blo

bloodgine

Game engine for HTML5 games built in typescript

Showing:

Popularity

Downloads/wk

10

GitHub Stars

2

Maintenance

Last Commit

5yrs ago

Contributors

0

Package

Dependencies

3

Size (min+gzip)

0.8KB

License

MIT

Type Definitions

Built-In

Tree-Shakeable

No?

Categories

Readme

Simple game engine for HTML5 games written in Typescript.

Built on Pixi.js for rendering.

Features:

  1. 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)
  2. Input handling (Keyboard, Mouse, Gamepad) - can also use Pixi-sprites if you want to do it that way
  3. Crude camera support
  4. Resolution scaling
  5. Basic Tiled map support
  6. 2d grid class and A-star path finding
  7. EC (Entity + component system), no support for systems built in
  8. Simple Ambient lighting
  9. Noise and noise maps (Maps, Islands) generated from simplex-noise
  10. Turn based support (works, but not fancy) and Ability/Spell system (also in beginning state, works but no more ;))
  11. Some UI features like basic buttons, text, control list
  12. Some Electron integration for Desktop based games
  13. Basic Particle system
  14. Audio through Howler.js
  15. Tweening with tween.js

Example in Typescript:

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;
    }
}

Motivation

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 ;)

Installation

Install the engine with npm (if thats what you prefer):

npm install bloodgine

Tests

Currently there are no tests written for anything, code is provided as is.

Contributors

If you want to add/contribute to the project I would be more than happy to accept PRs or anything.

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100