Jump to content


Photo

Make 1024x768 game support 1280x720


  • Please log in to reply
9 replies to this topic

#1 Thaudal

Thaudal

    GMC Member

  • GMC Member
  • 403 posts
  • Version:GM:Studio

Posted 25 January 2013 - 05:27 PM

I'm almost done with a game soon to be released on Android and iOS, which aims to be equally compatible with phones and tablets.

So far, we've tested on 10 different phones and 2 different tablets.

The game handles resolutions and aspect ratios using Mark Overmars' technique in his "Designing Mobile Games" PDF, which means the game is based on either 1024x768 or 960x640, which then scales either up or down based on need.

The only resolution so far we've encountered that has been vey problematic, is 1280x720. Here, about 35% of the horizontal axis is missing - and my guess is that it's the 256 pixels that differentiate between 1024x768.

My question is - how could I fix this without making dedicated room for it? At the moment I have a dummy room at the beginning which detects the display size, and based on that it sets all the game room's views up to either 1024x768 or 960x640.

EDIT: Oh yeah, something strange btw: The game works on the Nexus 7 (1280x800) but not on the Galaxy S3 (1280x720). Strangely enough, it's the horizontal axis that displays incorrectly. Huh.

Here's our data so far on the devices, in case anyone's interested:

TESTED AND CONFIRMED WORKING ON THE FOLLOWING DEVICES:

Android Phones:
LG Optimus One P500 ----------- (320x480)
HTC Legend -------------------- (320x480)
HTC Desire -------------------- (480x800)
HTC Desire S ------------------ (480x800)
Samsung Galaxy S2 ------------- (480x800)
Samsung Galaxy W -------------- (480x800)
HTC Sensation XE Beats -------- (540x960)
HTC Sensation 710e ------------ (540x960)

Android Tablets:
Samsung Galaxy Tab GT-P1000 --- (1024x600)
Google Nexus 7 ---------------- (1280x800)

iOS:
iPhone4 ----------------------- (960x640)
iPad3 ------------------------- (2048x1536)

KNOWN ISSUES ON THE FOLLOWING DEVICES:

Android Phones:
HTC One X --------------------- (1280x720) <- Missing about 35% on the horizontal axis
Samsung Galaxy S3 ------------- (1280x720) <- Missing about 35% on the horizontal axis

Edited by Elminster, 25 January 2013 - 05:31 PM.

  • 0

#2 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16041 posts
  • Version:GM:Studio

Posted 25 January 2013 - 10:01 PM

make a boot room, and a boot object, drop the boot object in the boot room, in the game start event, query the display size and use room_set_view or room_set_width/height for all the rooms in your game, then call room_goto_next() to go to your actual first room (menu or first level)
  • 0

#3 Thaudal

Thaudal

    GMC Member

  • GMC Member
  • 403 posts
  • Version:GM:Studio

Posted 25 January 2013 - 10:58 PM

make a boot room, and a boot object, drop the boot object in the boot room, in the game start event, query the display size and use room_set_view or room_set_width/height for all the rooms in your game, then call room_goto_next() to go to your actual first room (menu or first level)


That is what I'm doing right now, only I'm setting it to two possible view sizes: 1024x768 or 960x640, and the game then scales up or down based on needs. However, for 1280x720, for some reason, this isn't working (which is weird, because it works fine for both 1280x800 and 1024x600).

Edited by Elminster, 25 January 2013 - 10:59 PM.

  • 0

#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16041 posts
  • Version:GM:Studio

Posted 25 January 2013 - 11:13 PM

fiddle until it works, you may find the problem.

I would start with setting your view so things always scale up instead of down, just for testing. small view in room (640x480), and port matching display for the screen. go from there and fiddle until it works no more, using larger room view size...
  • 0

#5 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 26 January 2013 - 12:46 AM

Mark Overmars' guide is a bit outdated and was mostly made with iOS in mind, so this may help you a lot:
http://gmc.yoyogames...howtopic=565614

.

Edited by Manuel777, 26 January 2013 - 12:46 AM.

  • 0

#6 Thaudal

Thaudal

    GMC Member

  • GMC Member
  • 403 posts
  • Version:GM:Studio

Posted 26 January 2013 - 01:25 AM

Mark Overmars' guide is a bit outdated and was mostly made with iOS in mind, so this may help you a lot:
http://gmc.yoyogames...howtopic=565614

.


Thanks for the reply.

I just read your guide, and I will try it out as soon as possible (the 2 devices on which it faults are not in my possession, so I'll have to borrow a friend when possible), but I see other users posting in your thread are experiencing the exact same thing I describe in the OP - the black bar to the left or right. My background is already stretched on the x-axis, which doesn't work.
Like I said, I'll still test your method ASAP (that is, when I have one of the devices within reach) but from the looks of it, I'll have the exact same problem using your technique that I'm having right now using Mr. Overmars'. Can you tell me what would be different from them? If memory serves, he does almost the same thing, except he pre-sets the view size of the rooms before entering them.
  • 0

#7 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16041 posts
  • Version:GM:Studio

Posted 26 January 2013 - 02:11 AM

>> except he pre-sets the view size of the rooms before entering them.

any changes to views and room size has to be done beforehand. once in the room or if the room has been visited and is persistent, calls to change room size or view size will be ignored
  • 0

#8 Thaudal

Thaudal

    GMC Member

  • GMC Member
  • 403 posts
  • Version:GM:Studio

Posted 26 January 2013 - 03:48 AM

>> except he pre-sets the view size of the rooms before entering them.

any changes to views and room size has to be done beforehand. once in the room or if the room has been visited and is persistent, calls to change room size or view size will be ignored


So? I don't change, or attempt to change the views in any other places than the dummy room at the beginning. Why would I need to? What difference would that make?
(I have taken the rotation initialization steps into consideration - it wouldn't work on all those resolutions if I hadn't)
  • 0

#9 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 16041 posts
  • Version:GM:Studio

Posted 26 January 2013 - 04:42 AM

I just re-iterated that fact... your last sentence does imply you did not do it in another room, after you state you do in post 3 which confused me a little
  • 0

#10 Manuel777

Manuel777

    InvaderGames

  • GMC Member
  • 3535 posts
  • Version:GM:Studio

Posted 26 January 2013 - 01:09 PM

You can still make changes to te views on te same room, using the view_ functions, its what I do on my topic and I ave tested it works flawlessly.

Also, as I describe on that topic, you can simulate different screen sizes right on windows by changing the size of the window at the start of the game,so youdont have to have all those different devices ;)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users