A downloadable game

  • Game screenshot

(Figure 1.0 game screenshot with two objects and effects)

  • About making Graphics.cpp completely Independent
    • It was hard to come to a decision to create another class/struct especially after creating two already(Effects & Graphics) in the previous assignment. I was not convinced by my decision and it took quite long to come to a decision to make “RenderingAssistant” class.
    • I have used preprocessor directive statements for defining the view pointers for direct3d. I define functions related to these for clearing color, swapping buffers, etc in “RenderingAssistant.cpp” file.
    • Again I decided not to go for two separate platform-specific files and just stick to use preprocessor directives.

“To be honest I am still not really happy by creating a new class just to make Graphics.cpp independent but on the other perspective if I think as a user I feel like Graphics.cpp is now much more understandable and simple if I just care about making a game.”

  • Here is how I clear the back buffer color

(Figure 1.1 showing the code to clear color of back buffer)

  • The GPU capture when clearing color

(Figure 1.2 GPU capture with clear color function)

  • Initializing an Effect

(Figure 1.3 Platform independent call for initializing effect data)


    • I pass two string variables for this. The first one is the path for vertex shader and the other id for the fragment shader.
    • It takes memory up to 12 bytes Direct3d and 16 bytes OpenGL.
  • Initializing Geometry Object

(Figure 1.4 Platform independent call for initializing a 3D Object)


    • I am passing four things for this, which are the vertex array, index array, index count and vertex count.
    • I am storing index counts as an unsigned int in “GeometryData.h” for both direct3d and OpenGL.
    •  Also, I am picking up a right-handed winding method for indexing and shuffle the index array in direct3d’s initialization call for changing it to left hand for Direct3d.
    • For memory consumption, Direct3d takes up to 32 bytes and Opengl 16 bytes.
  • Took me around 10 hours to finish everything.


ROHAN PATEL

Download

Download
MyGame_3.zip 170 kB

Leave a comment

Log in with itch.io to leave a comment.