a simple game engine for the karo project
🏠 Homepage
npm install karo-engine
import { Game, Character } from "karo-engine"
///get the html canvas element used for drawing the game
const canvas:HTMLCanvasElement = document.querySelector(".canvas")
///create the game
const game:Game = new Game(canvas)
const loop = time => {
game.draw(time)
requestAnimationFrame(loop)
}
///start the game loop
requestAnimationFrame(loop)
///create a box character named `my box`
const box:Character.Box = new Character.Box({name: "my box"})
///add the box character to the game
game.add(box)
///and like that you get a black rectangle on your screen
👤 daniel_onyenwee
- Github: @daniel-onyenwee
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2021 daniel_onyenwee.
This project is MIT licensed.
This README was generated with ❤️ by readme-md-generator