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: Rafa³ Bursig <bursig@xxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: different iso drawing algorithms
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sun, 8 Dec 2002 13:47:42 +0100

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.

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

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

> 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.

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

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Are you saying that you actually used the Classpath Java AWT classes in 
  addition to the GTK peers and got them to display something?
  Wow.  That's way better than I did and I wrote the code!"
    -- Aaron M. Renn in the classpath mailing list



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