Game Development with Unity 2D – part 2: Javelins & Battle Cries

This is the second part of a voyage in Unity 2D development, where we document in video the design and development of a simple strategic game reproducing the Battle of the Teutoburg Forest. Here are Part 0, Part 1, Part 3, Part 4, Part 5.


In this part two we are going to have javelins and audio in battle; here is the video (also directly on YouTube):

Download the updated project here: and as usual the class sources are on GitHub.

If you missed them here are Part 0 and Part 1.

What follows are the notes I used for recording the video.

You can follow developments on Twitter here.

Things I forgot and a strategic game dev mistake

– Configuring the environment: green on play, save all & reformat on save, why not Sublime.

– How is a sprite compatible with the “traditional” texture? it silently generates one when type is sprite.

– Do a minimal balancing so that its hard, and make winning losing possible: not the last thing, the first thing! This will be part 3.

The code

– Found some balance in distributing code: RomanInfantry extends Unit, the update call is first delegated upwards. Then Unit has a UnitStateExecutor instance that does not extend MonoBehaviour, executes states, delegating actions to object instances (that do extend MonoBehaviour).



We see javelins instantiation, rotation, animation. They determine two kinds of damage (historical).


I had two remarkable voice actors providing me all the special effects:

Maia and Enea
Thanks to @krur for suggesting a basic approach to audio, just as basic as the sprites.

For audio management in code I’m using basic class reflection – very little code needed to handle lots of different audio clips & sources.

Here is a cool tool for creating audio effects: BFXR.

Homework and Updates


roman-weaponsThe page on the Execution Order of Event Functions is quite important: learn it by heart.

In the demo we use the HOTween free component. Remember donating to people developing open source projects!

Finally here you find more information on pilum, the Roman javelin.

Here are Part 1, Part 3, Part 4.

Social Share Toolbar


  1. Oh) This is awesome :) What’s your total time spent on the thing by now?

    • Hmmm… don’t know exactly, quite a while, as I am studying / learning / trying most of what I show. Takes a lot of time to do something the first time.

  2. Gonçalo says:

    Nice work, keep it on ! Thanks for sharing : )


  1. […] of the Teutoburg Forest; here we take a quick detour. If you missed them here are Part 0, Part 1, Part 2, Part […]

  2. […] we make a more general discussion of grids in games. If you missed them here are Part 0, Part 1, Part 2, Part 3, Part […]

  3. […] are continuing our voyage in Unity 2D development; previous trips: Part 0, Part 1, Part 2, Part 3, Part 4, Part […]

Speak Your Mind