Phaser.js Notes: Difference between revisions
Jump to navigation
Jump to search
Adamcolton (talk | contribs) Created page with "Start [http://phaser.io/learn here] Create game var game = new Phaser.Game(width, height, Phaser.AUTO, '', {##STATE DATA##}); Preload is used to init the game. function ..." |
Adamcolton (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
Start [http://phaser.io/learn here] | Start [http://phaser.io/learn here] | ||
== Notes == | |||
Create game | Create game | ||
var game = new Phaser.Game(width, height, Phaser.AUTO, '', {##STATE DATA##}); | var game = new Phaser.Game(width, height, Phaser.AUTO, '', {##STATE DATA##}); | ||
| Line 15: | Line 16: | ||
Pysics | Pysics | ||
game.pysics.startSystem(Phaser.Pysics.ARCADE); //there are several physics systems | game.pysics.startSystem(Phaser.Pysics.ARCADE); //there are several physics systems | ||
== Thoughts == | |||
This looks good, but it comes with a whole bunch that I'm never going to use because so much of the game happens on the server. I want to get get some performance stats. If it's beat the hell out of my hack'd little system, lets stick with Phaser. But if they're close (or particularly if I'm doing better, however unlikely) I may want to just polish up what I have. | |||
Latest revision as of 18:45, 18 September 2015
Start here
Notes
Create game
var game = new Phaser.Game(width, height, Phaser.AUTO, , {##STATE DATA##});
Preload is used to init the game.
function preload(){
game.load.image("sky", "assets/sky.png");
game.load.spritesheet("sprite", "assets/sprite.png", cellW, cellH);
}
Sprites
game.add.sprite(0,0, 'star');
Pysics
game.pysics.startSystem(Phaser.Pysics.ARCADE); //there are several physics systems
Thoughts
This looks good, but it comes with a whole bunch that I'm never going to use because so much of the game happens on the server. I want to get get some performance stats. If it's beat the hell out of my hack'd little system, lets stick with Phaser. But if they're close (or particularly if I'm doing better, however unlikely) I may want to just polish up what I have.