What Is CraftyGame?
Every game published on Crafty must extend CraftyGame.
CraftyGame is the contract between your game and the platform:
- game lifecycle,
- player join/leave callbacks,
- timer/match control helpers,
- server-authoritative movement helper for 3D templates.
Required Lifecycle Hooks
Override these in your game script:player for maximum compatibility across:
CraftyCharacter3Dplayers (3D action template),- custom
CraftyPlayersubclasses (2D/RTS/card/turn-based).
Common Platform Methods On CraftyGame
Hook Responsibilities
_game_init(): one-time setup (spawn points, static data, signal wiring)._game_start(): begin active match flow._game_end(): finalize and cleanup._player_joined(player): attach defaults for a newly connected player._player_left(player): cleanup per-player transient state.
Server-Authoritative Pattern
3D Template Pattern (Optional)
If your player scene usesCraftyCharacter3D, you can use the built-in movement helper:
apply_default_movement and implement your own state model with set_synced.

