The making of A Small Car, a 3D Flash game made with Flare3D
Do you want to know how to make a successful Flash 3D game? Christian Östman from a small game made a 15 million plays (and counting) game, and shares with us some interesting information.
If you have played A Small Car you know that it’s a 3D Flash Game where you drive a small car on winding levels in the sky. Since we released it in December 2010 it’s been played over 15 million times.
It was the first game made by me, Christian Östman (coding, gameplay) and Richard Åström (art,leveldesign, sound) under the “A Small Game” – name.
As there’s not that many 3D flash games around of this kind we thought it could be interesting for others to read about how we made the game and the workflow we used, especially with Molehill waiting around the corner.
The game was made in about 8 weeks, but neither of us spent full-time on it, so i would estimate that we spent around 2 weeks each full-time making the game. A while before we started working on the game i had experimented a bit with the Flare3D engine, which is a 3D engine for Flash.
Besides being very easy to use and being very good performance-wise it has an awesome integration with 3d Studio Max in the form of a plugin. With the plugin it’s possible to create 3D content and preview it directly in the Flash Player, without leaving 3d Studio Max. This would prove to be very important for the workflow we used to make the game (more on that later).
Physics
One of my first tests with the Flare3D engine was to try and integrate it with JiglibFlash, wich is a great 3D-physics engine that i’ve used before.
The way Jiglib works, as most physics-engines, is that you add physics-primitives and set their properties. While running the physics simulation you then use these primitives to correctly position your displayed objects.
After having JiglibFlash running with Flare3D i started thinkig about how nice it would be if you could edit the physics directly from 3D Studio instead of having to write it in code . This way you could eliminate basically all level-specific code which i knew from earlier projects could take a lot of time. To be able to edit the physics from 3D Studio i wrote a small AS-class called PhysicsParser.as. It uses a great feature in the Flare3D plugin called UserData.
User Data makes it possible to add any custom properties to your objects directly in 3DStudio Max, these properties are then read into Flare3D when you load your scene in flash. So what PhysicsParser does is parsing a Flare3D scene and looking for a User Data property called “jiglib”, if that exists it looks at the other properties on that object and creates a physics object and sets all the properties on it.
Some example properties includes: type (box,sphere,cylinder), movable, friction, restitution and so on. This is how setting userData on an object looks like in 3d studio Max:

Game Engine
With a physics engine that was editable from within 3dstudio max, it was time to start making a game.
Jiglibflash actually comes with a class that simulates a car, and i’ve been wanting to use it for a while in a game. So I made a quick test with the JiglibCar, added some keycontrols to it and used a car-model that Richard had made for another game we had been experimenting with. I made it so it loaded an external Flare3D scene called level.f3d and parsed it using physicsparser.
Then i could go directly in to 3D Studio, create a level and set the physicsproperties, and just export it as level.f3d. Then start the game.swf and the level would load, and you could drive around in the level directly. It’s even possible to animate stuff (which we ended up not using that much, but for example on the spinning Earth in the Bonus Level).
The flare3d plugin comes with a feature that makes this even nicer, called Custom Exporter, there you just define a swf that should start when you press export. So with this it was possible to make changes to the level and instantly try it out in the game. At this point i sent the swf to Richard and asked if he wanted to make the levels for the game.
Which he did, and it allowed me to focus only on the game-engine, and Richard could create all of the levels, without the need to write any code. Here are some screens of how the levels looked like in 3D Studio:



The rest
We added some more specific user data variables that was parsed for the game, like for example “goal” wich could be set on any object, making it a goal, and if the car would get in a certain range of a goal object the level would end. After all the levels was finished we embedded them all inside the game. Richard composed the soundtrack, and we added some menus and a titlescreen to the game. Finished!
For our new game INTRUDED we’re using a similar (identical) workflow, even though it’s a very different game, and not using Jiglib for the physics. We’ve made it so that almost everything in the game is editable from 3d Studio, making it very fun and easy to create different style of gameplay without writing any custom code.
Thanks for reading, and don’t hesitate to comment below if you have any questions. Also, don’t forget to check out the awesome Flare3D engine. Version 2.0 (using Molehill) is in pre-beta at the moment and looks very promising!
They can be easily customized to meet the unique requirements of your project.






(21 votes, average: 4.81 out of 5)








This post has 22 comments
Chris Moeller
Was the 15 million plays just from their website, or through a bunch of game portals, and if so, which ones?
Pedro
Should be exciting and really fun create levels with 3d studio. Thanks for the article!!
Vlad
Does this save all your models and everything into one final .swf file ?
and/or can this be done ?
Christian / Asmallgame.com
Chris Moeller:
The plays are from different portals, like minijuegos.com, gamesbutler.com, mochigames.com etc
Vlad:
From 3dstudio you can export the scene as a .f3d files containing all models, textures, animations etc. You can then embed these .f3d files inside your SWF, making the final game a single SWF.
Juanjo
Question about monetize.
Of course i dont want to ask you about your earnings in mochimedia ads (its private). But in general… is this game a good business for you. I have games with 50k (i know its not much) plays and the business is not so good ;-)
The good thing is that you have spent very little time (a normal coder would need more weeks to develop a game like this).
Thanks.
DJP
Great article. I was thinking of giving Flare3D a try and this really helps. I have seen A Small Car game on a bunch of sites but haven’t played it… until a couple of min ago :). It’s great to see more and more 3D games in Flash.
Jorge
Simply awesome…
JeremyOLED
Fantastic. You guys did a really a good job of not letting the development process get in the way of the actual development
sliz
the sky box is so good.
how do you do that?
vega
Great article – didnt knew that the game was so succesfull – gz!
Viza
I’m always confused with the definition of “plays”… Is 15million plays means 15 loads (i.e. counting in the preloader for example = 15 million views), or 15 million clicks on the “Play” button in the main menu, or 15 level played?
butler
yeah from gamesbutler.com the game got stunning 21,579 Plays
Christian / ASmallGame.com
Thanks for commenting!
Juanjo: Ads is one of the ways to monetize a game, we also have sponsorship and sell sitelocks/branded versions of it.
Sliz: It’s not a skybox, just a gradient background image really :)
Viza: In this case a play is equal to a view, counted once every time the preloader finished.
nikhil
hey Christian ,
loved the game.The simplicity of the game make it really attractive.Looking at it i was thinking that “its very easy to make complex games but very difficult to make a simple one”.But u did it really well.Kudos!!!
Blinx
Hi Chris, loved the physics. Is flare3d opensource?, Should I have to pay to make a sponsorship game using it
Case study: Pixel City Skater, an iPhone game made with Flash
[...] Do you remember Christian Östman and his Flash 3D game A Small Car? [...]
Case study: Pixel City Skater, an iPhone game made with Flash - Emanuele Feronato
[...] Do you remember Christian Östman and his Flash 3D game A Small Car? [...]
Amo Seenathy
i fell in love with this game cuz i search the internet 4 cool 3d games 2 play & tis is d best. thumvs up guys!!!! u should make a game where we cud create our own levels, that’s how much i love dis game.
Dasun
Hi Christian,
As I know how it’s difficult to get into the track of this latest technology, I wanna thank you both guys about this post to make us aware.Nice work and Good luck for you.
Bala
Great Work,
Can you pls explain about distribution of SWF (release build)to any gaming sites.
As game SWF should require a html page that needs to contain a tag like.
So How you managed guy’s…
you provided both html and SWF or just only SWF.
How you make sure that tag is there in html that was used to embed small car SWF…?
Normally we only give SWF file to clients.
We are about to release a game.
Thanks for helpful suggestions
Bala
Bala
tag like.. param name=”wmode” value=”direct”
Juan
Nice work.
What are you thoughts on the future of flash? Have you looked into developing html5 games?
Are there ready made physics engines you can incorporate into html5 games?
I love games with good physics engines I just hope flash doesn’t die.