Game Engineering || – Final Project

For the final project we had to make our game using the engine that we have we developed over the course and use most of the methodologies and techniques that we have been taught over this course.

Our engine contains both OpenGL and Direct3D configurations and so your can build and render your game on any of the two platforms. We have a cool Maya Mesh Exporter where you can export the model directly from Maya into your Game Assets and use those models for your game. We have Materials where you can adjust alpha transparency, RGB values as well as add textures. The engine also contains different builders like MeshBuilder, AssetBuilder, ShaderBuilder, MaterialBuilder and more whose work is to convert the assets to binary formats. Binary formats have great advantages of reduced size over the original mesh files.

So the game I decided to create is an Exploration Game where you control a character and you can basically interact with the objects on the island as shown in the picture below:

bandicam 2015-12-18 17-54-58-352

The main mechanic of the game is that when you come in contact with an object, its color gets affected. As you see in this picture below, when the main character comes in contact with house the color changes to a deep blue.

bandicam 2015-12-18 17-55-17-756

After interacting with all the objects their final colors will look like shown in the picture below. So basically I am comparing the position of the character with the objects on the island and checking whether the character is withing the same x-z plane as the object. The way I am switching the color is that when the character is within the same x-z plane as the object, I am swapping the current material of the object with a new Material which is already loaded. The reason I decided to go with the swap is because at the time I did not know if I wanted to change the effect (transparent or opaque), or color (RGB) or whether I wanted to change the texture. So when the new material allowed me to change the things and see which one looked better. So ultimately for objects on the island I am just changing RGB values and for the sky I am changing the texture.

So one of the mistakes I was initially making was adjusting the positions in Maya and getting them in the game. So checking whether the character was touching other objects in the island did not work correctly. So later I exported the model without adjusting their positions and centered in Maya to the Assets and adjusted their position in the Engine Graphics. This made the character object interaction work correctly. So looks like even if you move around objects in Maya and export them their centers do not move .

bandicam 2015-12-18 17-55-27-767

There are other ways in which you can influence the environment. Basically if you press left shift the sky at the back turns to a sunset texture.

bandicam 2015-12-18 17-55-35-465

Finally, if you keep “0” pressed on the NumPad on your right, a fish will popup and go back as you keep the button pressed. The fish moves up and down in a sin wave which is done by taking the sin of the total seconds elapsed and multiplying that with a height to adjust the amplitude of the wave. The same principle applies to moving the water up and down in a wavering sinusoidal fashion.

bandicam 2015-12-18 17-55-47-789

The things I have learned is firstly how to make code platform independent and writing and reading binary files. I did not have much clue about what a binary file does in a game. So reading it was totally cryptic for me. But John Paul really explained the concepts about it really well and how to read and interpret the binary files, which will be very useful for my future projects.

Other things that I have learnt is how to design and architect code. I never payed much attention to designing code and organizing code but through this course I have learnt that it is very important. You can learn Graphics, Gameplay or AI but learning how to integrate them and read between the lines is important and is something that I have learned in the class and need to work on it more. I learnt about decoupling the code, abstraction , platform independence and most importantly the simplicity of lua files, so that you can understand it and there is a good amount of clarity.

My biggest take away from this class is the Asset Build  pipeline system specially using the Maya Mesh Exporter. On a whole this class has been a enjoyable experience where we focused our attention to the asset build system and also on the basics of Graphics. Many graphics books will explain you tricks but the things we have learned in this class is barely found in books. Such courses are really rare to find, and I will definately look back to the things I have learned in this class for future projects.

The Gameplay Video of my Game is as follows:

Gameplay Controls –

Use arrow keys to control character
1) Left And Right Arrow Key for moving in x axis.
2) Up And Down Arrow Key for moving in z axis.
3) Press X to rotate clockwise.
4) Press C to rotate anticlockwise.

Press Left Shift to Change to Cloudy Sky to Sunset.

Press “0” on the right NumPad and keep it pressed to see the Fish move up and Down.

Click the following link to download the game.

FinalProject

Estimated Time for completion – 20 hours.

Game Engineering || – EAE 6320 – Assignment_13

The main objective of this assignment is to add Textures to our models from Maya. Basically our material file will contain the path for the texture file which will be either in png or jpeg format.

Every texture will have their own texture coordinates which are called u,v coordinates. We need to add a uniform variable called sampler which will basically sample the texture coordinates which are exported from Maya.

In the Maya Exporter earlier we only had a pos and a color, but now we need to update the Maya Exporter so that it can include the textures. Basically we need update the Maya Exporter to add the u,v texture coordinates so that they can be exported to the Mesh files from Maya . We will also need to add the Texture Builder tool to process the texture files in the asset folder.

So the textures need to be associated with the Material Files so that we can add the textures to the material files and the material files itself would allow us to basically set the textures, effects etc. So basically the material file would allow us to make the game objects opaque or transparent, change the rgb color values and now add textures.

The following picture basically shows the blue transparent material lua file. Basically as discussed above the texure_data is addition to the file which contains the “sampler” and the path of the texture file.

texture

After adding the textures the binary file looks like as follows:

bandicam 2015-12-17 21-51-21-814

Basically after the null terminator of the uniform name, we see a “01” which basically indicates the count. So the material file is using only one texture and so the texture count is 1. Followed by the texture count is the texture path . It was easier to append the texture data after the  effect path and  uniform data since I didn’t need to change the existing effect path and uniform data information. I thought about adding the textures in materials rather than creating new struct for Textures but it was cluttering my materials so I basically added a new struct for the texture to prevent the cluttering of code .

Direct 3D Output

Direct3D

OPEN GL OUTPUT

OpenGL

If you basically notice the two outputs you will see that the Direct3D output is a but more sharper around the edges than the OpenGL output. This is because of the difference in the sampling rates of both the platforms.

Estimated Completion Time – 16 hours

The controls for camera are First Person Shooter controls as follows:
A –     to strafe left
D –    to strafe right
W –   to move forward
S –     to move backward
Space – To fly upward
Z –    to Dive Downward
E –    rotate Camera ClockWise
Q –   rotate Camera AntiClockwise

C-    rotate the man around the house in clockwise direction to guard          the house
X-   rotate the man around the house in anti-clockwise direction to             guard  the house

Use arrow keys to control the mans movement

Link To download :

Direct3D_Release_13

After downloading the link run Game.exe.

Semester 3 Thesis – EAE Day Open House

Today is the day where the cohort 5 and cohort 6 will showcase their games. Everyones excited for the feedback that we will get from EAE Day.

It was a great day for us. The people liked the overall game. Was very pleased with the most of the feedback based on the wand weapon system and the environment sound system . We are proud of our effort to produce a good game for IGF.

The best part of the day was getting the BB8 Star Wars cake. Cant wait to watch the movie on the 18th.

cake

Semester 3 Thesis – 8

Finally I have finished the last task for the projects for this semester. The bee with my particles looks like as follows:

bee

The bee model was created by Avinash which looks quite cool.

So since initially the blind player has no clue on the mechanics, I programmed a fire fly behavior which rotates 90 degrees at a time in an orbital motion around the blind player and emits fire triangle particles. The fly basically has an audio source. Only the deaf player can see the bee but the blind player cannot. But the blind player can hear the sound of the bee. As soon as the blind player identifies the sound direction of the bee the bee rotates by 90 degrees. These events are programmed to occur 4 times during the tutorial. This prepares the blind player and helps him learn the mechanic during the tutorial.