Skip to content

Development source guide ยท workspace 0.1.0

Plan a playable game

A specification connects an idea to a result you can actually test. It should tell you what the player does, which inputs perform those actions, what state changes and how you will know the milestone works. It is not a substitute for implementing those behaviors.

Begin with a small playable result

For a first milestone, write down:

  1. The player's immediate goal.
  2. The smallest world or scene needed for that goal.
  3. Each action and its exact control.
  4. The visible feedback for success and failure.
  5. What should persist after closing the game.
  6. The platform you will test first.
  7. Known omissions that are intentionally outside this milestone.

For example, a movement milestone can require the player to move an object toward a visible target and recognize when it has reached the target. Collision, rewards and saving would be separate implementation work unless you explicitly add them. A specification describing those systems does not create them.

Use the generated specification

AIGameEngine new creates SPEC.md from an opinionated template. Open that file and replace placeholder prose with actual decisions. The template is broad: it asks for controls, NPCs, progression, economy, housing, dialogue, audio and more even when your first prototype is small.

Keep the intended final game separate from what the current milestone implements. If a section does not apply yet, explain the reason and intended scope rather than inventing a feature to make the document sound complete.

In development. The checker enforces the template's structure and several literal terms. It is not a genre-neutral design evaluator. A deliberately small puzzle or utility-like game may still receive complaints about sections it does not need. Interpret those as template constraints, not proof your design is invalid.

What the checker actually checks

From the working folder used in the first tutorial:

AIGameEngine spec-check ./first-game/SPEC.md

A successful check prints spec complete. A failure prints individual problems and a problem count, then returns an error.

The current checker looks for these kinds of requirements:

Check What to verify in your document
Required sections Vision, categories, render style, main menu, controls, AI NPCs, game loop, skill progression, economy, land and houses, NPC dialogue, audio, escape menu, engine use, assets, saves, budgets, platforms, phases and known gaps
Categories Three to ten dashed category entries
Render style A recognized style term, such as 3D, 2D, voxel, platformer or isometric
Main-menu background A nonempty Seed: value
Controls Platform subsections and no repeated function or multiple alternatives in a checked hotkey cell
Menu wording Resume, Settings, Graphics, Audio and Controls in the expected order
Phases At least one Phase 1: ...-style heading and the expected per-phase subsections
Content terms Specific template terms and ratios in several gameplay and audio sections

The untouched template can already pass. Passing therefore does not show that placeholders are gone, controls work, a save round-trip succeeds or a platform build launches. The checker does not run the game.

Define controls as implemented behavior

A control table is a promise to the player. For each action, record the input, whether it is pressed or held, its context and its effect. Do not copy the template's inventory, map or NPC controls into your player's guide until the game implements them.

The same applies to menu rules. The template describes Escape menus and fullscreen hotkeys, but the empty starter does not supply a complete menu just because those words appear in SPEC.md. Implement and test each behavior, then document the actual result.

For platform-specific behavior, check time and input and build targets. A browser controls section does not establish that mobile touch, pointer lock or audio works on every device.

Make budgets measurable

Choose a test scene and state the conditions beside every budget: platform, resolution, relevant quality settings and the behavior being measured. Useful budget categories include frame time, memory, startup delay, download size, packed assets and save size.

Do not copy a performance number from another game and treat it as a guarantee for yours. A budget is a target until the intended build and scene have been measured.

Finish a milestone honestly

A practical completion record should answer:

  • Did the game build for the selected target?
  • Could someone follow the controls and achieve the stated result?
  • Did the expected state change occur?
  • Were visible output and relevant failure paths checked?
  • If persistence is part of the milestone, did it survive closing and reopening?
  • Which gaps remain, and what will address them?

Use the inspection harness to investigate behavior, not to replace all player-facing checks. Keep a working milestone small enough that a failure has a manageable set of causes. Expand the game after the first result is real.