Creating an RTS game using DOTS-Stack

Hi!

As the title states, I want to build an RTS game. My handicap is, that I am new to Unity and therefore also new to DOTS. However, after a few days of digging into how DOTS works, I am confident that I do not want to go the “conventional” MonoBehaviour-road, but instead use ECS right from the beginning.

I’ve been adviced to not go this raod but honestly speaking: I think DOTS, or to be more specific, the ECS system, feels a lot more intuitive even though it’s purpose and focus lies more on performance and less on the ease of use (even though the latter is also being worked on from what I saw).

Anyway, there are already some sources which can get one started with DOTS but what I am struggling to find is something that could help me with the networking part of my game.

I realize, that Lockstep is the “default” solution for an RTS but there seems to be a shift towards server-client architectures even for those. But since my game is supposed to work with multiple players, say 8 to 12 players, and allow a huge amount of units (Supreme Commander comes to mind

), I am not so sure if the server-client approach will work for me.

Now, with Connected Games we shall see a major update and improvement for Unitys’ networking layer, but it’s hard for me to look through all this and how I might be able to use or benefit from it.

Since I am just starting to develop my game, there are two main questions that I’d hope to find an answer to:

  • Do I already have to think about networking from the beginning or can I work on this once the core components of the game are implemented?
  • Will Connected Games allow me to “seamlessly” implement networking for my game no matter whether I chose the peer-to-peer (Lockstep) or authorative server (server-client) approach?

What I mean by the first question is how things are separated when it comes to the game and its network part. E.g. it’s “easy” to implement a new type of unit e.g. a naval unit which can submerge but also fly even after the game was released, but this is surely not true for something like multiplayer.

However, if I do not have to rewrite my entire game if I want to introduce multiplayer later on, there’s no reason why I couldn’t just implement the core concepts of an RTS and during that time wait for Connected Games to come out of its shell later on.

This is what I am asking in the second question: Since I haven’t decided (or realized) which networking architecture is suited for my game, I wonder whether I will be able to decide something like this later on.

Then, there is a third question which I would like to add:

  1. Is there anything which could be a starting point for me to plan out how my game will run on Connected Games?

Thank you for any insight on this and/or source I can look into.

Minor update:

I’ve now found this projects which shows an Asteroids implementation using DOTS (GitHub - Unity-Technologies/multiplayer: Unity multiplayer packages and samples). Might be helpful for people like me at the very beginning.

2 Likes

You should always build a networked game as such from the beginning, because if you later try to bolt on networking to a single player game you will have to redesign all your single player systems for multiplayer. That’s as far as when you’re building the “real” game, feel free to make simple prototypes as single player for testing of gameplay or mechanics, etc.

The DOTS feature isn’t done yet, the majority of the Unity community is probably waiting until it is before even trying it, and an even smaller subset of current DOTS users have likely even tried the yet to be completed networking stack for it. The documentation isn’t done either, so you’re likely more or less on your own in this endeavor. Good luck to your though :slight_smile:

Hi!

Thank you for the input.

After looking at GitHub - Unity-Technologies/multiplayer: Unity multiplayer packages and samples I think it really does make sense to build the game with multiplayer in mind from the beginning.

I hope I won’t regret the decision but I think I’ll risk it going with DOTS from the beginning. From what I have learned over the past day(s), I think I will have to go for some kind of Lockstep solution for the kind of RTS I am planning to build.

The big question here is how much NetCode and DOTS is able to help me here. Transmitting commands seems to be easy, but I don’t know whether everything can be kept deterministic in this framework right now.

1 Like

Did you manage to pull it off? Curious on progress