News for hackers. Stuff that matters.
Re:Roll your own minilanguages with mini-interpreters (1989) by t0mek on Tuesday July 06, 2021 @03:33AM (#27745204)
"Another World", the game, is an interesting example of this approach. It's implemented in a mini-VM, with 29 opcodes - apart from the low-level "mov", "call", "ret", etc. there are high-level ones too, like "fill fb" or "draw txt". The VM design was closely related to the art style of the game, based on polygons, not bitmaps.

With this approach it was fairly easy to port the game to various platforms. "Only" the VM implementation had to be ported, while the bytecode remains the same. Of course, the VM implementation had to be tied to the graphics and sound subsystems of the target platform.

There's a super-interesting series of blog posts, starting with [1], describing the "Another World" internals and also the design of all the platforms to which it was ported: Amiga, Atari ST, PC, Genesis, SNES and GBA.

[1] https://fabiensanglard.net/another_world_polygons/index.html

Re:Roll your own minilanguages with mini-interpreters (1989) by exlurker on Tuesday July 06, 2021 @11:42AM (#27750033)
You might be interested to know that Another World was not Eric Chahi's first game to implement a VM. Infernal Runner (Amstrad CPC, 1985) was recently reverse-engineered to be playable in the browser. Some details and source: https://github.com/cyxx/infernal_js
Re:Roll your own minilanguages with mini-interpreters (1989) by 7thaccount on Tuesday July 06, 2021 @07:23AM (#27746880)
I've never played it, but apparently it's being ported to the Zx Spectrum Next and the C64, which are supposedly herculean efforts due to the limitations on those machines
Re:Roll your own minilanguages with mini-interpreters (1989) by pjc50 on Tuesday July 06, 2021 @02:24PM (#27752405)
Another famous example: adventure games using z-machine (Infocom), and later SCUMM.