scaling image based on screen res?

BlitzMax Forums/BlitzMax Beginners Area/scaling image based on screen res?

Amon(Posted 2011) [#1]
No idea where to even begin for the math for this. Maths has never been my plus point even though I know enough to get done what I need coding wise.

Basically I'm looking for a way to scale images dependent on screen resolution but also to have things like the logic adapt with it i.e. screen borders.

Cheers!


Jesse(Posted 2011) [#2]
why don't you use the built in virtual resolution commands.


Amon(Posted 2011) [#3]
Oh! err! When were those implemented? :) Been spending a lot of time with unity on a project so haven't used Max for a while.

Will check them out though, sounds exactly what I need, thanks!


Kryzon(Posted 2011) [#4]
Division.
Hard-code everything to the resolution you're using to develop the game, and then later on implement a factor (CurrentResolution / DevelopmentResolution).

Say, if you developed on a '1024 16:9' monitor screen and the user runs it on a high definition '1920 16:9', everything would be (1920 / 1024) = 1.875 times bigger (by the width at least).

The number to the left of the division is the reference.


H&K(Posted 2011) [#5]
Oh! err! When were those implemented?
When the dx9 driver came out, and dx7 support was dropped from vista and Win 7.
Id guess year and a half