1.2.7 • Published 7 years ago

gameframework v1.2.7

Weekly downloads
69
License
MIT
Repository
github
Last release
7 years ago

Moved:

https://github.com/Prozi/gameframework-lite/

this repository is an unmaintained old copy of gameframework

  • This was under development, but then came the tests. READ ON:

  • Then I experimented with it, found that BOX2D implementation might have some leaks (I'm not blaming! And I'm not sure either)

  • Then I branched this off (lite branch) which ended up cutting out physics and is maintained and complete separate package now. Link above. Or by npm: npm install gameframework-lite.


Old Readme:

documentation

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

installation

npm install gameframework@latest --save

or

yarn add gameframework@latest --save

testing

use yarn test to test

usage

require 'gameframework' for:

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

require 'gameframework/view' for:

  • View

require 'gameframework/physics' for:

  • Body
  • Physics

examples

const View = require('gameframework/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.fromImage('bunny.png');
		hero.sprite.anchor.set(0.5);
		hero.sprite.scale.set(3);
	}
}

new MyView();
const { Level, Game } = require('gameframework');

// 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 MIT

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

1.2.7

7 years ago

1.2.6

7 years ago

1.2.5

7 years ago

1.2.4

7 years ago

1.2.3

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.8

7 years ago

1.1.7

7 years ago

1.1.6

7 years ago

1.1.5

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.50

7 years ago

1.0.49

7 years ago

1.0.48

7 years ago

1.0.47

7 years ago

1.0.46

7 years ago

1.0.45

7 years ago

1.0.44

7 years ago

1.0.43

7 years ago

1.0.41

7 years ago

1.0.40

7 years ago

1.0.39

7 years ago

1.0.38-alpha

7 years ago

1.0.37

7 years ago

1.0.36

7 years ago

1.0.35

7 years ago

1.0.34-b

7 years ago

1.0.33

7 years ago

1.0.32

7 years ago

1.0.31

7 years ago

1.0.30

7 years ago

1.0.29

7 years ago

1.0.28

7 years ago

1.0.27

7 years ago

1.0.26

7 years ago

1.0.25

7 years ago

1.0.24

7 years ago

1.0.23

7 years ago

1.0.22

7 years ago

1.0.21

7 years ago

1.0.20

7 years ago

1.0.19

7 years ago

1.0.18

7 years ago

1.0.17

7 years ago

1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago