Week 12 Development (Devlog)
Tasks Undertaken:
- The primary task of this week involved the refractoring of predominance of the C# scripts alongside creating a simplistic Inventory Menu screen that is displayed on an Input rather than being stuck to the players screen at all times. Some minor additional tasks that were completed for aesthetic including the Ammo Display UI and script and colour changes for some of the UI Inventory elements. There was some alterations to the PlayerInput duplicate script also for singular weapon functionality at the request of Christian due to time constraints. All Weapon Switching functionality was preserved within commenting and saved to be developed at a later stage.
- The primary changes for the PlayerInput script involved the removal of conditional operands for the WeaponSwitching script and integrating a new gameobject variable for the currentWeapon which accesses the WeaponBase reference contained within the PlayerInventoryBase. This allowed perfect functionality with the Equipment system and Inventory System without the necessity to completely remove WeaponSwitching scripts that were currently implemented. The Weapon Switching references within the PlayerInput script were commented and region locked so that they could be utilised at a later stage. This procedure also coincided with the refractoring of all scripts with the application of region locks, commenting and application of proper coding conventions which were perused multiple times. Minimal commenting was necessary from personal opinion due to the naming conventions of all variables, coroutines, functions, and classes. More use of region locks and liberal use of tooltips when serialised variables needed to be displayed within the editor. Regions kept functionality, variables, initiation and subclasses separate allowing for easy navigation and readability of code.
- The development of the AmmoDisplay UI script was simplistic with the integration of a Text UI component on the HUD Canvas. The script accesses the currentWeapon from the PlayerInventoryBase script and updates the currentAmmo and maxAmmo variables in realtime on the Text component as a string. Some testing was conducted with colouration to show the player when they are low with ammo with red and green colouration when they have above a certain value. At the current stage due to the varied magazine amounts for each weapon rarity the value of red colouration for warning players is set to be less than or equal to 1, however further research was conducted into divisional approaches to allow the red colouration be displayed when the currentAmmo variable is equivalent to half of the magazineCapacity variable.
- The InventoryDisplay script was also a rapidly developed script that is quite derivative of a PauseMenu that would normally be developed within Unity with two base functions to Pause and Resume gameplay by setting background gameplay to stop using the timescale and setting the assigned screen to be active and inactive when necessary. The functionality was kept simplistic to display only the Inventory Menu with rescaled slot sprites for easier recognition by players. At a later stage this screen could be further built upon possibly combining the Inventory Menu with the pause menu or allow the player to switch between two menus on a button press to make for more dynamic UI functionality.
Obstacles:
- There were no overt obstacles during this week, predominance of the work was tidying and integrating small improvements to make the current game build more aesthetically and functionally viable.
Solution Reasoning:
- A rapid solution was applied to integrate the singular Weapon System as requested by Christian, by removing the secondary weapon slot for the equipment display and adjusting the Reload and Fire inputs to be triggered only when the currentWeapon variable is not null. All functionality for the secondary Weapon Switching input system was preserved utilising the commenting slashes. This solution allows both the singular functionality and multi-weapon functionality to be developed and reviewed by team members whenever necessary.
- Alternative solutions for the Low ammo warning colouration were researched including float based division which functions better than integers which was briefly tested. The error seemed to be with the check of the maxAmmo variable being half in contrast to the magazineAmount value. As a result the ammo counter would always be displayed as red unless the munitions were equivalent to half of the maxAmmo value. This was considered after programming and planned to be implemented in the future for intrinsic gameplay elements for the players.
SGD300 Assessment. (FPSRPG)
Status | In development |
Author | Xianomorph-7 |
Genre | Shooter, Role Playing |
Tags | FPS |
More posts
- Week 11 Development (Devlog)May 23, 2020
- Week 10 Development (Devlog)May 23, 2020
- Week 9 Developments (Devlog)May 22, 2020
- Week 8 Development (Devlog)May 18, 2020
- Week 7 Development (Devlog)May 18, 2020
- Week 6 Development (Devlog)Apr 11, 2020
- Week 5 Development (Devlog)Apr 01, 2020
- Week 4 Development (Devlog)Mar 24, 2020
- Week 3 Development (Devlog)Mar 24, 2020
Leave a comment
Log in with itch.io to leave a comment.