After 3 days of mixing it up with Pyglet, I gave up. I had resolved to do things the pygletty way, and I really wanted to use pyglet's shiny batched graphics, but in the end it defeated me. There was simply too many hoops to jump through to draw lines, and draw text and then detect picks with the mouse... etc. If I had more time, this would be the superior solution, but I simply didn't have time to invest in new development.
The next thing to try was wxPython. I went further with wx, but when I realised how little control I had over the look (or even just sizing) of buttons, I became a little discouraged. Then, when wx started hiding exceptions from me with what seemed to be a sys.exit(-1), I gave up. I doubt I'll be going back to wx, its just not... fun.
Getting somewhat desperate, I contemplated putting a BaseHTTPServer in my embedded code, and building the interface using HTML and jQuery. Half a day later, I realized this was a very bad idea. Without a nice framework like Pylons, it would be a nightmare.
Defeated and deflated, with 80% of my time budget spent... I was at a loss. So, I turned back to the old and faithful pygame. It is so much simpler to understand bytes, surfaces, sprites. And hey, If I want to draw text on a sprite, I can. Oh and it has some neat vector drawing operations. A few hours later, I had a custom GUI system, working just the way I wanted. Forms, Buttons, Text Boxes, Labels and Toggle buttons.
I also seem to prefer he way pygame deals with HID events, as compared to pyglet. Pygame gets out of the way and lets me handle things the way I like. :-)
I might actually get this done. Only 8 hrs left....
Monday, January 05, 2009
Subscribe to:
Post Comments (Atom)
Popular Posts
-
These are the robots I've been working on for the last 12 months. They each weigh about 11 tonnes and have a 17 meter reach. The control...
-
This hard-to-see screenshot is a Generic Node Graph Editing framework I'm building. I'm hoping it can be used for any kind of node...
-
Unfortunately I've not secured a venue for the GGJ. With 9 days left, things are not looking hopeful. It could be that GGJ Perth will no...
-
So, you've created a car prefab using WheelCollider components, and now you can apply a motorTorque to make the whole thing move along. ...
-
MiddleMan: A Pub/Sub and Request/Response server in Go. This is my first Go project. It is a rewrite of an existing Python server, based o...
-
Often, when building a game, you need to test if objects are colliding. The objects could be spaceships, rocks, mouse pointers, laser beams....
-
I've just read a newspaper article (courtesy of Kranzky ) from WA Business News documenting the malfeasance, gross negligence and misc...
-
Space is awesome. Especially when it is generated using Perlin noise, and some cool shaders. You can try it out over here.
-
I made something which lets you render very large worlds with a small farClipPlane. https://github.com/simonwittber/scaled-origin The d...
-
After my last post, I decided to benchmark the scaling properties of Stackless, Kamaelia, Fibra using the same hackysack algorithm. Left axi...
6 comments:
But no screenshot?
Interesting story. pyglet can be quite hard to wrangle sometimes. I've personally started three GUI toolkits to this date. The latest is actually quite reasonable, I think. I'm sorry I didn't think to fire you a copy of it :(
The direct surface manipulation you get with pygame is pretty damned attractive sometimes when you're elbow-deep in OpenGL buffers :(
Sometimes the overhead of learning the higher level system doesn't seem to justify the cost (especially when you're not trying to share code with people specifically familiar with it); I've gotten a lot more work done with raw WSGI than with django, turbogears, or pylons :-)
I agree with Mark, it is easier to use framework that you know ultimately well than learn something new (pyglet, wx, ...). This seems to be the main message of your post.
Not that this will help you on your quest for a UI library, but cocos 2D attempts to wrap pyglet in a way that might be more familiar to pygame devs. I have only briefly looked at it myself so I can't vouch for how good it is, but it looks promising.
http://www.cocos2d.org/
I had a very similar experience with wxPython. Turns out it was printing the unhandled exceptions to stdout before exiting, and since I was running in GUI mode (funny that!), I never saw these.
Post a Comment