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

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

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...