I am not able to playtest my project with my friend using Hamachi

I am trying to playtest my project with my friend using Himachi, but we aren’t able to join in the same game. I don’t know why. Please, anyone here who could help me playtest my game using Himachi? I would be very grateful.

Hi,
I’ve never used Himachi myself - I’ve always done playtesting on the same network which makes things easier.

There are a few things you can try.

  1. Ensure the build you are using the is the same. Don’t run them within the editor - this tends not to work as you need identical builds

  2. Ensure the correct ports are open on your firewall. Find out which port Hamachi is using and ensure your firewall allows this. I’ve seen this issue before

  3. Double check your code against the end of lecture in case you’ve missed something.

Let me know how you get on.

2 Likes

I tried these lines of code in cmd to playtest my project file:-

  1. I ran this line of code in the CMD of my friend’s PC (I created a server on his PC):-"E:\Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor.exe" "E:\Unreal Engine Suryansh\PuzzlePlatforms\PuzzlePlatforms.uproject" /Game/ThirdPerson/Maps/ThirdPersonMap?listen -server -log

  2. I ran this line of code in the CMD of my PC (Started the game on my PC using my friend’s IP address):-
    "E:\Games Files\UE_5.0\Engine\Binaries\Win64\UnrealEditor.exe" "D:\Unreal Engine\Projects\Unreal Engine intermediate Course\PuzzlePlatforms\PuzzlePlatforms.uproject" **(IP address of my friend's pc which I got form Himachi)** -game -log

  3. Ran this line of code in the CMD of my friend’s PC (Started the game on my friend’s pc using my friend’s IP address):-
    "E:\Games\UE_5.0\Engine\Binaries\Win64\UnrealEditor.exe" "E:\Unreal Engine Suryansh\PuzzlePlatforms\PuzzlePlatforms.uproject" **(IP address of my friend's pc which I got from Himachi)** -game -log

The things that are going wrong are:

  1. The client is launching as it should launch, but my friend and I can’t get into the same game.
  2. I even tried launching the server on my friend’s PC, then launching 2 clients from my PC using the friend’s IP Address. But even the 2 clients that I launched from my PC can’t get together(both are launching individually).

Some Questions:-

  1. The code which I ran in CMD are they correct?
  2. How should I set the number of players and net mode for both computers? Below is the current number of players and net mode for both computers’ project files.
    Screenshot 2022-08-22 145911
  3. Do you mean by “Ensure the build you are using is the same” that I need to export my game and try to use the build file instead of directly launching the server and game using the project file?
  4. I am not quite sure what you mean by the ports are you referring to port no. like (7777, 7778, 7779, etc.). And if yes then are telling me that the port no. should be the same for both of the computers?

Note:-

  1. I tried launching a server and 2 clients on my Own pc using my wifi IP address, and both clients are able to play games tother. (Working fully fine)
1 Like

The CMD is correct. However, this is using the editor. This should work but it might not. The code needs to be identical between PCs for this to work correctly.

Number of players does not matter when you’re running this way.

Hamachi works differently. It uses an IP address and port number which is not your computer or the unreal default. You need to set up your firewall to ensure it can communicate over this port. Have a look through the support site for Hamachi - there’s a section there for troubleshooting issues.

Some of this I know is covered in the lecture.

Connecting a game engine via the internet is not simple - it is actually quite a complex topic and you’ll hear terms like lag, latency, ports and ping times as an example. Ideally you should have some prior knowledge which is why this course is considered an intermediate course. You could easily spend days trying to sort this out, or longer if you don’t know the basics.

2 Likes

I will re-watch the lecture video and search on the internet for this firewall stuff. I have one last question. What will be the code for running the server and client for the build version of my game?

1 Like

I believe the commands are the same, so you would use -server for starting a dedicated server.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms