Last Update: 2023-07-06
Node Types Overview
Don't Starve Together's game architecture is built around a variety of specialized node types that work together to create the game experience. Each node type serves a specific purpose in the game's ecosystem.
Core Node Types
The DST codebase is structured around these fundamental node types:
Entity
Entities are the fundamental objects in the game world. Everything from characters and creatures to items and structures are entities. They serve as containers for components and provide the foundation for the entity-component system.
Component
Components are reusable modules that provide specific behaviors and properties to entities. They implement discrete functionality that can be attached to entities to give them capabilities like health, inventory, combat, and more.
Prefab
Prefabs are templates or blueprints for creating entities. They define which components an entity should have and set initial values for those components. Prefabs allow for consistent creation of similar entities.
Behavioral Node Types
These node types handle AI, movement, and state management:
Brain
Brains control the AI behavior of entities, defining how they make decisions and respond to the environment. They use behavior trees to create complex decision-making processes.
Stategraph
Stategraphs manage animations, sounds, and state-based behaviors for entities. They define the states an entity can be in and the transitions between those states.
Interface Node Types
These node types handle the user interface:
Widget
Widgets are UI elements that make up the game's interface. They handle rendering, input, and animation for UI components.
Networking Node Types
These node types handle multiplayer functionality:
Network
Network nodes manage the synchronization of game state between server and clients, allowing for multiplayer gameplay.
System Interaction
All these node types interact to create the complete game experience:
- Prefabs define what an entity is and which components it has
- Entities provide the foundation for game objects
- Components provide specific behaviors to entities
- Brains control AI decision-making
- Stategraphs manage animations and state-based behaviors
- Widgets create the user interface
- Network nodes synchronize the game state for multiplayer
Understanding how these node types work together is key to modifying the game or creating new content for Don't Starve Together.