Skip to content

daniel-onyenwee/Karo-engine

Repository files navigation

Welcome to Karo Engine 👋

Version Documentation Maintenance License: MIT

a simple game engine for the karo project

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