diff options
Diffstat (limited to 'crates/elfmind/notes.org')
| -rw-r--r-- | crates/elfmind/notes.org | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/crates/elfmind/notes.org b/crates/elfmind/notes.org new file mode 100644 index 0000000..bab8e1e --- /dev/null +++ b/crates/elfmind/notes.org @@ -0,0 +1,58 @@ +* game structure +** the world +the world is a directed graph, along with a set of flags +each node in the world-graph can contain characters, items, and gadgets. +each edge can optionally be "locked", which makes it inaccessible to a character unless they hold a certain item +each edge can optionally be "closed", which makes it inaccessible to all characters unless a certain world flag is set +** items +an item is something that can be held and traded by characters and picked up from the world +items are an index into an array of item definitions +item definitions hold data about the item (name, flags, etc.) +items can be held by characters or by world nodes +the game starts off pre-populated with items in certain character inventories and world nodes +new items can be created during gameplay (e.g. by activating gadgets) +** gadgets +a gadget is a "machine" that exists in a certain world node +interacting with a gadget first can several gadget-specific validity conditions (is a world flag set, is a character flag set on the interacting character, does the character possess an item), and then has an effect +this effect can be: + - setting a world flag + - setting a character flag + - placing an item in a world node + - placing an item in the interacting character's inventory + - give a character a piece of knowledge +** time +the game proceeds in discrete units of time +then, time proceeds in a series of "dances". +every dance ends with each character (optionally) pairing off with another to dance. +during this dance, the two characters exchange some items or knowledge based on their opinion of each other. +then, for each character in a predetermined order: + - the character's state changes based on their knowledge and desires: they move around the world, potentially picking up items and interacting with certain gadgets +the human player always acts last in this order - they still take actions in the same way, but they get to walk freely around the 3d world to do so, and they can trade and chat with the other characters freely +** knowledge +knowledge is an assertion about the state of the game. +this is represented as a datalog-like fact or rule +knowledge can additionally have zero or more provenance entries +a provenance entry is a character, mask, or the special entries LOGIC and GUESS +provenance represents on whose authority the statement was made - who does this character need to trust to trust that this statement is true? +GUESS represents a private inference - elves cannot lie, so an NPC will only share knowledge if it is not a GUESS +LOGIC represents something that the character knows 100% to be truthful - something they witnessed themself +examples: + - PIG: wears-mask(Character::Bombieri, Mask::Dragon) :- time-is(Time::2) + this fact asserts that the character Bombieri is/was wearing the dragon mask at time 2, and that this knowledge came from the character wearing the pig mask + - LOGIC: swore-oath(Character::Human, Oath::Kill(Mask::Horse)) + this fact asserts that the human player has sworn an oath to kill the character in the horse mask, and + that this character witnessed them swear that oath + - can-reach(C: Character, Location::Ballroom) :- has-item(C: Character, Item::BallroomKey) + this rule asserts that any character C can reach the ballroom if that same character has the ballroom key item, and that this is known implicitly without trusting any other character +new facts can be derived from the knowledge base by applying rules to facts +certain pieces of knowledge may be contradictory - each turn some special queries are made to the database to check if multiple conflicting facts exist, and then the conflicting facts are examined +the conflicting facts considered based on the character's desires and opinions, and only the most "trustworthy" is kept (where "trustworthiness" is character-specific) +the character's opinions, desires, and knowledge are updated based on the conflicting facts (e.g. if two conflicting facts with different provenances exist, one of the characters involved must be a liar) +** characters +a character is an actor that: + - can move around the world + - can hold items + - can interact with gadgets + - has knowledge of the world + - has opinions about the other characters + - has desires |
