Narrative Logic and Data Structures
For the past few weeks I've been considering Conversation Trees and game logic control. I think I've had an interesting epiphany.
For those not in the know, a Conversation Tree (also known as a Dialog Tree) is how talking to a non-player character (or NPC) is often handled in video games. For example, you talk to someone and the game presents you with a list of things you could say to them, then the conversation branches out from there, with each choice often going down a different path. This is an old, tried-and-true technique in games to allow player choice.
At it's core, this boils down to a simplistic state machine (I'll not get into that in this post; search the internet for Finite State Machines if you want to know more) that represents the player's relationship with an NPC. In some games, the NPC's behavior in the game can be affected by conversations with them.
Now for my epiphany: why not handle the narrative of a game with much the same technique? So, a conversation tree becomes a Narrative Tree and the narrative becomes a state machine that determines current events. The Narrative Tree represents all of the things that can happen in the game. As the player makes a choice, it redirects the narrative down a new path, possibly blocking other options from working in the future. Depending on the game's design, NPCs could easily be setup to affect the state of the narrative.
So, in the end, the narrative of the game becomes a set of state machines for everything that can affect the narrative, such as each unique location, NPCs and the player.
Additionally, game menus could easily be handled with the same data structures. It's all just a matter of what code is triggered as a result of each choice.
Get Big Block Engine
Big Block Engine
2D block-based mod-friendly sandbox game/game engine
Status | In development |
Category | Tool |
Author | simulatoralive |
Tags | blocks, Game engine, Moddable, Physics, Pixel Art, Sandbox |
Languages | English |
More posts
- Sandboxing Java Code, a Modern ApproachFeb 22, 2023
- Logic Components (0.27.0 Alpha)Feb 10, 2023
- Parallel Block-Based PhysicsOct 19, 2020
- GUI Overhaul (0.26.1-3 Alpha)Oct 11, 2020
- Placing Painted Blocks (0.26.0 Alpha)Sep 26, 2020
- General UI Improvements (0.25.1 Alpha)Sep 19, 2020
- Better Error Reporting (0.25.0 Alpha)Sep 11, 2020
- Better Exit Cleanup (0.24.0 Alpha)Sep 01, 2020
- Fix for Floating Actors (0.23.2 Alpha)Jun 28, 2020
- Actor Physics Fixes (0.23.1 Alpha)Jun 27, 2020
Leave a comment
Log in with itch.io to leave a comment.