Francois Posted August 6, 2013 Share Posted August 6, 2013 Fellow HTML5 game makers, I have been struggling with making my games fit on the most common phones but there is always one device on which the scaling looks bad, or for which I need to wrestle with CSS or some browser resizing or loading events. Until now, I have used cocos2d-html5 and melonJS but auto-scaling is not available or very meh. As many of you do, I wish to focus more on the game making part and less on the "Will it scale well on X device?" question. Do you have any recommendation for frameworks/engines that make games scale well on most phones and tablets, just through some easy setup. I do not wish to code resizing methods in Javascript anymore Thanks in advance for answers! Francois Quote Link to comment Share on other sites More sharing options...
remvst Posted August 6, 2013 Share Posted August 6, 2013 Do you use only DOM, or only canvas? That's kinda important when scaling. Quote Link to comment Share on other sites More sharing options...
Francois Posted August 8, 2013 Author Share Posted August 8, 2013 I am no expert but this is what I do:- on MelonJS, there is some auto-scaling feature when the canvas is created.- on cocos2d-html5, there is no embedded function so I get the available screen space and resize the canvas myself. What I would just like to know is if there is a framework which just does the magic by itself. Thanks Quote Link to comment Share on other sites More sharing options...
Gio Posted August 8, 2013 Share Posted August 8, 2013 Our WADE does it. It's quite a flexible system, so you have to tell it how you want it to resize / stretch your canvas - it can stretch preserving the aspect ratio, or not preserving it, or change the number of pixels on the canvas moving your objects relative to the edges of the screen, and it can do some cropping. Or a combination of all those things, according to the rules that you set - for example, crop up to a certain resolution, then stretch preserving aspect ratio, etc. A bit complicated to explain, but try resizing this to see it in action. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.