What Is This API?
Crafty is a multiplayer game platform where players discover and play community games at playcrafty.games. Think Roblox-style distribution, built for modern creators using Summer Engine.
Crafty SDK is the creator API you use inside Summer Engine to build, test, and ship games on Crafty.
If you’re building game logic, this is your source of truth. It is also structured so AI coding agents can generate reliable creator-side code without guessing.
What Is It For?
Use the Crafty SDK to build complete multiplayer game loops:- Match flow (start/end/timer)
- Players, damage, respawn, and input
- Team and score logic
- Spawning NPCs, objects, and projectiles
- Persistent data and leaderboards
- Economy, UI helpers, and gameplay signals
You focus on building the game. Crafty handles running it at platform scale.
How Does It Work?
Crafty is server-authoritative:- Your core game rules should run on the server.
- The server owns truth for player state, scores, and outcomes.
- Clients consume synced state and render UI/feedback.
Craftyautoload singleton for game control and subsystemsCraftyGameas your base class with lifecycle hooksCraftyPlayerfor per-player state/actions
If You Are An AI Agent
Follow these rules when generating creator code:- Extend
CraftyGamefor the main game script. - Put scoring, damage, win conditions, and persistence on server paths.
- Use
Craftyfor round control (set_time_limit,end_game) and global systems. - Use
CraftyPlayer.set_syncedfor custom state that clients must read. - Connect to signals for reactive game logic (
player_killed,timer_expired, etc.).
API Sections
Crafty Singleton
Match control, player queries, spawning, server/client checks, subsystem access
CraftyGame
Required base class, lifecycle hooks, and practical game structure
CraftyPlayer
Player identity, synced fields, custom vars, actions, and input
Subsystems & Signals
Teams, score, data, economy, UI, audio, input, and event hooks
Build Your First Crafty Game
Golden-path tutorial from blank project to .pck submission
Multiplayer FFA Guide
Full Coin Collector-style example with timer, collectibles, and scoring
Multiplayer Persistence Guide
RPG/quest example with player saves, progression, and economy
Team-Based Game Guide
Teams, auto-balance, team spawns, and team scoring
manifest.json Reference
Every field, required keys, and validated examples
Submission Guide
Export .pck, scanner rules, upload flow, review lifecycle, and updates
Versioning
Games declare acrafty_sdk version in manifest.json. SDK changes are intended to be additive and backward-compatible.
