Robot Overlord: Robot Scratch
Since the last update
I’ve been fleshing out the undo/redo system.
I made every button and menu item into an Action, which encapsulates both the visible thing that is activated by the user and the behavior once it is activated. This way I can move Actions around the GUI to improve the layout with ease. Each Action issues a Command pattern, which forms the Undo/Redo stack. Actions also pass along their label name. So changing a position shows as “undo change position” instead of “undo change vector3f”. It obviously easier to understand.
Most Actions are variations of the same thing, so I made an ActionSelectFile, ActionSelectString, ActionSelectNumber, and ActionSelectVector3f. All robots are being updated to the new standard so that they look and behave uniformly. So… that’s nice.
What’s next: Robot Scratch
All that work was important and useful and Good… but also escapism. I’ve been dreading the next step for a while because it requires major skills and I’m not sure I’m up to the task. I get to the point: To program each robot in a human-friendly way I can see no better option than Scratch. Programming – as a discipline – sucks. I should know! I’ve been a programmer for 25 years. I’m 10 years past the average coder’s half-life.
Anything to make coding more intuitive and less error-prone is a good thing. The easiest thing to fix in programming is to remove syntax errors, which Scratch does with such grace… it’s poetic.
Critique my method
My theory is to make every robot run a RobotProgram which has a Events, Control, Sensing, Operators, and More blocks like Scratch. Move a robot to point X (which is an Entity in the world), wait for signal Y, send signal Z, Loop, Branch…. it a lot of work.Is there a faster way to get what I want?
Asked on Scratch forums, too.
https://scratch.mit.edu/discuss/topic/213147/?page=1#post-2147190
So I’ve run this up the flag pole. Now to give it a day or three to see if anyone salutes while I work on my other prototypes.