Download

Structure or actor?

I started working on a group system for a survival game(similar to Tribes in ARK), and at first I thought of making a structure with group info, members etc, but I am thinking maybe I could make 1 actor for each group so I can handle invitations, messages, members etc. easier. Would something like that work? What would you recommend me?

Object.

Actors are for things that are tangible and have something like a physical location, objects are for things that are not, like teams or tribes.

Objects don’t replicate though, probably worth mentioning.

Thanks, but I like Vlad mentioned objects aren’t replicated, so can’t I just make an actor with just an empty scene in them?

I’d consider using blank, replicating actors, stored as references inside a GameState (for replicating references). As UE4 isn’t handling thousands of players too well and you’re probably limited to tens or hundreds, it’s probably safe to store a clan/tribe’s members and occasional stuff (such as invitations, ranks, achievements) in replicated variables. However, when it comes to messages, those would easily break the max data “volume” which the engine automatically replicates. You’d probably be able to add/overwrite messages, but when you’ll want to display them to each user, you’ll have to either use a cap somewhere or stream it.

In terms of large data, I had a similar project, a MapVote mutator, which I developed for the UnrealTournament project. I decided to implement a streaming method which was able to easily stream 1000+ maps in a few seconds, per user.

NOTE: Ideally, you’d store everything in server-side objects and use RPCs to stream the needed data, when it’s needed. In this way, you don’t replicate useless stuff (why replicate scores, for example, if nobody has the scoreboard open?) and keep bandwidth consumption to a minimum

5142700744272e9fe7971391afed761d91ec1497.jpeg

Thank you for the information! I am thinking of having a limit of ~100 players per server since it’s a survival game, so I shouldn’t have much of a problem. I am thinking of having setting a variable in the character pawn with the clan object as soon as the player gets in game and from there he should be able to check his team mates, announcements etc. Thanks a lot mate :slight_smile: