This tutorial is meant for educational purposes only to showcase how to build certain types of games. Please respect the copyrights/trademarks of others!
If you are in a hurry, you can try the game here and check the source code here.
Last time I posted something around Angry Birds was 3 years ago, when I blogged about a 5’ creation of Angry Birds with 0 lines of code using XAML, Behaviors and Expression Blend. Well, it wasn’t exactly a clone, but it simulated on how to implement some basic dragging/collision/particles functionality with the Farseer Physics Engine. This blog post serves as an attempt to create a single level (with reusable components, long live the prefab!) of Angry Birds using Unity 3D platform. The game features a single level, 3 birds for the user to throw, 3 pigs that the user has to destroy, parallax backgrounds, a maximum strength for the bird (we cannot drag the bird more than a predefined distance), animations with the help of the excellent GoKit library, a projection of the trajectory of the bird (so we can more or less predict where it’ll land), the user’s ability to drag the screen to see the entire scene, pinch to zoom ability (for multitouch devices) and a small trail that is left by the bird when it’s thrown.
Game scene in the Unity editor
The projected trajectory
The trail left by the bird
Before we begin, let’s mention the necessary stuff! Angry Birds, the red birds and the pigs are all registered assets trademarks of Rovio and this blog post serves no other than education purposes.
Game code was written in Visual Studio (check the free Community edition here). For debugging purposes, don’t forget to check the Visual Studio tools for Unity here.
Onto the game! It’s a pretty big game, we’ll attempt to cover most of the stuff. We’ll begin with examining our scene in the editor. As always, it would be better if you opened the game in Unity and examined all relevant parts as the post walks you through them.Read More »