Skip to main content
7 events
when toggle format what by license comment
Nov 17, 2011 at 20:48 comment added Robin Rodricks I could try, but I'm pretty lame working on the Flash Player. You just don't get native C++ performance. 1% of native performance is usually what you get writing in ActionScript; I could try some tricks but even the final rendering to screen is very slow if you try doing it pixel-by-pixel (a.k.a. no access to the screen back buffer, you have to work with some fancy OOP objects and the Player does the rest) .... I'm currently letting the Player render the triangles for me so its somewhat survivable. (1K tris at 25 fps?)
Nov 17, 2011 at 20:48 comment added Trevor Powell And yes, by "more traditional z-sorting", I meant sorting whole objects based upon their centre points. (Alternately, references to these moving objects can be inserted into appropriate branches of the level's BSP tree, and be rendered when the level rendering reaches those branches) Either way, you can absolutely get polygon draw order issues between movable objects and static geometry, but it avoids having to rebuild the whole world's BSP tree every time an object moves within it.
Nov 17, 2011 at 20:42 comment added Trevor Powell @Jenko: That's exactly the case. BSP trees are good for sorting and rendering large static geometry efficiently. Things like Doom levels, for example. As soon as you need to modify their contents in real-time, you'll likely find that the BSP creation takes up too much time to maintain a good frame rate. In a case like yours, I'd be seriously considering z-buffering or s-buffering, instead. Is there a reason you can't do z-buffering in software? All you need is a 2D array of floats to store "closest z value" into.
Nov 17, 2011 at 10:42 comment added Robin Rodricks In point 2 you said "using a more traditional z-sorting" ... what exactly are you referring to? I cannot do Z buffering in software, so do you mean sorting objects based on their center points? This is not possible because I'm trying to render many objects fitting into each other, so then I would have to use triangle sorting for those objects?
Nov 17, 2011 at 10:33 comment added Robin Rodricks What a fantastic answer! Thank you very, very much Trevor!
Nov 17, 2011 at 10:30 vote accept Robin Rodricks
Nov 17, 2011 at 10:09 history answered Trevor Powell CC BY-SA 3.0