First, this is what is possible now in my latest development build:
What you can see in the video is a maze and how the blue bot is navigating the maze executing the program on the right which consists of 18 instructions, forming the program that executes the left-hand-rule, that can be used to navigate flat mazes. This was possible before these new instructions, but it was complicated and extremely slow since it would have needed more instructions and each instruction would take one turn - something you can see in the video not being the case, thanks to the
But lets have a look:
The top-left instruction with the flash enables the turbo mode. That means that the bot will execute up to 16 instructions within one step that are not making the bot or anything else move. I fondly remember the turbo button on my first PC, which I can't find a picture for, but the wikipedia article has this photo, which explains sufficiently well what I have in mind:
So what happens in 8-bitBot when turbo is active is, that instructions such as function calls, gotos and return instructions (so instructions that don't make things move) are executed until an instruction is hit that waits (no instruction or NOP) or makes the bot or a box move. This decreases the number of cycles in this maze from over 300 to under 68! But it does make debugging harder, so disabling turbo is useful to understand what is going on.
Since turbo is skipping steps, it changes the duration of executing the programs, which changes the duration how long bots need to do complex tasks. This means that the programs run differently. I first considered a "smart" fast playback that would detect if there is any movement in the scene and if no, it skips that step, but that felt less intuitive; a bot pauses its motion because a box in a different part of the level is moving?
Making it an instruction solves the problem described above and furthermore, I can naturally introduce it in puzzles where it matters - or make it part of a puzzle! Like when you have only one turbo instruction but 3 bots that run in their own program slots.
The sensor-read instruction used to only check if the path ahead is blocked. That made it simple, but for the left-hand maze algorithm, it is more useful to be able to check other directions. Enter the sensor configuration dialog:
So now it is possible to check multiple directions at the same time. The "center" check is currently having a special function to check if the bot has arrived at its target, but I think I will add an option to check for different things, like if a path is blocked, a box is waiting, a target position is on that spot, etc.
When I began working on 8-bitBot, I decided to keep things as minimal as possible. That also meant: Instructions are only 8-bits wide. 256 different possibilities sound much, but the configuration for the path sensor above means 5 bits are already spent on flagging the directions to check. Just last week, I had only 16 major instruction types (4 bit) and 4 bits could be used to "configure" the instruction. For the goto instruction, that meant that the all 4 bits were used for the jump target. No spare bits left to store any additional data!
The goto instruction can now be configured to be a relative jump:
There are quite a few more changes and I am not yet done with these modifications. By making the instructions more versatile, I can pack some of the complexity from the board into the instructions themselves, which I think is good, because a crowded board with many simple instructions is more difficult to understand than having fewer instructions that have more configuration options.
Much! But this post is long enough. I am working full steam on getting the demo version ready so I can release it next week here on Steam!
I am quite disappointed that 8-bitBot was rejected for the Programming Fest; my original intent was to have the demo ready for the Programming Fest. But for some reason, my game did not fit Steam's criteria for the fest. My appeal failed and I don't know what went wrong.
I try to not let this demotivate me! 8-bitBot is still getting released (at least the Demo version)! And hopefully, the full release is something I can manage to get done within the next 3 to 6 months too.