0.0.3-beta ā€¢ Published 3 years ago

karo-engine v0.0.3-beta

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

a simple game engine for the karo project

šŸ  Homepage

Install

npm install karo-engine

Example

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

Author

šŸ‘¤ daniel_onyenwee

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2021 daniel_onyenwee. This project is MIT licensed.


This README was generated with ā¤ļø by readme-md-generator