The more I think about it, the more it is like a shadowy flight into the world of a console that never existed. I want to define a “cartridge” format that is very high level, and then an emulator which handles the nuts and bolts of the structures and operations defined by the cartridge.
For most of my initial cases, I don’t need anything too fancy. However, I can picture having a general purpose emulator that isn’t very optimized, and uses TypeScript as an intermediate step so that we can reject cartridges that don’t compile. There could then also be a high-performance emulator, if we need something faster for production, that goes directly to Lua, much the same way that you can just write plain JavaScript that is identical to the eventual output of TypeScript. Then you have the problem of making sure the two implementations “work” the same, which hopefully can be alleviated with automated testing.
Two games I’m picturing off the bat:
Comango
Turn based grid, like Chess or Go. A short rule string defines the size of the board, scoring options (territory capture, pair capture, N-in-a-row, etc), end-of-game conditions, etc for each playthrough. “8PR” would be like Reversi, “19C” would be Go, and “15k5P” would be Gomoku. I think it would be fun to add combat and movement as options. Instead of playing a piece every turn, a turn could be used to move a piece one unit in any direction. Or perhaps a piece could attack an adjacent piece, and maybe a dice roll decides who wins and who is removed from the board.
NPC
RPG, could be text-based, 2.5D, open world 3D. At the start of the game, the player is an NPC minding their own business in their idyllic fantasy town. Suddenly, the Hero has a massive battle with the Villain in the middle of the town square. Reaching a stalemate, the two opposing forces slink back to their respective camps in tatters, and your town is all but destroyed. The other townspeople start rebuilding, and this time they’ll find a way to keep the battle on the outskirts. At the same time, the Hero and Villain are rebuilding their armies, and if they become ready before you’re done rebuilding, they will destroy your town once and for all. As an NPC, you can’t do much directly, but if there is one thing you’re good at, it’s having powerful items you can’t equip in your inventory that you give to a Hero or Villain as a reward for fulfilling a quest. So put that exclamation point over your head and get ready to hand out some missions. Act 1 as an Inkle script