Author Topic: What if MG added a "live programming" feature?  (Read 1429 times)

mathusummut

  • Initiate
  • Posts: 3
  • Loading...99%
    • View Profile
    • Glest
What if MG added a "live programming" feature?
« on: 13 February 2016, 13:28:10 »
I just had an idea:

What if MG added a "live programming" feature and you could write in-game code like: "gold>200 tent1 stickman" (which is self explanatory)?
You would be able to edit/remove the in-game code in a side-window or bottom window.

Or: "gold>200 tent2 stickman castle1 worker" would mean the first time the gold is greater than 200, a stickman is produced by tent with ID 2, the second time gold is greater than 200, a worker is produced by castle ID 1, and then it alternates.

This is just for the purpose of allowing a certain level of automation to alleviate some of the production stress that comes with late-game when resource acquisition is at an alarming rate.

Also, in order for this feature to work correctly, all units have to be numbered with the ID shown, and the unit selection limit should be removed in order to facilitate the command-giving process for large numbers of units that can come with automation.

Any thoughts?
« Last Edit: 13 February 2016, 17:34:21 by mathusummut »
"What is infinite has no limit." - Tautology

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: What if MG added a "live programming" feature?
« Reply #1 on: 14 February 2016, 07:27:46 »
This is best done with a Lua console. GAE had such a feature implemented, which goes to show the effectiveness of such approach. It would let you do all the things you listed and more. Although it's a bit more verbose and there never was a good way to select units programmatically (which probably wouldn't be hard to extend -- IIRC, all that would be needed would be a way to figure out the IDs of units).
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

mathusummut

  • Initiate
  • Posts: 3
  • Loading...99%
    • View Profile
    • Glest
Re: What if MG added a "live programming" feature?
« Reply #2 on: 14 February 2016, 11:27:26 »
To add unit IDs I suggest simply showing their index by the name at the right, I don't think that would be a problem if the units are stored in an array (aren't they?). An "apply" button would be required, a key shortcut could be added to click it.

Also, what if the game AI was reprogrammed using this live-programming feature? I think it would be badass :P
"What is infinite has no limit." - Tautology

 

anything