delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/16/12:33:16

From: Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp,rec.games.programmer
Subject: Re: Compiled faster rle sprites in Allegro?!
Date: Sat, 9 Aug 1997 20:54:59 +0100
Organization: None
Distribution: world
Message-ID: <9pCcOHATsM7zEwpu@talula.demon.co.uk>
References: <01bca43a$76d41440$39a340c2 AT pjheilg DOT goslar DOT netsurf DOT de>
NNTP-Posting-Host: talula.demon.co.uk
MIME-Version: 1.0
Lines: 28
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019