A Dino addon.
---
An in-memory game-state database.
Supports booking data from packedScenes and registering data from a nodes' _ready() function at runtime.
Will soon persist and pull saved-state data in at Hotel.register(self) time.
Built up with check_in/check_out as write/read function names.
---
Hotel was originally a Room manager, but it has grown into a full game state db.
It supports 'booking' data based on your static scenes, 'registering' nodes with the hotel when a node is _ready(), and 'checking-in' data as in-game events happen.
The main feature supports reloading zones and rooms that have already been visited, and restoring the state from the player's last visit. Ex: was this candle lit? What was this enemies health? Was this item already found?
Hotel as a UI view that can be used to access game data in a debug overlay or in the Godot editor.
Pulling data from your static files makes it simple to connect nodes together - the initial use-case for this was making it possible for teleporters (elevators) in different rooms/zones to reference eachother as a destination.
Hotel exposes a useful
Hotel.query({})
function as well, which supports several
basic keys (e.g.
groups
,
is_player
) and a general
"filter"
key for fetching whatever data you
need.
Hotel also offers a signal for all data
check_ins
, which
provides a nice separation of concerns for updating the HUD or
sending out notifications based on changed data.
Related but not yet implemented: I hope to get to hotel themes soon, which is a step back toward the room management idea, but with a focus on data-driven or constraint-based look and feel (i.e. constraint-based room design ).
I love rooms (game design element) as a unit of game design and iteration. A rooms api should support that.
Dino has seen a few different rooms api approaches already. The Runner Room code managed cycling rooms ahead of the player so they could be revisited. In Tower Jet, the Reptile Room was built up to generate (and regenerate) the tiles based on noise images. Then, Mvania / Hatbot featured a fuller room and area management, including room data lifecycle via hotel and pausing/unpausing the rooms based on the player location.
Games, especially dungeon crawlers, lend themselves to talking about Rooms.
Rooms have treasures, keys, locked doors, enemies, bosses, etc.
Rooms have puzzles, shapes.
Rooms have look and feel, weather, traps.
All kinds of fun!
--
hotel (dino plugin) for room management. hotel themes for composable room decoration.
--
leaf runner (dino game) and its runner-room api.
Related, and probably stored in Hotel.
Likely part of the rooms api.
An attempt to capture the core of a constraint-based room design tool.