7 Jan 02:45
Re: ES SVG lib? (was Re: Eights SVG)
Jason McIntosh <jmac <at> jmac.org>
2005-01-07 01:45:20 GMT
2005-01-07 01:45:20 GMT
On Dec 30, 2004, at 8:26 PM, Mike Sugarbaker wrote: > Is it time to start thinking about a standard set of scripts to > provide to Volity UI writers? I'm thinking of basic things like > generating combo boxes, draggable things and drag targets, simple > sprites (on the level of "here are the shapes in your walk animation, > flip through them when i tell you 'walk' and stop when i tell you > 'stop'"), grids (automagically spec out either a chessboard-like thing > or an RPG inventory-like thing, or a grid layout for something else > entirely)... My focus on finishing the core protocol, and cheering on the Javolin hackers as they push its first releases out the door, has prevented me from spending a lot of time thinking about how UIs are actually made, even though they're actually at least as important to actual gameplay as all the other stuff. (I made an exception to finish the Eights SVG so that Javolin would have multiple working examples, at least one of which was less lame than rock-paper-scissors.) I have assumed (or, rather, dreamed) from the start that "someday" there would exist a whole application suite just for creating UI files and shared UI-component libraries. The first steps towards this ideal are little reusable patterns just of the sort you describe above. > A casual cruise through google world has surprisingly not revealed any > ECMAScript libraries for simple UI widgets, although it seems like > such an obvious project that I could be wrong. Plenty for generating > SVG from Java and such, but nothing in pure ES. Such a library seems > both useful for Volity and likely to catch on with other projects as > well. I agree. I believe that one reason few examples exist is that SVG has yet to find its killer app, and it's mainly been used so far in very specialized projects. One of the "problems" with our approach is that we are, in fact, blazing trails -- very few projects are trying to make SVG act so general and flexible as Volity demands, though I believe this flexibility is inherent to SVG. > I don't have a completely firm grasp on SVG yet, but I do know the > DOM, and I feel up to this if I can get time. Are there any > Volity-specific needs that I'm overlooking? I would *love* to see some work towards this end, especially as a parallel effort with the Frivolity and Javolin sub-projects. Let's talk about it, if you want to try making a project out of this; I can provide help with SVG and the like, as well as coordination with the rest of the Volity project. Would anyone else be interested in helping with this? Knowing the DOM is half the battle at least, and I can say from experience that Batik/Rhino, the SVG/ES library combination that Javolin uses, seems to support it quite thoroughly; I don't think that, in programming the Eights UI, anything I tried DOM-wise failed to work exactly as I expected it to. You may notice that much of the display work in that file involves just creating, destroying, and moving around many SVG <use> elements that point to various <symbol> elements which the file hard-codes. Ah, here is Batik's full confession of DOM support: http://xml.apache.org/batik/SVGDOMstatus.html An aside (and a caveat): one thing that Batik _doesn't_ support -- at least until until 2.0, which we're not gonna wait for -- is SMIL-based animation. Andy and I knew this from the start and decided long ago that we could live without SMIL at first, especially since basic animation can be achieved through clever ECMAScripting, via setInterval() and related methods listed here: http://xml.apache.org/batik/scriptingFeatures.html I'm also not sure what Batik's sound support is like. I would like a little sound support, and unlike animation, this is something we could probably work around with clever client programming... but this is a discussion for later. -- Jason McIntosh jmac <at> jmac.org Somerville, MA, USA http://www.jmac.org ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
RSS Feed