Having Trouble Testing Multiplayer. Any Help Is Appreciated!
Hello, This may be a rather stupid question and very simple but i am having trouble and must be doing something wrong.
Basically, at the moment i have my level blueprint that in its 'Play' settings, has '2 Number of clients', and when i click play, everything seems fine, 2 windows and 2 different players. However i didn't really know how i can make sure that this is actually working and would work with 2 separate connections. So, i looked at the recent 'CouchKnights' project that was released with 4.3 and packaged the 'CouchKnights' game and followed the instructions within the level editor which say...
With this, i created 2 shortcuts of my game executable, one the client and one the server. The target for the server shortcut was this :
F:\\WindowsNoEditor\CouchKnights\Binaries\Win64\CouchKnights.exe CouchKnights Room?Listen -Game
and the target for the client shortcut was this :
F:\WindowsNoEditor\CouchKnights\Binaries\Win64\CouchKnights.exe CouchKnights 1"2.1"".1."2 -Game
(Without the quotation marks in my IP) And so i tested this and it all seemed to work perfectly fine.
Next i tried to package my current project and did the same process with the shortcuts as well. This also worked and i had both players in the game.
However, next i tried to send this packaged game with the shortcuts to my friend. First of all we tried with the shortcuts. I would open the shortcut server with a target like this....
F:\ ......WindowsNoEditor\GameProject_1\Binaries\Win64\GameProject_1.exe GameProject_1 Networking_Multiplayer?Listen -Game
and then i had him open the client shortcut who`s target looked like this....
F:\ ......WindowsNoEditor\GameProject_1\Binaries\Win64\GameProject_1.exe GameProject_1 1"2.1"".1."2 -Game
(Without the quotation marks in my IP) However this method did not work.
So i looked to trying the 'Command Line' method instead of using shortcuts.
Firstly, i opened my game .exe and typed in the console this...
and then i had my friend launch the .exe and type in the console...
However this also did not work. I may be very wrong in thinking its this simple, but from what i have watched and read, i cant tell if there's more work for me to do? All i want to do is have the client connect and join the listen server. Am i doing something wrong?
I am sorry this turned into a really long post for something that probably could have been put much simpler.
If anyone could help at all with this it would be a great help, as i have been trying to figure it out for a while. Any help is greatly appreciated.
Thanks A lot!
asked Jul 20 '14 at 03:21 AM in Blueprint Scripting
The problem is you gave your friend the same IP you used, right? (That with 192.168 probably). It is only valid in your local network, but not on the internet. It's like being in a city, let's say London.
Your server is in George Street and that is working pretty well...in London. Your friend now is in Richmond, and if you say him you are in George Street, he will go to George Street in Richmond and find nothing.
First you have to give him your city, that is your public ip (http://www.whatismyip.com/). Then, you don't give him really the street (your local ip), but you say him a port number, like Talus showed how to configure it. In your router, you say: "Hey, the port 7777 is of this type and should lead to this IP address/this PC" and there you give your local IP/your PC. Then it's like "Ok, go to London and at port 7777 we will be routed to George Street".
That's the way it works.
Oh, the format is not 192.168.etc., it is like 188.8.131.52:7777 You append the port with a colon.
Hope I could help you with my problem, please vote if it helped you, ask if there are any more problems and good luck. Cheers mate.
Hello, In Engine > Config > baseEngine, you got at the top of the file in [URL] a variable named "Port", By default it's set to 7777, You can use many websites to check if your port correctly receives informations and which port are opened or closed. You can either manage to open port 7777, I had problem doing so, so I just switched the "Port" Variable inside baseEngine to a port that was already opened on my box.
I Use the same Console Command Line than you and it does work with no problem wether I enter it in the console, or use the appropriate blueprint node to do so.
answered Jul 20 '14 at 04:59 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here