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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Starting point: settings loaded in this terminal; internet access for downloads. Finishing point: every static check passes and the arena and tools images exist.
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.
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.
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.
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.
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.
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.
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.
Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.
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.
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.
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.
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.
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.
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.
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.
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