Gamasutra: The Art & Business of Making Gamesspacer
View All     RSS
August 20, 2014
arrowPress Releases
August 20, 2014
PR Newswire
View All
View All     Submit Event





If you enjoy reading this site, you might also want to check out these UBM Tech sites:


 
5 things learned: Flash to Unity port of No Time To Explain
by Alex Nichiporchik on 03/12/14 10:00:00 am   Featured Blogs

The following blog post, unless otherwise noted, was written by a member of Gamasutra’s community.
The thoughts and opinions expressed are those of the writer and not Gamasutra or its parent company.

 

No Time to Explain was initially a web based flash game, and then went to Kickstarter to become a commercial release on Steam. Long story short, the commercial game was also developed in Flash (ActionScript 2). Not the best decision as it turned out.

Here's a trailer of the commercial game:

We had to do space ship trickshots to make it work. First of all, it has an ActionScript 3 file that is the launcher. This launcher is wrapped into ZINC with custom extensions -- to make it a standalone app, able to communicate with Steam's APIs. 
 
However the only way for the AS3 launcher to communicate with the actual AS2 game is via local connection. 
 
 
Here's where the fun starts. You can't rely on a local connection for constantly sending data back and forth, nor can you send large amounts of data. 
 
So some players have issues with achievements not registering, others simply can't launch the game on first try, etc. The way it's structured is also not entirely stable -- especially on multi-monitor setups. 
 
After adding a level editor (which also uses the local connection...) we decided it was enough of work in ActionScript 2. Time to port No Time To Explain to Unity. 
 
 
Here are the top5 things we learned.
 
 
1. Flash art & workflow vs Sprite Sheets
 
Up until recently it was next to impossible to efficiently use flash art in Unity. With the 2D plugin it became a bit easier. Still, an issue remains - in Flash, you can just use the vector art and not worry about anything. In Unity, however, you need to export everything into large sprite sheets to make it work. 
 
Since there isn't a single timeline that you could use for cutscenes and seamlessly transition into gameplay, you need to do a lot of coding. No Time To Explain starts off with an instant cutscene, and then you pick up a gun and start playing. This takes about an hour to do in Flash, including easy tweaks to animations and all that. 
 
In Unity, however, that opening sequence took us hours to get right. 
 
 
2. Native physics aren't great for flash game ports
 
Unity is a 3D engine and has built-in physics. It's good for some things, but definitely not for remaking a game previously created in a physics-less engine, where everything is completely custom. 
 
We played around with the native physics engine before realizing it will never feel right. Instead, we use Unity's collision detection system, and wrote our own "custom code" physics, very similar to the way it was written in AS2. 
 
The good part about Unity here is that we can still drop some physics-enabled objects into the scene, and have them bounce around and do things you'd expect. 
 
 
3. Particles, particles everywhere!
 
Particle effects are awesome. After working in Flash's limitations, you can just go nuts with effects like snow or fire. It feels like a breath of fresh air and makes the game look really, really cool comparing with the old version.
 
 
4. Frame rate and pixels
 
So the game now can run at insane resolutions at high frame rates. You never really think about this initially. All of the animations will look completely different at twice the frame rate from flash, and you won't be able to do pixel detection. In the flash game, we'd just see if pixels are touching and assign collision based on that. In Unity though, we had to rethink the way we detect collision, especially when using Unity's native engine. 
 
 
5. Level creation tools are great
 
In No Time To Explain, the levels are generated by JSON strings. We were able to pretty easily build a converter for that. But due to point 4, most of the levels need to be redesigned either way. It just plays different at a higher frame rate. 
 
Regardless, it's very easy to use Unity's built in scene preview to check what's going on, instead of creating your own custom editor like we did in Flash. 
 
tl;dr Unity is great for most parts, but converting from Flash can be annoying and very long for parts that depend on timelines 
 
Regardless, it feels like Unity is the best choice for porting from Flash, simply because we would be able to publish the game on more platforms, and upgrade our current build on Steam. Players have been asking for controller support and stability for ages, and with the Flash setup we stretched it to impossible limits. Now it looks like they'll be getting it. 
 
You can already see the results in this Unity web build, it supports the Xbox controller and full-screen.

Related Jobs

InnoGames GmbH
InnoGames GmbH — Hamburg, Germany
[08.20.14]

Mobile Developer C++ (m/f)
Piranha Games Inc
Piranha Games Inc — Vancouver, British Columbia, Canada
[08.20.14]

Online Software Engineer
Piranha Games Inc
Piranha Games Inc — Vancouver, British Columbia, Canada
[08.20.14]

Systems Engineer
Cloud Imperium Games
Cloud Imperium Games — Santa Monica, California, United States
[08.19.14]

Gameplay Programmer






Comments


Wes Jurica
profile image
I had fun playing the web player demo. Great game!

Did you happen to try any tools from the Asset Store like UniSWF (https://www.assetstore.unity3d.com/#/content/3630) during your porting process? This tool looks like the perfect thing to use when porting a Flash game.

Phil Maxey
profile image
Did you use Unity's editor to make the game? or just code it in Unity with scripts only?

Bruno Xavier
profile image
As we can see on screenshots, they built their own custom tools to help porting the game;
Is very easy to create editor extensions for Unity.

Bruno Xavier
profile image
Very nice game! Great gameplay.
I’d suggest a streamed webplayer build for the demo though.

Aladine Dhiabi
profile image
Anyone can Explain the content of the last image please :O ??

Alex Nichiporchik
profile image
It's how the editor imports all the JSON data. You edit the data and can easily edit the tiles right there

Jonathan Ghazarian
profile image
It looks pretty good. I tried doing some custom editor stuff with the unity inspector and it was a nightmare.

Rey Samonte
profile image
I've also moved on from Flash to Unity. As much as I enjoyed working with Flash, I've enjoyed Unity even more. It's just a solid framework that allows me to get stuff done much faster. The performance and multi platform capabilities are just icing on the cake.

Although not the same workflow as Flash and it took some time to get used to the new way of doing things, in the end, you become much more productive and get things working that much faster.

Chris Melby
profile image
When was the original game built that it was scripted in ActionScript 2? O.o

I've been going back and forth with Unity for a while, but I'm still on the fence. One of the biggest hold backs being cost.

With Flash development, InteliJ IDEA + AS3 + Starling + Monocle has been a wonderful experience and I can fully support Android, desktop, and iOS, and not have to pay a cent to Adobe. This has been great since my work still centers around boring corporate vomit.

When I look at Unity, they want either a subscription of $150( $75 x 2 ) a month, or an additional $3000 up front to support both popular mobile platforms. Is this right? And if I pay for the subscription for one month, does that mean that my Android project will not work if don't renew it?

Anyways, I just downloaded Unity for my PC -- moving away from my Mac -- and will grab Visual Studio Express also, and give it another go. I've beeb keen on the Modo( my favorite 3D program ) integration.


none
 
Comment: