Slick Forums

Discuss the Slick 2D Library
It is currently Thu Apr 24, 2014 4:51 am

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Sat Sep 06, 2008 4:20 pm 
Offline

Joined: Wed Aug 27, 2008 4:20 pm
Posts: 7
Hello everyone! I have recently finished a two-week-long project which has resulted in something that Slick users have (probably) been wanting for quite some time: A much more complete SVG engine. It has decent, if buggy, support for the following features that the old engine lacked:

* Holes in paths, thanks to my path splitter class.
* JavaScript, powered by Mozilla Rhino
* Actual support for SVG path definitions beyond the limited subset that Inkscape uses, including the S, Q, and T tokens and relative values.
* SMIL animation -- supports <animateColor>, <animateTransform>, <animateMotion>, <set>, and event-driven animations.
* Images and text, including SVG fonts and <tspan> elements.
* Everything is stored in a pseudo-DOM tree which is faster than a complete DOM tree but exposes all of the same methods to scripting.
* Groups and <use> elements are actually handled correctly.
* The <polyline> and <circle> elements, which for some reason didn't work before.
* Fill-opacity and stroke-opacity properties.
* Stroke size is actually scaled correctly when the view is zoomed.
* DOM mouse events. (They currently use a lot of CPU power, though.)
* CSS style data specified in <style> tags. Classes and element styles are handled properly.
* Patterns that reference SVG elements, not just images.
* The ability to create many SVGDocumentViewer objects to display multiple SVG documents on one screen. Each viewer has its own translation and scale values, and handles its own events and animations.

You can download the SVG viewer below:

NOTE: SECTOR91.com is currently down, and the link is broken. Sorry about that. It will be back soon.
http://www.sector91.com/resources/downloads/svgview1.0.zip

Unzip the file somewhere, then double-click on svgviewer.jar. You will see the first of my SVG demos, a pendulum animation that is powered by JavaScript (taken from pilat.free.fr but modified). You can scroll around by dragging the middle mouse button or with the arrow keys, and zoom with the mouse wheel or the period and comma keys. You can also enter a file name in the address bar at the top (sorry, URLs don't work yet) and press Enter to view another file. Here's the files that are included with the viewer:

* holetest.svg - Demonstrates holes in polygons. Notice the seam in the center--I haven't figured out how to fix that yet.
* holetest2.svg - Demonstrates multiple holes.
* fonttest.svg - Demonstrates text elements and inline <tspan> elements.
* quad.svg - Demonstrates support for quadratic beizers, and for CSS stylesheets. A W3C demo.
* cubic.svg - Demonstrates more text support, and smooth cubic beizers. A W3C demo.
* motiontest.svg - Modified cubic.svg which demonstrates animateMotion tags.
* anim01.svg - A W3C demo which shows off all major types of animation.
* patterntest.svg - Demonstrates support for patterns. A W3C demo.
* bridge.svg - The bridge of the player's ship from my SVG-powered game, Project Gamma. An excellent stress test and demonstration of animations and mouse events. Try moving the mouse over the Galaxy Map, and clicking the red buttons.
* undergroundfactory.svg - A cool-looking animation from Project Gamma. Some of the gradients and patterns are missing due to a bug.

You can also copy any other SVG files that you want to test into the program's folder, and then simply enter their names to view them. Be forwarned: this is still buggy, and anything that makes heavy use of complex JavaScript, <use> elements, or animation may fail spectacularly. Most SVG games, toys and such that you can find on the internet don't work at all. This is still very much a work in progress.

If you're wondering where the source code is, I haven't posted it yet because I haven't decided how I want to distribute it. Most of the software from my website has been distributed under a "conditional open-source" license, which requires credit to be given in a blatantly obvious way (like a SECTOR91 logo on a game's main menu screen) in order to use the source code. That would obviously be inconvenient if the source code became a part of Slick, as I expect most people will want it to be. However, I don't just want to give it away without getting credit somehow. I'll have to negotiate this a bit.

Anyway, try out the SVG viewer and don't forget to ask questions if you have some and report bugs if you find any. Just bear in mind that it's incomplete and will have some bugs.


Last edited by ACE91 on Wed Sep 24, 2008 5:50 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sat Sep 06, 2008 5:56 pm 
Offline
Game Developer
User avatar

Joined: Sun May 25, 2008 9:45 am
Posts: 578
Very cool! I haven't had a chance to use SVG in a game yet, but I keep it in mind.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2008 5:49 pm 
Offline

Joined: Wed Aug 27, 2008 4:20 pm
Posts: 7
Sorry to say this, but SECTOR91.com is currently down and may be down for a while, so the download link is currently broken. I will try to get the file hosted somewhere else, or to get the site back up as soon as possible.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 24, 2008 6:03 pm 
Offline
Oldbie

Joined: Tue Jun 17, 2008 5:11 pm
Posts: 336
If you are interested why not host it on Google Code under the same license Slick uses?

_________________
My website about game development http://anotherearlymorning.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 16, 2009 3:51 am 
Offline

Joined: Mon Feb 26, 2007 12:17 pm
Posts: 18
Any movement on this? It'd like to play around with some SVG...

Cheers,
Rob


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jul 25, 2009 5:10 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
1. Don't ever ask for "cracked" anything on a public forum, especially this one.

2. Your message belongs in it's own thread because you started a new topic.

3. If you want "completely free" then you should be looking at "open source".

4. http://lmgtfy.com/?q=open+source+animation Check out Pencil


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 04, 2010 1:24 pm 
Offline
Regular
User avatar

Joined: Tue Apr 07, 2009 12:58 pm
Posts: 232
Location: Uruguay
I would like to try it too. Where can I find it?

Like manunderground said, you should try Google Code.

Or try upload it to Megaupload or something like that otherwise.

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 04, 2010 2:09 pm 
Offline
Regular

Joined: Mon Feb 23, 2009 11:32 am
Posts: 113
kdnewton wrote:
1. Don't ever ask for "cracked" anything on a public forum, especially this one.

2. Your message belongs in it's own thread because you started a new topic.

3. If you want "completely free" then you should be looking at "open source".

4. http://lmgtfy.com/?q=open+source+animation Check out Pencil


sry but the new post brought my attention here

you do know this is a bot right?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 04, 2010 4:02 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
h3ckboy wrote:
sry but the new post brought my attention here

you do know this is a bot right?


Yes.

But I did not know before your message.

_________________
Linux and free software enthusiast.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 05, 2010 1:07 pm 
Offline

Joined: Tue Jun 02, 2009 3:33 pm
Posts: 33
Hi! Your post brings my attention about this subject. Anyone has the code of this svg animator???

Thanks and happy new year mates!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group