Santabot: A Unity3D Flash Game

All right, so a Christmas game like “Santabot vs. The Flying Saucers from Mars” may be a day late (or 364 days early) and a few quid short, but it’s the best I got at the moment. When the good folks at Unity3D announced the beta 3.5 preview version with Flash export I downloaded the thing as quick as I could.¬†After a few false and frustrating starts (had to install the app 3 times before it started working properly. Have no idea why – I haven’t heard that happening to anyone else), I was up and running.

After building a quick and simple game here are a few thoughts.

  • Unity3D is freakin fast. The game may be simple, but still it was just a day’s work. Building the same thing in plain ol’ Flash would have taken I don’t even want to think about how long. Even using a 3D engine like Away3D, it would have been a fairly substantial undertaking. Bottom line – if you’re looking to build 3D Flash games, Unity is the way to go.
  • The output files are a bit chunky. A developer build (which compiles much quicker) of the .swf file is around 16 megs. A compressed release build is still around 2.5 megs. Hopefully future versions of Unity will allow us to break up assets into smaller .swf files and load them at runtime as needed.
  • The jury’s still out on scripting in Unity. I’m sure there are some best practices which I have not discovered or learned, but writing code for Unity seems really clunky. It reminds me of the dark days of Flash (Flash 5, that is) when scripts had to be attached to MovieClip instances and refer back to the _root object to communicate with others. It may be nice if Unity implemented something similar to Flash’s document class to function as the Unity project’s entry point.

In any case, what little experience I’ve had with Unity, I’ve always enjoyed (installation difficulties aside). Now if I could just learn some 3D modelling software so I wouldn’t have to resort to just sticking primitives together like Legos in Swift 3D.

Anyway, you can check out the game here. Be sure to use a browser with the release version of Flash Player 11 installed. If you happen to try it in a beta version of Flash, very bad things will happen.

Maybe I’ll build it up a bit more and enter it in the Unity3D contest. I’m sure a lot can be done in the next 10 days or so…

4 Comments »

  1. northwolf says:

    Will we write as3 code in Unity? I hope they can give us a good news in the future.

  2. Devon O. says:

    The javascript for Unity is so close to AS3 that syntax really isn’t an issue. Unfortunately trying to structure the code in an application is sort of a cross between writing javascript for the web and AS in Flash 5. Sort of a soup sandwich (i.e. a mess)..

  3. I advise you not to use JS, but C# instead. Sure, the syntax is something to get used to, but it won’t cost you too much effort.

    The pro’s are the use of native events (like AS3 Signals) and a very big .NET library you can use out of the box, which contains a lot of useful code like validators, formatters, converters, services etc.

  4. Devon O. says:

    Thanks for the tip, Bart. I always wondered if there were any benefits as I’ve heard performance is the same either way. The native events and additional tools could be quite handy, though…

RSS feed for comments on this post. / TrackBack URI

Leave a Reply

Devon O. Wolfgang

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development”

Contributing Author of “Flash AS3 for Interactive Agencies”

Senior Software Engineer at Meez

Starling Particle Editor

vignette

Some Photographic Shaders


A couple weeks ago I was contacted and asked to develop some filters for Starling that could be used in a mobile camera app[…]

boids

Animated Particles, Books, and Code – It’s a New Year


It’s a new year[…]

bug

Logical Or Assignment Bug in ASC2


So, here’s something to keep an eye on if switching to AIR 3.8[…]

Starling Filter Collection

Starling Filter Collection


Building up a collection of filters for the Starling framework[…]

Starling Warp

Warp Filter for Starling


Another filter for the Starling framework[…]

promise

Promises Promises


What it boils down to is handling asynchronous tasks […] in a clean, intelligent fashion […]

GodRays

Starling ‘God Ray’ Filter


While cruising the internet today looking for interesting things to try out I ran across this fun little GPU Gem[…]

Alpha in Starling Filters and Basic Branching in AGAL


In plain English to create a circular mask we would want to do something like this[…]

Starling, Nape Physics, and PhysicsEditor


A look at using the PhysicsEditor tool for Nape and Starling […]

Playing With a Couple Game Ideas


Just a couple game fragments, really[…]

One More Filter For Starling


Another filter for the Starling framework[…]

Filters in Starling


Using and writing filters in the Starling framework[…]

Towards a Better Scratch


Perhaps it was too much Meat Beat Manifesto in the late 80’s […]

Learning AGAL with AGALMacroAssembler and OpenGL Examples

So the other day I sat down and thought to myself: self, it’s high time you learn you some of this new fancy pants AGAL[…]

UV Scrolling in Starling


Obviously this could come in pretty darned handy for space games, side scrollers, etc, etc[…]

Drawing on Stuff in Away3D 4.0

So, Easter Day, I thought I’d sit down and make a little ‘Paint on an Egg and Send it to Your Friend’ app.