3 ms·
I've read stories about old games on constrained systems, where the solution to limited space was to design a special byte code which would be much more compact
by rhn_mk1 5y ago
I've read stories about old games on constrained systems, where the solution to limited space was to design a special byte code which would be much more compact than native code. I think one of the examples was Another World, maybe ScummVM.
The idea sounds like it could be still relevant for microcontrollers, AVRs can have <2KiB program space.
Are there any good resources that discuss the design of the "mini-languages" composed of byte codes and interpreters?
- andrewchambers 5y agoWell, a (more) compact bytecode representation is one of the design decisions made for web assembly... That is one reason why it is a stack machine.
- lou1306 5y agoJust to be pedantic, ScummVM is a re-implementation of the original SCUMM, which totally was an instance of this approach. There is a (crazy long) Youtube video [1] where they take a peek at the SCUMM code for the first Monkey Island, and hack it almost on the fly. Pretty good for a 1990 game. Of course, Infocom's Z-machine may be an even earlier example. [1] https://www.youtube.com/watch?v=ikaqus5_QIg https://www.youtube.com/watch?v=ikaqus5_QIg (the relevant bit starts at around 3:09:30)
- chrisseaton 5y agoBytecode in practice is almost always more compact than corresponding machine code.