1.3.2 • Published 4 years ago

craters.js v1.3.2

Weekly downloads
8
License
ISC
Repository
github
Last release
4 years ago

Craters.js

npm bundle size es modules

craters.js logo craters.js documentation

Short description

A Compact html5 Game Engine that helps you build fast, modern HTML5 Games

Features ✨

Rigid Body Physics.

  • QuadTrees Spatial Subdivision * Broadphase collision detection

  • Separating Axis Theorem * Narrow phase collision detection

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 * Captures keyboard input

  • Sound module * Creates instances of audio files a fork of Soundbox.js

Installation

  • Clone git repository
git clone https://github.com/swashvirus/craters.js.git
  • Npm package
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();
		// draw some text on the screen
        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.

1.3.2

4 years ago

1.3.1

4 years ago

1.3.0

4 years ago

1.2.2

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago