x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

how to make a multiplayer game

I am trying to make a multiplayer game but i can't find a good tutorial to learn from it what i want to do is 1- create a random quick match 2- create a match with your friends i want a good tutorial series and how much i have to pay

Product Version: UE 4.18 Preview
Tags:
more ▼

asked Oct 07 '17 at 02:56 PM in C++ Programming

avatar image

medolash
1 1 2 3

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You can just do quick match and make friend join out of nothing, UE4 alone does not provide such service. Start with basics, make server and try to connect to it with client, i think editor has option for that to

https://docs.unrealengine.com/latest/INT/Gameplay/Networking/Server/

Replication system works quite seamlessly, the game play framework of UE4 is designed for multiplayer local and network from ground up. All you need to do is make code/blueprints that is prepared for existence of two or more player and existence of multiple PlayerControllers (each player has one) and multiple player pawns. The default spawn system should automatically spawn default pawn for all players connecting to the server out of the box. So technically even empty project is already support multiplayer on the get go

Keep in mind that server contains game state, while client tries replicate it state from data they getting fro server, client sending data to server to update the state which eventually will be synced to other clients. All actors that are set to replicate will be synced from server to all clients, so you can pick what si replicated what is not. Note that lot of cospetic things can be figured out by client itself based on actions of replicated actors, for example particle when bullet hit the wall, appearance of effect don't need to be replicated, it;'s just waste of network bandwidth. when so there no need to replicate all actors. Search "replication" and you should find ton of tutorials.

Now creating a match and friend, as i said this is not job of UE4 to provide those services, all UE4 can do is make server and clients can connect to it. You need a service that will connect clients to servers without user needing to know IP of the server. You need 3rd party service to provide those services or make your own, and in case of PC, Steam is best known. UE4 have common API for those servcies and it's called OnlineSubsystem, read about it, there few network supported including console once. Biggest problem of OnlineSubsystem that some advance features are C++ only so you might prepare yourself for that

You also need to figure out who gonna host a server, someone needs to host a server for network multiplayer to work. Do you let users make servers, and you just view lists of them or you gonna host it whole array of them (rocket League does that) but thats expensive, or you gonna have some match making system where client randomly host the game, but then you have higher hacking risks as one of player will be able to manipulate memory of server. Each service might deal with this differently, Steam as i know supports both user hosted servers and client matchmaking.

But think about this, Minecraft never had any master server that lists all server, people hosts server and just share IP addresses, it didn't stop game to be extreamly popular. So not using any service is also option to consider, but if you make game seriously usage of such services is quite mendetory as most people expect game from larger company to support it, it also no go in consoles

for development i recommend you to just use IPs to connect you can worry about service stuff later. Just remeber that if oyu host server behind router you need to setup port forward so people can connect to your PC, inside LAN you should able to connect without any restrictions

more ▼

answered Oct 08 '17 at 02:44 AM

avatar image

Shadowriver
33.9k 916 164 1093

avatar image Xosh project Oct 08 '17 at 06:34 AM

@medolash I suggest you to read every paragraph in this. Also I want to add one option, but I guess if you ask this question, it's not even an option.

You also can create your own server out of the box with any language you desire. You just need to learn about networking, which is less or more difficult depending the language and then use plugins such as this (https://www.unrealengine.com/marketplace/tcp-blueprint-plugin) to connect all the client you want to your server easily.

But I highly recommend you to choose steam feature (maybe combine with an plugins like https://www.unrealengine.com/marketplace/assets?lang=&q=steam).

Have a good day!

avatar image medolash Oct 21 '17 at 02:36 PM

signed up for a GAMESPARKS account and they gave me a developer account

i wanted to know if gamesparks api works like steam api

what i am saying is can gamesparks work using this method https://www.youtube.com/watch?v=abmzWUWxy1U&list=PLZlv_N0_O1gYqSlbGQVKsRg6fpxWndZqZ

(keeping in mind installing gamesparks plugin)

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question