Controls rekeybinding

 Author: Cameron Taylor

How I originally made the system I made every key press hardcoded with a certain outcome. For example, when pressing WASD the player would move in coordinal directions throughout the game. The problem with this is people like to rekeybind and therefore I needed to make a menu for them. The biggest hurdle I needed to overcome is making a map to comprehend an input key with the correct action. I also needed to display what key they had selected/bound so they know for gameplay.

The way I accomplished the rekeybinding is is by making two maps (translators) to tell the system what key was going in, and what that key needs to be interpreted as. This took a lot of work since I initially needed to hardcode every key input to their respective output in our system. Then it was all up to the player to reassign each one through the settings and that would then automatically update in the code since I was using translators instead of hardcoded values.

Comments

Popular posts from this blog

Adding assets to every enemy -- Owen Meyers

Sphere to AABB collision