[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] 3D sample code



Will McGugan:
> I don't think it would be pracitcal to render 3D models and blit them
> in 2D. Happy to be proven wrong though.

Well, consider games like powermanga.  They generated their sprites
using 3-D tools and saved them to disk.

When I was working on an SDL game in C, I noted that since I rotated
only in integer degrees, I could set up 360-long cache arrays for sprite
rotations.  This sped up rendering immensely, so long as nothing ever
zoomed in or out.

So if your 3-D game tends to repeat a few basic perspectives on an
object, you may actually consider memoizing renderings to a weakref
LRU/MRU structure of some sort.

-- 
"Here is the memo if you didn't receive it: GNOME and       Nick Moffitt
Free Software is all about *SAVING THE WORLD* not          nick@xxxxxxxx
drawing pissy little buttons on the screen."
                -- Jeff Waugh