A readable 2D side-scrolling platformer reference implementation by Jake Gordon. Play directly in your browser with zero install and explore the engine code.
- Genre
- Side-scrolling platformer
- Difficulty
- easy
- Players
- 1 player
- Touch
- Keyboard only
Added · 2–5 minutes to reach the end
How to play Tiny Platformer: Minimalist 2D Browser Jump Game (Playable Reference Engine)
- 01Run right along the continuous map to reach the goal threshold.
- 02Space triggers a fixed-height jump that inherits forward horizontal momentum.
- 03Falling off the bottom of the world or into a hazard chasm instantly resets you to start.
- 04The viewport dynamically scales from 512x384 up to 1024x768 while preserving tile clarity.
Controls
| Input | Action |
|---|---|
| Left / Right arrow | Horizontal running movement |
| Space | Jump impulse |
This one needs a physical keyboard — it has no touch controls.
Tiny Platformer is an open-source 2D side-scrolling reference game designed to demonstrate swept collision detection, momentum physics, and deterministic fixed timesteps in lightweight HTML5 canvas. Authored by Jake Gordon under the MIT licence, this project strips away commercial bloat to present a concise, readable masterclass in foundational 2D platformer architecture that executes in milliseconds inside any modern web browser.
Physical Engine Constants & Architecture Specifications
Platformer engines live or die by the precision of their collision resolution and timestep loops:
| Engine Constant | Value | Technical Role |
|---|---|---|
Physics Timestep (dt) |
1/60s (16.6ms) | Fixed delta prevents tunneling regardless of display refresh rate |
| Tile Resolution | 16 x 16 pixels | Scaled cleanly across 512x384 to 1024x768 viewports |
| Max Horizontal Velocity | 120 pixels / sec | Reached via smooth acceleration curve |
| Jump Impulse Velocity | 240 pixels / sec | Delivers consistent, readable arc heights |
| Gravity Constant | 600 pixels / sec² | Provides crisp downward acceleration without floatiness |
Engine Deep-Dive: Swept Axis-Aligned Bounding Box (AABB)
The primary reason amateur platformers feel sluggish or suffer from “wall glitching” is naive collision detection. Tiny Platformer demonstrates how to handle fast-moving player collisions cleanly:
- Swept Collision Projections: Instead of checking overlap after the character has already moved, the engine calculates the projected bounding box between frame
TandT + dt. - Axis Decoupling: X-axis movement and Y-axis movement are resolved independently. This ensures that wall collisions do not arrest downward vertical falling momentum.
- Momentum Preservation: Running jumps carry horizontal speed forward, rewarding deliberate player pacing.
Modifying & Extending the Map
The game level is decoupled from the rendering loop and stored in level.json. Developers and tinkerers can modify map geometry using any standard text editor or the open-source Tiled map editor without recompiling binary assets.
Open-Source Transparency
Served directly from local static assets via the canonical Jake Gordon javascript-tiny-platformer repository. Zero third-party tracker scripts, zero cookies, and complete client-side execution.
Tiny Platformer: Minimalist 2D Browser Jump Game (Playable Reference Engine) FAQ
- Why is Tiny Platformer so short?
- It was built by Jake Gordon as an educational reference implementation demonstrating clean swept-AABB collision physics and fixed timestep loops in under 400 lines of JavaScript.
- Can I design and load custom levels?
- Yes, levels are defined in standard Tiled JSON format in level.json and can be edited directly.
Source and licence
- Author
- Jake Gordon
- Licence
- MIT
- Upstream repository
- https://github.com/jakesgordon/javascript-tiny-platformer
Self-hosted from this domain. We never iframe a game from somebody else's server — the files above are served by us, and the licence file ships alongside them.