Jump to content

Newbie question about phaser


pdiddles03
 Share

Recommended Posts

So, I know phaser is a html5 game engine which comes with a lot of pre coded stuff.  I don't want any of that though.  From my understanding, i can scale phaser to any size screen.  That is pretty much all I want it for, well among drawing sprites also.  I tried Pixijs but it does not come included with a screen scale function. So just to clarify my question, can i use phaser just to draw sprites, scale the game, and just program all key touches and everything else myself?

Link to comment
Share on other sites

Yes, you can draw sprites, scale, and use phaser's input to handle key touches:

this.space_key = game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR);this.space_key.onDown.add(myJumpFunction, this);

Also, you came into Phaser just in time - you can create your own custom build of Phaser to include only the modules you want.  If you only need Phaser for the features you mentioned - take a look at customizing your own build here:

 

https://phaser.io/tutorials/creating-custom-phaser-builds

Link to comment
Share on other sites

I think you can use the barebones build for what you want. Go to where you cloned the phaser repo and run "grunt minimum". It'll be inside the "dist" folder. 

Of course you can also use the full version, but the barebones one is only 83kb.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...