Week 3 | Dev Log | Jamie Pasnin


Week 3 | Development Log | FPS RPG

Creating Health System Part 2

Introduction

This week I was tasked to extend upon the health system from last week by creating:

  1. Armor UI artwork, adding text numbers to both health and armor, and implementing it into Unity.
  2. 'SetArmor' public functions within 'HealthController' script for team developers to use to communicate with said script.
  3. Create a bar and text base class to set override-able functions from different types of child bar and text UI classes. Improve the Health Controller script to include armor and be able to communicate with bar and text combination base class. 

Goals

The following are the primary goals for this week.

  1. Create armor UI artwork.
  2. Implement armor UI artwork and add text numbers for both health and armor within Unity editor. 
  3. Adding 'GainArmor' and 'LoseArmor' public functions within 'HealthArmorController' script.
  4. Create a bar and text base class to set override-able functions from different types of child bar and text UI classes. Improve the Health Controller script to include armor and be able to communicate with bar and text combination base class. 

Personnel

The following is the primary author and any secondary authors who assisted in completing the set tasks given this week. 

  • Primary - Jamie Pasnin
  • Secondary - Christian Hodges. Course coordinator who helped with BarAndTextCombination classes and HealthArmorController scripts.

Technologies, Tools, and Resources Used

The following are the technologies, tools and resources used to assist in completing the set goals this week.

Key Tasks Undertaken

The following are the key tasks that were taken to help a developer/reader understand how the tasks were completed.

  • Began by creating armor UI sprites for the player character within Adobe Illustrator (inspiration design from Borderlands 3) and implementing them, plus text into Unity. Screenshots below:
    • Health and Armor UI Sprites
    • Health and Armor UI in Unity
  • Created a 'BarAndTextCombinationBase' abstract parent class with the following abstract functions:
    • BarAndTextCombination Base Class
  • Then created a UI 'UIBarAndTextCombination' sub-class to display the health and armor stats from the player character. 
    • UI BarAndTextCombination Sub-class
  • Improved the 'HealthController' script to include armor which is why it is renamed to 'HealthArmorController'. Then added the following code which I got help from course coordinator/ senior programmer:
    • HealthArmorController Script Variables
    • Health and Armor Functions
    • Then placed the script onto the player character and set the variables in order for the script to work. Also added buttons on the side of the screen for debugging the HealthArmorController script and the BarAndTextCombination classes. Screenshot below:
  • Once the scripts were working as intended, I pushed my work onto Jamie_Pasnin branch and the master branch.

What I Found Out

The following is any particular lessons learned this week.

  1. Re-learned about inheritance and creating base classes and sub-classes within Unity. Also re-learned on how to plan out using object oriented programming base and sub-classes.
  2. Learned about using the dedicated UpdateUI function for updating health and armor stats to BarAndTextCombination class.
  3. Learned a new method for debugging by the means of setting UI buttons that connect to the player character HealthArmorController script functions. 

Open Issues/Risks

The following is a list of any issues or risks that were unable to be resolved that caused tasks to not be completed this week. 

  • No issues or risks were presented that caused tasks to not be completed. 

Solution Justification

The following describes why I chose the solution that I did to complete the goals set this week. 

In terms of creating the armor (and health) UI sprites, I simply followed the design from Borderlands 3 as a prototype design for this game because a dedicated design is not necessary as of now in the development cycle. In terms of implementing the health and armor controller script that communicates between the bar and text classes; that method was suggested by my course coordinator/ senior programmer so that we can create multiple different types of sub-class health and armor UI displays such as creating a mesh sprite UI display within the game world.

Leave a comment

Log in with itch.io to leave a comment.