plicatibu Posted October 18, 2013 Share Posted October 18, 2013 Hi. I'm note sure whether I should post this question here or at the Coding and Game Logic forum. When I developed my first game for Android, I did it with AndEngine framework. In AndEngine one specifies the game dimensions (width and height) and the screen orientation (landscape / portrait) and ratio resolution policy. This way, it doesn't matter the screen resolution in which the game is running, the assets are automatically handled by the framework that put them in the right position. Does Phaser do this too? In negative case, how do I resize the assets and take in consideration the new dimensions from assets so that they will be in the same position (relative to other assets)? Thank you. Link to comment Share on other sites More sharing options...
rich Posted October 18, 2013 Share Posted October 18, 2013 We use a similar approach, yes. Your game has a fixed size (specified in the game constructor) and everything is based off that. Then we scale the canvas to fill the browser, but essentially the game is still the size you requested at the start. Link to comment Share on other sites More sharing options...
plicatibu Posted October 18, 2013 Author Share Posted October 18, 2013 Great to know. Thank you. Link to comment Share on other sites More sharing options...
sergil Posted October 22, 2013 Share Posted October 22, 2013 If I understand rich Your game has a fixed size (specified in the game constructor) and everything is based off that. Then we scale the canvas to fill the browser, but essentially the game is still the size you requested at the start the thing is that when you start a mobile phaser mobile game, the game resolution is the one you specified in the game constructor, but the game is scaled to fill the final web browser? In this case, it means that if your game resolution is for example 480x640 and the mobile resolution is much bigger (1024×768, 2048×1536,...), the game graphics will be blurred by the scaling? my previous game developing experience is developing in Unity3D, and using the free UItoolkit plugin for UI representation. With UIToolkit plugin, you can define different spritesheets for sd/hd resolution, and the game start detects screen resolution and uses the best option, based on parameters that you can define to mark the boundary between sd and hd. In this case you can always use % for defining sprite position. Before reading this post I was thinking if I could create a similar solution to minimize the scale of the images and thus improve the visualization of them... what do you think? how do you code a mobile game that you can see in almost all screen resolutions? I found a web that explains "How to create mobile games for different screen sizes and resolutions" Link to comment Share on other sites More sharing options...
sergil Posted October 29, 2013 Share Posted October 29, 2013 how does window scale works in phaser? I can see the different options: Phaser.StageScaleMode.EXACT_FIT;Phaser.StageScaleMode.NO_SCALE;Phaser.StageScaleMode.SHOW_ALL; Link to comment Share on other sites More sharing options...
{ESO} Posted October 29, 2013 Share Posted October 29, 2013 Add this to your game:game.stage.scaleMode = Phaser.StageScaleMode.SHOW_ALL;game.stage.scale.setShowAll();game.stage.scale.refresh(); Link to comment Share on other sites More sharing options...
{ESO} Posted October 30, 2013 Share Posted October 30, 2013 Ehi @rich,did you have the time for look this? Thanks Link to comment Share on other sites More sharing options...
rich Posted October 31, 2013 Share Posted October 31, 2013 What was it I'm supposed to look at? Link to comment Share on other sites More sharing options...
{ESO} Posted October 31, 2013 Share Posted October 31, 2013 Was referring to this post that is magically disappear.. and merge the my question here... http://www.html5gamedevs.com/topic/1840-crop-resize-in-11 Link to comment Share on other sites More sharing options...
Recommended Posts