Box of horrors
Today I adapted the nice setuptools-based plugin module from Spineless to more easily support different physics toolkits in my code, and played around a bit trying to write a Box2D plugin. Frankly, I don’t like the Box2D API design at all, and I like the pyBox2D API even less, as it’s a direct port of the C++ API and doesn’t even try to be Pythonic. Eww. Seems I’ll have to try fake sweeping collision detection and other tweaks to pymunk next to fix the collision problems I wrote about.
In other news, starting tomorrow I’ll try to finish two university courses that are really long overdue and that I want out of the way before September. I have one short paper to write and one coding project to do, so game development progress will probably be a bit slower again for a while. But every finished course takes me closer to graduation (which I’m planning to do next year), so yay for that!
As the author of pybox2d, Sorry to hear that you don’t like the API. I wanted to leave it basically as the C version for users to make it fit their project/be Pythonic as they please.
Even so, I expected a bit of interest in it and people to want to work together with me to create a nice and simple API. As the response has been all but underwhelming (practically nonexistent), that doesn’t look like a possibility.
Oh well! Glad to hear you tried it, in any case. Good luck with your courses.
Thanks for the reply!
To be fair, I know first-hand how hard it is to make Python bindings of C++ libraries, so I don’t really blame you. But I can also tell that I would be seriously interested in pyBox2d if it actually did have a Pythonic API instead of a copy of the C++ one. See pymunk for a nice API that is reasonably similar to the original (chipmunk) but still quite Pythonic. Too bad chipmunk seems to be the slower of these two libraries, and the one with less features…
EDIT: Also, if you would like help designing the API, I think I can spare a little time for that.
I will have to check out pymunk, thanks for the tip.
As far as designing the API goes, I’d love some help with it, but I likely won’t be able to seriously work on it for a month or so. If you have any ideas on how you’d like it to work, be sure to get in touch with me and we can chat about it.