Jump to content

Create a Slot machine game with Phaser.js


Anahit DEV
 Share

Recommended Posts

Hello to everyone,

I am new to Phaser.js and wanna create a Slot machine game with it as i requested to create the flash game in html5 canvas. After research i understand that is better to use either Pixi.js or Phaser.js framework.

I have read the Phaser Getting started guide and did the small game with the tutorial but need some help, guide for my Real game. Am attaching a screenshot with game view.

I need something to start with, like the structure and other stuff. Are there any limitations from the design point?

ANy help is appreciated from game gurus.

Thanks in advance.

game.png

Link to comment
Share on other sites

Pixi is good for canvas graphical 2D rendering but it cannot handle scenes. That is where Phaser comes into play.

Phaser 2 uses Pixi under the hood. If you don't need menus and scenes then, Pixi might finish the job, but I doubt you will not need menus and scenes.

At least 3 scenes will be there.

Link to comment
Share on other sites

Thank you for the answer @spinnerbox.

So what you think with what i can start with? Am a beginner and don't know about the scenes can you please detail why 3 scenes?

And will it possible to create the game with the design i attached without issues with canvas limitations?

Thanks in advance.

Link to comment
Share on other sites

Yes, if you are that really a beginner, Getting Started Guide can help you.

Phaser is JS game engine. You will need a web server like Apache HTTPD or Nodejs with http-server extension installed. I use Nodejs/Http-Server

The examples                  are quite handy.

I believe all game engines share the same structure using the State software pattern. Each scene is a state and you can view your scenes as oriented graph. For example Main Menu scene is main state and all other scenes(states) can be accesed only trough this Main Menu scene. For example Game Scene where the main gameplay happens can go to Statistics scene and to main menu scene back. It depends on the game.

The main problem is that visual bits are mixed with game logic. Make sure you separate you game logic in separate functions or create utility files/"classes" to ease your coding.

JavaScript is dynamic language and it has prototypal inheritance, different from classic OOP inheritance. Make sure you view some of Douglas Crockford videos.

But in the comming years JavaScript will change and new things will be added. Make sure you check JS EcmaScript 6 as well.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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