• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[SORTED OUT]screen resolution

RODO

Member
Hello guys, I come here to answer a question:

is it possible to keep the resolution or change it while you move between rooms?

1611988896122.png
I have a problem in the creation of the menu screen, more in the part of drawings and paintings, where my drawing is not fitting on the screen and I would like to change this room so that the drawing was perfect and well fitted. The problem with all this is that when he changed to the height and width of the drawing he changed to all the other rooms, making them flat and horrible.
I would like to know if there is any way to tell this, maintaining the resolution or changing only one room and leaving all the others normal. I appreciate all the help and attention
 

Tyg

Member
each room has constants room_width and room_height
you can do it several ways by either changing the cameras projection and view mats
or use viewports
it looks like your just putting a sprite on the background layer....if thats what your talking about
check the background option stretch in the room editor
not sure why you change the room size, objects can be scaled and the menus visible property can be turned on and off or put in another room
anything marked persistant carries between rooms including the room properties or objects...anything not marked persistant gets destroyed on room changes
so if you want the room size to stay the same check persistant in properties in the room editor
it is far easier to stay with one room size
if you post a few pictures of what your trying to do i could help you more :)
 

Tyg

Member
window_set_fullscreen(true) or false sets windowed or fullscreen mode
best to keep one room size and persistant throughout
i take it theese are all in separate rooms, and you are trying to use background layer pictures of different sizes
the background layer is special and is the room size, it can be tiled or stretched(without camera manipulation)
if that is the case its best to mark room as persistant and check the background layer to stretched
if you want to scale move or rotate it , easiest to put it on an object as its sprite
you could also just have all your backgrounds the same size
 
Last edited:

DaveInDev

Member
don't forget that you can use the Draw GUI layer and events to display a menu over the current room. This layer can have a different size/resolution than the current room.
look at display_set_gui_size

typically, you can use something like
GML:
    display_set_gui_size(window_get_width(), window_get_height());
 
Last edited:

RODO

Member
each room has constants room_width and room_height
you can do it several ways by either changing the cameras projection and view mats
or use viewports
it looks like your just putting a sprite on the background layer....if thats what your talking about
check the background option stretch in the room editor
not sure why you change the room size, objects can be scaled and the menus visible property can be turned on and off or put in another room
anything marked persistant carries between rooms including the room properties or objects...anything not marked persistant gets destroyed on room changes
so if you want the room size to stay the same check persistant in properties in the room editor
it is far easier to stay with one room size
if you post a few pictures of what your trying to do i could help you more :)
well, explained better I will use some images that I think is more explanatory :
1612041027499.png
here I changed the screen to the size of the sprite (height and width) so that this specific room is the size of this sprite (don't worry too much about options I'm fixing yet)
1612041044680.png
however, when I change rooms, all rooms are the size of the menu room, compromising all image and screen quality. This is a big problem, because my game is a top-down that needs a bigger screen size and I also didn't want it to change
 

RODO

Member
Your game is indented to be played on windowed mode (aka not fullscreen)?
intend to put but not at the moment

don't forget that you can use the Draw GUI layer and events to display a menu over the current room. This layer can have a different size/resolution than the current room.
look at display_set_gui_size

typically, you can use something like
GML:
    display_set_gui_size(window_get_width(), window_get_height());
well, i can try to use that idea if i can't go the way i have in mind. Thank you for your help
 

gkri

Member
I understand that you are eager to focus on certain aspects of your game, but there some things that you need to decide and work on early, to avoid design dept and/or redoing work later. The sooner, the better. One of them is the design or ideal resolution of your game. The design/ideal resolution is the resolution that your graphical assets look as indented without any scaling or with scaling equally all the assets.

I assume from your screenshots, that you have not decided your design resolution yet and that you should consult the GMS2 manual and see what is the difference between the room size, the viewports and how to manipulate them.

Additionally, you can try my resolution manager script and hopefully make your resolution handling a lot easier.
 

RODO

Member
I understand that you are eager to focus on certain aspects of your game, but there some things that you need to decide and work on early, to avoid design dept and/or redoing work later. The sooner, the better. One of them is the design or ideal resolution of your game. The design/ideal resolution is the resolution that your graphical assets look as indented without any scaling or with scaling equally all the assets.

I assume from your screenshots, that you have not decided your design resolution yet and that you should consult the GMS2 manual and see what is the difference between the room size, the viewports and how to manipulate them.

Additionally, you can try my resolution manager script and hopefully make your resolution handling a lot easier.
hmm I understand, I can try this and read more about it, because, I really don't have much idea of window size or room size, I will consult to see the best option. Thank you very much for your attention and help
 
Top