Anahit DEV Posted March 31, 2017 Share Posted March 31, 2017 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. Link to comment Share on other sites More sharing options...
spinnerbox Posted March 31, 2017 Share Posted March 31, 2017 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 More sharing options...
Anahit DEV Posted April 3, 2017 Author Share Posted April 3, 2017 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 More sharing options...
spinnerbox Posted April 3, 2017 Share Posted April 3, 2017 Please don't ask "can you do my job" questions. If you don't know how to code, hire a coder to do it for you. Link to comment Share on other sites More sharing options...
Anahit DEV Posted April 3, 2017 Author Share Posted April 3, 2017 Am not asking how to code. Am just asking for a guide cause am a beginner in this area and wanna learn. Link to comment Share on other sites More sharing options...
jjcale Posted April 3, 2017 Share Posted April 3, 2017 The states - or scenes if you will - are nicely described in Interphase Volume #1. http://phaser.io/interphase/1 Link to comment Share on other sites More sharing options...
spinnerbox Posted April 3, 2017 Share Posted April 3, 2017 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 More sharing options...
Recommended Posts