Unity Game Development
About the Project
Poop Revenge is one of the games being developed by Root2Games. The basic idea of the game was to fly like a bird, eat, poop and dodge obstacles in the city and at the same save its eggs (points) from the humans. The game has been developed on the Unity Game Engine. We worked on the idea quite a bit, thinking about the birds as well as the city elements. Thinking about each detail made the idea feel more interesting. We finalized on a 3D Runner Based Game inspired from Temple Run, Smash Heat and Sim City.
UI and Icon Design
A 3D game comprises of many small objects known as 3D assets. (eg) trees, buildings, cars, street light, roads etc. Each asset has its own texture. These textured are then UV Mapped to the Object.
We built the Objects individually from scratch on 3ds Max and created their textures using Photoshop. We created a total of around 150 assets and their textures.
One of the major problems we faced while creating these objects is that we had to make sure that the they are not heavy on the mobile processors. The more number of faces ( Polygons ) an object has the more processing power it requires. So we had to reduce the objects polygon count to a great extent by compromising with the detail. (eg) The above building has only 556 polygons.
We had to make optimizations to the Texture as well. The lower is the number of Textures the better is the performance. So we tried to reuse as many textures as possible for different Objects by using UV Mapping
|One of the major elements that decides the look and feel of the game , is the environmental lighting. After numerous tests and looking at different settings, we decided upon a lighting that looked very much like that of sunset or Sunrise.A mobile platform limits the usage of dynamic lighting and dynamic shadows in a game. So we had to find a way to make the game really good without their use. The answer to this was Lightmapping.
What lightmapping does is that it pre computes the shadows and illumination of the entire game before hand and saves it into texture files. These Texture files are then overlayed ontop of the original object textures.
Lightmapping allowed us to precompute the shadows and illumination of various static objects. This allowed the processor to focus on the very few objects that required dynamic light and shadow.
Constructing The City Layout
This was definitely one of the toughest task yet in this project. We had to construct a city Layout with the roadways and city blocks. After numerous attempts to create this by hand , we realized that it is not possible without actually knowing how a real city is planned. So we started looking for alternatives , which is when we stumbled upon this Open Source Tool called “Ghose Town”.
This tool can be used to build random city layouts on any plane surface based on its polygon surface structure. Using this tool we were able to achieve our city layout.
The above sub-city layout was then repeated number of times and then put in an array of tiles to form the actual city layout.
Putting Together The Entire City
Now that we had the City Layout and the 3D assets with us, it was time to combine them both
and complete the city. The assets were manually positioned at different locations to give the most accurate representation of a real life city. The city has its own industrial area, sub-urban area and office area.
Waypoint Navigation System
Now that the static objects were in place, the system had to be made dynamic. The vehicles , people and the character in the game had to be made moving from one point to another. For this we developed out own Waypoint Navigation System. Any object can be made to follow a certain set of waypoints using this system. The objects would rotate and tween automatically when the direction of movement changes.
The above image shows the waypoints used by the bird to fly through the city. The entire navigation system comprises of 2 scripts. One is used to set up the various waypoints for the object and the other for the object to follow these waypoints.
Character Control Script
Now that the world was set up, it was time to develop the gameplay. The bird (character) had to be flown through the city either via swipe or using the accelerometer. Each of them had their own advantages and disadvantages.
We decided to stick with the accelerometer controls. Meaning the bird responded to the tilt of the mobile phone to go left or right.