Different resolutions

Community Forums/General Help/Different resolutions

JBR(Posted 2017) [#1]
I'd like to develop for 1080p.

How do you guys develop for less or more resolution.

BMax - 2D

Jim


Steve Elliott(Posted 2017) [#2]
Good question. My monitor's top resolution is 1920 x 1080 too.

I guess it depends if you can scale your graphics without too much distortion - and then positioning needs a scaling factor. If scaling is a problem, then you can add 'black bars' where the difference between the required and available resolution differs.

The scaling factor would be:

AVAILABLE X RESOLUTION / REQUIRED X RESOLUTION
AVAILABLE Y RESOLUTION / REQUIRED Y RESOLUTION

If somebody has a higher resolution monitor then they probably have 1080p too. On laptops is where you have the greatest variance.

Playniax seems the guy to answer your question though, because his framework systems have virtual resolutions and such.


Bobysait(Posted 2017) [#3]
"How do you guys develop for less or more resolution."

Well ... I set the graphics size to a lower resolution. (yep, it's that simple)

Then, it probably depends on <Fullscreen or Windowed> mode.
In the first case you 'll need to check the hardware resolutions available (all the resolution won't work and will fail creating the graphics context)

But to be honest I don't really understand the question as it seems too obvious to be just that, so, for the moment, my best answer just this one :
-> Set the graphics size to a lower resolution. ( helpfull isn't it ?! :p )


ps :

Playniax seems the guy to answer your question though, because his framework systems have virtual resolutions and such.


BlitzMax has a native max2d function called SetVirtualResolution.

ps 2 : there is still a Blitzmax programming section, maybe it's a better place for this question ?


Steve Elliott(Posted 2017) [#4]
No, he didn't want a lower resolution.

No, getting help from the community should be in the help section.

You didn't understand the question, because you avoided it and suggested something different.


Bobysait(Posted 2017) [#5]

You didn't understand the question, because you avoided it and suggested something different.


Nope, I didn't understand it because I just didn't understand it.
1/ I'm not english, so my understanding in formulas stops where I didn't learn it.
2/ My brain is compressed and I'm having a lot of trouble to keep concentrated on anything
So ... I just don't understand the question all that come to my mind is "How to develop with different resolutions"

ps :

No, getting help from the community should be in the help section.


This guy ends his post with "BMax - 2D"
(or maybe it's his signature, I can't tell as there is no separation)
And there is two sections related to blitzmax programming (one for general blitzmax and the other for beginner questions)


RemiD(Posted 2017) [#6]

My brain is compressed and I'm having a lot of trouble to keep concentrated on anything


if this is a chronic problem, simple suggestion (since i had similar symptoms a while ago) : maybe try to reduce the amount of salt and of sugar that you eat/drink. (take a look at the composition of foods/drinks) Quite easy if you are not obsessed by foods/drinks... Of course the pressure can be provoked by others causes...


Xerra(Posted 2017) [#7]
I get your question, I think. I'm a bit vague on this too, so hopefully someone can explain it a lot better if they understand what's needed.

You're asking how graphics can be located in the right places on the screen when there's an option to change the resolution of the screen display, if I'm correct?

You can use SetVirtualResolution which can be adjusted so that no matter what size screen mode the user has in place, the code can use default location data for images for say a 1024/768 standard resolution. I think NG does something like this when it compiles to tablet so games look ok on both Iphone resolutions, and Ipads. You might end up with some images that look far too chunky if they're designed for a lower resolution screen and are put onto a device that has a drastically different detail level unless you created an alternative image set. Kind of like what XCode allows you to set up in projects developed on that.

I'm no expert with virtual resolution though, so please forgive me if I misunderstood the correct use here.

Another way to do it would be to have some kind of screen size x and y information read in and use a formula for all images being displayed which takes these into account so they get placed at the right spot, no matter what size the screen is. I'm only theorizing this, however, because I've always just had a couple of modes defined and hard code the images accordingly, because I don't know how either as yet. Or, if I'm being a bit crap then I'll just use a default of 1024 * 768 as I doubt there's much equipment out there that can't display that.


RemiD(Posted 2017) [#8]
if your question is how to position your game view or GUI elements or HUD elements depending on the chosen width,height of the graphics window (windowed or fullscreen), the answer is to position all your images (even a 3d render can be considered as an image), depending on the center of the screen...
for example to position your game view at the center of the screen :
PX% = graphicswindowwidth/2-gameviewwidth/2
PY% = graphicswindowheight/2-gameviewheight/2

the game view area does not necessarily need to be the same width,height than the graphics window area

then you can draw your GUI elements or HUD elements related to the graphics window area or related to the game view area...


Matty(Posted 2017) [#9]
If the aspect ratio is the same on the other devices I'm building for I simply use 1 set of graphics designed for the highest resolution.

If I'm building for different powered hardware I have a lower resolution set of images if fill rate is a problem (mobile devices).


RemiD(Posted 2017) [#10]
The game view does not necessarily need to fill all the screen, especially if this causes distortions. I have played more than one game where there were borders at left and at right because the resolution was only 4:3, and personally i have no problem with that...


CGV(Posted 2017) [#11]
I know 4:3 is still a factor in mobile thanks to the ipad but for desktop games do you still need to deal with 4:3 monitors?


xlsior(Posted 2017) [#12]
I know 4:3 is still a factor in mobile thanks to the ipad but for desktop games do you still need to deal with 4:3 monitors?


Depends: If you want your game to work on 100% of the computers out there, you'll need to support 4:3 as well. If you don't care, then no one is making you.
However, if you are creating a commercial game, then keep in mind that every computer it won't run on is a potential tech support case, bad review, and return/refund.

Here's a good starting point: The steam hardware survey, which is based on the specs of hundreds of thousands of Steam users. It shows that the vast majority of people run on a widescreen setup, but 1024x768 and 1280x1024 still add up to 5.68% of the market.

http://store.steampowered.com/hwsurvey

But keep in mind that even in widescreen, not all computers support the same resolutions. 1920x1080 is the most popular with 38% of people running it, but almost 25% only does 1366x768 -- and another 2 percent 1360x768, many of which will NOT support 1366x768.

I'd suspect that most of the people running 1366x768 do so because it's the max resolution of their laptop display. If you make your game 1920x1080, that will mean that it won't run on a full 1/3 of the computers out there. Even if you don't feel like dealing with 4:3 and 5:4 screens, you at least should try to accommodate other widescreen resolutions.


CGV(Posted 2017) [#13]
Wow, great detailed answer xlsior, thanks!


Steve Elliott(Posted 2017) [#14]
So basically, with the many systems out there these days, you have to support them and get your game running optimally.

Or you could take the easy route and pick a fixed low resolution for your game.


xlsior(Posted 2017) [#15]
Or you could take the easy route and pick a fixed low resolution for your game.


Note that some of the newer high-res screens may have issues with 800x600 or below, and if you pick 1024x768 you could have aspect ratio problems: some video card drivers and monitors will re tain the original aspect ratio and give you black bars on the side, while others will stretch to fit the panel.


Steve Elliott(Posted 2017) [#16]
Yep, it's a minefield. 800 X 600 or lower will not run on some systems (unless it's in a Window - rather than full screen). That's why the author of the question is asking for help.


RemiD(Posted 2017) [#17]
a possible approach is to have a game view which can be drawn in all kinds of (common) screens (4:3, 16:9) and depending on the case (screen ratio) have the game view smaller than the graphics window (and a black backround in the remaining areas)... (that's what they do for movies/videos...)


therevills(Posted 2017) [#18]
I support the user's screen resolution using a virtual resolution if they have a resolution greater than 1366x768, else I try 1366x768, then 1280x720, then 1024x768, then 800x600 and then 640x480.

I design my latest games to fit in 4:3 but expand the background / UI placement to go in 16:9 if the user selects it/system detects it.


coffeedotbean(Posted 2017) [#19]
Virtual resolution is the simple answer else you'll need to develop resources\images for most popular resolutions then code around that.

for a good virtual resolution with aspect ratio correction try http://www.blitzbasic.com/codearcs/codearcs.php?code=2879 - it's what I use in my games (sig), I set the Graphics() resolution to DesktopWidth(), DesktopHeight() that way I dont need to worry about support resolutions on the end user.

If you opt for Virtual resolutions you'd be safe developing a 1080p game and letting the virtual resolution scale it down to lower, the effect going the other way (scaling up) wont look so good though.


JBR(Posted 2017) [#20]
Hi, thanks for the ideas!

I think SetVirtualResolution, VirtualMouseX(), VirtualMouseY() are going to do nicely.

Jim