BGP Week 8 – UI Switching
|
The final real ‘feature’ added by me before we changed focus entirely to solving bugs and polishing details before Gotland Game Conference was a change in the UI. As the game features three characters that the player switches between, using the right and left trigger buttons on the controller. For this reason, above the button images that were added last time, which were of the triggers, we wanted pictures to tell which slime you would shift to by pressing that button. This was to make it easier for the player to tell what they were doing, without forcing a lot of meaningless trial and error. We had code for telling which character was currently selected previously made to work with the camera. Taking this, I reconstructed it to instead tell which one was selected and determine what sprite should then be displayed, and then used that in two different scripts. One for the left side and one for the right. Whenever the player changed character, the script would note the character chosen not matching with the current value of an integer (with the options 1, 2, and 3, to match the characters) and then adapt to match it up and change the images to display images of the characters the player could select with the correlating button. While it took me some time to understand how to change the look of images in a canvas, the end result was effective and worked for the intended task, thou I hope to have a chance to upgrade it at some point after the conference. |