Emberwake, a 2D Arena Action Game on a Deterministic ECS Engine with Verified Replays and Accessible Controls

Build a 2D arena action game and the engine under it: a fixed-timestep, deterministic simulation on an entity-component-system with collision, navigation and enemy behaviour for crowds, a WebGL2 renderer that draws every sprite in one call, accessible controls and settings, and a leaderboard that ranks a run only after re-simulating its replay.

Game Developer. Advanced.

What you will build and explain

  • Structure a game around a fixed-timestep, deterministic simulation with render interpolation, and explain what breaks determinism across machines and how to prevent it.
  • Design entity-component-system storage with sparse sets and typed arrays, order systems deliberately, and measure what they cost.
  • Implement swept collision, a spatial hash, flow fields, A* with deterministic ties, line of sight and utility decisions for crowds within a frame budget.
  • Render every sprite in one instanced WebGL2 call from a code-generated atlas with palette-driven colour, and synthesise sound with captions from the same events.
  • Build remappable keyboard and gamepad input, accessible menus, comfort options and versioned settings, and test them with Playwright and axe-core.
  • Record replays, verify submitted runs by re-simulation behind size, rate and duplicate limits, and discuss the design, its budgets and its limits in an interview.

Before you begin

  • Programming in at least one language with functions, objects, arrays and loops, and reading TypeScript or JavaScript; 2D coordinates (adding points, scaling a direction, a distance); a browser's developer tools; docker compose up, logs, exec and run; reading short shell scripts and JSON.
  • A workstation with Docker 26+ and Compose 2.24+, about 2 CPU cores, 4 GB of memory for Docker, 10 GB of free disk and a desktop browser with WebGL2; a gamepad is optional. Vectors for games, the game loop, ECS, collision, pathfinding, WebGL, audio synthesis, replay verification and game accessibility are taught.

Who this is for

For programmers who read TypeScript or JavaScript and use 2D coordinates, and want to build a game and its engine end to end: a deterministic fixed-timestep simulation, an ECS for crowds, WebGL2 batching, accessible controls and replays a server re-simulates.

Curriculum

Learning topics (13)
  1. Follow one frame to the pixels and one run to the leaderboard

    Emberwake is a browser game and a small Node service. The browser holds everything that makes the game playable: a fixed-timestep simulation built on an entity-component-system (ECS), a WebGL2 renderer, input devices, synthesised sound and an accessible DOM interface. The service serves the built game, re-simulates every submitted run before ranking it, keeps the leaderboard and telemetry in SQLite, and reports health and counters. The same simulation source runs in both plac

  2. Prepare the workstation and the maths you will need

    This lesson gets three things ready: a workstation that can build and run the lab, a mental model of how the project's code is laid out, and the small amount of vector maths every later lesson uses. If you already write games, skim the maths and go straight to the checks at the end.

  3. Fixed ticks, smooth frames and the spiral of death

    A game is a loop: read input, update the world, draw it, repeat. The question this lesson answers is how often to update and by how much. The answer shapes everything after it, because it decides whether the same inputs can ever give the same result twice.

  4. Same seed and inputs, same bits, in every engine

    A fixed timestep makes every tick the same size. Determinism asks for more: that a run with the same seed and the same per-tick inputs produces exactly the same state, to the last bit, in Chrome, Firefox, Safari and Node, today and next year. Emberwake depends on it three times: replays play back by re-running inputs, bug reports reproduce from a replay, and the leaderboard service re-runs a submission to check its score.

  5. Store the world as data and run systems in order

    Emberwake's world has a player, three braziers, up to 30 shades at once in wave 5, wisps, glooms, bolts, orbs and wards. A benchmark puts 2,000 enemies and a thousand orbs in it. This lesson explains how that world is stored and updated, and why the layout, not just the algorithms, decides the frame time.

  6. Circles, tiles, rays and a spatial hash for crowds

    Collision answers two questions every tick: "where can this body be?" (it may not be inside a wall or overlapping another body) and "what did this shot hit?". This lesson builds both answers from three exact tests, then makes them cheap enough for a crowd with a spatial hash. It ends with a worked profile: how three small decisions decide whether 2,000 enemies fit the budget.

  7. Flow fields, A*, line of sight and utility decisions

    Three enemy types, three questions. Shades ask "which way to the player?", wisps ask "can I see the player, and am I at a good distance?", glooms ask "is the player or a brazier the better target, and how do I get there?". Each answer uses a different technique, chosen for what it costs when a wave puts dozens of enemies on the map and the benchmark puts two thousand.

  8. Tuning in data, input buffering and removable game feel

    The engine is only half a game. This lesson covers the rules that make Emberwake a game (the player's verbs, the enemies, waves, scoring, winning and losing) and the presentation that makes it feel good to play, kept strictly apart so that comfort settings never change the rules.

  9. Draw every sprite in one instanced call

    A frame with 500 enemies, their orbs, the 960 tiles and the particles is about 1,800 sprites. Drawn one at a time, each would cost a call into the graphics driver; drawn as one batch, they cost one. This lesson builds the renderer in src/client/renderer.ts from the GPU's point of view: what it needs, why instancing is the right tool, and how one sprite sheet serves five colour palettes.

  10. Sprites from distance functions, a reproducible atlas and synthesised sound

    Emberwake ships no image or audio files. Every sprite is drawn by a function at build time and every sound is synthesised in the browser when it plays. The studio owns every pixel and note, the art can be reviewed as code, and the build is reproducible to the byte. This lesson shows how, and where the approach stops scaling.

  11. Actions, rebinding, accessible menus and comfort options

    Moonwick's last prototype lost players with motor and visual impairments in its first level. This lesson builds the parts of Emberwake that decide who can play: input mapping and rebinding, an interface every device can operate, settings that survive updates, and options for motion, colour, hearing and reaction time, all checked automatically.

  12. Record replays and rank only what the server reproduces

    Moonwick's last leaderboard accepted whatever score the game sent. Cheaters edited the number in memory, and the top ten were fiction within a week. This lesson builds the alternative: every run records a replay, and the service ranks a run only after re-simulating that replay and arriving at the same score. It then hardens the service so that hostile replays cannot exhaust it.

  13. Test in layers, measure against budgets, read telemetry

    A game is hard to test because so much of it is timing, pixels and people. Emberwake's design makes most of it testable anyway: a deterministic simulation can be checked like a function, the client's logic is kept in pure functions, and a test hook lets a real browser play a seeded run in seconds. This lesson walks the test layers from fastest to slowest, explains how the performance budgets are measured and read, and covers telemetry and the lab's operations.

Practical build steps (10)
  1. Prepare the workstation

    Starting point: a copy of the project source and a workstation you may administer. Finishing point: Docker answers with enough resources, the game's port is known to be free, and your browser has WebGL2.

  2. Create the lab inputs

    Starting point: the workstation checks passed. Finishing point: a lab.settings file that Compose reads, loaded in this terminal, and a Compose model listing the arena, e2e and tools services. No container exists yet.

  3. Check and build

    Starting point: settings loaded in this terminal; internet access for downloads. Finishing point: every static check passes and the arena and tools images exist.

  4. Start the lab

    Starting point: both images exist; no lab containers are running. Finishing point: the service is healthy on 127.0.0.1 with its security headers.

  5. Play the game

    Starting point: the lab is running. Finishing point: you have played a run, watched it back, submitted it to the leaderboard, rebound a control, and run the unit tests in the tools container.

  6. Try the accessibility options

    Starting point: the lab is running and you can play. Finishing point: you have played with reduced motion, captions, a colour-vision palette and a slower game speed, using the keyboard for the menus.

  7. Drill the replay verifier

    Starting point: the lab is running. Finishing point: every forgery was refused with its reason, the genuine run was accepted once, a repeat was refused as a duplicate, a burst was rate-limited, and the counters show it all.

  8. Measure performance

    Starting point: the lab is running (built with EMB_TEST_HOOKS=1). Finishing point: you have the simulation benchmark's percentiles for 2,000 enemies and the browser's frame times for 500, and know how to find the hot function in a frame.

  9. Run the automated checks

    Starting point: any state; the step removes the lab first. Finishing point: every acceptance check passes on a fresh lab, with evidence in runs/, and you can read the telemetry report.

  10. Remove the lab

    Starting point: any state, including after a failed step; settings loaded. Finishing point: nothing with the project's label remains; unrelated Docker data is untouched.

Access

Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.

Cloud costs and boundaries

Runs entirely on your own workstation with Docker and your browser: no cloud account, store or payment is used. The container images use about 4.5 GB of disk, most of it the browser test image. Workstation, network and Docker licensing terms remain your responsibility.

Licence and completion

Vectametric Project Source Licence (2026-09-27): personal learning, modification/deployment and attributed portfolio/interview demonstrations are permitted. Lawfully obtained copies remain usable after online access expires. Do not redistribute original source or the Source Pack; commercial/client production use requires separate permission. Third-party terms remain separate. See included LICENSE.txt and the Project Source Licence section of the site Terms.

Questions about projects

Do I need a cloud account?

You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.

Can I read the code with Learning Access?

Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.

Are cloud charges included?

No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.

Does the project include troubleshooting and interview preparation?

The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.

How long can I use the project?

The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy