Final Game

Game Engineering Final Game:


Controls :  Space /MouseClick To Jump



==> FlappyMon Direct3D



==> FlappyMon OpenGL



==> Description About My Game

The Game is all about emulating Flappy bird movement mechanics with my engine created in the game engineering class and some features to demonstrate few capabilities of the engine.

==> Some Notable Points about capabilities of the engine The game currently uses 3 different mesh files and 4 different materials. All have different alpha values. The alpha values and positions can be dynamically changed.

==> Playing the Game

Download any of the above version and click on the exe to start the game.

Press Space to jump Try to avoid obstacles. I you collide with objects you will re spawn after your characters alpha value has reached 0. If you reach the end of the screen you will apear from the other side.

Your Goal is to play as long as possible.

==> Design Of my game

I want to expand this game by changing the objects position in the world dynamically and give rewards to the player by changing the mesh of the character he controls every third round cleared.

My engine is not perfect but still I am happy and proud that I can do  ton of stuff easily with it. It is easy to add new capabilities to the engine .

==> After this class I learned hoe to make things in a proper and structural way as we had guidelines and rules set for the class, which helped us to make all different parts of the engine working smoothly. I believe my coding skills have improved and also while creating not only c++ but the approach of creating software models have changed. I also understood the importance of making things Human readable and platform Independent. Learning how to export things from Maya from our engine was also important and useful



Assignment 13

Game_Enginnering Assignment_13

Download exe AssignmentD3D


Use WASD to move Camera and Arrow Keys to move EAE6320

ScreenShot of Assignment with different Materials and Textures



Binary Material File Containing Texture Data:



I Store The texture Table data after storing uniform data this makes it easy for me to write and read files. I choose to store the texture uniform name first and then texture path as I found it more convenient to store name first.

The above Image shows a black line which stores the texture uniform name , I inserted a null pointer after it so it can be easily readable.  Red line stores the path for the structure.  at the end I inserted a null pointer for easily able to read ata.

==> I made my textures part of my materials as I wanted to reuse some functions in my material class needed to make platform independent calls to get uniforms. Also i could easily update textures inside my Update material functions.


Comparison Between OpenGl and Direct3d

Direct3D Output:



OpenGL Output:



If we observe both images we will find that the image looks smother in OpenGl compared to Direct3d. especialyy the green and red pillars.




Game Engineering Assignment_12

Game EXE Download

Final Game Output:



My Human Readable Material File

Hi Materials Are useful because we can apply different colors to objects with similar render states.



Path store the location of the Effect File to use.This Material has two uniform data. One is  color which is blue and other is alpha modifier that sets transparency level as 0.5. Both are fragment shader’s uniforms.  values set the color that we want on this material. Alpha modifier sets the transparency level that we want.




Blank Line Shows the path, Null Pointer is Inserted After that, Red Line Shows Uniform Count, Yellow Line Shows Name of uniform, Null pointer after that is inserted, Green Line Shows Uniform Handle , Blue Line is Enum 1 is Fragment and 0 is Vertex, Brown Line Shows Values in Float[4],  Grey Shows ValuesCount.


My orders

  1. Path + Null
  2. UniformCount
  3. (UniformName +Null) * UniformCount
  4. Structure * Uniform Countstruct

==>Difference in Binary Files

There is difference in size of the binary file in D3D and openGL. This is mainly because of the size difference of the handle, D3D Uses ConstChar* wheras Opengl uses GLint. Rest Everything is same

Screen Shot Of Game


All 4 Squares HAve same mesh file but different material and offset.

First Square => opaque Shader Color{0,1,0}

Second Square==>Transperent Shader Color{1,1,0} Alpha=0.2

ThirdSquare Transperent Shader Color{0,0,1} Alpha =0.5

FourthSquare==>Opaque Shader{1,0,0}




Assignment 11


To make a maya Exporter and make  an object transperent

Download D3D EXE

Note: Transperancy dosnt work for my Direct 3D platform.

==> Output for openGl





==> Maya Plugin

My MayaMesh Exporter depends on Windows but No  Project  Depends  On it.



==> Maya Debugging Plugin



==> Screen Shot


==> Screen Shot Of Transparent Effect File


My effect File has  a render state table and it contains 3 dictionaries for alpha for transperebcy, depth testing and writing which  have a boolean value determining to Enable or Disable


==> Look at the Last Value in both the effect files to see the render state value. The render sattes are added after paths

==> Shader.Effect


The last byte shows 6 i.e.’00000110′



The last byte shows 6 i.e.’00000011′


==> The transparency of a pixel is a function of the collective transperencyof all the objects at that point


No oh hours : 17 hrs









Game Engineering Assignment 09

==> Goals of the Assignment :

  1. Draw 3D Objects
  2. Add Camera Movement
  3. Adding Depth
  4. Creating World And Screen Coordintes


Use WASD to move camera forward and sideways



Screenshot of my game. Finally things are 3d now and I have a Camera. So we Draw the object on a #d Plane Whith depth 1.0 (maximum depth).

Local To World:

Transform the objects drawn from the position of the local coordinate system to origin of  World Coordinate System.All the objects drawn have their local coordinate system. All the vertices are drawn relative to the local origin of that object.

World To View:

Transform the objects drawn from the position of the World coordinate to the Camera.All the objects will be transformed relative to Camera View.

View To Screen

Transforms the objects relative to the near and Far plane. This makes world to be adjusted according to the values of near and far.


Screen Shot of Cube Intersecting the Plane


We set The Value Of the Depth Buffer to 1,0 and clear it every frame.

Screen Shot of Mesh File

Mesh Binary


Screen Shot Of plane Drawn

Binaryplane plane

==> Camera

Created a sigleton Class for Camera which stores the Cvector and quaternion, and updates when the user provides input to move camera to the uniform




Assignement 09

GOAL : To make a Platform Independent Rendering Algorithm and Platform Independent Shaders

Download Code Build


The Platform Independent Graphics Class


The Platform Independent Code is being used in renderable function. and all the platform Dependent Code Is in Render.

My was is Different But I think it does the same thing.

Edit::Got feedback it was not the right way   updated Platform Independent Graphics Class:  View Here

==>  Platform Independent VertexShader




-> Input and output variables are defined for both platforms HLSL and GLSL,

-> Main Function is not Platform Independent as output positions for both are different

==>  Adding to AssetTo Build.lua

Created a subtable depencies for adding all the dependt files for Both The ShaderBuilder Projects which will ensure the dependent files to be updated








No of Hors : 10


Assignement 08

Goal : To Make Make A Effect Builder And Shader Builder

Download Code

Human Readable Lua Effect File :


Shaders =

I made a Shader Table Consisting of the sharers used , this helps to categorize them as shaders this will help to add if we want to add some different categorizes of files in future


My Binary Effect File Format:



I wrote the paths in the same order i was reading in.  Added Null pointer after each path to know the end of the string.

My Create Effect Function Reads the data from the binary file path during run time and pass the file path to individual sharer functions.

I created Two Different Shader Builders Vertex and Fragment Shader Builder. I chose this Because it was simpler and not much changes had to be done in the build procedure.

To make it simpler to debug in both debug and release mode we use seperate #define functions.

Direct X Vertex Shader Debug Modex64debugvertex


DirectX Vertex Shader Release ModeX64Release


OpenGL  Vertex Shader Debug Mode



OpenGL  Vertex Shader Release Modevertexrelease

The Difference Between Both the Files is that There are comments in the debug node which helps us in understanding while debugging.



Assignment 07

Game Engineering Assignment


Goal: To create a square and more than 1 triangles and make the square move on user input


Final Output:

Controls :  Arrow Keys to move the triangle




Download EXE:Download


Updating The Vertex Data are every draw() call is really expensive because for every update, the buffer data you have to lock and  unlock the vertexbuffer.

Wheras Uniforms are shader constats, using constants will be less expensive and and passing one more parameter will not create much of a load.

==> Problems In Assignment

Square is flickering slightly when it gets the input.

I tried to restructure my code but could not get it working  with , so reverted back to last commit and simply tried to accomplish the requirements. But in Future i have to do it for next assignment.


Game Engineering :: Assignment_06

Download Code Asing_06

Final Game Output:




==> The size Of an array will help us to determine the length of the data to be read from the buffer.(We take the data of the entire file in the array, and then store into member variables by determining thier start and end position through the lengnth)

==> First I read Vertices Count and then vertices data then index count and indexdata, This was done because count is required before reading data and immediately reafing the array will help us debug in case of errors, particularly i find it more easy

==> Adv and Disadvantages

Advantage of Binary files are they can be read faster and they have occupy less memory.

Advantages of Human Readable Are they can be easily be understood by just browsing the code , easy to edit or insert data.

==>  Sizes

my binary square.mesh size on disk is:80 bytes

my Human readable square.mesh size on disk is: 344 bytes


==>  The Binary Mesh file for my project will be different for different platforms because opengl uses righth hand and d3d uses left hand so order of index data changes for different platforms.

eg openg 0,21, d3d: 0,1,2



Read Data From Binary File


Effect Header Structure :L Platform Independent