I’ve also developed a new Text Adventure engine!
Is this the right place to talk about it? I’d really like to get some feedback - hopefully people would like to try it out?
In my system your game is authored entirely in XML but the engine has a lot of features, not necessarily unique but I think from an authoring point of view it’s a lot simpler than many sophisticated engines as you really don’t need to know programming - especially JavaScript!
Here’s a brief rundown of some of the features:
Everything is declarative XML.rooms, items, tasks, events, Npc definitions and event the verbs themselves!
Full(ish) sentence parsing with verb, noun (both action and target) + adjective recognition with prepositions.
Adverbs also handled so you can augment verbs to behave in a different way according to an adverb. Think LOOK or LOOK UP (a IN b). This is configurable.
Rooms and Room Exits, full map definition with 8 standard compass direction plus UP and DOWN. The author can expand to more directions if they want or add other verbs such as CLIMB by editing the the engine definition game.xml file.
Also Npc names, time strings and quoted text. WAIT UNTIL 19:27, GIVE MONEY TO THE GUARD stuff like that is fully supported.
So yes, there a world clock which is configurable as to hours per day. Tasks and movement take definable amounts of time. Granularity is minutes. Days aren’t distinguished but time intervals know about midnight.
Items, which may be weapons, consumable (usable), containers or virtual objects like information.
Items can be traded with a trading enabled Npc.
Events (Room, events, Universal, onTake, onExamine, item state change, all sorts of things). Events have conditions and world consequences which can affect just about every game object.
also event can be fired in the future either X minutes or at a specific time.
Tasks (triggered from sentences) → basically trigger an event with conditions and consequences (either run an event directly or inline the event into the task with conditions and consequences).
Npc State machines.
Autonomous Npc Patrols - Npcs will drop out of Autonomous mode on encountering the player and drop back once the player has left).
Npc Combat (from task or ATTACK verb) and through states directly.
Npc have their own inventory and can steal stuff from you.
Npc state actions are also like the conditions and consequences, and can do all the same things. Conditions branch as you’d expect to a different Npc state,
Npcs can ask questions too and expect you to make a choice then branch depending on the answer.
Npc proximity alerts: The engine calculates real-time compass directions relative to the player, dynamically mapping placeholders in text you define (e.g., “You hear a market trader shouting his wares to the NORTHEAST”).
Systemic Trading: Implemented full market mechanics driven entirely by XML attribute-based tags. NPCs automatically evaluate item classifications (such as rare or damaged) to dynamically calculate price shifts and/or swap interventions. You can buy, sell, swap or show items to a trader.
The engine is fully internationalizable - the dictionary is defined by the items available (items.xml). Verbs are definable too - mapped to pre-defined verb handlers (hopefully eventually they’ll be completely pluggable) but any new verb you need can be mapped to the task handling system so almost anything you need can be handled that way.
All prepositions and adverbs are attached to the verb and so can be redefined along side it.
Decoupled Environmental Renderers: Solves the “darkness problem” via automatic global rules.
Instead of scripting visibility for individual spaces, you get a clean and simple way of changing the text engine behind the scenes automatically when say, a torch is toggled using tag based room renderers.
There’s a hundred things I’ve missed I’m sure as I’ve been working on this for a little while.
I can point you guys to some docs - I don’t have a Wiki page yet, it’s just on Git as a library and there’s a Libre Office doc file there which covers some of the above in vastly more detail. A full Wiki seems like I’m getting a bit ahead of myself…
There’s loads of stuff it can do - I’m developing an adventure alongside it and that’s acting as my primary source of what the engine needs to do so everything is still very much still in development although what’s there now is certainly stable.
If you’d like to know more I can point you to my git hub and you can download a playable demo and the libraries plus the documentation as it stands. The docs are not really complete - I’m getting to the point where I could actually use a bit of help to be honest.