top of page

Research, Achievements, & C++ Refactor

Writer: Liam HealeyLiam Healey

Micro Star Command

This week I wanted to add proper meta-progression to the game so I designed and implemented two systems. The research system, which would act like an experience bar that would fill up depending on how far you made it and would be affected by the difficulty and the modifiers (the other meta-progression system). Each time it filled the player would unlock a new relic that would show up in future runs. I also added 3 new relics that would be unlocked via research as well as locking some of the more confusing relics behind research.

The other system was the achievements and modifiers system. I added 10 achievements that are each unlocked in unique ways like defeating an elite in 30 seconds or gaining $20,000. Each achievement the player completed would unlock a modifier that would change the game in some way like making the neutral faction hostile, making enemies react faster, making the player have more choices when picking rewards, and more. The modifiers that made the game harder would increase the research gained and the modifiers that made it easier reduced the amount of research the player gained.


I also started the process of optimizing the game since it was lagging in the late game. There were several easy Blueprint optimizations that made the game go from 25 to 40 fps with lag spikes but that still wasn't good enough. So I decided to remake the probe system. Previously each probe was a single blueprint actor and that resulted in slow updates due to collision checks and actor spawning. I decided to write a single C++ class that would handle all the probes using instanced static meshes and doing all the calculations needed to test for collision and move the probes. This will cut out all of the overhead from the Unreal actors and it should simplify collision as I will only be doing 2D circle-circle collision rather than whatever 3D collision Unreal was doing. Though my collision code will be nowhere near as optimized as the built-in collisions I'm hoping that all the assumptions I'm able to make will speed it up. Luckily the process has been fairly simple as very few classes actually interacted with the probes and I was just about able to make one-to-one replacements for all the nodes involved. I still need to fix a few bugs but it should be ready in time to be included in the next update.

Comments


bottom of page