Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: different iso drawing algorithms
Home

[Freeciv-Dev] Re: different iso drawing algorithms

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Cc: "freeciv-dev@xxxxxxxxxxx" <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: different iso drawing algorithms
From: Rafa³ Bursig <bursig@xxxxxxxxx>
Date: Sun, 8 Dec 2002 14:06:51 +0100

Dnia 2002.12.08 13:47 Raimar Falke napisa³(a):
On Sun, Dec 08, 2002 at 12:47:30PM +0100, Rafa³ Bursig wrote:
> Dnia 2002.12.08 12:26 Raimar Falke napisa³(a):
> >On Sun, Dec 08, 2002 at 05:16:01AM -0500, Jason Short wrote:
> >> When drawing tiles in isometric view, we need to follow the
> >painter's
> >> algorithm.  Since the tiles may overlap, we need to draw a tile
in
> >back
> >> before we can draw a tile that may partially cover it.  But if
we're
> >> only updating one tile, we can't redraw all the tiles behind it
all
> >the
> >> way to the top of the screen, we just want to draw the one row of
> >tiles
> >> above the tile.
> >>
> >> There are currently used ways to limit the number of tiles drawn
to
> >only
> >> those that are necessary.  I will hence name them partial tile
> >drawing
> >> and tricky buffered drawing.
> >>
> >> The attached image describes the basic concepts of the two
drawing
> >> systems.
> >>
> >> So, the question becomes: which system is better?  Should we
support
> >> just one of them, or try to support both?
> >
> >What can you tell us about the drawing speed? Will the partial
drawing
> >be faster because it has to draw less? Or is this a non-issue?
> >
> about speed...

> SDL can pack transparent pixel in sprite but this is usefull only
> for read whole pixel array.

Sounds like it uses something like a run-length encoding to minimize
memory footprint.

not only memory footprint but that sprites has less pexel to copy.
That depend on numbers of transparent pixels and aspec of sprites ( sprites where width >> high are faster/better compres )

This is called RLEACCEL

> This speed up blit about 50% becouse terrain tiles have 50% pixel
> transparent.

blit == http://sdldoc.csn.ul.ie/sdlblitsurface.php?

sorry for that...
blit is copy one surface/sprite to another

surface == sprite

> If you want have partial acces to pixel ( first metod )you must
> uncompres sprite and then read those pixels.

It wouldn't matter if SDL supports a mask as a clipping
object. However it looks like it only support rectangulars.

Yes but that isn't problem here.
If you want use that compresion all direct acces to pixels force decompess sequence. And when you want get only part of pixels ( clipping rect mask ) from sprite you must done directly acces.

SDL can support both metod but IMO secound has better performance becouse can use RLEACCEL.

> In SDLClient only fog tiles and edge tiles will be draw to tmp
> buffor sprite, rests are draw dirrectly to main screen buffor.

I use tmp sprite to fogy tiles becouse SDL can only support rectangulars clipping masks and
only to area inside the mask.

Rafal

----------------------------------------------------------------------
Powiedz sobie dobre "Dzien dobry"! >>> http://link.interia.pl/f168b




[Prev in Thread] Current Thread [Next in Thread]