1.0.6 • Published 5 years ago

node-craters.js v1.0.6

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

node-craters.js

headless version node micro game development micro framework

  • it's not a craters.js version for node but a minimal nodejs framework.

making a game 🚀

"use strict";
require('./craters/craters.js');

class mygame extends craters.game {
	
	intitiate () {
		super.intitiate();
		// now intitiate my game 
		this.state.entities.push( new comet('f18'));
	}
}
	
class comet extends craters.entity {

	update () {
		super.update();
		// fly autonomously
		this.state.accel.x = 0.10;
		this.state.accel.y = 0.10;
		// radio log
		console.log( this.type + ' state:' + JSON.stringify(this.state));
	}
}

window.cg = new mygame('#node', 800, 500, 60, false);
1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.0

5 years ago