Anuken / Mindustry-Suggestions

Repository for Mindustry suggestions and feedback
130 stars 58 forks source link

Logic Rework #4411

Closed Maxi-9 closed 1 year ago

Maxi-9 commented 1 year ago

Describe the content or mechanics you are proposing.

This game is so close to being really good. But some systems need polish. Such as the logic system, it is missing the ability to create complex "code" right now it doesn't feel very useable(at least to me) maybe I am missing something but I have a few suggestions(Click to expand):

Suggestions (Click Me) - Create a logic section with: if, while, for(not needed really if you have while), for each(like: for each unit) and with these a area to put sub commands(see Concepts below) - And with the if block, you could add a button that allows the user to add things like else or else if to the already existing if block. - Create a help button, with syntax for description on how to use @ stuff and other information needed when creating logic. Because the game doesn't really specify what that stuff means. - Have units be able to "patrol" an area or a point or even between multiple points(either logically or by like middle clicking on a spot while selecting a unit), where it would target any enemy that comes within range and keeps attacking and following the enemy even if it goes out of patrol range. - This would be very difficult and would require a complete over haul but it maybe be worth it: having individual blocks that drag and drop code editor(like the kid editor: scratch): So you wouldn't need to create variables and would be better for mathematical operations, the And, Not, and Or would be very helpful: ![Screenshot 2023-04-28 at 8 20 52 PM](https://user-images.githubusercontent.com/80234680/235281247-a30455d2-417c-463d-b99f-1ccd1eac33a4.png)
Concept (Click Me) (I just created some concepts, just note that these are photoshopped) If: ![ifLogic](https://user-images.githubusercontent.com/80234680/235264180-5132d936-da96-47e4-87e7-1afb502b051e.jpg) If Else: ![IfElseLogic](https://user-images.githubusercontent.com/80234680/235264098-d97daf17-3aab-4f71-8879-579972bc4058.jpg) While: ![WhileLogic](https://user-images.githubusercontent.com/80234680/235264780-4e2c801f-c070-4b7a-9c07-cf3884ad0e35.jpg) For each: ![ForEachLogic](https://user-images.githubusercontent.com/80234680/235281532-5706c634-ecb8-4b05-b64c-83886b07dfcf.jpeg)

Not related side note: M1 build?(I know it is in the README.md to not ask for it but: there should be a way to target darwin-arm64 (without having an M1 Mac). I googled it and there is like no information about targeting darwin-arm64 on other platforms :(. But I was able to build it and run it natively on my M1 without an issue.



Describe how you think this content will improve the game. If you're proposing new content, mention how it may add more gameplay options or how it will fill a new niche.

These suggestions would make it much more user friendly and would fill in any gaps in the logic system. I know this is a very large request but this would make logic almost perfect(in my opinion). I tried to see if it was possible or even try to work on it, but I could find a place to start in your code, I would like to make a prototype: where would I be able to start? It maybe just for me but your code seems a bit overcomplicated/overkill but that seems to allow it to be more expandable.

Thanks for your time! I think that Mindustry could be/is an amazing game and that it can only get better from here.



Before making this issue, check the boxes below to confirm that you have acknowledged them.

SkyeTheFoxyFox commented 1 year ago

My take as a logic user:

  1. the behavior of if, while, and for, are really quite easy to implement with jumps, so i really don't see why it's needed.
  2. same thing, if and if else are easy to implement already.
  3. the game does explain what all the instructions do, but i do agree that some in game documentation on the global variables would be nice for new users.
  4. that seems like more of a command mode suggestion, not a logic one. and that behavior can be recreated with mlog already.
  5. that's far too much to change, and would likely break so much, but if you want a scratch like experience a nice community member made a website for that. https://mlog.reheatedcake.io/

Also, your concept just seems like it would make the logic gui even more cluttered for no real reason.

github-actions[bot] commented 1 year ago

This suggestion is now stale, and will be automatically closed.