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

What can be used as an anchor?

K

krugen

Guest
So I tried both display_get_width and display_get_gui_width and somehow one of the phone tested keep giving me a wrong value. So I assume that it is a device problem.

So, says a box 50x50px big in a 360x640px room. Is there a way to detect the final res of the box as a result of auto-scaling by GMS2?

Why not scale manually? I can't scale manually because the device gives faulty reading to display_get_width/display_get_gui_width. Not all the device, just one that I tested.
 

samspade

Member
How do you know that the width and gui width are wrong? What does your code look like? What are you trying to do with this information?

I think the answer to question, regardless, is no. The box doesn't actually change size (it is still 50px for game logic regardless of resolution) so if you're saying that the functions which would answer the question don't work then I'm not sure what else you would do.

The only thing I can think of is test other functions (such as get_height). For example, does checking the application surface size show the value before or after scaling. Essentially, does some other function return a value you could use as a proxy for the value you want?
 
Top