2026-04-29 23:52:04 +09:00
2026-04-29 23:52:04 +09:00
2026-04-29 23:52:04 +09:00
2026-04-24 15:29:08 +09:00
2026-04-29 15:59:34 +09:00
2026-04-29 15:59:34 +09:00
2026-04-29 23:52:04 +09:00
2026-04-24 15:29:08 +09:00

Nubzuki Jump

How to use

npm install
npm run dev

Description of the game

Nubzuki Jump is a simple 2D platformer game where the player controls a character named Nubzuki. The goal is to jump on platforms and reach as high as possible without falling down. The game features four different types of platforms, which are introduced as the player progresses, the types of platforms are:
  1. Basic platform
  2. Moving platform a platform that moves horizontally
  3. Spring platform boosts the player's jump
  4. One-time platform disappears after one jump

The player can move only left and right, the jumping is done automatically whenever player lands on platform. Game is controlled either by using the arrow keys, or by enabling camera control and moving head left or right.

Code Organization

The code is divided into two main parts, the Svelte app and the game logic inside of src/game. The Svelte app is responsible for layout of the page, displaying the leaderboard and handling the game state (start, end, restart). It also contains one component CameraControl.svelte which is responsible for enabling camera control and showing reading of head movement. The game logic is divided into several files:

  1. game.js - the main file which initializes the game and handles the game loop
  2. player.js - contains the logic related to the player character, such as movement and player state
  3. platforms.js - contains logic for creating and managing platforms
  4. platformTypes.js - handles the creation and behavior of of platforms by type
  5. cameraControl.js - contains the logic for enabling camera control and reading head movement
  6. constants.js - contains constants for the game

How that different parts of the code are conected and are communicating can be seen in the following diagram:

Organization diagram

Issues

The issue I was not able to solve is that when using camera control, the game becomes slower and a little bit laggy. I improved it by lowering the camera resolution and reducing the detection frequency, however its still not perfect but playeble. Other then that, the colisons between player and edges of platform are not always perfect, but nothing terrible.

Resources and Acknowledgements

  • P5play tutorial and P5play documentation - to help me with p5play
  • Github copilot - to help me write code faster
  • ChatGPT - mainly for camera controls and for finding bugs in my code
Description
Individual project - Software prototyping
Readme 41 MiB
Languages
JavaScript 61.6%
Svelte 33.5%
HTML 3.5%
CSS 1.4%