Desktop
- WASD or arrows — move
- Mouse — aim
- Left click or Space — fire
- Shift — dash (brief invulnerability)
- P or Esc — pause · M — mute
A wave survival shooter running on a browser port of the 2D Java Game Framework.
This repository is a 2D game framework written in Java — a game loop, vector and rectangle math, input polling, and Robert Penner's easing equations. Java no longer runs in browsers, so the framework's core was ported to ES modules and the game is written against that port. The classes keep their original names and signatures.
| Java | Browser | Notes |
|---|---|---|
game.framework.Game |
framework/game.js |
Same initialize / loadContent / update / draw hooks; requestAnimationFrame replaces the BufferStrategy loop. |
game.framework.GameTime |
framework/gametime.js |
tick, start, stop and getDeltaTimeSeconds, fed by the frame timestamp. |
game.framework.Vector2 |
framework/vector2.js |
Immutable operations, plus in-place variants for the hot path. |
game.framework.MathHelper |
framework/mathhelper.js |
clamp, lerp, smoothStep, random, with frame rate independent damping added. |
game.input.Keyboard / Mouse |
framework/input.js |
keyDown and keyDownOnce polling against DOM events. |
game.animation.ease.* |
framework/ease.js |
All eleven easing families with the original (time, begin, change, duration) signature. |
| no Java counterpart | framework/quality.js |
Watches the frame time and scales glow, particle counts and the device pixel ratio to match — a problem a desktop JVM window never had. |
| no Java counterpart | framework/spatialgrid.js |
Uniform grid broad phase, so bullet against enemy stays cheap once a late wave fills the arena. |
The wave banner, combo pop and enemy sway are all driven by these. Each canvas plots the ported function over a single second.