A good friend of mine was tasked with developing a small game engine to prove to a professor that he could skip class. When he told me what he was working on I was immediately inspired to write my one version. So I started hacking some python code together and with no real goal on what I wanted to achieve the project naturally grew in complexity and unreliability. Bugs were everywhere.. But at the same time it also kind of awesomely worked.. somehow. After a couple of hours I took a break and then forgot about it altogether.
At the time of development I was learning about ASM and how CPUs work. This newly gained knowledge is clearly visible in some of the design choices I made. In a way, part of the flexibility comes directly from the idea to have things like "system calls", a "stack" and "instructions". The concept was taken so far that one could joke about the programming language or interpreter that was created.
There are scope like structures with function like behaviour and a lot of other intriguingly strange and at times irritating designs.
This project was rescued from an old backup I recently found. It was not developed using any best practices and needed a bit of a brush up. Although having been a lot of fun going through old code I have no plans on fixing any further bus or extending on any functionalities. This project was archived for future reference.
To run the provided demo:
python z.py demo.z
To see what is happening under the hood:
python z.py demo.z debug
Try out the following commands:
help
_write hello_world
_write $ inventory
_data append inventory ticket
_data set _debug true