Semester 3 Thesis – 5

So we are close to the IGF deadline and my task is currently to work on the particle effects. So basically when the wand magic effect or the arrow will hit the collider or the obstacle I need to generate or instantiate a hit effect.

 

So you can see the above video to get an idea of the effects that we will use for the hit effects. So for now I am going to use one of the effects from the pack and then we will see how it looks during the gameplay testing.

Semester 3 Thesis – 4

To give an update on the sound the effects are working great. The transition from the one area to another is sounding good.

So i have scripted and designed an audio system that works on trigger boxes, audio mixers and sound interpolation. As soon as the blind player comes close to the beach part our island he starts to hear the sound of ocean waves which progressively increases as he moves closer to the water. This is done using the logarithmic roll off of the sound. So the script detects the player’s position relative to certain audio sources using Vector3.Distance() and then the logarithmic interpolation of sound takes places. If the blind player is in the valley he hears the wind gushing which gives him a perception that he is in a valley or mountain environment. At one point the player can hear two or more audio sources depending on his location. If he just enters the forest area from the beach then he can hear the birds but he can also ear a bit of the ocean waves which gives him feedback that he is leaving the beach are and entering the forest.

Programming this was tricky at certain areas since I had to program distortion when the audio source was on the other side of a barrier like a hill. So if the sound source was coming from the other side of the hill, the script will first detect the barrier and introduce an audio occlusion in the sound. This is again to give a sense of perception to the blind player that there is a barrier in the middle.

So i had to include the audio occlusion for the following scenario:

Sound_diffraction_paths

Game Engineering || – EAE 6320 – Assignment_07

The main focus of this assignment is to move the red square or rectangle game object on the screen through the keyboard input. For the Input movement I used John Pauls code for Input Controls

bool UpdateEntities_vector()

This particular function uses the cVector from the Math library which was provided . So I just added the Time and Math as existing project.

So the red square gameobject moves on the screen using the arrow keys. The following images show the red square movement by using arrow keys.
bandicam 2015-10-20 16-08-46-774
bandicam 2015-10-20 16-08-56-874 bandicam 2015-10-20 16-08-58-600

 

To move the rectangle on the screen we can either update the vertex data or we can update the uniforms. The first method is not favorable as discussed in class because we have to update the vertex data every frame. So locking updating and unlocking the buffer is not an optimized way and so we use the method of updating the uniforms. Uniforms remain constant through one frame so it is more optimized.So we are simply modifying vertex shader to take a variable and modify the offset of the mesh.

Basically the triangle 1 on the left and triangle 2 on the right share the same mesh . So if you modify the mesh file it should be reflected on both.We also need to render a rectangle. So I now have a total of three game objects. Probably using a list in the future would be better.

It took me around 17 hours to finish this assignment because I made a couple of structural changes which added unnecessary complexity and so it took longer to complete. Its probably better to have a list of GameObjects in the future as we will have more of them,

You can download the Zip File of Assignment_07 from the following link to get the square output. Use the arrow keys to move the red square.

Direct3D_Release_07

After downloading the link run Game.exe.

Semester 3 Thesis – 3

So now that I am done with the wand system, I need to work on the sound AI.

Since our game involves binaural audio, programming the audio AI is crucial for the game as we figured during the team meeting. Since the blind person has no visual cue about what is happening in the environment, it was important to script the sound events which have environment sounds in order to paint the visual image of the environment.

For now I am going to arrange the different sound audio source and do the research of audio mixers. After getting an idea of that I will basically script the behavior to interpolate between the sound sources.

Some good examples that I have come across are while playing witcher the environment sounds have a good mix . I like the behavior when the sound changes during danger events. Will try to incorporate that in the game.

Semester 3 Thesis – 2

This is the update after two weeks for the electric beam effect . It looks great so far and I am happy with the results. There are a few bugs that need fixing though. It looks like the video shown below .

Looks like the picture I had posted of dragon age. It is yet in buggy state. The beam should destroy a bit faster and there seems to be a lag between the current position and the previous position. Will need to do some more research on that but it looks great so far.

Game Engineering || – EAE 6320 – Assignment_06

The main objective of this assignment is to create a binary version of our human readable mesh file. The reason we are doing this because this reduces the file size and significantly improves the runtime loading.

We have to make a couple of changes to the Mesh file . We basically have to move the code which reads the Lua file and migrate it from the Graphics project to the MeshBuilder. The reason we do this is so that the builder can covert the lua mesh file to the binary file.

bandicam 2015-10-06 11-07-31-514

The above image shows the binary file in a hex reader. The structure is the same as we discussed in the lecture. The first 4 bytes have the number of vertices. The next 4 bytes have the vertices. The next 12 bytes are the vertex struct and after that is the indices array.
The size of the binary is only 80 bytes which is significantly lower than the file of the mesh file which is 346 bytes .

The important thing to note and take care of is that the number of vertices needs to come before the vertices or in the other words the number of elements in an array must come before the array. The is because we need to know the number of elements to read before we actually start reading the elements. This is done so that there is clarity in the type of data that we are reading and also the number of elements that we are reading.

The following image shows the way I extract the information from the Binary File :-

bandicam 2015-10-06 12-00-18-570

The 3 advantages of the binary file format are:
1) Like I mentioned in the start , the reason we are converting the lua to binary file to reduce the file size which improves the runtime loading since no parsing is needed after loading the data from the file.

2)The file size of the binary is significantly lower than the lua file which is only 80 bytes as compared to 356 bytes of the lua file.

3) Another advantage is that we only need to order the data correctly in the corresponding memory blocks and read them in the read them in that correct order.

The binary have significant advantages as discussed above but they are hard to decipher and the lua mesh file are undoubtedly the better human readable formats. So it is better to keep them especially during debugging situations.

The next part of the assignment was to encapsulate the shader’s into the GraphicEffects class like we did for the case of Mesh in order to make it platform independent. I made the structure similar to the Mesh file structure.

Overall the assignment took me around 10 hours to complete . I learnt a lot about binary files and their purpose while working on this assignment. It was fun to finally understand and decipher the binary files which were a complete mystery to me before. I also read the email regarding the project dependencies and I have made changes to the project dependencies.

You can download the Zip File of Assignment_05 from the following link to get the square output.

Direct3D_Release_06

After downloading the link run Game.exe.