Smoothly scroll a GameWindow

Discussion in 'Questions (Windows Mobile)' started by Byak@, Sep 27, 2009.

  1. Byak@

    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: Sep 27, 2009
  2. Ariel_Z

    Ariel_Z Active Member Licensed User

    Is it running this slow on optimised compiled app?

    Sounds interesting your game - what is it doing?
     
  3. agraham

    agraham Expert Licensed User

    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?
     
  4. Byak@

    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: Sep 28, 2009
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice