Giter Club home page Giter Club logo

feliprado31 / kaboom-js-game-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 43 KB

This project is a basic game implemented using Kaboom.js, a game development library for JavaScript. The goal is to demonstrate how to structure and organize a game project following the SOLID principles and best practices for object-oriented programming in TypeScript. It also integrates with React and Vite to provide a modern and efficient develop

Home Page: https://kaboom-js-game-boilerplate.vercel.app

JavaScript 4.97% HTML 4.18% TypeScript 90.85%
kaboom kaboom-js kaboomjs react reactjs vite vitejs

kaboom-js-game-boilerplate's Introduction

Kaboom.js Game Starter with React and Vite

This project is an implementation of a basic game using Kaboom.js, a game development library for JavaScript. The goal of this project is to demonstrate how to structure and organize a game project following the SOLID principles and best practices for object-oriented programming in TypeScript. It also integrates with React and Vite to provide a modern and efficient development experience.

The base game implementation follows the Kaboom.js intro tutorial.

Features

  • Implementation of a basic game based on the Kaboom.js intro tutorial
  • Integration with React and Vite for a modern development setup
  • Organized and modular project structure
  • Adherence to the SOLID principles
  • Use of TypeScript for better type safety
  • Separation of concerns into classes and modules
  • TypeScript configuration and custom types for Kaboom.js

Prerequisites

  • Node.js (21.7.2)
  • npm (Node.js package manager)

Installation

  1. Clone this repository: git clone https://github.com/FeliPrado31/Kaboom-JS-Game-Boilerplate.git mygame
  2. Navigate to the project directory: cd mygame
  3. Install dependencies: npm install

Running

To start the project in development mode, run the following command:

npm run dev

This will compile the TypeScript code, start the Vite development server, and open the game in your default browser.

Project Structure

src/
  components/
  classes/
    Floor.ts
    Player.ts
    Score.ts
    Tree.ts
  interface/
    IGameEntity.ts
    IScene
  page/
    Home.tsx
  scenes/
    GameScene.ts
    LoseScene.ts
  constants.ts
  kaboomInit.ts
  • components/: Game Components
  • classes/: Classes representing game entities
  • scenes/: Functions for initializing game scenes
  • interface/ Interfaces used throughout the project
  • constants.ts: Constants used in the project
  • kaboomInit.ts: Function for initializing the Kaboom.js instance

Demo

You can check out the live demo of the game here: Live Demo

Contributing

If you'd like to contribute to this project, feel free to submit your pull requests. You can also open issues to report bugs or suggest improvements.

License

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

kaboom-js-game-boilerplate's People

Contributors

feliprado31 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.