Friday, August 16, 2019

Turns

As described in earlier posts, Tidewoken is a turn based game.

Each character gets added to the turn control at the start, while summoned characters can be added later.
Once a character gets removed from the game, this character is removed from the turn control.

Initialization

We're at the GameState


All the now spawned characters will be added to an array, then a random bool decides which team starts first. Now the turn order is written per character, alternating between both teams.

In this step the main game HUD will be updated with the character portraits:

Mystic and Assault

Mystic summoned his Ghost Wolf

Once the Actor Tick of my Game State runs, the turn timer of the first turn starts.


Once the current turn time is below 0, there is a check for pending actions like spell casts and movement. This way you can already skip your turn while moving and the turn will automatically be ended after all actions are done.



"Start Next Turn" is pretty simple, it just increments the turn order or resets it (based on if its the last character in the turn order) and starts the end turn event on the character and also the main turn code.


The main turn code calls functions like On Turn Start/End events


Why Blueprints

In my past I have been working with a few GUI based programming options, like the Warcraft 3 World Editor. I kind of got used to this method of coding and I really wanted to do a full scale Blueprint based Unreal Engine project. 

I think Blueprints are a really good way for new programmers to learn logic without getting hindered by syntax. 

Some functions later on will be written in C++, like server backend communcation, because there is nothing available in Blueprints like this.


If you want to know more about a specific topic, please let me know in my Discord! https://discord.gg/jrGyj2p

2 comments:

If you have questions regarding this project, let me know!

I'm looking for testers with understanding of tactical turn based PvP games like Dofus!