Thank you for the examples! I will have a look at them when doing more graphics.
Currently I am implementing a small VM to make the game scriptable. I started implementing it in Python to see if it will work and to be able to do some tests on my computer. The scripting language will be something influenced by BASIC and some Pascal. I choose BASIC as it is relatively easy.
The idea is to have a small compiler on your computer which translates the script into byte code which can be executed on the VM on the Gamebuino. There is support for some stack (16 level -> 32 byte?, not defined yet) and 26 variables named "A" to "Z" to have some "external" storage (which will be inculded in a savegame).
The main instructions are implemented in the Python VM and it runs fine. I started porting it to the Gamebuino but I'm not finished yet. Some special instructions to interface with the game engine are missing and will be implemented later.
I'm currently working on the compiler also written in Python as it will never run on the Gamebuino. As it would probably last even longer if I try to create a parser, I decided to use a parsing library. It does a pretty good job and I can concentrate on generating an AST for now.
Some technical details about the VM:
As I am too lazy to get into register allocation algorithms, I decided to build a stack based VM. So everything is done on the stack. The byte code will be read from the SD card filling a 256 byte buffer. The VM reads its instructions from there and executes them. As the access to the SD is read-only the architecture of the VM is a Harvard architecture not being able to modify the program it is executing. Addresses will be identified by a 16 bit unsigned integer limiting the address space for any script to 64k.
The memory consumption of the VM (on the GB) is currently about 340 bytes + some implementation dependent things like a stack pointer, program pointer, ...
It will take me a while to finish the compiler. It's my first try to build a compiler but as I wanted to build one for quite some time I already read some information about compiler construction. However, there won't be many updates to Thordar in the next time.