Jump to content

Unity Summer of Code Post Mortem: Detonator

unity project system game code games time did great
Artist and programmer Ben Throop talks to us about his experiences developing Detonator, a parametric explosion system for Unity picked for this year’s Unity Summer of Code competition.

4: Adsense

Artist and programmer Ben Throop talks to us about his experiences developing "http://unity3d.com/support/resources/unity-extensions/explosion-framework">Detonator, a parametric explosion system for Unity picked for this year’s "http://blogs.unity3d.com/category/usc/">Unity Summer of Code competition.
How would you describe your project to someone who had
never heard of it before?

The project is called Detonator, and it's a parametric explosion system for Unity. It helps Unity developers get good looking explosions into their games quickly and easily.

How many people were involved in creating your

Just myself, though I got feedback from some industry friends as well as a few of the Unity devs, Jonas Echterhoff and Rune Skovbo Johansen.

What is your background – eg: previous experience
with Unity or coding in general?

My Unity experience was minimal before this project. I actually took it on so I could learn it because in the few weeks that I'd spent tinkering beforehand I was really impressed. My prior
experience in the game industry includes time at Sony as a Senior Artist and at Vicarious Visions/Activision as a Lead Technical Artist. I then founded the website MrsRiley.com and coded the Flex
application for that. I've written a lot of code, but it's been in high level languages like Maxscript, Actionscript3, PHP, and now C#. Really, I'm most skilled as an artist but my interest is
focused on making games, whether I'm doing art, code, or design.

What inspired the idea behind your project?

I've had the opportunity to create explosions in a few games and I've always enjoyed the combination of problems in lighting, physics, and animation that they present. However, every time I've
done explosion effects, the process has been complex. With the rise of the Indie game scene many developers don't have the time to focus properly on effects, but they are really important to the feel
of the final product. Prior to the Summer of Code announcement I had just come off of doing some explosions for Marvel Ultimate Alliance 2 for the Xbox360 and PS3. I enjoyed it so much that I was
looking for a way to bring that experience into my work again, and the fact that I was starting to get interested in Unity at that time made it all fit.

What does your project bring to the table that isn’t
available already?

Detonator can help any Unity developer that wants to incorporate explosions into their game. A solo developer can quickly integrate it like any other Unity component and with zero effort can
create a great looking explosion. The effect can easily be scaled, recolored, or its duration changed with a single parameter each. Folks that are more interested in creating custom effects can take
advantage of the system's modular nature, arbitrarily piecing together components like fireballs, glows, sparks, heat distortion, shockwaves, and more. The system automatically builds its materials
from provided textures, but materials can be replaced as well. Even sound has a place, as the system lets the user define different arrays of sounds for close up and distant explosions with a
definable threshold in between. Lastly there's a level of detail system that lets developers tie into the global quality settings or change via distance. It's really flexible and I'm excited to see
what the Unity community does with it.

Unity - Summer of Code

How would you describe Unity to someone who has never used
it before?

I'd tell them that Unity is kind of like Flash but is built specifically to make games using a 3D engine. Everything about Unity is structured around making a game and removing the annoying,
trivial tasks that most developers are unfortunately very accustomed to. Iteration is ridiculously fast, from import pipelines to script compilation, and you can spit your game out to multiple

What originally attracted you to use Unity?

Unity caught my eye a few years ago when it was still Mac only, but I didn't give it a real go until they released the Windows version with 2.5. Having worked as a technical artist in the game
industry for several years, my job was to build pipelines to help artists quickly and efficiently get their art into games. I read some things about Unity's import pipeline and it blew my mind. It
just looked so easy... and it is. I have a great deal of respect for what these guys have done and if I have an opportunity to do pipeline work again I'll be using a lot of concepts I've learned from
working with Unity.

Which platforms do you target with Unity when making

I'm currently involved in some Unity iPhone projects with Infrared5, and I'll be doing some webplayer stuff in the future as well. I'm also looking forward to seeing what additional platforms
Unity supports in the future.

What inspired you to enter Unity’s Summer of Code
competition this year?

I saw a tweet from Tom Higgins of Unity. Once I read the description, the concept for a parametric explosion system just popped into my head. I sat on it for a few days but then just took a few
hours to write up the proposal. Honestly, I didn't expect to be accepted since I really whipped it out, but when I heard they had chosen it I was really excited.

Would you have created your project without the

Maybe if I was working on an explosion-centric game, but otherwise probably not. That's the great thing about events like the Summer of Code. They give developers a reason and incentive to try out
ideas that would not otherwise have found a place in their workday.

What does being selected as a final project in the Summer
of Code competition mean to you?

Well besides just being exciting to be picked, hopefully it means that the project will get enough exposure to continue to grow and live on after release.

Development – Post Mortem

After you had the original idea, describe the process you
took in prototyping the idea and finally bringing it to completion...

Well, first I had to learn the peculiarities of the Unity particle system by making a prototype effect that looked as good as I expected the final system to look. This took a little over a week of
working at night and along the way I posted some Unity webplayers on my blog to get feedback. Once we were all excited by the look, I started building out the architecture of the system, recreating
each piece of the explosion in code and making the system able to scale the explosion, change its duration, color, detail, etc. This process essentially took the remainder of the project.

Did you plan the project in detail, or did you let it
evolve along the way?

The first step in the project was to develop a detailed development plan. The Unity guys and I needed to come to an agreement on what would be built. The final result is very close to that plan,
but the implementation details did shift somewhat over the course of the project.

How did you go about testing the project?

I built a test scene early on and pretty much just used the system in it. I also sent a few beta versions to Martin Schultz of Decane in Germany and he gave some nice feedback a few weeks from
release. His feedback was great and his enthusiasm was really reinforcing that Detonator was headed in the right direction. Post release, Slippy Douglas of Nectar Games was kind enough to test on
Unity Indie.

Did you get any external opinions or help on the
development of the project?

Yeah Rune and Jonas at Unity provided some valuable insights, often contributing code snippets in areas that I was confused about. This was one of the reasons I wanted to get involved in SOC and
their contributions were very useful. I also got feedback from Andy Zupko at Infrared5, Dan Bernard at Robomodo, and Jesse Brophy at Blizzard, in addition to the great user comments on my blog and
the Unity blog.

What do you feel went well in the project?

I feel great about the architecture going forward. This really could be a framework for any kind of scalable composite particle system. I'll put some documentation together about creating
additional Detonator Components and we'll see what happens.

What didn’t go so well?

I am extremely tired!

If you were to go back and do your project again, what
would you do differently?

Really, nothing. I suppose if I could go back and do my project again, that would mean I had a Time Machine, which I would use to catch up on my sleep.

What would you do the same?

Pretty much everything. No regrets.

Which part of the project did you find the most
interesting or fun?

Digging into Unity and reaching a point where I understood the system so well that I'd be confident doing my own game. I've not seen an engine or system that I felt this way about before, so it's
really exciting. It was also fun watching my 3 year old nephew Luke play with the test scene. Everyone likes blowing stuff up.

And which part did you find the least interesting or

The whole thing was fun. I mean, I was making explosions for video games, right? ;)

Did you have enough time to complete your project?

It was tight, but certainly a reasonable amount of time, even considering I had a day job.

Is there anything else you’d like to have added or
spent more time on if you had the time?

I would've liked to get a Camera Shake component in. That'll be in the first post SOC release. I plan on continuing work on Detonator for the foreseeable future. More details to come on that.

Is there any advice you’d like to offer any
developers based on your experience in this project?

On this project, getting multiple sets of eyes on the project as it was being built was a great benefit. The model of developing web games is really unfamiliar to those in the traditional game
industry, where the game is worked on in secret for months or years and is only seen by the press and internal parties. It's so nice to be able to pop off a prototype early in the process and get
feedback. This has been familiar for the web and Flash folks for years, and game guys should take advantage of this as well. So if you're thinking about doing stuff in Unity, get a blog going and
start posting as early as you have something to show, even if you're slightly embarrassed by it.

What do you plan to do next?

I'm going to continue development on Detonator, make some blog posts about Unity, and get started on some personal game projects. You can follow development on Detonator at "http://variancetheory.com/detonator">http://variancetheory.com/detonator



Note: GameDev.net moderates article comments.