Skip to content

This project is a Sonic-themed infinite runner game built using JavaScript and the Kaplay game development library. The game features classic Sonic mechanics, including jumping over enemies and collecting coins to achieve the highest score.

Notifications You must be signed in to change notification settings

Yash-Pandey07/Sonic-Runner-Game

Repository files navigation

"# Sonic-runner"

Sonic Runner Game with Kaplay Library

Run Online

Sonic-Runner-Game Sonic-Runner-Game image

This project is a Sonic-themed infinite runner game built using JavaScript and the Kaplay game development library. The game features classic Sonic mechanics, including jumping over enemies and collecting coins to achieve the highest score.

Prerequisites

  • Basic knowledge of JavaScript
  • Node.js installed on your machine
  • A code editor (e.g., Visual Studio Code)

Getting Started

  1. Clone the repository:
    git clone <repository-url>
    cd sonic-runner-game
  2. Install dependencies
    npm install
  3. Run the development server
npm run dev

4.Open the game in your browser

http://localhost:5173/Sonic-runner/

Project Structure

  • kaplayContext.js: Sets up the Kaplay context.
  • public/: Contains the game assets (images, sounds, etc.).

Key Features

  • Infinite Runner Mechanics: The game speeds up as you progress.
  • Sonic Mechanics: Jump on enemies to defeat them and collect coins.
  • Parallax Scrolling: Background moves to create a sense of depth.
  • Multiple Input Support: Play using keyboard, mouse, or touch inputs.

How to Play

  • Jump: Press the spacebar or click the mouse to make Sonic jump.
  • Collect Coins: Gather as many coins as possible to increase your score.
  • Avoid Enemies: Jump over or bump into enemies to defeat them.

Debugging

  • Debug Mode: Press D to toggle debug mode and see hitboxes and FPS.
  • Touch to Mouse: Ensures touch inputs are translated to mouse clicks for mobile compatibility.

Additional Resources

  • Kaplay Library Documentation
  • YouTube Tutorial
  • Substack Post on Parallax Scrolling

License

This project is licensed under the MIT License. See the LICENSE file for details.


Happy coding!

About

This project is a Sonic-themed infinite runner game built using JavaScript and the Kaplay game development library. The game features classic Sonic mechanics, including jumping over enemies and collecting coins to achieve the highest score.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published