Jump to content

New to phaser and html5


Murali
 Share

Recommended Posts

Phaser is a framework and works as most frameworks do across languages, it sets some standards for how to structure and plan your application and contains loads of code and patterns to help you create your product without the hassle of writing loads of boilerplate.

In short, if you follow the patterns it dictates then it should be a breeze to get things up and running quickly and focussing on the logic that is specific to your application rather than spend a lot of time writing generic things like a state machine, rendering layer or user input handlers etc etc etc.

Whilst there are lots of modules out there you can consume for the generic stuff, Phaser also does the glue between these individual bits which elevates it to framework status rather than collection of modules.

Take a look through some of the examples and then start googling, there are lots more user-land examples out there, some very detailed about how to structure and code a game using the Phaser framework.

Link to comment
Share on other sites

I think some generic pros/cons would be (there are loads more I've missed too):

Pros:

* You're writing JS and your target platform understands JS, this decreases friction between your source code and your production running code

* Phaser contains loads of code to reduce boilerplate meaning that you (as developer) can focus on adding features and coding up the logic that makes up your game rather than spend a lot of time on more generic things/boilerplate.

* Phaser has great documentation, an active commit history and an active community. This means it is always improving and that lots of information exists out in the wild i.e. if you hit a problem its quite likely someone has already hit it and solved it, if not, there is an active community there to help you solve it for yourself and for anyone else who runs into the issue

* As you're writing JS any other modules/code you add that Phaser doesn't include (stuff like some sort of router, advertisement libs, analytics/tracking libs, maybe websocket stuff) is probably pretty easy (ish) to include into your project as the library will be written in JS and your code will be written in JS so you don't need some sort of abstraction layer to make all the libraries compatible (or, at least, this will be far easier).

* Debugging tools inside your target platform (the browser) understand JS so you _should_ have a far easier time debugging (and then fixing) problems you run in to.

Cons:

* JS isn't for everyone, it has its quirks, particularly for large and complex projects. Thankfully the JS community is super active and lots of user-land solutions exist (i.e. if you really really like data types then typing solutions such as TypeScript and Flow exist in user-land).

* You might there are some problems that Unity (etc) solve that Phaser (or JS) make awkward or just don't solve for you.

* I think Unity and some other engines have a pretty extensive UI and code-generation tools, with Phaser (and most JS stuff) you'll be writing stuff yourself rather than doing stuff like architecting a state machine in a UI. Again, some user-land tooling exists, e.g. tools to generate a sprite sheet in a format Phaser (or other JS libs) understand.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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