GameRust + WASM

Neon Command

Year2024–present
RoleSolo
StatusLive

A browser-based tactical tower defense game built in Rust with the Bevy ECS engine and compiled to WebAssembly. Playable on desktop and mobile with no installation, no backend, and no tracking.

~14k
Lines of Rust
8
Tower Types
8
Enemy Types
Play in Browser
Neon Command tower defense game
Title screen, playable at td.wyatt-fleming.com

Overview

Designed and built Neon Command from scratch in Rust as a way to learn the Bevy game engine and WebAssembly toolchain end-to-end. The game runs entirely in the browser (no backend, no account, no tracking) using LocalStorage for high scores and settings. Eight tower types with mid-game specialization branches, eight enemy types including bosses and splitters, four procedural map presets, three player abilities on cooldown, and a tower-synergy system that activates bonuses when adjacent towers compose into combos.

Game Systems

Designed around a small set of mechanics that compose into deeper strategy:

8 Tower TypesEach with a level-3 specialization branch. Pick a build, not just a tower.
8 Enemy TypesBasic, Fast, Tank, Armored, Flying, Boss, Splitter, MiniSplitter. Counter-pick or get overrun.
4 Map PresetsRandom procedural, Serpentine, Sprint, and Spiral, each playing differently
Tower SynergiesAdjacent towers activate bonuses, rewarding placement-as-strategy
Player AbilitiesFreeze, Gold Rush, and Artillery on independent cooldowns
Economy LoopInterest, kill streaks, combo bonuses, and early-send wave bonuses tighten the risk/reward dial

Rust + Bevy + WASM

Built on Bevy 0.14s ECS architecture and shipped as a WebAssembly bundle:

Pure ECS Architecture~14k lines of Rust organized as systems operating on components. No inheritance, no game-object tree.
WASM Build via TrunkCompiled for wasm32-unknown-unknown and served as a static bundle by Nginx
Aggressive Size OptimizationRelease profile uses opt-level=z, LTO, single codegen unit, panic=abort, and strip=true
WebGL2 RendererBevys WebGL2 backend with custom particle, projectile, and HUD systems
Defensive Command BufferUses try_insert instead of insert to avoid panics when entities despawn before commands flush
Persistent StateHigh scores and settings live in LocalStorage via web_sys, no server required

Technical Architecture

Lean stack so the build stays fast and the binary stays small:

LanguageRust 2021 edition
EngineBevy 0.14 with the WebGL2 feature set
ToolchainTrunk for WASM bundling, wasm-bindgen for JS interop
Grid18x11 tiles, 50px each, 900x550 play area
StorageLocalStorage via web_sys (no backend)
HostingDocker multi-stage build (Rust compile -> Nginx Alpine), auto-deploy via Coolify

Why It Matters

Systems Programming Range

Counterweight to the otherwise web-only portfolio. Proves comfort with Rust, ECS, and the WASM toolchain.

Privacy by Construction

No backend, no accounts, no analytics. The whole game is a static bundle, period.

Performance Discipline

Performance audit catalogues 11 known optimizations (synergy O(T^2), splash damage O(E)). Performance is treated as a tracked roadmap, not a hope.

Personal Project Discipline

Shipped, deployed, and maintained under the same release process as the production work, not a dead branch

Key Learnings

Bevy ECS PatternsInternalized the ECS mental model (components as plain data, systems as queries, no inheritance) and learned where Bevy specifically diverges via deferred commands, change detection, and SystemSet ordering.
Rust to WASM Build PipelineSet up the full wasm32-unknown-unknown pipeline including the getrandom_backend=wasm_js rustflag, js feature on transitive uuid deps, and Trunk build profiles. Every layer of the toolchain has its own gotcha.
Defensive Command PatternsBevys deferred commands can panic if you reference an entity that gets despawned before the buffer flushes. Settled on try_insert as the default to make the system robust without sprinkling existence checks everywhere.
Performance as a RoadmapProfiled the hot loops (tower synergy is O(T^2), splash damage is O(E)), wrote an algorithm-audit doc with 11 prioritized optimizations, and treat it as a backlog rather than premature work.

More Projects

Need something like this for your business?

I build custom software that solves real business problems — from quote systems to customer portals.