Xenex Turnbased Combat Game Design


Xenex Turnbased Combat Game Design

By Ryan Moore

When making our turnbased combat for Xenex we did have to find a lot of tutorials and examples from people online. Upon scouring the web for tutorials we noticed there were not that many and most of them were for a combat style we were not making. So we used what we could from all these tutorials and made our turnbased combat style using Unreal Engine 5. Unreal engine does have a couple of built in features that help with making a turnbased combat game but we did not use any of these features because we could not find very good documentation and rather than try and understand these features we just made our own.

We did use two enumerators one for handling what the player will be doing and the other to decide on whos turn it is.

Enumerators

We did rely heavily on enumerators to make our turnbased combat because they were the closet things to lists we could find which we needed to make the actions for our player units. We had five state the player unit could be in which was Neutral, Move, Ready to move, Ready to secondary attack and Ready to primary attack. We could just call them as Primary attack and Secondary attack but we thought it would make more sense to say the player unit was ready to do this action because we still needed input from the player before they were actually going to use the attack.

Switch Combat Actions Pannel

 

To handle whos turn it was we used the Whos Turn Enumerator which only had two values Players Turn and Enemies Turn and we had an end turn button to switch between those states. Also before switching the turn it would set the selected player Units state back to neutral so they could not try to do anything while it is the enemies turn.

End Turn Button

After all the Attack points for the enemeis who are in combat are used it switches back to the players turn.

Originally we had buttons for the players to press for the selected player unit to attack and move but they were in the way and a lot of our testers complained about the buttons so now we just have hot keys to cycle between the different attack and move actions. After the player uses an action we always set the player units state back to neutral so they would not accidentally use another action point.

When the player selects am attack or to move they are presented with a highlight of what will be affected by the attack and if the player is moving they will have a highlighted area where they will be able to move.

Example of Decontaminator Highlights

We wanted to provide the player with a display of what this attack would affect before they actually use it allowing them to think before they do anything. To display these highlights we have a couple of funtions that are called Enable/Disable Primary Attack Highlight or Enable/Disable Secondary Attack Highlight which they just enable/disable the highlight object from the viewport much like the name implies. None of the highlights update their positions in real time except the Decontaminators grenade and the Psychers explosion highlights because they do not have a set range and we wanted the player to know the size of the explosion.

Get Xenex: Conscientious Culling

Leave a comment

Log in with itch.io to leave a comment.