Tuesday, October 25, 2011

Progress report

There isn't really anything new to see yet, but a lot is going on under the hood, so I figured I would make a post. The cross-platform GUI is working out (I already have an Android port), and in addition there are several useful features that were conspicuously absent from the last release (such as independent line and fill colors, paint bucket and layers).

Tuesday, October 18, 2011

Aha! Object-oriented programming!

Well, I didn't intend to rewrite any of the internals of Swift, only the GUI interface. However, now I see that I should have been using objects all along instead of nested dictionaries. The rewrite makes it vastly easier to use. Consider this snippet:
This now becomes:
A bit more concise.

Monday, October 17, 2011

New system almost complete - much more stable

I have mostly finished the framework underlying the second release of SWIFT. I have made a wrapper around most of the windowing functions I need, plus drawing functions which are now handled by the GUI library (which should allow me to make a Clutter backend as well!).  Instead of using the buggy pixel-based hitTest I was using before, I am now using the even-odd algorithm. I was initially calculating exact intersections of lines, but I stumbled across this post, which appears to be much more efficient. Early tests indicate that it is. I ran a benchmark; here are the results (from an Asus EeePC netbook!):
10,000 hitTests
total time: 1.735355 seconds
average time: 0.000174 seconds/hitTest
In other words, that's about 0.1 milliseconds per hitTest! This is better than I expected by a factor of 10 or more! And it all "just works", unlike the pixel version which was very finicky. So (judging by hitTests alone) you could be working with 1,000 objects on the Stage and not even notice a slowdown on a low-spec'd computer!
I will re-write the HTML5 hitTest library to use this algorithm, it should speed it up quite a lot.

Thursday, October 13, 2011

Re-writing SWIFT from the ground up

Most of my problems with SWIFT come from the interaction with PyGTK and Cairo. These are also my major source of pain in platform ports. So I have decided to abstract the GUI library so I can use GTK on Linux, Cocoa on OSX and whatever on Windows. This also lets me fix all the crude hacks I did to get input to the right place. However, this will mean a nearly full re-write of SWIFT (only the object processing functions can stay untouched). Time to get cracking.

Tuesday, October 11, 2011

OSX Working!

I finally got it running on Mac OSX! It is not a one-click setup, and Gnash doesn't run, but it is a start. I will keep working on it and hopefully I can offer a package soon. For installation instructions, see http://swift-swf.blogspot.com/p/installation.html.

Sunday, October 9, 2011

OSX difficulties

Well, I expected it would be fairly simple to get this up and running on Mac OSX, as it is "just another Unix", after all. It turns out I'm wrong. I managed to get all of the dependencies installed, and it loads, but then immediately crashes with the message "Bus error". I will work on fixing this; in the meantime, it could be run in Virtualbox or something.

Alpha release coming tonight!

After a year and a half, the alpha release is coming tonight! Being alpha, not all features are implemented yet, and some are still buggy. But it is finally here!

Download .deb for Ubuntu from: https://launchpad.net/~skykooler/+archive/swift-swf

Sunday, July 3, 2011

Full copy undo added!

I now have implemented full copy undo, which tracks all object changes and additions. The result of this is that you can now undo every change. It is also unlimited, so it saves all changes going back to when you first opened SWIFT (since everything in the internal file representation is very small, I don't think that memory usage will be an issue. I will keep an eye on this though.)

Wednesday, June 22, 2011

Added swftools to my PPA!

I have now added swftools to my PPA! This means that one should finally be able to install swift on Maverick without dependency issues. I will add a Natty component tomorrow.

Monday, June 20, 2011

Release delayed due to lost data

Well, I or my operating system accidentally replaced the entire contents of the executable with a single semicolon, so I need to re-write everything I have done since my last push to Launchpad (a good 5 hours of work). Since it is now the work week, I will have less time to do this, so I doubt the release will be before this weekend.

Sunday, June 19, 2011

Sound support added!

I added sound. Currently you can only import a sound to the first frame of a project, but it will run and play in both SWIFT and the exported SWF (sound in HTML5 and videos coming soon!)

Saturday, June 18, 2011

Basic drawing support added.

Well, for a while now, you have had the ability to draw rectangles and ellipses, and there has been that predefined curve object - but now you can actually draw shapes yourself! Right now it is limited, and buggy - many lines do not turn out smooth that should. But it is there, and I should have it done tomorrow. And maybe sound support also. We shall see.

Sunday, May 29, 2011

Drag and Drop added!

I now have drag and drop support for images. It is pretty powerful - you can import any image type PIL supports (including png, jpeg, gif, pbm, pgm, ppm, tiff, targa, rast, xbm, and bmp among others). This should help speed up the workflow. Note that is converts all images to png internally to maintain compatibility with swfc - this may use up extra space if you are importing many images.

Saturday, May 28, 2011

HTML5 animation working!

HTML5 animation is now working in the latest build, available from launchpad. No actionscript yet.

Demo video

I have made the first video showing some of the basic features of SWIFT. It is by no means a comprehensive list. Here it is:

Blog created!

I have finally created a blog for SWIFT! For anyone who is seeing this for the first time, SWIFT (which stands for "ShockWave Is Free Territory") is an open-source animated content creator. Besides creating .SWFs, it can also create HTML5 content, making your web apps future-proof. SWIFT includes an ActionScript editor to bring advanced functionality to your applications. SWIFT uses swfc for compiling and GNASH for playback. It is still in early alpha stage, but can be used effectively already. It currently runs on Linux only. I have made a Mac port, but it is ugly (i.e. it takes upwards of 3 hours to install, doesn't completely work right, and installs a lot of useless junk on your system). Windows ports will come later.
I will use this site to post about my progress on SWIFT. For general information, see my website (currently under construction.)