• 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!

Resolution and views

S

spiritualatombomb

Guest
So i've set up a basic system for views that is turning out to be problematic, hoping you guys can have a look and come up with some feedback on making it more flexible. The way the view system works now is that I first retrieve the screensize and attach some variables to the width and height in my gamefile creation event.

screenWidth = display_get_width()
screenHeight = display_get_height()

I then use these variables to limit the player's view in the gamefile's step event, so I divide it by 5 for rooms with a view. And don't divide at all for rooms without one:

// set views for different rooms
if room == tutoriallevel && view_wview != screenWidth / 5 { view_wview = screenWidth / 5; view_hview = screenHeight / 5; }

if room == rGameover { view_wview = screenWidth; view_hview = screenHeight; }

This works fine for me, and other people I've had test it. The thing is they've all been using my resolution which is 1920x1080. Today I had a guy play through it and complain about how difficult it was and how he couldn't see enemies or GUI elements. Turns out he was running a 1366 x 768 resolution and this resulted in a much tinier view than intended. So yeah, I'm still no good with views so I'm a bit clueless. So my question is as follows: Do you have any ideas how I could define a standardized/similar view across all resolutions?
 
D

Dennis Ross Tudor Jr

Guest
I believe it's due to the screen and not your game per se. Your friends monitor is an 'extended graphics array' (WXGA) monitor and your resolution is calling for a HD resolution. This article and this article mentions the major differences between the 1920x1080 and the 1366x768 resolutions and the problems involved with dealing with them.

EDIT: I think checking for the resolution and adapting the ratio to better fit your friends monitor might work. But since that resolution is going out of style and no longer a standard, it might be worth not adjusting at all or changing the aspect ratio better fit to that actual low resolution widescreen ratio
 
Last edited by a moderator:
S

spiritualatombomb

Guest
I believe it's due to the screen and not your game per se. Your friends monitor is an 'extended graphics array' (WXGA) monitor and your resolution is calling for a HD resolution. This article and this article mentions the major differences between the 1920x1080 and the 1366x768 resolutions and the problems involved with dealing with them.

EDIT: I think checking for the resolution and adapting the ratio to better fit your friends monitor might work. But since that resolution is going out of style and no longer a standard, it might be worth not adjusting at all or changing the aspect ratio better fit to that actual low resolution widescreen ratio
Hm all right. It's a fair point that this is an outdated resolution. But I think the problem also shows a fault with my viewsystem, and I'm thinking that just dividing the display height and width is a bit too static if it prevents some laptop users from even playing the game. So I figure I'd have to make the view dependent on something other than dividing the screen height/width, so that the same ammount of my rooms are being displayed across resolutions. But again, this is beyond my current level of experience so I guess the current system will have to do for the time being.

EDIT: Or yeah, I think your suggestion is a better one about doing a check for screenheight/width of an WXGA and if true setting up a new set of rules, because the current system does work very well for HD monitors.

Thanks for the informative response man.
 
Last edited by a moderator:

RangerX

Member
Your problem is not the view. For your game you should have ONE view size and keep it.
Its the application surface that need to scale to different monitor sizes. Because you want all the player to have the same experience, to have the same point of view, see the same portion of the room.
Here's the one stop place for scaling:
https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/

Besides the explanation at first (which isn't your current situation) there's still 4 methods for scaling described after + 2 important tutorials from YogoGame helping your understanding scaling and an excellent alternate method by Pixelpope for windowed games.

Other notes:
1366x768 is not outdated in the sense that its the most used screen resolution in the world right now. (followed by 1920x1080)
 
Last edited:
S

spiritualatombomb

Guest
Your problem is not the view. For your game you should have ONE view size and keep it.
Its the application surface that need to scale to different monitor sizes. Because you want all the player to have the same experience, to have the same point of view, see the same portion of the room.
Here's the one stop place for scaling:
https://forum.yoyogames.com/index.php?threads/how-to-properly-scale-your-game.995/

Besides the explanation at first (which isn't your current situation) there's still 4 methods for scaling described after + 2 important tutorials from YogoGame helping your understanding scaling and an excellent alternate method by Pixelpope for windowed games.

Other notes:
1366x768 is not outdated in the sense that its the most used screen resolution in the world right now. (followed by 1920x1080)
All right, thanks. I'll take a look at the different solutions for sure.
 
Top