
I excitedly picked up my Samsung Guru mobile, launched “Sherlock Homes” the game and started playing it as though it was the best game ever. It was amazing, we had to go into these various rooms, pick up clues that would come into play later on in the course of the game and complete tasks… Oh! I almost forgot to mention that the game was in 2D. Anyways, that was long ago in 2011. Fast forward 8 years, and now we have “Call of Duty”, “FIFA”, “PES” and many more such games available on a smartphone. This is as exciting as it could get (well, at least for now), being able to play them anytime, anywhere and with anyone is practically a huge advancement in the field of Technology.
My interest in the field of Game Development emerged when we were asked to make a project for a subject called “Graphic Designing” wherein 3 of my friends (Aaron ,Tanmay, Jigar) and I came together to make a real-life 3D game. Given that my entire friend circle was into computer and mobile games we pretty much had an idea of what the game should look like. However, we were searching for a great idea and a great storyline for the game (which are the two building blocks of any game). So, after much deliberation and a series of brainstorming sessions we came up with the following idea: ‘What if we created an open world game wherein the map would be our own prestigious college –St. Xaviers College Mumbai’, we would have the student (our player) perform various tasks to get points. In order to acquire these points, the player would have to visit each department and then answer academic questions as per the respective department and receive points, if the answer was correct. On reaching the score limit, that player would then complete the game (yes, it does pretty much sound like a GTA rip off, however the goal was to incorporate a real-life 3D model of our college in the game along with regular college tasks).
Now that we had our idea and storyline in place, we had to start the next phase, which would include determining the software needed for bringing this abstract idea to life. After doing a lot of research and reading various types software available for game development, we as a whole, decided to settle down on using Unity, Visual Studio (used by Unity) and Blender. Now, what are all these weird names which we have never heard before? Well, Blender is an application wherein we would design the map that was required, all the 3D models would be designed and then “transported” to Unity. What is Unity? Unity is a Game Engine that allows you to make games! It provides various tools to the developer to make their game stunning and exciting. So then, what does Visual Studio do? Visual Studio is a code editor (Integrated Development Environment or IDE) wherein we decide how our character moves, runs, jumps etc. so in essence, the entire functionality of our character or the behavior of our character would go into Visual Studio.
It is important to understand that game development isn’t hard to understand nor is it rocket science. It is just “you” telling the game engine how your “player” should behave in the game. Let us take a simple example, now since we are making a 3D game, we have to understand that we will be dealing with 3 dimensions as 3D means 3 Dimensional. These dimensions would be the X, Y and Z planes.

In the window on the left at the top right corner, we see the 3 dimensions in which the green signifies the Y-axis, blue signifies the Z-axis and red signifies the X-axis. At this stage we have made a simple ground for our player to move on. Notice how the camera catches everything that is specified in its given range. We can alter the camera and also change its position to fit our desire. Next, we create our player which will be another cube that should move on this ground..

As we see in the image above, we have created our player that will now move on the ground (notice the Rigidbody property of our player on the last right-hand window). However, the player won’t move automatically as soon as we hit the play button situated at the top of the two windows. Here is where Visual Studio comes into play. We now will specify what our player does once the game starts

Now as soon as we make a new script for our player we are greeted automatically with this screen. Don’t pay heed to what is written from lines 1–8, but focus on the two main functions: — “void Start()” and “void FixedUpdate()”. The “void Start()” function gets called only once at the very beginning of the game and never gets called after that, however on the other hand, the function “void FixedUpdate()” gets called every time your computer screen refreshes. So, logically speaking, if we wanted to make our player move, then that entire code will go into the “void FixedUpdate()” function. By writing the following piece of code it will apply force to our player in the forward direction once we hit the play button….

On line 7 we declare a variable “rb”of type Rigidbody so that we can now reference our player through code(recall that our player had a property of rigidbody)! As of now we can control our player by writing just a few lines of code and making it do what we want. So, on line 18, we have used a function named “AddForce()” which will add force on our player (rb) in the X, Y and Z direction once we run the game.
However, if you want to only move your player forward then you would need to write something like this…

On line 18, we now check if the key ‘W’ is pressed on the keyboard, if so, only then will the force be added to our player!
The above example shows how we can make a player and also how we can write a simple piece of code to move the player around on pressing the desired key. There are so many other things that one can do to leverage the entire power of Unity and make a stunning game.
Overall, there are loads of stuff that one can figure out and do once you set foot into game development. The game that my friends and I built is called “Xaviers Unleashed” and does contain such pieces of code for our player movement, below are a couple of screenshots of the fully functioning game along with how the entire college quad was designed in Blender. For getting the texture of the buildings of our college while designing, we used a DSLR camera to click pictures of the walls of our college and then applied that to our 3D model.
DESIGN:


TEXTURES:

WIREFRAME:

GAMEPLAY: