Jump to content


Photo

Performance Impact Of Scaling Graphs


  • Please log in to reply
4 replies to this topic

#1 snurty

snurty

    GP32 User

  • Members
  • PipPipPip
  • 33 posts

Posted 14 November 2008 - 06:55 PM

I have almost finished an asteroid type game using fenix but the frame rate is starting to drop.

I am scaling quite a few graphs using the size = command e.g. large rock is size = 100, medium rock size=50 and small rock size = 25 all based on the same graphs.

Does anyone know what kind of performance impact using the size command to scale graphs has?

I could create new graphs for the medium and small rocks but wouldn't want to go to the effort if it doesn't help much. There are quite a few animation frames and therefore quite a task.

Thanks

#2 Alex.

Alex.

    Retired

  • GP Guru
  • 4582 posts
  • Gender:Male

Posted 14 November 2008 - 07:23 PM

Try scaling every frame once when the game starts and save them as separate graphs. Then you could use those instead of scaling each rock every frame, and avoid any manual rescaling work. Hopefully Fenix allows you to do this.

Edited by Alex., 14 November 2008 - 07:25 PM.


#3 xnopasaranx

xnopasaranx

    Superbad!

  • X-treme Team
  • 2369 posts
  • Gender:Male

Posted 14 November 2008 - 09:05 PM

Well if it is the same graphic you use for all the asteroids and there is only three different types of sizes, why don't you make three different sprites out of it. I wouldn't even bother to scale and save the graphics on runtime.

#4 Peter R

Peter R

    Zrzore Gvgyr

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 9334 posts
  • Gender:Male
  • Location:Somewhere in Wiltshire or Somerset
  • Interests:Programming, Science and Computer Games.

Posted 14 November 2008 - 09:57 PM

QUOTE(Alex. @ Nov 14 2008, 07:23 PM) View Post

Try scaling every frame once when the game starts and save them as separate graphs. Then you could use those instead of scaling each rock every frame, and avoid any manual rescaling work. Hopefully Fenix allows you to do this.

IIRC boomshine2x does this several thousand times at the GBAX splashscreen tongue.gif

#5 snurty

snurty

    GP32 User

  • Members
  • PipPipPip
  • 33 posts

Posted 16 November 2008 - 06:42 PM

Thanks for the info. I didn't really want to create new sprites in the fpg as there are about 14 frames of animation and therefore an additional 28 sprites. Not massive but not worth it if the rescaling on the fly didn't hit performance much. I hadn't thought of doing it on loading and will have a look to see if this is possible in Fenix.