rich

A Guide to the Phaser Scale Manager

Recommended Posts

Hi all,

 

I'm please to announce that this new book is now out.

 

post-1-0-44211300-1417575054.jpg

 

The Scale Manager is a powerful part of the Phaser game framework. By learning how to use it properly you can explore the different scale modes on offer and ensure your game looks great no matter what screen size it appears on. The guide covers:

 

  • Picking a resolution for your game
  • The different Scaling Concepts used in Phaser
  • Setting a Phaser Scale Mode with a detailed look at the 5 modes on offer
  • Game Alignment
  • Scaling on Mobile
  • Forcing Orientation
  • Using the Fullscreen API
  • Important Scale Manager Properties
  • Changes in Phaser 2.2
  • Source Code

 

The book is available from here in PDF, iPad and Kindle formats.

 

It's released as "pay what you want" as I want the knowledge to be out there, so if money is tight then you're welcome to get it for free. However if you can afford a few dollars it will go towards writing the next guide.

Share this post


Link to post
Share on other sites

See I knew there was an upside to staying up til 4 am

 

edit: small typo on p.32, where a " is missing in the game call

 

edit 2: very comprehensive, i was not considering a making a mobile version of my game precisely because of the scaling issues, now i am. cheers!

Share this post


Link to post
Share on other sites

That's the most important part in the mobile game development and for many the greatest source of bugs or issues. Thank you Rich for publishing the guide, I'm sure it will be invaluable for many gamedevs!

Share this post


Link to post
Share on other sites

Thanks for the feedback guys :) I've made some edits today and will publish a new version - so if anyone spots something else, please let me know!

 

I've been so encouraged by the number of people getting this Guide that I'm starting the next one tomorrow :)

 

Will it include a section on the windowConstraints?

Share this post


Link to post
Share on other sites

Hi Rich

 

I found this very useful and am looking forward to more in due course.

 

I noticed a few minor typos whilst reading and in the spirit of Lean Pub please see below for a list.

 

I have also uploaded an annotated version to my Dropbox (which I will remove in due course) to make it easier to see the typos in context.

 

https://dl.dropboxusercontent.com/u/20488777/scale-manager-annotated.pdf

 

I hope this is useful.

 

Regards

 

Mike

 

Page 2 - 2 typos (you've --> you) (is --> it)
Page 3 - missing apostrophe in "player's bandwidth"
Page 5 - suggested re-wording and missing apostrophe in "game's parent container"
Page 6 - missing letter "e" in "the"
Page 11 - missing apostrophe in "parent's dimensions"
Page 13 - missing apostrophe in "sprite's width"
Page 13 - typo (regadless --> regardless)
Page 17 - typo (depending --> depend)
Page 22 - "straightforward" is one word
Page 23 - missing apostrophe in "device's screen"
Page 23 - "Fullscreen mode" inconsistently capitalised compared to elsewhere on the page
Page 23 - "MouseEvent" inconsistently capitalised compared to page 24
Page 24 - Fullscreen and FullScreen both used
Page 25 - "Fullscreen mode" should be "fullscreen mode"

Share this post


Link to post
Share on other sites

Thanks for the feedback Michael - I've incorporated all of your changes into the new release I published today.

 

Also everyone - here is my new book: A Guide to the Phaser Tween Manager. You can get emailed when it's ready from that page. I'm 20% through and it's already quite large, so this will be a bigger and more detailed book than the Scale Manager one, with more creative source code too. Looking forward to releasing it next week :)

Share this post


Link to post
Share on other sites

Cool, I've just bought it... I have to say that there appears to be a great thought process behind Phaser.  Even thinking about scaling issues in other frameworks is a PITA so hopefully this will enlighten me as to the true way. :D

Share this post


Link to post
Share on other sites

Finding the book really useful thanks. 

 

Couple of typos that could cause confusion in the code:

Pg 36 update function backslash at end of minHeight and and maxHeight shouldn't be there.

s = s.concat("minWidth: " + game.scale.minWidth + " - minHeight: " + game.scale.minHeight\+ "\n");s = s.concat("maxWidth: " + game.scale.maxWidth + " - maxHeight: " + game.scale.maxHeight\+ "\n");

Share this post


Link to post
Share on other sites

workaround?

s = s.concat("minWidth: " + game.scale.minWidth +           " - minHeight: " + game.scale.minHeight + "\n");s = s.concat("maxWidth: " + game.scale.maxWidth +           " - maxHeight: " + game.scale.maxHeight + "\n");

code formatting is stupid :( 

Share this post


Link to post
Share on other sites

Hi @rich

What do you think about to add more examples to create games/websites like http://flashvhtml.com/ and http://www.goodboydigital.com/runpixierun/ using Phaser?

Because the scaling is fullScreen, we need more examples about that... (using assets with different sizes according on the size of the device)

Thanks in advance, Nicholls

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.