I am working on a game, and it would be cool if it had multiplayer. I just have a few questions so that I do things correctly from the start:
•If everything is good when launching UE4 with 2 multiplayer players, does that mean everything will be good with packaged game?
•If I want 1 player to host a game, and 1 to join, do I need any C++?
•Is there anything special I have to worry about if I put the game onto Steam?
No, not necessarily. It’s important to test packaged games often just because it works in editor doesn’t mean it will always work or behave as expected in a build. That’s been my experience anyway.
Take look at the Epic’s Learn tap in launcher there is MP shoot-out Western type game ] You can see the how it’s working in MP. There is also tutorial from another member. Wish I knew where it was ] + Have search through the tutorials forums you should find in there.
Lastly there this also. https://www.youtube.com/watch?v=TbaOyvWfJE0&list=PLZlv_N0_O1gYwhBTjNLSFPRiBpwe5sTwc
To your 1st question : For example : Lets say you have sprinting working when shift pressed/hold ] When you test it in Editor with 2 players you will notice that one of them won’t able to able to sprint - but other can. So you need to check it.
Ok, for #2, is anything special or out of the ordinary required if I want a matchmaking system like Call of Duty where it finds all of the available players and groups them up?
And for #3, I’m just wondering if there is any API stuff I have to deal with while making networking, I just don’t want to make the networking, and then go back and change a lot of things because I didn’t start out correctly.
I obviously need to watch some tutorials, but I guess these questions will help motivate me.
I’m not too familiar with the technical aspects of how CODs matchmaking system works. I assume it matches players based on ping/location and probably experience/rank.
Off the top of my head, I would think this is possible in blueprints with the help of an online service or web server that can help aid with this process. I’m just going to think out loud here. A player decides he wants to play an MP game. Clicks a button or whatever. The game tells our service (which for the sake of conversation lets say this is a RESTful web api) that player A is looking for match making. He is entered into the web service with his name, his ping, and his rank. And then he waits. Player B also wants to play MP and he presses our MP button. Player B is then added to our web service with his name, ping and rank. The web service does some logic and says “hey these players are a good match”. Meanwhile, the entire time players A and players B are waiting on matchmaking, the game is constantly pinging our web service asking if we have a match yet. Now that the web service has matched our players, the game pings the service again and is told there is a match. One player is decided to be the host (randomly?) and opens up the Lobby level in game. The second player is then told to connect to the host using the command “open 12.24.123.1”, which then loads that player into the same lobby. Maybe the host has a start button, or there is a timeout for how long to wait before actually launching the level. The server/host uses the command “servertravel levelName” and both players are transported to the level and play can begin. That’s how I would imagine matchmaking working in UE4 with blueprints. I think this is definitely possible.
The multiplayer in my game works a little differently, and maybe I’ll move more towards a match making system. Right now it’s a simple, a player decides to “host” a game. Selects the level and the match options, then hits “create”. The host will wait in the lobby. The game pings my web service and says “hey we have a new game” and adds it to the list of servers. Anytime someone wants to join a game they go to “join game” and are presented a list of currently available servers. User selects the server, hits join and loads into the lobby with the host. Host hits start game and all players travel to the level to begin the game. It’s much more simple but was easy to implement just to get networking up and running.
Oh and about steam, I believe it’s totally optional if you would want to use the steam online service so the answer is… yes or no
Oh alright, I guess what I meant for matchmaking is that I don’t want the player to have to type in an IP address or something, but I guess that is doable.