Skip to content

E-Jay Tripoli

A documentation of my work for Year 2 – Studying Games Design and Art at the University of Southampton

Menu
  • Lament
    • Development
      • Procedural Room Generation
        • PRG – Pt 1
        • PRG – Pt 2
        • PRG – Pt 3
        • PRG – Pt 4
        • PRG – Pt 5
      • Dungeon
        • Stalagmites
        • Pitfalls
        • Health Potion
        • Dungeon Bug Fixing
      • Player
        • Player – Pt 1
        • Player – Pt 2
        • Player – Pt 3
        • Player – Pt 4
        • Player – Pt 5
      • UI/HUD
        • Start Menu – Pt 1
        • General UI
        • Skill Tree – Pt 1
        • Skill Tree – Pt 2
        • Skill Tree – Pt 3
        • Skill Tree – Pt 4
        • Skill Tree – Pt 5
        • Skill Tree – Pt 6
      • Enemies
        • Whispers – Pt 1
        • Whispers – Pt 2
        • Wrought – Pt 1
        • Wrought – Pt 2
        • Boss
      • Scenes
        • Tutorial
        • Hub
        • Depression Gate
        • Gateway Scenes
    • Logs
      • Initial Plan
      • Teamwork
        • GitHub
        • Discord
      • Weekly Logs
        • User Analysis
        • Accessibility
        • Testing
        • Marketing
        • Formative Feedback
      • Playtests
        • Playtest 1
        • Playtest 2
        • Playtest 3
      • Showcase Event
      • Post-Project Reflection
    • Research
      • Understanding Learning Outcomes
      • Understanding my role
      • Researching Tools
      • Researching Pipelines
      • GDD Breakdown
      • Researching Procedural Generation
      • Existing Games
  • Arcadia GDD
    • Weekly Logs
      • Week 1 – What is a GDD?
      • Week 2 – Game Worlds
      • Week 3 – Concept Art
      • Week 4 – Character Design
      • Week 5 – Narratives
      • Week 6 – Gameplay and Game Systems
      • Week 7 – Feedback week
      • Week 8 – Audio
    • Research
      • Analysing Existing Games
      • Genre Research
      • Research into Psychological Abuse
      • Character Research/Moodboards
      • Environment/Map Research
      • Researching Medieval Knights
      • Researching Enemies
      • UI Research
    • Ideation & Development
      • Initial Development
        • The Essential Experience
        • Initial Game Ideas
        • Choosing a Game Genre
        • Choosing the Game’s Title
      • Game Play
        • Gameplay Loops
        • Mechanics/Tech
      • Story/Narrative
        • Twine
        • Summary of Narrative and Story
      • Game Art
    • GDD
      • Game Overview
      • Game’s Vision
        • Game Pillars
        • Project Focuses
      • Gameplay
        • Mechanics
        • Skills
        • Enemy Behaviour
      • Story & Narrative
        • Twine Prototype
        • Story
        • Narrative
      • Character & NPC Profiles
      • Map/ Level Design
      • UI & HUD
        • Creating the logo
      • Prototype/ Proof of Concept
      • Sound
      • Target Audience
      • Controls & Platform Specs
Menu

Skill Tree – Pt 4

Posted on May 11, 2025May 11, 2025 by et4g23

Now that the player is able to buy skills in the skill tree that actually effect the player character, I needed to implement a way for the player to interact with the Tree of Sorrow from within the Hub scene.

To create a way for the player to interact with the Tree of Sorrow, I gave it a childobject with a PolygonCollider2D component and set it to trigger. Then, I created a new C# script and called it SkillTreeZone.

This script constantly checks for any other colliders that trigger its collider component. If the player collides with it, a playerInside bool is set to true. If this is the case and the player presses ‘E’ then the Skill Tree UI is set to active and an isOpen bool is set to be active, along with the active status of the Skill Tree UI.

This isOpen bool then determines whether the player’s AttackNew and PlayerControllerNew script is enabled, disabling them if the Skill Tree UI is enabled. Furthermore, this isOpen bool controls whether the cursor is visible on screen, enabling it if the Skill Tree UI is enabled and disabling it otherwise.
Then, if the player presses ‘E’ while the Skill Tree UI is enabled, it gets toggled off, allowing the player to move and attack again.

Saving the player’s Tree of Sorrow progress

An extremely big issue with the current Skill Tree, is that if the player dies in the dungeon after unlocking skills at the skill tree. When they respawn at the skill tree, all of their progress is erased, despite still having the effects from the skills on the player character.

However, this was essentially the same issue I had with the player character not being able to keep the effects from their skills when going to another scene in the game – an issue I had already fixed by using the PlayerStatsManager singleton. However, this was a much more complex version as with the skills effecting the player, I only had to change and store certain ints in the PlayerStatsManager. But in this case, I had to store data about: Which skills were unlocked; what skills should stay locked and what skills were already maxed out.

After unsuccessfully trying to fix this issue, I explained the situation to Ross and asked for his help:

Essentially, what Ross had done to fix this issue was adding a Dictionary<> (A Dictionary is is a collection that stores key-value pairs, like a real-world dictionary where you look up a word (key) to get its definition (value) – Microsoft Documentation) to the PlayerStatsManager, this Dictionary would track each SkillSO on every SkillButton’s SkillSlot script and would store its currentLevel int and then runs the UpdateUI() method every time a SkillSlot was enabled. As this dictionary is stored in a singleton, this data is never destroyed even when loading a new scene in the game.

Additions to the PlayerStatsManger script

On the SkillSlot script, every time that the a Skill Button with the SkillSlot script was enabled, it would check if the skill was not locked. If it was locked, it calls the IsSkillUnlocked() and GetSkillLevel() methods from the PlayerStatsManager script.

Additions to the SkillSlot script

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

©2025 E-Jay Tripoli | Built using WordPress and Responsive Blogily theme by Superb