Smoothly scroll a GameWindow

Byak@

Active Member
Licensed User
I'm try to scroll a gamewindow(from Sprites lib).My GameWin have size 240*1700 pixels.I see a 2 ways:
1)create a big(of my size) GW with all sprites and place it to a big panel.and now i can move panel with GW.It is work OK but i can't create a big GW on device (I get a OutOfMemory)!This way is not good

2)create a small GW (240*320 for example) and now if i want scroll, i redraw back image and move all sprites. this way doesn't get a OutOfMemory but when i try scroll smoothly (for example on 7 pixel every step) it is very-very sloooow! This way isn't usable!

Can anyone help?:sign0148:i'm work with Physical Algorithm for my game many time and now i only can't scroll my window!
 
Last edited:

agraham

Expert
Licensed User
Longtime User
GameWin have size 240*1700 pixels ... I get a OutOfMemory
I'm a bit surprised as a GameWindow has a background and foreground Bitmap. In your case they should each be 3*240*1700 /(1024*2) = 1.167 Mbytes for a total of 2.334 Mbytes which doesn't seem large to me.

On my iPAQ 214 I can create GameWindows of 480*2048 using the Sprite demo app without problems but I haven't tried putting them on a Panel. Are you servoing anything else to the size of the GameWindow?
 

Byak@

Active Member
Licensed User
Andrew, I'm not correct) My O2 Flame has a VGA screen and 240*1700 in real it is a 480*3400 and as you know it is so large for device

Ariel_Z yes,in optimised compil.i'm run 'tick' from Game Window every 50ms.all sprites move very smoothly and nice.my game look as Mario with some new futures and big maps but maps only vertical and mario jump to up.
 
Last edited:
Top