Skip to main content

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
Crafty handles the platform layer for you: authentication, networking transport, server orchestration, moderation, submission/review flow, and payments.
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.
At runtime, you use:
  • Crafty autoload singleton for game control and subsystems
  • CraftyGame as your base class with lifecycle hooks
  • CraftyPlayer for per-player state/actions

If You Are An AI Agent

Follow these rules when generating creator code:
  1. Extend CraftyGame for the main game script.
  2. Put scoring, damage, win conditions, and persistence on server paths.
  3. Use Crafty for round control (set_time_limit, end_game) and global systems.
  4. Use CraftyPlayer.set_synced for custom state that clients must read.
  5. Connect to signals for reactive game logic (player_killed, timer_expired, etc.).

API Sections

Versioning

Games declare a crafty_sdk version in manifest.json. SDK changes are intended to be additive and backward-compatible.