Backaplay

Contribute a Game

Stack

Games are built with the approck framework. The server side is Rust; game logic and rendering are TypeScript with HTML5 Canvas.

File Structure

Each game lives under src/web/<game_name>/ and needs:

  • mod.rs — declares the module
  • index.rs — HTTP route handler that renders the HTML shell
  • index.ts — TypeScript entry point (imports MCSS, bootstraps the game)
  • index.mcss — all CSS, scoped inside #game-container
  • Additional .mts modules for game logic (state, renderer, entities, etc.)

Adding to the Homepage

Once implemented, register the game in two places:

  1. Add a game card in src/web/index.rs (alphabetical order in the grid)
  2. Add an entry to ALL_GAMES in src/web/index.ts — key must match the URL slug
  3. Increment the game count and add a line in src/web/about.rs

Guidelines

  • Game must be fully playable — no placeholder or stub pages
  • All CSS goes inside an #id scoped block — no top-level selectors
  • No inline style= attributes — use MCSS
  • No external dependencies without approval
  • Canvas-based games should handle window resize
  • Run approck pre-commit before submitting
Contribute - aplay