Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Screen Sizing

Author
Message
Help Me Please168
6
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 9th Jan 2014 03:08
I was wondering how games are able to make the game know how to resize the images (for like selection button images know when to resize and make the mouse know where to click and stuff). Please give me a code thing (if you want) that works with DBPro.
Derek Darkly
7
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 9th Jan 2014 18:09 Edited at: 9th Jan 2014 18:10
The only way I know to resize images in DBpro is to make your image a sprite and use commands like SCALE SPRITE, SIZE SPRITE and STRETCH SPRITE.

Here's some mouse button code:



D.D.
Help Me Please168
6
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 10th Jan 2014 02:25
Thanks for the info Derek Darkly but how can I make it though where the game knows how to exactly scale the images the right way with different screen resolutions (ex. Make the program know what to scale the images at a 1280x720 display compared to a 1920x1080 display).
Derek Darkly
7
Years of Service
User Offline
Joined: 22nd Sep 2011
Location: Whats Our Vector, Victor?
Posted: 10th Jan 2014 06:20 Edited at: 10th Jan 2014 06:45
Well, just use them good old maths to get your sizes.

For example, if you want an image to take up 30% of the screen width you'd size it as Rwidth*.3, where "Rwidth" would be the resolution you or the user chose.

D.D.
Help Me Please168
6
Years of Service
User Offline
Joined: 23rd Apr 2013
Location:
Posted: 10th Jan 2014 13:28
Okay I will try it out thanks

Login to post a reply

Server time is: 2019-06-19 11:07:00
Your offset time is: 2019-06-19 11:07:00