Jump to content


Photo

Adapting room size to screen


  • Please log in to reply
4 replies to this topic

#1 Erik Leppen

Erik Leppen

    GMC Member

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

Posted 02 May 2012 - 12:02 PM

I'd like my game room to stretch across the whole screen, and I'd like this to work for multiple resolutions. My old method to do this was to have the first room only have one object, and put in its Create event:

room_set_width(roomname, display_get_width())
room_set_height(roomname, display_get_height())
repeated for all rooms in the actual game, followed by
window_set_fullscreen(true)
room_goto_next()
This works, because GM allowed rooms to have different sizes. However it does this no more due to a design decision. But I'd still like my games to be full screen without scaling, so I'd like to change the actual room size (so that I can use room_width and room_height to position stuff) and have a matching display size as well.

How should I do this?
  • 0

#2 Jack Indie Box

Jack Indie Box

    GMC Member

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

Posted 02 May 2012 - 12:54 PM

i dont see why you would want the room to be different sizes for different end users as gameplay would be completely different. I understand optomizing visuals for different size screens

but surely using viewports and scaling is better?

I know i read that yoyogames changed how there full screening and window size coding recently so i personally havent done anything like this recently.
  • 0

#3 Erik Leppen

Erik Leppen

    GMC Member

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

Posted 08 May 2012 - 08:35 PM

Commercial desktop games do this all the time. Why wouldn't I want to do it as well? I want sharp graphics at every resolution, and that means one view pixel for every screen pixel. No scaling. Scaling creates artifacts I don't want.

I know i read that yoyogames changed how there full screening and window size coding recently

Yes, they changed it. That's why I'm asking how to do it. As I said, I know how to do it in GM8.1. But it has changed.
  • 0

#4 benetonmovie

benetonmovie

    GMC Member

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

Posted 08 May 2012 - 08:53 PM

I am also very curious to hear YYG's response to this. Suppose you want to make a universal iOS app (targetting both the iPhone/iPod Touch and the iPad), what is the best practice for that?

Here's an idea: make all your rooms the maximum size you want to support (let's say we're making an iOS app, so 1024x768, which is the iPad's resolution) and enable views. Instead of changing the size of the room, change the size of your view in your initialization code so it fits the device's resolution. Wouldn't that work?
  • 0

#5 wickedsunny

wickedsunny

    GMC Member

  • GMC Member
  • 128 posts
  • Version:Unknown

Posted 08 May 2012 - 10:17 PM

I am also very curious to hear YYG's response to this. Suppose you want to make a universal iOS app (targetting both the iPhone/iPod Touch and the iPad), what is the best practice for that?

Here's an idea: make all your rooms the maximum size you want to support (let's say we're making an iOS app, so 1024x768, which is the iPad's resolution) and enable views. Instead of changing the size of the room, change the size of your view in your initialization code so it fits the device's resolution. Wouldn't that work?


Making the biggest screen resolution graphic is what I am doing now, making it at 1024 x 768. For ipad 3 I will be creating at HD resolution. Though we will have to keep n mind the over all file size as well, because the same size can be huge for android apps and not acceptable.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users