And so begins my dive into Game Engineering II, learning how to properly setup dependencies in a large codebase and even dabble in some shader programming.
The objective was to take an existing C++ solution containing a game and its engine and add a new project, called Graphics, which handles graphics. The code for the project was already present and I had to wire all the dependencies together. You can see the results of my efforts in the screenshots below.
As part of adding the graphics library I had to figure what the new project required in order to build successfully. I also had to figure out which of the existing projects needed to reference the Graphics project. I found that the Application project was the only one that directly needed Graphics as a reference. The ShaderBuilder project did use the Graphics namespace but it was accessing only enums and didn’t have any direct function calls so I didn’t have to explicitly add it as a reference.
Once I had wired everything and tried to make a build, the real struggle began. The dreaded linker errors started to appear. Luckily I had taken a look at my professor John-Paul’s (JP) earlier wiki posts about static library dependencies and it allowed me to diagnose the problem pretty easily. I also ended up learning a valuable lesson about changing project properties: ALWAYS CHECK THE CONFIGURATION AND PLATFORM DROPDOWNS BEFORE APPLYING PROPERTIES. I had to do multiple rounds of editing properties for all the different platforms and configurations to get the build just right.
When it came to editing the existing shader code there were helpful instructions in the comments that helped me figure out how to go about the whole thing. I was able to create a simple animation where the triangle changes scale, position and color over time by modifying the example vertex and fragment shaders.
As far as my expectations from this class go I have to be frank and say that I am really not sure at this point. All I know is that I am going to try to get the most out of what JP has to teach and become a better programmer. JP did mention something about building a rendering system. That would be a pretty cool project to show off on my portfolio.
You can download a zip of the build below.
Controls: If you hold down the space bar the animation slows down