|
|
|
|
|
|
|
|
|
|
|
A custom high-performance 2D game engine written in Rust + WGPU. Features AABB physics, focuses on precision platforming (Hollow Knight) and parry-based combat (Sekiro/Nine Sols) with a touch of a fast momentum based platformer (Ghostrunner). For a Metroidvania running at 60FPS (Important Metric) in a web browser, I want tight, deterministic, arcade physics, not realistic simulations. This project also serves as a "Living Proof of Work" for a TPM role.
It's all in the details. It’s not just about Can I jump? but How does it feel to jump? The secret sauce is in the mechanics that make the player feel powerful and responsive. Like coyote time, jump buffering, variable jump height, and a parry mechanic that rewards precise timing. The goal is to create a tech demo of the engine's capabilities by building a tight, fun, and responsive player controller that embodies the essence of a Fast Momentum Metroidvania gameplay.
- Clone the repo with
git clone https://github.com/ujjwalvivek/journey.git. - Install Rust, Node.js, and wasm-pack.
- Press
Ctrl+Shift+B→ "Run Native (Release)". - Enjoy!
The pipeline needs to be Cross-Platform First.
- The "Renderer" uses
wgpu(which targetsVulkan/Metal/DX12on Desktop, andWebGL/WebGPUon Browser). - The "Input" uses
winit(which capturesWindows eventson Desktop, andJS eventson Browser).
Journey/
├── Cargo.toml //* Workspace definition
├── engine/ //* The reusable library (journey-engine on crates.io)
│ ├── src/lib.rs //* Public API surface, GameApp trait, re-exports
│ └── Cargo.toml //* Dependencies: wgpu, winit, kira, egui, glam, bytemuck
├── game/ //* The executable (Content)
│ ├── pkg/ //* WASM Artifacts (Generated here)
│ ├── src/main.rs //* Native entry point
│ ├── src/lib.rs //* JourneyGame: GameApp implementation
│ ├── src/input.rs //* JourneyAction enum and key/gamepad bindings
│ └── Cargo.toml //* Dependencies: journey-engine (aliased as engine)
└── web/ //* Vite Project for WASM distribution
├── src/ //* JavaScript Glue Code
├── package.json //* NPM Dependencies
└── vite.config.ts //* WASM Configuration
This forces a clean API from engine to game. It also allows the engine to be published as an independent crate (journey-engine) for reuse, testing, and documentation, and prevents spaghetti coupling. All crates are to be WASM-compatible. Pollster for async main, and Kira for audio. More have been mentioned in the badges above.
- Make Rust changes in
engine/orgame/ - Press
Ctrl+Shift+Bto build + run.
Full rebuild (Rust + TS changes):
- Make changes in
engine/orweb/src/ - Run task "Run Web Dev Server"
- Vite will rebuild WASM + serve at localhost:5173
Quick iteration (TS/HTML only):
- Make changes in
web/src/(no Rust changes) - Run task "Quick Web Dev (skip WASM rebuild)"
- Vite hot-reloads instantly
- Rust Analyzer will run clippy automatically on save.
- Format on save is enabled for both Rust and TypeScript.
target/,node_modules/,dist/, andCargo.lockare hidden from file explorer.- The default task (
Ctrl+Shift+B) is "Run Native (Debug)" which is fastest for iteration.
You might want to run "Run Native (Release)" for more accurate performance testing since debug builds can be very slow.
- Performance: 60 FPS stable on both Desktop and Chrome/Firefox/Safari.
- Size: WASM binary under 5MB (gzip). Keep it lean. Hopeful.
- Gameplay: Fast Momentum Metroidvania feel.
- Code Quality: No
unwrap()in the main loop and clean separation between Engine and Game.
v1.0.0 Released (Check the Release Notes for details)
- Polish the level design to showcase the mechanics effectively.
- Plan for future features and create a roadmap for MVP2.



