Download

RTS games - considerations to fit within UE4 architecture?

I may be speaking too generally, but has anyone here done any work with RTS games or other genres requiring lots of actors that can be ordered around and so on? What considerations must be made in order to fit within the UE4 way of doing things?

  • Has anyone tried multiple pawns per AI controller? Does it make more sense to just stick to one? Why/why not?
  • What about large-scale AI? Load balancing and threading AI queries?
  • How has EQS held up in these scenarios? Do you bother with it or just manually inform AI pawns / controllers of what they ‘should’ know?
  • Built-in server/client networking and replication; good enough for your uses?
  • Other RTS-specific implications of UE4?

Please throw in below any questions about this that I’ve missed!

EQS itself is generally pretty performant because it does its thing over multiple frames (basically it does an asynchronous evaluation over time), so its really doing things the way you would need anyway. You’d want a hierarchy of control actually. Each RTS unit would have an AIController which would run a simple BT (or other system, fsm for example). Each AI Controller would have a command list that it took commands from and executed them. There are a bunch of ways of architecting the hierarchy, but for the most part it involves command queues (either filling them, or executing them). You’d want another overall AI that did things like terrain analysis and strategy for instance. So from a player perspective, their input is essentially being turned (by the player controller) into commands to go into a queue. Either commands for the unit(s) under direct control, or commands that queue build orders or the like. The AI would also use the same command queueing to perform the same things. So if you built a unit that could execute commands from a queue using its own AIController, you’d be on your way.