How to support multiple screen sizes Android

0 favourites
  • 10 posts
From the Asset Store
Controller Support ,TouchScreen Support , Keyboard Support , Action Platformer, Lots of Animations
  • Okay so I've read the forums regarding this particular issue, and I've found some topics on it, but nothing was as clear and straight forward as it should be. Is there any one that can simply state in the easiest way possible what is the easiest way to support multiple screen sizes for android? Where do I start, what do I do in the middle, where do I begin? I really want to make Scirra made-games thrive on every market possible I want to create the best fitting game as best as I can, so this will help me out and others a lot. Thank you for your time. <img src="smileys/smiley41.gif" border="0" align="middle" />

  • The best mentioned approaches involve setting the full screen to scale outer.

    There are quite some topics and capx's relating to this in the forum.

    generally it is setting scale outer, and have a some extra layout imagery around your layout size to reduce black lines at the sides or bottom/top.

    Scale outer will try and stretch your viewport till either the widest or highest side of your viewport matches the users window.

  • As mentioned above, I use Scale Outer.

  • Well, you could create a system which can update the positions of your objects so that they always stay in a relative position to the window size, and stretch (with/without preserving the aspect ratio, maintain size relative to screen width/height) them as necessary.

    Here's a thread where i posted how the end result should look like (proof that this is very much possible in C2), however it isn't made with the best practices and therefore would introduce bugs into something faster paced such as games: http://www.scirra.com/forum/your-c2-tests_topic41840_page57.html

    Also, a direct link for the lazy: https://dl.dropboxusercontent.com/u/80437109/LimbaziLive/web-test/index.html

    Something that i should mention is that you'll probably have problems with the touch controls / mouse input coordinates when using the scale outer mode, i had to re-create a new system (2 global variables for both the X and Y coordinates) that takes the viewport sizes into account, just to be able to precisely read the input... :/

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • you can use touch.x("Layername") (or mouse.X("Layername")) which grabs the X according to the layers scale and or paralax.

    ;)

  • Not sure about others, but for me Scale Inner has had much better results than Scale Outer...

  • Thanks a lot everyone, your responses are really helping me to understand construct just a little more every time. Another question, more specified this time, I have a game that I`m currently working on aside from my other projects of course, and it`s layout size is set to 400, 500, -- it`s margin size is set to 400, 500 -- and it`s window size is set to 400, 500 -- now I understand that using scale outer or inner will help me to accomplish compensation of varying screen sizes, but can I get a specific example using the numbers I just gave perhaps how to allow this game to be able to be presentable to the android user of, Samsung Galaxy S1 = 480 x 800 -- and The Samsung galaxy S3 = 720 x 1280. Would I have to target the Samsung Galaxy S1 screen size specifically or would I have to target the S1 and then size it down?

  • you can use touch.x("Layername") (or mouse.X("Layername")) which grabs the X according to the layers scale and or paralax.

    ;)

    Thank you so much!! I had a MASSIVE bug and i didn't know why my mouse controls where gradually more inaccurate as the camera zoomed out / as the layer was scaling. I was using just "Mouse.X, Mouse.Y", and know with your suggestion I use "Mouse.X(1), Mouse.Y(1)" and it works like a dream!! Now accurate mouse controls camera zoomed in or out.

    Thanks a million!! <img src="smileys/smiley32.gif" border="0" align="middle" />

  • > you can use touch.x("Layername") (or mouse.X("Layername")) which grabs the X according to the layers scale and or paralax.

    > ;)

    Thank you so much!! I had a MASSIVE bug and i didn't know why my mouse controls where gradually more inaccurate as the camera zoomed out / as the layer was scaling. I was using just "Mouse.X, Mouse.Y", and know with your suggestion I use "Mouse.X(1), Mouse.Y(1)" and it works like a dream!! Now accurate mouse controls camera zoomed in or out.

    Thanks a million!! <img src="smileys/smiley32.gif" border="0" align="middle" />

    I tried that, but it didn't work for me. Then again, i was using two coordinate systems for positioning the objects (the default in C2 and also my own for scaling and positioning the objects relative to the default layout size. don't ask me why, it just was faster in regards to positioning the objects in the editor. or something...)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)