In this course, we will cover approximately 10-12 topics at a rate of one per week. I will give you 10% of your grade for each topic that you demonstrate strong knowledge in. As you are in your final year, I hope that you will apply these ideas in your capstone project so that you do not have to create separate demonstration programs. The goal is to make your capstone project stand out.
As each topic is worth 10%, you can choose how many of these ideas you want to implement. Therefore, you have the opportunity to choose your own grade by demonstrating strong knowledge in the number of topics that you select.
Topic 0 (max 10%): Required
Dr. Dina Sabie will explain.
Topic 1 (max 10%): Memory Monitor
For full credit, keep track of all the heap allocations and deallocations by overloading
the new and delete operators and gather data.
Some ideas are, but not limited to, count the number of allocations and deallocations,
sum the amount mem allocated and subtrack the amount deallocated looking for memory leaks.
Can you give me some statistics about memory allocation and deallocation I can use to analysize
a program.
Example code: Week1 MemoryDemo.zip
Topic 2 (max 10%): Memory Management
Memory management in game programming is the process of allocating, freeing and managing memory efficiently to ensure the
proper execution of a game. This includes handling memory allocation for game assets such as textures, audio files,
and models, as well as managing memory used by the game engine and game objects. Effective memory management is crucial
for achieving optimal performance, avoiding crashes in large game productions. Common techniques used in game memory management
include pooling, garbage collection, distinct memory block allocations.
Cool old article on memory allocation
To get full credit for this topic, put the memory management tecgniques discussed in class into an existing program
and demonstrate that you can control the use of memory over just using the OS.
Topic 3 (max 10%): C++ Concurrency (multi-threading)
Example code: ThreadDemo1
For full credit, the secondary threads must perform a meaningful task.
If the threads share objects in memory, the use of mutexes
(a synchronization object) should be considered to prevent race conditions.
Here are some ideas for tasks that the secondary threads could perform:
Topic 4 (max 10%): Profiling
Profiling tools are already installed since VS2022. Let me show you a little on geting started analyzing your C# or C++ code.
Yup, I said C#.
There's technical publications from Microsoft out there on how to use their profiling (diagnostics report) tools but I find
them unclear. There are a set of (really bad) videos from Microsoft on YouTube, in my opinion, they talk a lot and say very
little. Just skip to this link
Profiling CPU usage
Use these tools look at what your capstone is doing over time.
Problem is you all code too clean and our projects are too small for this type of profiling to be of any use. I just want you to know it
exists.
Another way to do timing is to do it yourself. In class, I talked about std::chrono, we saw it first in the Threads topic.
Using this tool, you can create your own timing calls to evaluate the performance of your code.
There is a guy on youTube has a game engine series (TheCherno), and I really like his work. Secretly, I think he steals my good ideas. Ha!
Cherno does a really good job of creating some timer wrappers in this video Intro to Profiling.
This is my version of the timing/profiling code - much better I think, of course.
Scott's Timing class demo.
Topic 5 (max 10%): Adding a Game Controller
Human Interface Device (HID) is a standarized way communicating with USB devices, it's not just games controllers - wake up.
When a USB device is plugged into a Windows machine, the OS identifies the device by asking for a set of ID bytes. Given this info, the
OS looks on the network for a driver. You have probably seen this when you plug a new device into your system.
The current most popular controllers are PlayStation(Sony) and Xbox(Microsoft).
In class I will discuss the differences between them and walk you through some of the toolkits that are out there out there.
PlayStation+
XBox Controller
SDL2 Support
SDL3 Support
RawInput Plugin
How can I send force feedback to my steering wheel?
Topic 6 (max 10%): Audio
Creating audio without tools is very difficult and requires a knowledge of 3D-audio physics beyond the scope of out program.
Therefore, I recommend using a pre-made library:
IrrKlang This is my favorite library. It's very complete but it's not free.
Example code: AudioIrrklang
SDL_mixer This is a primitive audio library that cannot handle too many audio clips being played at the same time but it's easy to use and great for backgound music.As you may know, Limbo is my favorite
video game from my grogramming and artistic perspective. I love the background music so much, I bought it, check it out in the panel on the right.
OpenAl - Open Audio Library This offers more features than SDL_mixer. It is free and open source (and a little old) - I dare you to look into it.
FMod - FMOD is a proprietary sound effects engine developed by Firelight Technologies This is very much one of the standards in gaming. To download it you must register with them,
to use it commercially, you must pay them. It is very complete for 3D sounds and music. It can hook into Unity, Unreal or in your stand-alone applications. Warning: it is a big API, there is a large learning curve associated with it.
FMod starter code
Topic 7 (max 10%): Frustum Culling
Oops, we did this last week along with the audio stuff
You can do it this way
FrustumCulling.pdf
But this is cooler
fast-extraction-viewing-frustum-planes-from-world-view-projection-matrix.pdf
Topic 8 (max 10%): GUI build your own or use a pre-made tool kit.
Topic 8 GUI video
If you are working in Vulkan: imgui for vulcan
If you are working in OpenGL: imgui for OpenGL
Another option is: The nuklear GUI system
Example code: ImGUI.