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...
-
So, you've created a car prefab using WheelCollider components, and now you can apply a motorTorque to make the whole thing move along. ...
-
The procedural planet package has been updated to version 1.4, and you can see the new demo here . It features better city light control, be...
-
Why would I ask that question? Python 3 has been available for some time now, yet uptake is slow. There aren't a whole lot of packages i...
-
I have just spent an hour trying to track down a weird bug in some Javascript interpolation code. The offending code looks like this: var n ...
-
I've just finished refactoring an awful C# class. I had been delaying the job for a while because I didn't want to do it. Then, whil...
-
Dear Lazyweb. Imagine a nice RESTful interface for working with Tags. The URL: /tags/ will return a list of all the tags. The URL: /tags/fo...
-
After my last post, I decided to benchmark the scaling properties of Stackless, Kamaelia, Fibra using the same hackysack algorithm. Left axi...
-
Summary: NodeJS wins. Test Program ab -n 10000 -c 5 http://localhost/ Gevent Code from gevent import wsgi class WebServer(object): def a...
-
I've built sites with Django, TurboGears and Pylons. I've come to prefer Pylons. Why? Pylons gets out of the way, and stays out of t...
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