RTS/Tactics Game - what are the roles of the GameMode/PlayerController/Character?

More of a general question. I understand that for a “typical” game like an FPS the roles for these three classes would be as follows:

  • GameMode - deals with code that describes the rules of the game itself, like scoring and things like that.
  • PlayerController - would be used to posses the Character.
  • Character - would have the movement code.

How would that look like for a tactics game? Think Gears: Tactics, XCOM or any other “top-down, many units” games?

  • GameMode should deal with scoring and general game/level related things.

But what about the controller and pawn/characters? For now I use the Character as an invisible actor that I just have the camera linked to. What should/could I use the PlayerController for?

Hey @galkowskit!

You wouldn’t exactly want a “PlayerController” for a top down RTS. A player controller would be active for just one character at a time. Since you are not actively controlling one character, this would not be ideal.

Instead, I suggest taking a look at UE-5’s new top down template (like the fps template or third person template) as an alternative for the character you are currently using. It has a top down controller already in place that you can modify or use as a template to create your own. It also uses point and click movement, which would solve your movement issues as well.

I hope this helps point you in the direction you are looking for.

Where would you keep things like currently selected unit?

Hey @galkowskit!

There are several ways to do so, however, the easiest way to do so would be an array of actors. Here is a great non-Epic affiliated tutorial series that goes over one example of how to pull this off:

RTS Marquee Selection (Select Units by Dragging a Rectangle) in Unreal Engine 5

I hope the above solution works for you!

1 Like