Built on Pixi.js for rendering.
- States (Menu, Game, Pause etc) with support for displaying a state on top of another (great for e.g. pause menu or combat on a map)
- Input handling (Keyboard, Mouse, Gamepad) - can also use Pixi-sprites if you want to do it that way
- Crude camera support
- Resolution scaling
- Basic Tiled map support
- 2d grid class and A-star path finding
- EC (Entity + component system), no support for systems built in
- Simple Ambient lighting
- Noise and noise maps (Maps, Islands) generated from simplex-noise
- Turn based support (works, but not fancy) and Ability/Spell system (also in beginning state, works but no more ;))
- Some UI features like basic buttons, text, control list
- Some Electron integration for Desktop based games
- Basic Particle system
- Audio through Howler.js
- Tweening with tween.js
SuperDuperGame.ts:
import * as engine from 'bloodgine'
import * as PIXI from 'pixi.js'
class SuperDuperGame extends engine.GameCore {
initialize() {
this.pushState(new MainMenuState());
}
}
let game = new SuperDuperGame();
game.run();
export default class MainMenuState extends engine.State {
init(game:engine.GameCore) {
// setup entities, gui etc here
}
destroy(game:engine.GameCore) {
// remove anything you don't want to ase anymore, most things gets removed automatically
}
update(game:engine.GameCore, dt:number) {
if(engine.Input.keyPressed(engine.Input.Keys.e)) {
console.log("pressed e");
}
/// Returns false if this state does not want further updates down the state stack
return false;
}
}
I wanted to start making games in HTML5 and typescript. So I have done some work with Phaser but I just wanted to create something myself from scratch that has everything I want for my games, simple solution; just roll my own ;)
Install the engine with npm (if thats what you prefer):
npm install bloodgine
Currently there are no tests written for anything, code is provided as is.
If you want to add/contribute to the project I would be more than happy to accept PRs or anything.
MIT