Posts

Showing posts from April, 2019

Week 8 - Code improvements using "Managers" and Persistence using PlayerPrefs

Image
With the addition of a singleton SoundManager class from the previous week, it became apparent that Managers made accessing actions that were needed across multiple scenes far easier. Because of this, the group decided to localise more functionality into "Manager" classes. These classes can all be found under the "Assets/Prefabs/Managers" folder in the github repository posted at the end of this blog. The functionality that was moved into "Manager" classes include Sound (mentioned in last week's blog post), EndGameManager(The functionality behind when a game is over, such as number of lives reaching 0 or the player reaching the end of the game), LevelLoader (Functionality to progress the player from one level to another, or one scene to another), Button Manager(Handles the buttons on the Main Menu). Each of these classes are singletons which are initialized when the Main Menu is loaded and persist throughout gameplay using the "DontDestroyOnLo

Week 7 - Additional levels and attempts at Advanced Scripting

Image
This week the group were tasked with tackling some advanced scripting topics shown in the following image: The group primarily focussed on improving game functionality for this week, so that the game was playable and looked good. This meant an overhaul of the inputs for player movement and the addition of a "Boss Battle". The chosen boss for this battle is a witch, that has three layers of animation, one for hovering, one for horizontal movement across the screen and the last for casting a spell. While no AI pathfinding was used for this battle, a simulated pathfinding was used for the projectile that the witch releases when casting a spell, which moves towards the player by having a small force applied on it in the player's direction, if this spell hits the ground instead of the player then an enemy is spawned that follows the same logic of pathing towards the player. Gameplay testing and all of the attached scripts can be found at the GitHub