xTravax Posted August 21, 2014 Share Posted August 21, 2014 hi umm i wanted to ask: what's best method for drawing dx functions considering resolution? i have seen many topics about this but some people say those methods dont work and some say they do, so im not sure anymore and i decided to ask here i have made an userpanel only using (example dxDrawText(screenWidth/3,screenHeight/2.50.......)) and it works awesome on my 1920x1080 resolution but for an example on 1366x768 it looks like crap with half things missing and when there are no stuff missing, images/buttons aren't placed correctly anyway which method would be best for most of resolutions? Link to comment
undefined Posted August 21, 2014 Share Posted August 21, 2014 hi umm i wanted to ask: what's best method for drawing dx functions considering resolution?i have seen many topics about this but some people say those methods dont work and some say they do, so im not sure anymore and i decided to ask here i have made an userpanel only using (example dxDrawText(screenWidth/3,screenHeight/2.50.......)) and it works awesome on my 1920x1080 resolution but for an example on 1366x768 it looks like crap with half things missing and when there are no stuff missing, images/buttons aren't placed correctly anyway which method would be best for most of resolutions? Example: local sx, sy = guiGetScreenSize() dxDrawText((1150/1366)*sy,(510/768)*sy.......) Link to comment
xTravax Posted August 21, 2014 Author Share Posted August 21, 2014 i have used your code on 1920x1080 res and as i went to lower resolution the text moved more and more on right side Link to comment
arezu Posted August 21, 2014 Share Posted August 21, 2014 It depends on how your gui looks like. Sometimes it's better to scale things depending on screen height only for a linear scaling in both axes, or even make a different layout design for lower screen resolutions. Link to comment
tosfera Posted August 21, 2014 Share Posted August 21, 2014 The thing I did to be honest, is not using any value at all like AbaZaSiRiN00 did. I'm just using calculations for every device; local x, y = guiGetScreenSize() dxDrawText ( 'Some random text', x * 0.4, y * 0.2, x * 0.6, y * 0.3, tocolor ( 255, 255, 255, 255 ), 1, "default", "center", "top" ) I'm not having trouble so far with any resolution. Link to comment
xTravax Posted August 21, 2014 Author Share Posted August 21, 2014 It depends on how your gui looks like. Sometimes it's better to scale things depending on screen height only for a linear scaling in both axes, or even make a different layout design for lower screen resolutions. The thing I did to be honest, is not using any value at all like AbaZaSiRiN00 did. I'm just using calculations for every device; local x, y = guiGetScreenSize() dxDrawText ( 'Some random text', x * 0.4, y * 0.2, x * 0.6, y * 0.3, tocolor ( 255, 255, 255, 255 ), 1, "default", "center", "top" ) I'm not having trouble so far with any resolution. thank you both! it seems to work good so far Link to comment
Mr_Moose Posted August 21, 2014 Share Posted August 21, 2014 There are many ways to solve this and make the GUI looks nice, I'm usually build them after the screen edges which works pretty good both on small sized fixed GUI's and dynamic ones on all resolutions. More regular dialogs and windows are usually centered, then we have centered at top or bottom for longer text messages for example. At the end you might also set a minimum supported resolution for any GUI, below that it won't matter if it looks weird since nobody would use that small screen anyway. This lowest resolution are often defined as 800x600 pixels. Link to comment
tosfera Posted August 21, 2014 Share Posted August 21, 2014 There are many ways to solve this and make the GUI looks nice, I'm usually build them after the screen edges which works pretty good both on small sized fixed GUI's and dynamic ones on all resolutions. More regular dialogs and windows are usually centered, then we have centered at top or bottom for longer text messages for example. At the end you might also set a minimum supported resolution for any GUI, below that it won't matter if it looks weird since nobody would use that small screen anyway. This lowest resolution are often defined as 800x600 pixels. offtopic; If you're using 800x600, you should probably get an upgrade. I'm supporting 800x600 with alot of pain in my hearth, why the hell, do you want a resolution so small in 2014. But still, alot of people are using it! Link to comment
bandi94 Posted August 21, 2014 Share Posted August 21, 2014 offtopic; If you're using 800x600, you should probably get an upgrade. I'm supporting 800x600 with alot of pain in my hearth, why the hell, do you want a resolution so small in 2014. But still, alot of people are using it! Maybe bk not everyone live in a place where money grow on the tree's ( parents ) and they can't just spend 1-2k euro on a gameing PC like maybe you can .... And GTA:SA game eninge is a crapy engine and don't realy can handle custom object's very well so those player's must use 800x600 to get out some FPS just bk they can't get money for gameing PC's from the tree's. Now you know why ..... Link to comment
Mr_Moose Posted August 21, 2014 Share Posted August 21, 2014 offtopic; If you're using 800x600, you should probably get an upgrade. I'm supporting 800x600 with alot of pain in my hearth, why the hell, do you want a resolution so small in 2014. But still, alot of people are using it! Truly off topic, maybe you should read again and realize that I feel exactly the same about such crappy resolutions. I got 3 screens with 1920x1080 currently but still, it's easier to make the GUI for a low resolution and then let it scale up rather than letting it scale down from HD. That was the point. The most common resolution out there was 1366x768 according to stat counter last time I checked. Link to comment
xTravax Posted August 21, 2014 Author Share Posted August 21, 2014 nevermind this post Link to comment
Bonsai Posted August 21, 2014 Share Posted August 21, 2014 This 800x600 discussion is interesting. For some reason, there are many players out there using this resolution. Even for an older game as GTA SA thats just too low. So, if people still using this in 2014, its totally their fault if that affects them in a negative way. Link to comment
DiSaMe Posted August 21, 2014 Share Posted August 21, 2014 This is the attitude I don't like. Such area like 800x600 has enough space to display lots of stuff. As for myself, I use 1366x768, but I designed my server's GUI to fit all resolutions, and while some details might be harder to read at 640x480, the GUI is still usable without problems at this resolution. It's not like 800x600 is too small. It's more like the objects displayed are too big. Link to comment
Mr_Moose Posted August 22, 2014 Share Posted August 22, 2014 GUI's built to fit on all resolutions is called responsive and the whole idea is that you make the GUI to fit on the small screens first, same thing when you make a website, start with mobile phones which may even have lower than 800x600 resolution. Static elements build for those small resolutions will obviously look weird on larger screens too and that's why they are scaled up in a proper way. Text however are hard to scale up since you only enter the size, it's still relative to itself while the players screen may vary from 4:3, 16:10 and 16:9. Because of that it's recommended to add those text elements at either the bottom or top, centered or after the edges like kill messages does. Rectangles, lists, buttons and other GUI elements can often be scaled properly both in x and y which allow them to be placed almost anywhere. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now