Craters.js
craters.js documentation
Short description
A Compact html5 Game Engine that helps you build fast, modern HTML5 Games
Features ✨
Rigid Body Physics.
Tile Engine
- Sprite system
- Renders animated images and solid color.
Additional features
- Emscript6 modules
- Reduces your package size
Additional Modules
-
Assets module
- Loads images, Audio and json files.
-
Input module
-
Sound module
- Creates instances of audio files a fork of Soundbox.js
Installation
git clone https://github.com/swashvirus/craters.js.git
npm install craters.js
Let's make a game 🚀
example games are included in the examples and test directory
Writing an example "it's working" game.
import {Game, Vector} from '../../craters/craters'
class mygame extends Game {
constructor() {
super({
fps: 60,
container: '#container',
size: new Vector(1024, 512)
});
}
render() {
super.render();
this.context.fillStyle = "#fff";
this.context.font = '2em Arial'
this.context.fillText('It\'s working.️', 65, (this.state.size.y / 2), (this.state.size.x))
}
}
let game = new mygame();
Submit Issues, fixes and Contributions.