This week, work was done to gamify the project. The first step in doing this was implementing a controllable player character, this was done using Unity’s CharacterController class (Unity n.d). Once the character controller was in place, the game world was populated with free assets, including walls, a player model, and collectibles, sourced from Kenney (2024). To further enhance interactivity, a coin collection system was developed, allowing the player to collect coins scattered across the map. A function to collect a coin was made.

To automate the placement of coins, procedural spawning was introduced. This was achieved by repurposing code from a previous project (Zoltikrys 2024), enabling coins to be distributed dynamically throughout the environment.

Finally, Unity’s Cinemachine package (Unity n.d.) was utilized to integrate a third-person camera.


Reference List

Unity. (n.d). CharacterController (Unity API). [online]. Available from: https://docs.unity3d.com/6000.0/Documentation/ScriptReference/CharacterController.html [accessed 11 December 2024].

Kenney. (2024). Mini Dungeon. [online]. Available from: https://kenney.nl/assets/mini-dungeon [accessed 11 December 2024].

Rigor Mortis Tortoise. (2023). How to Collect Coins in Unity 3D Tutorial 2023 (Updated). [YouTube video]. Available from: https://www.youtube.com/watch?v=6iSJ_jh6Rdo [accessed 11 December 2024].

Zoltikrys. (2024) MyFirstPGC. GitHub [online]. Available from: https://github.com/Zoltikrys/MyFirstPGC [accessed 11 December 2024].

Unity. (n.d). Cinemachine. [online]. Available from: https://unity.com/features/cinemachine [accessed 11 December 2024].

Updated: