Shovel Knight Study

The goal of this project was to remake at least one level from an existing 2D platformer in C++. I chose to make Shovel Knight, because it’s a platformer that has that old-school look and feel, while also incorporating modern mechanics and technology. It provided an interesting challenge, and I’m quite pleased with the result.

All assets used belong to Yacht Club Games, you can check out their game here.

One of the challenges I faced was recreating the flickering when an enemy gets damaged. After figuring out how the shader worked in the original game, I had to transfer this to the engine which had no custom shader capabilities. Instead of running a custom shader, I generated 9 different versions of each enemy’s spritesheet, and stored these in a pointer vector.

SK_Enemy_init

Then in the tick function I can just swap out the original spritesheet with the nine custom sheets respectively, with no additional overhead.

SK_Enemy_tick

This resulted in a convincing visual effect that was very light on the CPU, at the cost of some memory.

Leave a comment