I’ve been playing some of the old Scott Adams games recently, and it occurred to me that the ultra-terse, puzzle-heavy style could be nice for “mini-adventure” games on mobile devices. But typing on mobile devices is not nice, so I’ve started working on a parserless system that otherwise mimics the feel of those games:
(This is a web page for now, but it will be possible to compile games made this way into mobile apps using cordova or something.)
The game data is defined in a JSON object, for easy stashing in variables or localStorage when I implement undo and save/restore. Currently you can see a version of this at work when the game ends (either bring the ruby to the trophy case and STASH it, or go down the tunnel with no light and get eaten by a grue) and you’re able to restart it.
An excerpt of game data showing an item:
lantern: {
description: "brass lantern",
portable: true,
active_verbs: [],
location: 'house',
after: {
take: 'set_lantern_verbs' // name of a function that gets called after "take lantern"
}
},
Items have an active_verbs array that changes depending on context - for example, when you pick the lantern up, you’re able to DROP or LIGHT it, and when it’s lit you can UNLIGHT it. The available verbs show up as clickable words next to the item listing.
I’m not sure about the layout - there are three main bits of display: the room description, the hero’s inventory, and a pseudo-terminal bit that prints the commands as if you’d typed them ("> TAKE LANTERN") and the game’s responses.