Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

gameframework-lite

1.12.2 • Public • Published

Version Known Vulnerabilities

PIXI.js + Game Loop + Level Loop + Character Loop

Isomorphic, Scalable, Node.js package

examples (non-MIT)

Games made on it:

documentation

https://prozi.github.io/gameframework-lite/

installation

npm install gameframework-lite@latest --save

or

yarn add gameframework-lite@latest --save

testing

  • yarn test

  • open http://localhost:3000

usage

require 'gameframework-lite' for:

  • DEFER,
  • Game,
  • Level,
  • Block,
  • Hero,
  • atan2
  • random

require 'gameframework-lite/view' for:

  • View

require 'gameframework-lite/extract' for:

Editions

We're using npm editions here so you can use gameframework-lite/source/... for import/export

or regular gameframework-lite/es2015/... for require syntax

or trust editions and just use gameframework-lite

Texture Extractor

Examples

const View = require('gameframework-lite/view');
const PIXI = window.PIXI || require('pixi.js');
 
// this is how you should use View
class MyView extends View {
    // override example
    onCreateHero (hero) {
        hero.sprite = PIXI.Sprite.from('bunny.png');
        hero.sprite.anchor.set(0.5);
        hero.sprite.scale.set(3);
    }
}
 
new MyView();
const { Level, Game } = require('gameframework-lite');
 
// this is how you should use Game
class MyGame extends Game {
    // one room game example
    constructor () {
        super();
        this.levels.push(new Level());
    }
    // override what you need
    onUpdate () {
        console.log('tick');
    }
}
 
new MyGame();

view example/index.html to see benchmark/test

License

License MIT

Author

made by me - Jacek Pietal (prozi85@gmail.com)

Install

npm i gameframework-lite

DownloadsWeekly Downloads

49

Version

1.12.2

License

MIT

Unpacked Size

4.61 MB

Total Files

80

Last publish

Collaborators

  • avatar