top of page

Final Project Write up &

Views on class

FPS Shooter

“An FPS shooter game where you can move the camera around and walk in all directions, shoot at enemies with a crosshair.”

Demo:

FinalP2.PNG
FinalP3.PNG

Update:

Rotation is fixed now. So now you can fly around free without having any weird rotations.

Game Controls:

Player control: W- forward S-Backward A- Left D- Right

Camera control: camera arrows: Up, Down, Right, Left

Shoot: Space (I did not use collisions so there is no bullet.)

[FIXED] 22 December 2019.

Note: The rotation still buggy at this point and shooting only works when you are at the front. I am still working on it to fix it.

Initial plan: My initial plan was to create a basic catch the ball game where you play as ball but you have to walk into the bucket instead of waiting for it to dropdown.

Game changer: I changed my game to fps camera controller primarily in order to learn about 3d math and rotations. I wanted to create a basic camera controller where you can walk around just like in other fps games. My primary reason here was to learn about 3d math and vectors but not to come up with a great balanced game with difficulty.

Development Insights:

Crosshair creation AND effect: This is something I was super confident on creating so I did this task on the last week. I just used my UI project to add a crosshair and change effect which was very simple.

Beginning with basic camera transformation 3d matrix:

First, I understood how to create a transformation matrix for camera which gives you forward, left and up direction vector.

camera.PNG

The functions to do this was already there in our professor’s provided matrix code. I used it and got the basic camera movement working with WSAD.

Then I started searching about setting camera angles with quaternion and figured out that I can do that with Euler angles. It took me a long time to understand them both and the conversion between them.

Created functions which return Euler angles from quaternion and vice versa. This is how I handled rotation with arrows.

Getting the screen object world position for triggering the crosshair effect:

I wanted to get the drawing position of any world object on the screen. This is something that I couldn’t figure out completely. I got It working with standard camera rotation but I am still figuring out when the camera is at different angles.

 

Using Joe’s system:

As I talked in the presentation it was very easy to use. For highlights, if you’ve missed the presentation these are the positive and negative points about the system.

++

  • No assistance needed at all. The documentation was good and we did not communicate at all.

  • Easy to add the system inside my project.

  • I found the features that I was looking for.

_ _

  • Needs more Lua error checking. Game crashes by throwing a Microsoft error.

  • I needed to add changes to my Graphics.cpp to adjust rendering.

Views on class:

Talking, in general, there were many things in the class not just about graphics and systems but also about programming standards and disciplines that I learned will help me in the future for sure. Here I am mentioning some of the key things that I personally found amazing.

 

Threading:

This was without a doubt my favorite lecture of the semester. To understand how threading work in graphics with the concept of the bucket was really interesting. I followed this and during my unfortunate 48 hours long flight I was getting bored and I looked into cbApplication.cpp file to see how the events are called and the conditions to fire events for timeout etc. I want to try doing it by myself to add another application of that during my winter break.

 

 

Reference counting:

This was also one of the things that amazed me. By just writing the macro functions inside any class and use this functionality is quite brilliant. I still have not looked at the actual code but using this was very helpful.

 

 

Lua to binary conversation and Asset Building:

I have used Lua in Joe’s class so I was quite familiar with it but the way we used it here was very disciplinary with error checking and exception handling. I was surprised by watching the difference of size and load time between Lua and the binary file. I have heard about the advantages of binary files but to implement it and see it by yourself was very rewarding.

 

Anonymous namespaces:

I have never used them before. I just knew that they exist and now I quite know when is a good time to use them.

 

 

Error checking, safe asset loading and preventing crashes:

I think this was very handy practice as a programmer to so error/null check and throw exceptions and prevent the program from crashing.

 

Documentation and comments:

I don't know how much it matters to others, but this is something I really appreciate. It can save hours for someone like me who takes time to understand. Our professor kept assignments description very clear and descriptive that it was nice to read them and it was not frustrating at all. Also, the comments are there in the code he provided will only help me to become better at commenting codes.

 

Conflicts:

Do not prefer reading ‘auto’ keyword:

So, this is my personal opinion 😊

The first time I try to read someone else’s code with auto keyword, It is a bit confusing to see what is going on. It takes a while to read auto variable types. I personally liked using it but when I read someone else’s code it is quite hard to read. So, I am inclining towards not using them everywhere but only at the places where things are obvious.

Thanks to my professor for teaching us a great class with very well structured assignments and all the great things I learned. Plus a huge huge thanks for keeping things documented very well.

Thanks to my TA Sid for being such a great and friendly TA.

 

Wishing you all a great holiday season

and Merry Christmas from India 

bottom of page