Saturday, August 4, 2012

Plants VS Zombies-like game I am creating on Unity3D

Back in march, I spent 3 weeks to reinforce my learning of C# programming under the Unity3D game engine. I created a 2D game (temporarily named "Tikis VS Pirates"), which is an orthographic tower defense game very similar to Plants VS Zombies by PopCap Games. About 15 000 lines of C# code has been necessary so far, and it's far from being finished. I had to code snap-to-grid, bezier curve algorythm for canonballs, and also to ensure that sprites were not overlapping, by giving each tile a unique z-index based on its X and Y coordinates values. This also ensures that sprites dropped on tiles found at lower horizontal rows are appearing over sprites dropped on tiles found at higher horizontal rows, in order to simulate some perspective.

The goal is to defend the islands from waves of pirate crocodile invaders that are in quest for more treasures. Some characters can be dropped only on water-type tiles, while some others can be dropped only on grounded tiles. The player can also collect sun, wood and rock materials. Those materials can be used to build bridges and palisades. Most characters/items that can be dropped on ground-type tiles can also be dropped on bridge-type tiles.

Come back later to follow development of this one-man army game development!


  1. Hey I was curious how this project is turning out and what pipeline you were using to create 2d animated sprites in Unity?

  2. I did a playable update in a new post. Go check it out!