Fantasy consoles and other minimalist virtual machines

I don’t currently have any plans to adopt one for a project, but I find the “fantasy console” concept compelling mainly because of the implications for portability and preservation. And while I don’t buy the romanticized idea that constraints always breed good art, the memory and performance limitations are at least interesting constraints.

If you click “fantasy console” on tinytools.directory then you can find a bunch of these — which is great, lots of options for people with different tastes. The only ones I have passing familiarity with are PICO-8 and uxn. PICO-8 is a little too low-res for me, and I admire uxn’s stated purpose to upcycle old hardware but I don’t have the patience for writing assembly.

If I were to describe my ideal fantasy console, here are the traits:

  • Familiarity: language reasonably resembles a normal-person high-level language like JavaScript. At worst, Lisp.
  • Open: entire stack has a permissive license.
  • Graphics: not too low-res or monochrome, something like 1024x768 and should be able to display a nice rainbow. Something that doesn’t require every game to use pixel art. 90’s CD-ROM game jagged edges with no antialiasing, now that’s the good stuff. If it’s possible to pull all that off without needing much in the way of GPU acceleration, perfect.
  • Audio: if I can store and play back a few minutes of stereo 44.1k/16 PCM audio files and layer 2-3 of them, I’ll be fine.
  • Minimalism: the runtime VM (not necessarily the language’s compiler) should be easy to write an emulator for if you have a graphics and audio API. This is in direct tension with my other preferences, especially having a nicer language.

Anyone here had experiences with these? Thoughts, comments, concerns, favorite tools?

something i would really love to see one day is something like https://wasm4.org/ - but a more robust api capable of making basically whatever type of game. i know a lot of people really love what you can do with them but sometimes i just want to make assets on my own, use the tools i already like, and have an engine that can load up whatever i need and build a game with, which is what turns me away from things like pico-8

The idea of having a webassembly runtime hooked up to things like graphics + sound + input, and letting people load in compiled wasm like a ‘game cart’ honestly kind of feels more like console development than even things like pico-8 (and even has been proven to be useful for porting onto modern consoles). it also gives you a ton of freedom to test out a ton of different languages, basically anything that can compile to wasm could produce a cartridge, which i think would spur a pretty interesting development community in and of its self. its something i’ve considered as being possible within vibbit, but way too early to make it a stated goal, and in fact i think it would need to just be its own project on top of vibbit to really get the ‘fantasy console’ vibe/api correct.

i worked with PICO-8 and uxn in the past,
PICO-8 is fun (especially for modding, all games being source available by default),
uxn i appreciate its architectural design a lot but i very much dislike its rendering pipeline

not listed, TIC-80 is really good and open source (the large array of programming language is very appreciated), i enjoyed writing games for it in Squirrel in the past

the project that is the closest to “the dream” in the current landscape might be HashLink, very cool project that shipped multiple commercial titles, but it “only” has a haxe compiler as of now. i don’t know it’s bytecode format, but it should (could?) very well be possible to compile other languages to it

what you are asking for is very close to the JVM too

in the past some games (including one of the quake?) compiled C to bytecode and executed in a way akin to the JVM, i think that’s really cool and a bit disappointing it didn’t continue in that direction

there is some projects to run compiled RISC-V bytecode and interpret it at runtime (which could be arguably less “bloated” than WASM), there would still need something to be built around it

honestly i should just mess with haxe in general, i dont terribly mind the syntax and i know its like… basically the hidden gem indie games lang. though i think if i did id be starting something new like vibbit with it - i’ve checked things out and kha is not exactly ergonomic sounding to use. it has rust-esque enums and honestly a lot of good language features though

tic-80 is definitely much more widely capable than pico8 - ive seen a few people who make their entire dev cycle with it