[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] scenegraph options
Doug Holton wrote:
Are there any example scene graph libraries out there that are similar
to what is wanted for pygame? Something like sForzando or pyOSG or some
java scene graph? Or could you share your games that are written with
scene graphs?
getting to any sort of full scenegraph is still a ways out. in the
meantime there are some features that would be useful for a full 2d
graph that are very useful for pygame.
i'm working on some of these things now, and they may start trickling
in after pygame-1.6. there are two main things i'm putting together now.
Vector/Point. a simple 2d position and vector container. there are
tons of these out there and they are fairly simple. it will likely be
a C type for python.
Regions. a region is kind of like an image that has an on/off value
for each pixel. they support standard boolean operations like AND and
OR. they will give pygame two big features. pixel collision detection
and automatically optimized update rectangles.
for the regions i'm developing my own runlength style packing. this
allows for very quick combining and optimized tesselation into
rectangles. i'm about 70% done with the implementation in C.
any scenegraph stuff in pygame is a long ways away. it will likely be
implemented in all python and use pygame and opengl as its primary
backends. this will make it a separate package from pygame altogether,
but eventually may be included depending on how things go.