Jump to content

How to create a Phaser mobile game


pencilking2002
 Share

Recommended Posts

Hi. I've been trying to find resources on how to use Phaser to build a mobile game but I can't seem to find any mobile specific tutorials/resources out there. In some ways, mobile has more specific challenges like varying screen sizes, performance issues, touch input, etc. so I'd love to get my hands my hands on some reading material discussing this part of making games with Phaser. Thanks!

Link to comment
Share on other sites

Follow any tutorial to make any game then read some examples and docs to get touch/screen ratios added too.

You can literally make anything touchscreen friendly in phaser so go nuts and try.

activePointer = mouse or finger

pointer1 = single finger

pointer2 = 2 fingers

pointer3 = 3 fingers

Etc etc.

Its just a case of having extra parameters in your input logic for either touchscreens or desktop or both :D

Link to comment
Share on other sites

  • 1 year later...

Information on Mobile Game Development with Phaser seems scattered all over. The Phaser Examples page works great for mobile but many of the examples are not mobile ready. There are some good examples of Multi-touch input, virtual joysticks and virtual game controllers in the Input section.

  I can't get the Full Screen Mobile demo to work on my Android 4.04 phone (maybe it's just for iOS). I've been looking into material regarding the viewport meta tag and scale manager etc. I've even tweaked the Phaser-Examples CSS a bit, replacing 800 x 600 with 480 x 320.

I have been tweaking the examples too, by replacing 800 x 600 with 480 x 320. I used a proportional calculation to resize the Einstein Image (517px x 480 px/800px). There is probably something like RESIZE in the API for all I know.

 I am tweaking the Tanks example at the moment by adding code from the Virtual Game Controller example. I used the vertical and horizontal buttons and an 'A' button for firing. The left horizontal button rotates the tank clockwise and the right right horizontal button rotates the tank counterclockwise. The lowest button moves the tank.

 I have a problem however with the active pointer code from the original Tanks code. It rotates the turret instantly in the direction of a tap but it is also pointing to where I am tapping buttons. I need to fiind out how to replace it or isolate it so that I can use the virtual controller buttons for moving and firing at the same time.  

 

  I recently found a touch gestures demo that uses Phaser but doesn't even require a server to run.

 

Zenva Academy is selling a Mobile Development Course.

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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