Mail Archives: djgpp/1997/08/16/12:33:16
Janko Heilgeist writes:
>we tried to optimize our tile based game engine by using compiled sprites
>instead of rle sprites.
>
>Result: 30000 tiles need 21 seconds with compiled sprites (20 seconds with
>rle sprites)
>
>We used the sprite routines draw_rle_sprite and draw_compiled_sprite of
>Allegro 2.2
>
>Why?????????????????????
Obviously compiled sprites aren't the best approach for what you are
doing :-) As with anything, the best method depends on the situation.
Compiled sprites can give a dramatic speed boost over other methods, but
in other situations the fact that they are so bulky can just end up
thrashing the cache to no benefit. Being background tiles, I presume
these graphics are solid? If so you would probably actually be better
off with the regular blit() function. The largest advantage to a
compiled sprite is that zero (transparent) pixels are removed when the
image is compiled, so there is no runtime overhead in skipping past
them. But if your images are completely solid this doesn't make any
difference, so you may as well use a simpler routine...
--
Shawn Hargreaves - shawn AT talula DOT demon DOT co DOT uk - http://www.talula.demon.co.uk/
Beauty is a French phonetic corruption of a short cloth neck ornament.
- Raw text -