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

Re: [pygame] pyopengl and pygame



I started out using Pyui for a prototype, but decided after a while that
it's lack of support and usage was a serious liability.  It's not that pyui
is bad per se, but it's alpha code in many ways, there is nobody to go to
for help, and it doesn't have the sort of higher level gui designer tools
you'll find for more established toolkits.

So I messed around with wxPython a bit, which has so many advantagous as a
piece of software, but it just didn't do what I needed it to do.
Specifically creating your own theme was a pain in the ass, it just didn't
do translucency, and didn't seem easy to extend.

So I looked around a bit, and ended up deciding I could either use Pyui, or
craft my own toolkit based on pygame/pyopengl just like Pyui.  In that light
Pyui didn't look so bad, but if something doesn't work right I get to fix it.
Fortunately it's pretty easy to extend and maintain.

Now I keep my own copy of Pyui in a local Subversion, which I extend as
needed.  So far I've hacked it's use of OpenGL textures a bit, expanded the
event handling to pick up some missing events from pygame, fixed a couple of
bugs, and customized my theme and some widgets.

-Jasper

On Wed, 22 Dec 2004, David wrote:

> Jasper:
> 
> Yours is the first project I've specifically heard of that is using
> PyUI for the GUI.  What has your experience been with it?  The
> sourceforge docs for it are promising, but Web and Newsgroup searches
> mostly yield negative reviews.
> 
> Have you needed to make any corrections/code changes to the PyUI
> library?  Is your project multiplatform, or windows only?
> 
> David
> 
> 
> On Tue, 21 Dec 2004 16:06:01 -0800 (PST), Jasper Phillips
> <jasper@xxxxxxxx> wrote:
> > 
> > On Tue, 21 Dec 2004 programowanie1982@xxxxx wrote:
> > 
> > > does anybody use the pyopengl with pygame?? is it stable and suitable for
> > > 3D engine develop??
> > 
> > It works very well for me.  I use it for perspective, smooth
> > scrolling/zooming, and efficient "sprite sheet" texture animation on the
> > main map of my 4x game, and also for depicting terrain/soldiers during
> > battles.  It also makes transparent gui frames easy, which is a nice touch.
> > 
> > I've had no stability problems at all, although I'm not sure if a Python 2.4
> > pyopengl is readily available yet (but then it's not for pygame either).
> > For my purposes the only computing limit I've run into is max graphics card
> > texture size.
> > 
> > Here's a couple of screenshots of the strategic screen, although I've left
> > out the battles since I don't (yet) have copyright or permission to the
> > sprites I'm using for development.
> > 
> > http://gazler.com/users/jasper//1221154839_screen.jpg
> > http://gazler.com/users/jasper//1221155402_screen.jpg
> > 
> > The map is one big textured quad, with filters for what to show, which are
> > blitted into the texture as needed.  The exception is the selection circle,
> > which is an animation and on it's own quad.  The gui elements are also
> > textured quads via pyui.
> > 
> > The battle screen is similar, with a big "ground" textured quad, and then
> > quads per soldier "billboarded" to face the camera.
> > 
> > -Jasper
> > 
> 
> 
> -- 
> dkeeney@xxxxxxxxxxxxxxxx
> Pitcher's Duel -> pduel.sourceforge.net
>