Re: Depth-Sorting Axis-Aligned Boxes

metanet software <[email protected]>
Newsgroups gmane.games.devel.algorithms
Message-ID <[email protected]>
> If what's stopping you from using a ZBuffer is memory or
> performance,you can try a span-list based system

Unfortunately the problem is the platform: Flash. This means I don't have access to the pixels directly if I want to use the flashplayer's rendering system.

In theory I could write a z-buffer or span-list system in Actionscript, however this would require circumventing Flash's built-in renderer and writing my own (on top of the basic get/set pixel commands). I suspect this would be hellishly slow, but if that's the only solution I guess it's worth trying.


> How many different camera angles will you be viewing from?  Also, by
> sprites, do you mean quads in 3-space, or something more like point
> sprites

The camera angle will be fixed (pointing along z) but will translate in x and y. By "sprites" I mean something close to GBA: 2D images you can translate/rotate/scale, but not anything as general as a textured quad; if I had access to textured polygons, I could conceivably build a BSP each frame and split each quad into pieces.


This is looking more and more grim! :(

thanks again,
raigan



--- On Mon, 8/3/09, Bert Peers <[email protected]> wrote:

> From: Bert Peers <[email protected]>
> Subject: Re: [Algorithms] Depth-Sorting Axis-Aligned Boxes
> To: [email protected], "Game Development Algorithms" <[email protected]>
> Received: Monday, August 3, 2009, 9:56 AM
> metanet software schreef:
> >> Unfortunately, this is the classic polygon sorting
> problem.
> > 
> > This is what I was afraid of; aside from the cost of
> building a BSP every frame, the more fundamental problem is
> that the graphics are sprites and not really amenable to
> arbitrary splitting. I was hoping in the worst case that I
> could split them up to have one sprite per face (top, front,
> side, etc), but it would appear that even that is too
> coarse.
> > 
> > So, I'm screwed?
> 
> If what's stopping you from using a ZBuffer is memory or
> performance,
> you can try a span-list based system; at every scanline,
> you keep track
> of which poly's overlap it, then you analytically compute
> the spans of
> pixels that are visible due to every polygon edge or
> intersection.
> See quake1.  If the sprites in turn have an alpha
> mask, you can still
> make it work by converting the sprites into several spans
> (ie. RLE
> compression; see, uh, 'Divinity').
> 
> 
> bert
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal
> Reports 2008 30-Day 
> trial. Simplify your report design, integration and
> deployment - and focus on 
> what you do best, core application coding. Discover what's
> new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> GDAlgorithms-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
> Archives:
> http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
> 


      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
GDAlgorithms-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list
Archives:
http://sourceforge.net/mailarchive/forum.php?forum_name=gdalgorithms-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.