Squirtle 0.2 released
Version 0.2 of our Pyglet SVG mini-library, Squirtle has been released.
Changes include a new tesselator (with holes!) and a few bugfixes. Thanks to everyone who gave feedback and bug reports. As always, comments, bug reports, etc, welcome.
richard: I know this is quite a long way after the library deadline, but will people be able to use Squirtle 0.2 this Pyweek, given that the API hasn't changed since the initial release?
(log in to comment)
Windows users (and anyone planning on packaging Squirtle with a game) should note that there's a new release, 0.2.1, which fixes a crash problem which was reported on Windows systems. My bad for insufficient cross-platform testing. Again, available from the Super Effective website.
Treeform: It would certainly be possible to rewrite the GLU tesselator in Python. If you're interested in doing so, the SGI sample implementation is probably a good reference point. However, it's likely to be very slow. Is there a particular reason why you're averse to the GLU tesselator?
- supporting multiple layers (to be drawn independently or not at all), and
- ID-based access to paths.
That said, others have suggested the things you're asking for in the past. It wouldn't be completely impossible to rewrite things so that individual paths acted as vertex lists in a single batch, which could be indexed in a dictionary on the SVG object. However, then you run into the situation where every copy of an SVG requires its own copy of the geometry, which can add up to quite a lot of data.
As for multiple layers, I assume you're talking about groups, which I believe newer versions of Inkscape use for a layer system. Again, it's possible, but it would require subdividing the SVG more, which slows things down.
So, to answer your question, yes, I'm interested, but I'm not sure what exactly the best way to proceed would be, or whether it's something I want for Squirtle. However, feel free to bug me with any questions you have - I'd like to see this working as much as you would.
I'll have to look into the retention of path information. It may be that I can come up with an elegant method of retaining only some path information - perhaps by layer.
I'd not got around to looking into the actual SVG mechanism for inkscape's layers yet. I guess I'll be doing so today :)
pymike on 2008/08/28 14:16:Yaaaaaaaaay! (seriously I'm psyched again :-D) I drew a new SVG ship today and it loads fine. (I stuck to lines. No circles like in the last one) Were you able to fix the old one, though?
richard: I started using it yesterday and I'm already easily making a game with it :-) Shouldn't be hard at all for people to pick this up and use it.