
GAME & MEDIA TECHNOLOGY (MSC PROJECTS)
Optimization & Vectorization
Profiling and performance optimization case studies.
Overview
Two performance-focused projects applying structured profiling, optimization, and parallelization techniques. Developed as part of an Optimization & Vectorization course in a three-person team. The projects include a tank game and a real-time image filtering application using adaptive manifolds.
Showcase

Tank Game - Before Optimization
Structured Optimization Process
1. Profile: determine hotspots. 2. Analyze hotspots: determine scalability. 3. Apply high-level optimizations to hotspots. 4. Profile again. 5. Parallelize. 6. Use GPGPU. 7. Profile again. 8. Apply low-level optimizations to hotspots. 9. Repeat steps 7 and 8 until we're satisfied.
Tank Game
In the first project, we were tasked with optimizing a simple tank game using only high-level and low-level optimizations (without parallelization or GPGPU optimizations). We implemented a grid as a spacial partitioning structure (high-level optimization), which allowed us to simplify calculations in several aspects of the game. We also implemented a lot of low-level optimizations, such as using efficient operations, normalizing data, managing memory, avoiding conditional branches, reducing cache misses, and more. After implementing all optimizations, we were able to improve the game's performance by a 100 fold. In the images above, each player starts with 1000 tanks; performance went from around 0.6 frames per second to 60 frames per second.
Image Filtering with Adaptive Manifolds
The second project was a real-time image filtering application based on adaptive manifolds. Our primary focus was GPGPU optimization: we converted most of the code to OpenCL to parallelize the workload, allowing the application to run on both the CPU and GPU simultaneously. In addition to GPU acceleration, we implemented several high-level optimizations, such as applying box filters, along with various low-level improvements. After applying these optimizations, the application achieved a 3.8× performance improvement.