Open jbheard opened 3 years ago
Some more thoughts on this; the parsing language could have simple rules:
GameContext.destroy(obj)
is called as destroy obj
With these 2 rules in place the language becomes similar to assembly, and is exceedingly simple to write an interpreter for.
* Or at least something like a scripting language
I doubt this project will ever grow large enough to warrant using an entire language for it (I hope I'm wrong), so we likely don't need anything like Lua, or letting game devs write their own python. But I think it is necessary to have some kind of customizable behavior to make the engine effective.
Some of this is already in the docs for items, but this will also be a necessity for
Room
objects since something happens when a player makes a choice.For example, suppose your room has the option
Pick up potion
. The game dev needs some way to add a potion to the user's inventory, and then remove that option from the room.Something a bit more complex is using variables. For example, the user wants to keep track of how many times a player has visited a specific room. Variables could be represented as
GameObjects
, but we need some kind of typing system (unless all variables are integers? strings would get messy, and floats can probably be avoided).