Progress
This morning I implemented a simple stack-based programming language (similar to Postscript/Forth) to control my robot. To move the robot 100 pixels to the right, for example, you could write the program:
100 0 MOVE
My idea is to allow the robot to capture tokens in the maze, and push them into its stack. The input will be limited in size, so you could write the following program:
100 0 MOVE 100 MOVE
The robot starts moving to the left (100 0 MOVE), so that the input is now:
100 MOVE
This is not enough for the robot to move, since the stack is now empty. But if the robot passed over a 100, it would be added to the stack, allowing the intruction 100 100 MOVE to be run.
I hope I can finish this basic physics today, and focus on some levels tomorrow. Then art on friday and finish it on saturday! :)
(log in to comment) @kfields I always wanted to learn Postscript, so I thought this would be a nice opportunity — besides, it's not like I'm running short on time! ;)
I loved the tiles you used on your game, BTW.
Comments
I write it by hand.
But now, many people use xsl-fo and svg.
apache team write a free xslfo engine.it is name 'Apache-FOP'
I still think it also might be useful for places where you don't need a Lisp, Python or Lua interpreter. If people gag on the postfix expressions you can always write an infix to postfix translator!
kfields on 2008/04/02 15:34:
Sweet. I'm working on a Postscript-ish language myself called Functor.The plan is to use it as a mini scripting language inside of a rule engine. Peace!