Week 13 Dev Log (03/04/2023– 10/04/2023)


Overview Of This Week

This week I researched onto my topics for the group presentation and made my slides as well as balancing this with implementing my bindings for my options menu.

Made-Man: Options Menu

I made all of the action mappings able to rebind apart from the one multi action mapping which is the weapon select. Once again, this was very complex so the explanation will have to be shortened to the things I am most proud of that I implemented.

Action mapping part 1

The script above is the same for all of the buttons that are able to be clicked. Each button uses the name for the action mapping to input it to the function that sets the stage for the player to be able set a new key binding.

Action mapping part 2

Inside each click of a button holds this function above. Essentially, it will set all the variables to make the player not make any mistakes that could cause bugs such as pressing another button whilst setting a new key bind. It will also set the confirmation text from a map that will find the necessary instruction for the player using a speed of O(1).

Action mapping part 3

This sets the text for the button from the bind as well as setting the new mapping structure for the action mapping.

Action mapping part 4

The comments above explain what this function does in order to make a new binding.

Extra Things I Have Learnt Or Problems I Have Solved This Week

  • Whilst experimenting with the best ways to get items from an array, I discovered the map. With this data type, I can have an index that instantly points to a value with a time complexity of O(1). It also has an added benefit of being more readable than using an array and using a pointer with a number.
  • Whilst implementing new keys, I decided to add a default settings button which would allow the player to switch the button key binds to the default values. This is due to the fact that, whilst I was experimenting with the implementation, it would get annoying to manually set the values back to the default ones. The implementation will be shown below:

This is the general code with specific functions that essentially have an array of keys to allow the key binds to be set to the defaults.

  • If noticed from the image, I also implemented a way for the multi action mappings to be set to the default values. However, it does not work as of yet and will be completed for next week.

Plans For Next Week

Following my Gantt chart, I will have to start my technical essay for next week as well as trying to implement the last piece to my options menu which will be allowing the player to bind the multi action mappings.


Leave a Reply

Your email address will not be published.