P1 controls: Arrows, X, Z / P2 controls: ESDF, Tab, Q
UEM Mini Game
A mini-game developed in Go for the WASM-4 fantasy console.
The game features a 3D depth effect obstacle system where the player must dodge obstacles approaching down the road. Includes jump physics, collision detection, scoring system, and pause menu.
Features
- Player movement: Use arrow keys to move and up arrow to jump
- Dynamic obstacles: Obstacles that grow and approach with 3D effect
- Scoring system: Score increases automatically during gameplay
- Interactive menu: Start menu and pause menu with navigation
- Collision detection: Game restarts when colliding with obstacles
Controls
- Left/Right arrows: Horizontal movement
- Up arrow: Jump
- X: Confirm selection in menu / Start game
- Z: Pause game
- Up/Down arrows: Navigate pause menu
How to play
- In the start menu, press X to begin
- Use arrow keys to move the square
- Press up arrow to jump over obstacles
- Avoid colliding with the red obstacles approaching you
- Your score increases automatically as you survive
- Press Z to pause at any time
Building
Build the cart by running:
make
Then run it with:
w4 run build/cart.wasm
For more info about setting up WASM-4, see the quickstart guide.
Architecture
The game was developed using an Entity Component System (ECS) architecture with the following components:
- Position: X and Y coordinates
- Drawable: Rendering information (size and color)
- Physics: Velocity, gravity and jump physics
- Depth: 3D depth system for obstacles
- PlayerInput: Player input control
Links
- WASM-4 Documentation: Learn more about WASM-4
- WASM-4 GitHub: Official WASM-4 repository
License: CC BY-NC-SA