Spawning debris and starting turn based system
Joshua Keith
The Issues:
The problems I was tasked with completing this week were spawning debris tiles and starting to work on getting a functional turn-based system. Why was generating debris a problem? It was a problem solely because the combat level would be very repetitive and stale without it. The landscape would be the same, and the end user would grow tired of the same scene repeatedly.
A functional turn-based system is a huge issue that our game is experiencing now. Until now, the team has been building functionality up to needing the turns managed, and now it is time to work on it. The current issue is yes, we have an ally archer, but we cannot control him or determine the order in which people should be moving. The turn-based system will aim to fix those issues and give the player a more strategic experience.
The Solutions:
The spawning of the debris tiles. The way I approached this was to create a new blueprint child of the base tile. I made this approach because the Hextile Manager uses the base tile as the type that you can spawn, and since the debris is a child, it could be added as a type. I also changed the Hextile manager member into a TArray to have both the base tile and the debris in a container and swap on the fly when needed for spawning. After this, I was ready to enter the code side of it. The current code was to spawn a tile whenever the weight was at least 1 of the hex tile. For those of you who do not know what weighting is for, know that it is used for path-finding purposes. I decided to change the constant weight of 1 to have a 25% chance to spawn a tile with 0 weight and change the type for that specific generated location. This is also a seeded random, so this could be easily changed to have certain maps spawn in a rotation based on a seed, but I chose to do it based on time, so there shouldn't be any duplicate maps. With this change, I was able to get this result :
Turn-based manager:
I do not have the complete current solution, but I can talk about the approach that Aj and I have and are taking on this system. So before starting with the turn-based manager, we had to build a queue to store the order of people's turns based on speed. We ended up creating these rules in the game mode based on the level due to reading documentation that the game's rules should be implemented there. So, from the turn-based manager, we call those functions from the game mode base to populate the queues accordingly and keep the order intact. Now, on to what we haven't got done just yet. Our theory of how things will function is the queue will be like a circle. As soon as you start your turn, you are removed from the queue, and when you finish your turn, if you are still alive, you get added to the back of the queue. This should repeat until one team's units are all gone, and one team is victorious.
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.