Most efficient way to replicate thousands of actors

Scenario:

Let’s say I’m building a large base… From a bandwidth perspective, is it better to have each building part be an individual actor, or a component to a “base” actor?

Essentially, I’d like to know which way would transmit the least amount of data, in the most efficient way if a player were to get close enough to replicate the “base”.

Also, if I were to change one of the components, say its color, would that single component replicate or would if have to … go through the actor…?

Hope I explained well enough. It seems to me right now that the actor/component way is the best

i honestly would love to know that answer too.
maybe try to use the analyses tools in ue4 and try out both variants and see which takes less bandwidth.
youre working on a RTS game?

No, multiplayer survival game. The bases will easily get to be at least hundreds of “pieces” large, so I’d like to replicate them the best way. Not to mention I’d also like to have at least a few dozen NPCs per base. If I didn’t get a reply I was going to test it out myself.

I’m by no means a professional at the subject, but I’m working on a grid generator at the moment for our game which can consist of hundreds to thousands of grids. And each grid must be able to perform some logic in some way or another. For example, a simple 20x20 grid would result in 400 grids.

How I used to do it:

One actor for every grid, and this actor not only had general logic going on - but also a mesh and a collision box for overlap events. Obviously, doing it this way it would take some time to generate large grids and it would become unresponsive when doing so.

How I currently do it:

One actor generates and stores the entire grid. Obviously, using instanced static meshes alone resulted in a very dramatic speed difference. And luckily you can easily remove and update instance transforms at runtime. I also instead add a box collision as a child actor component for every grid.

This way, I can still utilize the overlap events those box collisions generate.

I’d say using my current method it probably generates grids 8-10 times faster if not more. I don’t have my old project so I can’t really compare the two, and I’d rather not re-create it :wink:

Edit:

If I’m using DateTime correctly, it takes my generator around ~650ms to generate a 40x40 grid. So that’s 1600 static meshes along with 1600 child actor components. And that’s without running it as standalone or using the BP->C++ Converter. :rolleyes:

Oh and sorry, just realized the question was about bandwidth and not performance. But I believe it’s somewhat faster to try replicate a large actor rather than many, many smaller ones. Though I’ll leave that for someone more experienced with networking to answer that :stuck_out_tongue:

if you just want to handle buildings you can set the replication tick rate very low in the properties . buildings usually dont move so it shouldnt be that expensive. also for buildings i made a system myself once in which i had one actor per building and all the parts of the building were added as instanced static meshes