screen_size.x and bmap_width(bmap)

Posted By: SirCamaris

screen_size.x and bmap_width(bmap) - 08/11/08 02:22

I displayed screen_size.x in digits for a 800x600 panel. The result was 800 as to be expected. I'm not sure why it displays the same result when I switch to fullscreen mode.
I moved another panel one pixel at a time on this 800x600 panel "backround" by modifying the pos.x and pos.y values. However, when I switch to fullscreen mode, the movement is considerably "slower" due to an increase in pixels the panel has to move on the screen. I tried the following:
"movement_factor = (screen_size.x / bmap_width(bmap))^2;"
When screen_size.x is equal to bmap_width, the result is 1 when squared (one pixel). When screen_size.x is larger than bmap_width, squaring the result is larger than one. While this reconciles the problem somewhat, it is not completely accurate; the panel still moves 'slower' when in fullscreen mode. I need to find the precise width in pixels of a given monitor to obtain the correct "movement_factor"; screen_size.x when in fullscreen mode doesn't seem to give me the desired result.

Posted By: Fenriswolf

Re: screen_size.x and bmap_width(bmap) - 08/11/08 07:16

Hello,

the decrease of movement speed is probably due to different frame rates.
Are you using time_step? Having a look at fps_max might help, too.
Posted By: Joozey

Re: screen_size.x and bmap_width(bmap) - 08/11/08 12:36

If you press ctrl+F5 for fullscreen, you just go into fullscreen with 800x600 resolution. It's not adapting to your desktop's resolution. Press F5 to change resolution.
Posted By: SirCamaris

Re: screen_size.x and bmap_width(bmap) - 08/11/08 20:13

Thankyou. I set fps_max and fps_min to the same value and for pos.x/y I did, pos.x += 1 / time_step; This gave me the desired result for both 800x600 and Fullscreen mode.
© 2024 lite-C Forums