GAME JOBS
Latest Jobs
spacer View All     Post a Job     RSS spacer
 
June 20, 2013
 
High Moon / Activision
Texture Artist
 
Insomniac Games
FX Artist
 
2K Marin
Lead Network Programmer - 2K Marin
 
Bluepoint Games, Inc.
Senior Graphics Programmer
 
2K Marin
Lead AI Programmer - 2K Marin
 
Wahoo Studios, Inc
PR and Marketing Director
spacer
Blogs

  Unity and Flash marriage (Tetris3D in 2.5 days)
by Alex Nino on 12/09/12 06:02:00 pm
1 comments Share on Twitter Share on Facebook RSS
 
 
The following blog was, unless otherwise noted, independently written by a member of Gamasutra's game development community. The thoughts and opinions expressed here are not necessarily those of Gamasutra or its parent company.

Want to write your own blog post on Gamasutra? It's easy! Click here to get started. Your post could be featured on Gamasutra's home page, right alongside our award-winning articles and news stories.
 

Recently, there is a lot going on regarding to games development. Mainly speaking about how prominent Unity3D is becoming, we can hear more and more people speaking about it everywhere; even my wife (who doesn’t understand anything about games development) asked me these days about it, she said; hey! what’s that unit 3d plug-in for? Is that a kind of Adobe Flash competitor? I said; well to be honest I don’t know enough about it for calling it “competitor”.

About couple of weeks ago there was a conference here in London called bluegfx, mainly focused on 3D production stuff (film industry, cgi effects, etc) and also 3D game development… the Unity guys were there showing off some features and for the very first time I got the chance to look at it deeply. Guys! I have to confess that I fall in love to it same I did in 1998 when I first met Macromedia Flash.

Am I switching from Flash to Unity?

The short answer is no. Long answer is; nowadays I am really worried about Adobe’s attitude regarding the Flash platform. It seems to me Adobe cares every day less and less about Flash and for me, in this last quarter of 2012 the big question is; if Adobe doesn’t care about it why should I do it? It feels like those old days when our girlfriend is not anymore into the relationship, she stops feeding it and even worse, she’s interested in other men. Well my friend, maybe it is time to move on.

In my case, I truly love Flash more than Adobe does it, simply because I mainly use it not for making money but satisfying my joy, my creativity… but hey! we are here speaking about business not love, aren’t we? Yes, sorry I forgot about it. Money, money, so should we make things in HTML5? Huggg! once again I will skip this HTML5 part, It feels like going backwards in all senses… let’s just put it in this way; What you can achieve in HTML5 today is equivalent to what we did in Flash in 2003 (and back those days it was less painful). People are very ignorant about Flash and unfortunately these days there are more developers/designers using it wrongly than properly, which is understandable, not everybody have a certain skill set and responsibility to make a decent work in a robust platform that tries to satisfy us all. Sadly, the Flash platform trending is to get worse. I am in the games industry so let’s go back to what we were talking before, Unity!

Just in 2.5 days

Around a year ago Flash made a big step giving us multiplatform support for dealing with real 3D (rendering 3D using almost any GPU chipset), however we all know how complicated things are when dealing with 3D, especially the nature of 3D programs and the way they behave in the GPU. As expected, all what Flash (Stage 3D API) had to offer was something very low level and complex, so the chances of “pick it and go” were a bit low unless we use a third party 3D framework such as; away3d, alternativa, stariling… Unbelievably, Unity came with a solution that makes everything even easier; the whole Unity world is about “multiplatform 3D games” using an IDE which allows us to build our own scenes in 3D by simply using the mouse, isn’t this awesome?

Inspired by the blugfx conference I’ve decided to have a go with it and make a very simple game, a TETRIS game in 3D, which I’ve tried to do in Flash before but unfortunately I have to postpone it over and over again due to the amount of time it was taking me, surprisingly making it in Unity took me only 2.5 days to build the whole game logic and visuals. I am very satisfied with what I have achieved in just 2.5 days of work.

Tetris World Records game play in Unity3d web player

Unity exports to SWF (Stage 3D)

Although Unity uses C# as a main programming language, it also accepts a strict version of javascript which looks almost the same to Action Script. However I built the whole game using C# why? I just wanted to try something different. It was my first time with C# and you know what? I loved it!

The craziest part of it all is that Unity exports to almost every platform (Web, xBox, Play Station, Nintendo Wii, iOS, Android), and when speaking about web, it has its own web plug-in but it also exports to Flash SWF which was one of the things I was interested the most. My biggest question was; how on earth does it generates a SWF? How come? The answer is; it understands my crazy logic written in C# and translates it to Action Script… Whoooaaaaaa!!! amazing! the thing is that there are some resources in Unity C# libraries that are not available in Flash so, guess what!? In those cases you can tell to Unity that you have your own Action Script .as Classes and Unity compile them all together when generating your SWF. God! Is there anything else you could ask?

TetrisWorldRecords.com

Once I got the game done (in 2.5 days) I have decided to build its leaderboard so people can submit their score and compete against others. This took me an extra 2 days to get it done and then, and I have to confess that it was here when I decided to named it Tetris World Records, so I’ve registered its domain tetrisworldrecords.com which I am going to leave up and running for very long time, totally for free (no ads, no fees). I am pretty sure I am not the only one here who love tetris.

Also I made a quick test, exporting the game to other platforms (PC, Mac and Linux) it all works perfectly fine in all of them, same game experience. I highly recommend to you having a go with Unity, you will be surprised how easy is to make 3D games.

I hope you liked my Tetris made in 2.5 days.

Cheers!
 
Alex Nino (yoambulante.com)

 
 
Comments

Devin McCamey
profile image
One thing among many that Unity does have going for it is ... It. Is. Fast. It handles a lot of the fluff development mechanics that you always have to recode into every new game. Instead of digging through your personal codebase for the snippet you're looking for, Unity's already got it ready to go. You just plop it into your scene.

Sure, you can recode the wheel as it were, and in some circumstances, I'd prefer it to remove code bloat and keep the scripts simple. (Unity's pre-baked scripts tend to generalize a lot to make everything extensible to multiple games) Regardless, it is fast to develop. You can pump out a basic platformer in a few hours. I did one in 8 and that was including the models I made for it and I wrote my own player movement script (for the hell of it of course)


none
 
Comment:
 




 
UBM Tech