Technical Design Document
see also: FDD
foreword
this is for a 1 person programmer, maybe in the future more, but for now that is the constraint.
this doc describes one way that works; it is not the only way. When deviating, update this doc
(codebase in a few lines:
easy to read, safe to rewrite, honest about what it does.)
Content in Doc
- Technical Stack
- Project Layout
- Adding New Stuff
- CORE Programming Rules
- Rules for Documentation and Comments
- Game System Architecture
- Technical Specifications
Technical Stack
Godot 4.8, GDScript. Godot compatibility renderer(openGL), if more advanced features we use that then, not sooner.
Addons
- Dialogue Manager 4.2.0 - dialogue + choices :
DialogueManager(autoload) - Antzs Debug Menu 1.3.0 - debug :
DebugMenu(autoload) - Maaacks Game Template Addon 1.7.1 - level loading (
LevelManager)- Godot-UI-Sound-Controller 1.7.1 :
ProjectUISoundController(autoload) - Godot-Scene-Loader 1.7.1 :
SceneLoader(autoload) - Godot-Music-Controller 1.7.1 :
ProjectMusicController(autoload)
- Godot-UI-Sound-Controller 1.7.1 :
- phantom camera 0.11.0.4 - camera :
PhantomCameraManager(autoload) - sound manager 2.6.2 - sound :
SoundManager(autoload) - LimboConsole 0.8.0 - debug :
LimboConsole(autoload),DebugCommands(autoload) - Log.gd 0.2.2 - logging :
Log(static class, no autoload),GameLog(autoload) - SpacetimeDB Client SDK 0.3.3 - multiplayer
SpacetimeDB - GDScript Formatter 0.27.0 - tool (no autoload)
- health, hitboxes and hitscans 5.0.4 - future health? (no autoload)
- Godot State Charts 0.22.5 - movement states (no autoload)
- Script-IDE 2.2.5 - tool (no autoload)
- Plugin Updater 0.5.1 - tool (no autoload)
- Project Time Tracker 3.0.1 - tool (no autoload)
only GameLog, DebugCommands + Net autoloads are ours.
Server: see Multiplayer.
GameStateis static class, not autoload ->GameState.save()can be called from anywhere, order doesnt matter.LimboConsoleshould stay aboveGameLog+DebugCommands, bc those add their commands in_ready.
Project Layout
mindmap root((ROOT)) 📁 content/ items/ quests/ dialogue/ 📁 scripts/ autoload/ save/ components/ data/ entities/ ARCHIVE SCRIPTS/ 📁 scenes/ 📁 server/ 📁 The Amazing Art and Sound Folder/
Adding New Stuff
start here. most new stuff = file in content/ or small scene, not new code.
- item / quest =
.tresincontent/items//content/quests/, id = file name. renaming breaks saves. -> Game State and Level Management - thing you can touch (pickup, door, sign) =
interactable_thing_prefab.tscn, orNode3Dscene withInteractableThingon root. reach = itsArea3Dchild, none = sphere built in_ready(physics layer 5).persistent_id= stays gone after reload,requires_item/requires_flag+blocked_cue= locked.
- npc / dialogue =
InteractableThing+dialogue+dialogue_cue. 1.dialogueper character, objects inworld.dialogue. only callsPlayerApi. -> Other, Player API - remembering a choice = no code:
$> set_fact("choice.<what>")/set_level_flag("<level>.<what>"). key starts with who wrote it. -> Game State and Level Management - something dialogue cant do yet = 1 narrow method on
PlayerApi, no new global (rule 9). - place that heals or eats sanity =
SanityArea. -> Game State and Level Management - player ability = component extending
Componentin body scene, wired by body, talks through signals. -> Components - HUD widget = small scene in
scenes/game/hud/, finds player itself, add tohud.tscn. -> Other - level = scene in
scenes/game/levels/+ path inSceneListerfiles(game.tscn), also what consolelevellists. - saved field -> “new saved field” in Game State and Level Management.
- console command =
LimboConsole.register_commandinDebugCommands._ready, throughPlayerApi. -> Debug - log channel -> “new channel” in Debug.
CORE Programming Rules
GAME DEV CORE PROGRAMMING AND CODING PRINCIPLES
- main design pattern (but not only one present):
- godot flavored component-based architecture
- but its not perfect, consider this:
- components add complexity over simply making a class, and communication between components becomes more challenging.
- making everything components is stupid, some things can just be classes or such.
- over-application can be solved with the golden rule, everything in balance. even the rule itself. (applies to all rules)
- godot flavored component-based architecture
- if considering abstraction, also consider deletion or merging scripts into one.
- First of all trying to keep it simple, but secondly when adding complexity how much benefit is coming from that complexity?
- is this abstraction earning its keep?
- Fail loudly.
- A bad item ID should call
Log.error(prints file + line, then callspush_error). warnings useLog.warn. - Never continue silently.
- A bad item ID should call
- Clear, descriptive names over shortened or abbreviated names.
- Signals up, methods down.
- Event driven.
- react to signals, dont poll every frame when signal exists.
- small, composable scenes, not a framework layered on top.
- Separate machine-independent and machine-dependent code.
- Thats what makes the code hackable, not cleverness.
PlatformerMovementBase, with its abstract 2D and 3D functions, is example.
- Use narrow interfaces where change is expected.
PlayerApi(give_item,has_item,set_level_flag,set_fact, etc.) hides components, so you can rewrite them without touching dialogue files.
- Make code easy to grep.
- Use one class per file, name file after class, and use stable IDs (item ID is the file name).
- Write the minimum, Less code is a feature.
- Add a narrow interface only where you already expect change.
- if not necessary, make sure not to handroll our own logic, use godots inbuilt logic and functions and methods instead.
- AUDIT, REVIEW, REPEAT:
- make sure old code is up to date with current codebase/code conventions, design patterns could have changed, things evolve and change.
- make sure stuff doesnt get left behind
- GENERAL, keep code like:
- netbsd; easy to inspect, modify, and extend. and like
- openbsd; simple, clear, and consistent.
- suckless; Simpel, Clarity, frugality and small enough for one person to read and rewrite.
FUNCTION NAMING
- Descriptive names. Longer is good when clearer.
add()->add_inventory_item()
- Full words.
_read_move()->_get_movement_input()
- Name the actual behavior.
_find_closest()->_find_nearest_interactable()
- Add system/target/result when it clarifies.
get_ratio()->get_current_sanity_ratio()
- Readable at call site.
run(by)->execute_interaction_for_actor(actor)
- Related names consistent.
pause()->pause_sanity_drain(),unpause()->resume_sanity_drain()
- Context from class alone isnt always enough.
set_value()->set_current_sanity_value()
- No filler words.
get_frame()staysget_frame()when it returnsInputFrame.
- Rename declarations, overrides, call sites together.
- Preserve Godot-defined method names.
Rules for Documentation and Comments
GAME DEV DOCUMENTATION AND COMMENT PRINCIPLES
- Comment the surprising, not the obvious with inline comments.
- be direct and concise, skip the word “the” and “a” and apostrophes even if its less pretty (keeps things more direct)
- use symbols over words, even if less readable, see SYMBOLS
- Explain why, not what.
- Code shows what it does. Comments show reasoning, decisions, xor constraints.
- Code documents implementation; comments document intent.
- If intent changes, update comment.
- Dont duplicate code in comments.
- If a comment just restates code, delete it.
- Use two comment types, two jobs.
- Double-hash doc comments for public API docs (shown in editor and shown in class reference).
- Single-hash comments for inline implementation notes
API DOCS
Use double-hash doc comments for public functions, signals, @export variables, class_name, and modules. Doc comment must sit above the member it documents.
#= why.##= public API contract (shows in editor). Dont mix.- Document the contract: what it does, parameters, return values, and side effects.
- Link related symbols with
[member health],[method take_damage],[signal died]. (become clickable in editor.) - Add short usage example for non-trivial functions.
Example:
## Emitted when facing changes.
signal flipped(new_facing_x: float)
## Replaces save w/ file at [param path]. Returns false + changes ∅ when file ≠ save.
static func import_save(path: String) -> bool:INLINE COMMENTS
Use single-hash comments inside function bodies.
- Good: engine workarounds, ordering requirements, magic numbers, and warnings like “changing this breaks saves”.
- Write for future fixer and extender.
- Explain invariants, pitfalls, and non-obvious choices.
- Keep them short.
- Long explanations belong in API docs or this doc.
Example:
# own copy: height changes at runtime + scene shape resource is shared by every instance
_capsule = _capsule.duplicate()HYGIENE
- Fix code, not comments.
- Dont use comments to patch bad names or messy GDScript. Rewrite it.
- Update outdated doc comments.
- Editor hover and class reference will show stale docs. An incorrect comment is worse than no comment.
- Be consistent.
- inline
#: lowercase, no period at end, above code. - doc
##: capital letter, end with period. - class names + identifiers keep their case (
DirAccess,JSON,_ready).
- inline
SYMBOLS
Used in both # and ##. Not inside [code], [codeblock] or quoted strings.
| symbol | word | example |
|---|---|---|
+ | and | refills jumps + dashes |
/ | or, per | respawn/level change, one step /version |
∴ | so, therefore | leave cleanly ∴ server drops our row at once |
> | then | spawn remote if missing > apply |
∵ | because | read here ∵ addon reparents camera |
! | not | saved by id, !resource |
≠ | is not (between two things) | when file ≠ save |
≈ | about | ≈10 for default jump |
⚠ | warning | ## ⚠ Renaming key breaks saves. |
∅ | nothing, empty, none | Warns + saves ∅ w/o game state. |
w/ w/o | with, without | w/o game state |
>= <= | at least, at most | length <= 1 |
pitfalls:
- “or” meaning otherwise is not
/, use, else([NetSyncComponent], else motion stutters). - “one more than” is not
>, write count out (thresholds size + 1 entries). nullstaysnull, its GDScript value, not∅.
Game System Architecture
(architecture inspired by https://gameprogrammingpatterns.com and others i need to link)
Components (Extend Component, Wired by Body, Not Looked up Themselves)
graph TB subgraph Body["PlayerBody"] IC["InputComponent<br/>PlayerInputComponent"] FC["FacingComponent"] MC["Movement3DComponent"] AC["AnimationComponent"] IAC["InteractionComponent"] INV["InventoryComponent"] SC["SanityComponent"] SVC["SanityVisualsComponent"] NSC["NetSyncComponent"] end subgraph Bases["Bases + Data"] PMB["PlatformerMovementBase<br/>does actual movement"] MPROF["MovementProfile<br/>(tweak movement here)"] IF["InputFrame<br/>(1 frame of input)"] end IC -->|"builds each frame"| IF IF -->|"read once per physics frame"| MC IF -->|interact pressed?| IAC MC -.->|extends| PMB MPROF -->|speeds, jump height, ETC| MC MC -->|"jumped / landed / dashed / ground_motion_changed"| AC MC -->|"update_facing_from_input()"| FC FC -->|flipped| AC IAC -->|"interact_started / interact_ended<br/>(ignore input)"| MC IAC -->|"interact_started / interact_ended<br/>(pause drain)"| SC INV -->|"using item restores sanity,<br/>add_sanity()"| SC SC -->|zone_changed| SVC NSC -.->|"sends position + facing + animation<br/>(see Multiplayer)"| NET["Net"] click IC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/input_component.gd" _blank click FC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/facing_component.gd" _blank click MC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/movement_3d_component.gd" _blank click AC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/animation_component.gd" _blank click IAC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/interaction_component.gd" _blank click INV href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/inventory_component.gd" _blank click SC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/sanity_component.gd" _blank click SVC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/sanity_visuals_component.gd" _blank click PMB href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/components/platformer_movement_base.gd" _blank click MPROF href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/data/movement_profile.gd" _blank click IF href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/data/input_frame.gd" _blank
context; (what player actually does, see FDD)
- Input: read once per physics frame into an
InputFrame, andInputComponent.get_frame()hands everyone that same frame.PlayerInputComponentremembers presses + releases from input events, held buttons are polled.
- Movement: state chart decides which state is active (Ground/Air/WallSlide/Dash/Crouch).
PlatformerMovementBasedoes physics for that state + sendsStateEventsback to chart. - Facing: movement tells
FacingComponentwhere player is going withupdate_facing_from_input().FacingComponentemitsflipped(not movement).
- 3D player uses
AnimatedSprite3D(2D art on 3D plane). - Animation: names are constants in
Animations, and its all driven by movement + facing signals. - Interaction:
InteractionComponentruns the closestInteractableThingplayer is standing in zone of.- if that thing locks player it emits
interact_started/interact_ended, -> movement ignores input + sanity stops draining while its busy.
- if that thing locks player it emits
- Sanity:
SanityComponentkeeps value + zone. (codezone= sanity stage in GDD/FDD, not world zone)SanityVisualsComponentlistens tozone_changed, so the meter itself knows nothing about visuals.- per zone it greys, darkens + warps the screen (shader) and shakes the 3D camera. shake goes through
Camera3D.h_offset/v_offset, bc phantom camera owns the transform. at full sanity it stops processing, zone change wakes it.
Component Wiring
Two hooks run in order:
_on_readyruns insideNode._ready. Dependencies already set, but sibling_readys may not be._on_setupruns deferred (idle time after all_readys). Check dependencies here with_require_dependencies({ "label": value }), which collects every null into 1 error + returns true/false so component can bail out.
sequenceDiagram participant Engine participant Body as PlayerBody participant Comp as Component Engine->>Body: _enter_tree Body->>Comp: find + wire (set fields) Engine->>Comp: _ready -> _on_ready() Note over Comp: dependencies set,<br/>siblings maybe not ready Engine-->>Comp: all ready -> _on_setup() Comp->>Comp: _require_dependencies({ "label": value }) alt something missing Comp->>Comp: 1 error naming all, stop else all there Comp->>Comp: carry on end
PlayerBody is the only place dependencies are assigned. It runs in _enter_tree, finds every component + sprite with Component.find_descendant_of_type(self, Type), assigns typed fields before hooks run.
If component is missing body just skips it. Not a service locator.
Missing wiring is reported once, in _on_setup, by every component that depends on it.
Hooks dont call their parent on their own. if component extends Component directly it needs no super(), but if it extends another component (like Movement3DComponent) it must call it.
Components communicate through signals (jumped, landed, dashed, flipped, etc.).
Input is read once per physics frame into an InputFrame, so movement never reads Input directly.
Bodies and Spawner
PlayerBodyis god and wires all components.PlayerSpawner(Marker3D) spawns player scene as its own child in_enter_tree+ tells itscamerato follow that player.
Player API
graph LR D["Dialogue files"] I["InteractableThing"] DBG["DebugCommands"] S["SanityArea"] PA["PlayerApi<br/>items / sanity / level flags /<br/>facts / opinions / quests /<br/>favors + debts"] PB["PlayerBody"] C["InventoryComponent<br/>SanityComponent"] D -->|gets as extra game state| PA I -->|gets as actor| PA DBG -->|"finds it, find_local_player_api()"| PA S -->|"takes from body.api"| PA PB -.->|makes in _enter_tree<br/>+ keeps as api| PA PA -.->|hides| C click I href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/interactable_thing.gd" _blank click DBG href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/autoload/debug_commands.gd" _blank click S href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/sanity_area.gd" _blank click PA href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/player_api.gd" _blank click PB href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/player_body.gd" _blank
Not autoload. Body creates it in _enter_tree, keeps it as api + joins group player. thats how PlayerApi.find_local_player_api(tree) finds it.
InteractionComponent gives it to InteractableThing as actor, and that one gives it to dialogue as extra game state (never as global).
Dialogue files and InteractableThing should only call its methods, that way components can be rewritten without touching any dialogue file.
other code (DebugCommands, SanityArea, HUD) is allowed to read api.inventory + api.sanity directly.
Quest stage, NPC opinion, favors and debts are “just”: quest.<id> + opinion.<npc> + favor.<npc> (they owe you) + debt.<npc> (you owe them).
Other
- Dialogue: talk to NPCs with Dialogue Manager. 1 file per character + 1
world.dialoguefor objects, per level:content/dialogue/<level>/.- mutations use
$>(do+setare deprecated in 4.x). - design notes =
##doc comments above line or option they are about. Dialogue Manager keeps them on the compiled line, shown only byexplain. scenes/game/dialogue_balloon.tscn= example balloon +[#sanity_glitch]tag right after character name: text trembles + flickers, text itself stays same. use it rarely.
- mutations use
- Items and Quests:
ItemData+QuestDataresources. quest itself holds no progress, that is factquest.<id>. - HUD:
scenes/game/hud/hud.tscn, made of small widget scenes (SanityMeter,InventoryList,ControlsLabel,PickupToast,DebugStateLabel,ExplainFeed). each finds the player itself + listens to its signals, so a level can use only some of them.ControlsLabelreads keys from the input map -> remapped keys show (after level reload).DebugStateLabelshows every fact, off by default (show_debug_stateon the HUD), polls bc facts have no signal.
Game State and Level Management
graph LR GS["user://save.json"] GSR["GameState<br/>(static class, not autoload)<br/>facts, inventory, sanity,<br/>level paths"] LSR["LevelState<br/>flags of 1 level"] LM["our LevelManager"] USERS["everything else<br/>(PlayerApi, InteractableThing,<br/>SanityArea, components)"] GSR -->|"loads + saves"| GS GSR -->|"1 per level,<br/>by scene uid"| LSR LM -->|"writes current level<br/>+ checkpoint"| GSR USERS -->|"only through GameState<br/>static functions"| GSR click GSR href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/save/game_state.gd" _blank click LSR href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/save/level_state.gd" _blank click LM href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/save/level_and_state_manager.gd" _blank
- everything reads + writes through static functions in
GameState, setting something = saved immediately.- except sanity; changes every physics frame -> only copied into
GameState+ file gets written whenSanityComponentleaves tree.
- except sanity; changes every physics frame -> only copied into
- when running scene straight from editor theres no game state -> default values + nothing saved.
- facts are global and their keys start with what wrote them:
choice.,opinion.,quest.,favor.,debt.. level flags are per level:thing.<persistent_id>,sanctuary.<persistent_id>. - save is JSON in
user://save.json, written byGameState.save(). not.tres: loading a.tresfrom someone else can run code + it stores script paths. templatesGlobalStateis not used anymore.- written to
save.json.tmpfirst, then moved over the real file -> crash mid write keeps old save. - file that is not valid JSON gets renamed to
save.json.broken+ game starts fresh. - JSON has only 1 number type -> whole numbers in facts are turned back into int on load.
- only
_to_dictionary,_apply_dictionary,save+_read_save_fileknow the format. other format later = change those.
- written to
- options menu, Game tab: Export copies the save to a file you pick, Import replaces the save with a picked file (
GameState.export_save/import_save). import keeps old save assave.json.backup, migrates older versions + reloads the scene. - new saved field: default in
GameState+ line in_to_dictionary+_apply_dictionary. missing key keeps default, so no migration needed. - if changing what saved data is (renamed fact key, reordered quest stages), bump
SAVE_VERSION+ add step in_migrate_save_to_current_version. not; old saves break. steps change the plain data from the file, before it becomesGameState. - items + quests are saved by id -> renaming
.tresbreaks every save that has that. InteractableThing: optionalpersistent_idkeepsfree_afterpickups gone after reload.SanityAreachanges sanity drain while player inside. default = sanctuary: pauses drain + gives entry bonus. with optionalpersistent_identry; bonus stays used after reload.pauses_drainoff +extra_drain_per_second= thing that eats sanity when you stand close.- flag key is still
sanctuary.<persistent_id>, renaming it breaks saves.
Camera
graph LR PS["PlayerSpawner"] PC3["PhantomCamera3D<br/>third-person follow"] CML["CameraMouseLean<br/>(child of PhantomCamera3D)"] PS -->|"follow this player"| PC3 CML -->|"leans toward mouse"| PC3 click PS href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/player_spawner.gd" _blank click CML href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/camera_mouse_lean.gd" _blank
how camera should feel for player: see Camera FDD.
CameraMouseLeanmust be child ofPhantomCamera3Din third-person follow mode, if not errors + does nothing.- damping + spring arm length tweaked per level on
PhantomCamera3D, not in code. - lean tweaked in
CameraMouseLeanexport.
Multiplayer
graph LR PB["PlayerBody<br/>NetSyncComponent"] NET["Net autoload"] STDB[("SpacetimeDB<br/>server/ (Rust module)")] RP["RemotePlayer"] PB -->|position + facing + animation| NET NET <-->|sends ours + gets others| STDB NET -->|spawns 1 per player| RP click PB href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/player_body.gd" _blank click NET href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/autoload/net.gd" _blank click RP href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/entities/remote_player.gd" _blank
- Server module in
server/ - only
NettouchesSpacetimeDB.Faerie.FaerieNetPlayerrows are also read byRemotePlayer. - Offline still works if connection fails (why tf would it not? idiots bad desin probbly, or in case of corpos; Greed)
Debug
graph LR DC["DebugCommands<br/>(autoload)"] LC["LimboConsole<br/>(autoload)"] PA["PlayerApi"] DLG[".dialogue files"] GL["GameLog<br/>(autoload)"] LOG["Log<br/>(Log.gd addon)"] SYS["movement / sanity / inventory /<br/>InteractableThing / PlayerApi"] DC -->|"give / use / sanity / explain<br/>drain / fact / level / timescale / savefile"| LC GL -->|"log"| LC SYS -->|"GameLog.write"| GL GL -->|"formats lines"| LOG GL -->|"listens for cues, lines, picked option"| DLG DC -->|"commands go through"| PA DC -->|"checks ids + option conditions"| DLG click DC href "https://github.com/sintutiers/celter-fairy-pixie-gameproject/blob/master/scripts/autoload/debug_commands.gd" _blank
- every time you run from the editor,
DebugCommandschecks all.dialoguefiles and gives error for item + quest ids that dont exist (rule 3, fail loudly). it only sees ids that are typed out, flags + facts cant be checked bc there is no list of them.InteractableThingchecks on load that itsdialogue_cue+blocked_cueexist in its.dialoguefile.- same check gives error for option conditions that dont end in
/]: with plain]the condition is shown as option text + never checked.
GameLog.write(&"channel", ...)logs what the player does: one line at the place where it happens. channels:movement,sanity,inventory,interact,dialogue,ledger. value inGameLog.channels= on or off at every start. consolelog <channel>flips one until you quit,loglists them.- lines go to godot output, the console +
user://game.log(overwritten every start). - log changes, not frames: sanity drain + held direction are not logged every tick.
- new channel = new key in
GameLog.channels, unknown channel is an error. dialoguechannel needs no calls:GameLoglistens toDialogueManagersignals + the balloons response menu.- errors + warnings dont go through
GameLog, they useLog.error/Log.warn(rule 3).
- lines go to godot output, the console +
- console
explainturns onExplainFeed(HUD). it shows everysanity,inventory+ledgerline fromGameLog.wrote,##notes of current line, + condition of every locked option. ->.dialoguefiles never say what a line did, game already knows.GameLog.wrotefires for channels that are off too, only formats when something listens.
- cheats:
drainstops sanity drain of current player,fact <key> <value>sets a fact (no arguments = list),level <number>loads a level (no number = list),timescale <value>for slow motion,savefileshows the save in the file manager.
Technical Specifications
Game makes use of Godots API (CharacterBody3D, Resource, signals) plus addons listed above.
- Movement values tweaked in
MovementProfileresource, not in code. - State charts state nodes must have unique names
%Ground,%Air,%WallSlide,%Dash,%Crouch+ be in same scene as movement component. Chart is injected. - transition events in player scene must be same as
StateEventsconstants. carefull!; 1 typo / rename on either side gives no error, event just gets ignored.
stateDiagram-v2 state "%Ground" as Ground state "%Air" as Air state "%WallSlide" as WallSlide state "%Dash" as Dash state "%Crouch" as Crouch [*] --> Ground Ground --> Air: jump/fall Ground --> Crouch: crouch Ground --> Dash: dash Air --> Ground: land Air --> WallSlide: wall_slide Air --> Dash: dash WallSlide --> Air: jump/fall WallSlide --> Ground: land Dash --> Ground: land Dash --> Air: fall Crouch --> Ground: crouch_end Crouch --> Air: fall
Performance
- Web should be 45 FPS minimum (see Performance FDD). if followed; other platforms are automatically optimised as well
see FDD for User acceptance tests