×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    16

    j2me game scrolling so slooow (7210)

    hi,

    i'm developing an isometric game for the 7210 device. the game map'S size is a grid with 20x20 components. there's a class GameComponent representing a component and a class GameComponentType representing a component type (height, image, animation...). before painting the screen i check if the component i want to paint is inside the device display (nokia 7210 = screen dimension with fullcanvas 128x128). if its inside i draw it. the whole map scrolls in 4 directions when the game hero moves. the structure i described works fine but it is very slow. with the emulator i get 20 FPS and on the device between 7-11 depending on how many images are drawn on the current clip. this is too slow to play the game. t think that i have to reduce the drawImage()-calls, maybe build a single background pic and draw that instead of drawing every component!? i don't know... i anybody knows help, please answer, thanks, markus.

  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    77

    RE: j2me game scrolling so slooow (7210)

    Do you have any example code to run?

    I am doing some similar scrolling in something I am working on. Is yours slow than this? If so I can give you some tips.

    http://wap.beeper.co.uk/7210/ (A work in progress, with 4 way scolloing.)

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    72

    RE: j2me game scrolling so slooow (7210)

    drawPixels() is alot faster than drawImage on the 7210 and 6610, you could try using that.

    if you are redrawing the whole screen every frame using 20x20 tiles and also drawing the player and enemies i dont think you should not expect more than 10/11 fps.

    and about caching the map, there is only 200k heap memory i think you will have a hard time to cache the map as there is so little memory. best bet is to probably cheat and add a border at the bottom or top and use this as a "status" area. make the border 20 pixels high and you have reduced a whole row of tiles to draw.

    but drawPixels should increase your performance already.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×