Turn Base Manager
Hey everybody welcome to another weekly blog!
Overview
This week I decided to tackle turn controls. Or better said "How can I end my players turned and start my enemies turn?" Let's get started.
Problem 1
So when tackling players turn? I had to decide? How do I even know if it is the player's turn well? I thought we could make an enum saying Hey, it's players turn and the other index saying Hey, it's the enemies turn simple right. Wrong. I forgot to consider one crucial control. So I will say it again how would I know WHOSE TURN it is???? I got so lost in thought that I started falling down a rabbit hole (this rabbit hole led me to a laundry list of unnecessary code aka the image above) adding different controls like bools on different characters... but this rabbit hole not only led me to a lot of dead ends but it also led to an even simpler solution.
Solution 1
To solve this problem I needed a CURRENT TURN. The reason why the Manager needs to know who's the current player is because it will manage the turns at all times. I currently have a simple event call, called "active characters turn" which determines the current turn for the enum. However, that's not the only control I have. I also have a bool on the player called "isYourTurn" doing the same. Do I need both no. However, I may be removing the enum entirely because the bool made it very clean and even easier to access. But I am also willing to keep it because later down the line we will be implementing who goes first determined by the speed stats of the characters on the field of play. So now, my enum is checking who's turn it is for each the player an enemy. While also checking the bool in the player. I know later down the line when we add party members to the team the Manager will need tweaking. Or simply put the enum will just need to be updated with the party members.
Get Quest for Dominion
Quest for Dominion
Status | Prototype |
Authors | Quest for Dominion, rdionian, RaGinCagin, Jkeith, acefizz, PhantomIsobel |
Genre | Adventure |
More posts
- Button SoundsMar 01, 2024
- Bug Battles: Last ShowdownFeb 29, 2024
- Feedback and Final Debugging touchesFeb 24, 2024
- Tutorial TrialsFeb 23, 2024
- Tab Menu BugFeb 23, 2024
- Tutorial TriggerFeb 17, 2024
- Tutorials and Bug FixesFeb 17, 2024
- Teaching the User CombatFeb 16, 2024
- Coming to an EndFeb 10, 2024
- Nothing Much 2.0Feb 10, 2024
Leave a comment
Log in with itch.io to leave a comment.