Peter Eldredge PPJ #1
Team Meeting - 2 Hours
Gameplay UI Rewrite - 3 Hours
Gameplay UI Rewrite
This week I decided to rewrite the UI to be more modular. Before, nearly the entirety of the gameplay UI was handled in a single script. I broke that up into a bunch of components that handle different aspects of the UI individually. Now, there is a Health UI Controller, Heat UI Controller, Score UI Controller etc. Additionally, each screen has its own component and can handle itself. This should make it much easier to expand the UI effects, and overall just make it easier to work with the UI.
This ended up being more work than I thought, as now what was once a 300 line file is now repurposed as a sort of UI helper that can be referenced for overall UI things such as enabling/disabling the UI, timescale manipulation for pausing, and input handling. The rest was separated into 7 different components which all are derived from a Base UI Controller class which basically just automatically subscribes them to specific events. Here is a look at this class.
Most UI Controller components are very simple at the moment, but will hopefully expand as we get new ideas for the UI and different effects. Here is the Score UI Controller, which is the most robust UI Controller we have currently.
The Score UI Controller handles the Score Text, Combo Text, and Combo Slider. On Update, those components are updated. Additionally, the OnPlayerDefeatedEnemy function is overridden to handle the animation that is played. The animation is a simple coroutine that changes the scale of the UI components off of an animation curve for easy tweaking.
Team Stuff
I was elected to be the programming lead for the game as I had the most general knowledge of the game's systems. Unfortunately, I had to miss the first programming meeting this week but hopefully everyone was able to get themselves familiar with the code base. I made myself available Monday but nobody seemed to have any questions or issue with the code so far. My hope is that people will keep to the standards I have set for the gameplay code for the most part, or at least will develop a fairly consistent style.
Upcoming
My hope is that this term I can transition to do mostly enemy work. Right now the idea is that other programmers will take over the other gameplay systems, and then I will look over the code before it is fully implemented, which is how I will remain up to date and will ensure we keep things maintainable. Hopefully that works out but I may need to do some of the gameplay (non - enemy) work at least initially.
Comments
Post a Comment