Download

What do I need to know before attempting to make a multiplayer game?

Hey all. I’m beginning to work on a small multiplayer (LAN for the time being) arcade-action game. I know nothing about replication, aside from the fact that it exists and that it’s what makes things consistent between client and server. I plan to have things like a few cosmetics, in-game money, in-game usernames, vehicles, security cameras, guns, AIs, grenades, and objects that can be placed.

The basic idea of the game is that there are three teams - two cops, any amount of citizens, and a single murderer. The murderer has to enter one of 3 banks in the map, kill the bank teller, and rob the bank. The murderer can use things like guns and knives for fighting, and smoke grenades and camera disruption devices for stealth. At the beginning of every game, the murderer can choose his loadout - whether he wants a gun or a knife, a camera disruptor or a smoke grenade or extra starting money, etc. The cops have live CCTV so they can see the inside and outside of each bank and street. The murderer can also change clothes so that if he were caught on CCTV, he would be harder to recognize. There are also citizen AIs that walk around amongst the actual citizen players, as well. As far as money goes, money is earned when a team wins. Additionally, when the murderer kills a citizen, he picks up whatever money the citizen had on him (a random amount of money chosen at the start of the game). The murderer can also bribe citizens into not tipping off the police, or helping them hide. Each player can see their own money and screen name on a HUD. Each player also gets a randomly generated name at the beginning of the game, that will show up when they talk in chat. This is to keep them somewhat anonymous when playing with friends. After each game, whatever money the players had when they finished gets cashed out and saved so that they can buy in-game cosmetics with it (like a new costume, or a hat, etc.). These would show up in-game for all other players as well.

I’ve been a little anxious to start this because, as I said, I have no idea how replication works, and this sounds like it might be a fairly complicated thing to set up for multiplayer. I tried experimenting a bit with multiplayer last year, but since I didn’t really understand replication, I wasn’t able to get so far. I had a feature where above each person’s player model, it would show their money and their name. I had a lot of issues like the names not being consistent between client and server, or between the in-game text chat and above head, and money not updating for other players when earned. This was a bit discouraging, so I suppose that’s why I haven’t touched multiplayer since.

Anyway, what should I know before attempting to make this project? I’m making this in Blueprint, and most of the guides I’ve seen were for C++. Any links, tips, or advice would be greatly appreciated. Thanks!

this should help you out a bunch : https://www.patreon.com/iamjohngalt75/posts
teachs alot of stuff about replication etc. fantastic tutorials.

My advice: Make the game local-multiplayer split-screen first, see if it has legs…
There’s a lot going on here, it sounds fun, but it’ll need lots of art & tweaking.
I’d also simplify the game and # players in order to get it to prototype faster.

Replication is not your only challenge here, its also quite possibly physics also.
Is this game GTA like, with high-speed police chases, as that part wasn’t clear.
Overall If you make it local you won’t have to deal with all the online nightmares.

Even LAN doesn’t replicate everything automatically, only local split-screen does!
Also don’t fuss about $$$ icons above player heads etc. Make solid core gameplay!

With few word i tell you it’s simple, you need to know about the patterns of replication. There’s 3 main ones.

Repnotify. do somethign whenever a variable is replicated. ex. A attachment Skeletal mesh assigned.
Multicast. replicate something to all clients whenever is needed ex. An animation
Basic replication. Just replicate a variable, ex. Health to display on client

Also remember all lògics shall be performed from the server client it’s just a visual representation of the server instance.

Calculate Health Subtraction on the Server.

https://www.youtube.com/watch?v=hUEXdt3wITU&list=PL56pcT0mYsOgFmbwukjKppPI_Q7E89jTK
this tut it’s pretty good.

OMG this ^

I was looking everywhere to find it, I started with these tutorials as well. I couldn’t find them anymore to point newbies towards them, thank for linking them!