DescendentStudios / PingPlugin

Plugin for Unreal Engine 4 (UE4) to ICMP ping hosts and obtain results from Blueprint
Apache License 2.0
70 stars 35 forks source link

Compile broken in UE4.14.0? #3

Closed metahusk closed 6 years ago

metahusk commented 7 years ago

Thanks for the awesome ping plugin! I'm going to use it with the Cardinal Menu System (free multiplayer game menu) https://forums.unrealengine.com/showthread.php?121203-Community-Project-Blueprints-Cardinal-Menu-System-Steam-and-LAN-Server-Browser-w-Friends-List to fetch the pings from listen servers on Steam. I have it working in UE4.13 without issues on our in house project but it won't compile on the new engine version. I tried the launcher and source versions of the engine. I'd take a look at it myself but I figured you all have a lot better idea of what is going on with the code.

Thanks! Parvan / Thaddeus

Stormwind99 commented 7 years ago

We're updating our project to 4.14 right now, so I'll have to update PingPlugin to 4.14 for that. Hopefully will have it updated soon and then I'll push the changes to this repo.

steve7411 commented 7 years ago

We recently updated to 4.14, and as I recall, all you need to do to fix the compiler errors is remove the includes for Object.h (and probably also Engine.h) from the WinPingThread.h and MacLinuxPingThread.h.

However, we're using it from code and not blueprints, and we also had a problem with the fact that it was a plugin at all, so we had to convert it to a module.

Stormwind99 commented 7 years ago

@swolter - I have not looked into it myself yet, but is it possible for the plugin to provide the module to use in code?

metahusk commented 7 years ago

Thanks for the help. No worries if it's a lot of work. I talked to someone who thinks that exposing WAN IP for Steam servers on a session property key pair is a bad idea as it makes DDOS attacks on hosted games easier? Anyone have thoughts on that? Maybe I will rethink the easy server ping solution. If I get some extra time soon, I will take a look at the plugin includes like you mentioned.

Stormwind99 commented 7 years ago

@metahusk - Unless Steam proxies TCP and UDP data to/from game clients and the game server, the game client has to already have the game server's IP address so it can communicate with it - so no addition information would be given that the client already doesn't know.

For a game service with permanently available but dynamically created game servers/VMs, one can run a small VM without a game server in the same zone/location/data center as the game servers and ping that machine as the representative of all the game servers in that same location.

crazyandre192 commented 7 years ago

Hi... In 4.14 version my ping is 9999, with this ping plugin solve the problem? is possible recompile ping plugin for this version ?

metahusk commented 7 years ago

crazyandre192, are you asking if it will fix the online sessions listen server's reporting a ping of 9999 out of the box? It won't fix it without implementing it to do so. This plugin strictly pings an IP. But, you can have the session share information about the session, such as IP, and then have the clients ping the IP. That's what we did.

crazyandre192 commented 7 years ago

how can i ping on the ip? I'm using advanced session plugin and online session reporting ping 9999

metahusk commented 7 years ago

They have a screenshot of how to set up the blueprint nodes. https://raw.githubusercontent.com/DescendentStudios/PingPlugin/master/Example.png

You can use VaRest and https://www.ipify.org/ to get the external IP of your host in json. Then have the server add the IP to the session information. Use this plugin for the clients to ping each listen server.

crazyandre192 commented 7 years ago

Thanks... Is there a sample project available?

metahusk commented 7 years ago

We might release pings in cardinal menu in the future. It's on the agenda. Pings are working in our internal project. Honestly I thought epic would have implemented this by now but I think they are leaving out some crucial things to slow asset flips and other things like that. https://forums.unrealengine.com/community/community-content-tools-and-tutorials/93565-community-project-blueprints-cardinal-menu-system-steam-and-lan-server-browser-w-friends-list

Stormwind99 commented 6 years ago

Build break should be fixed with lastest pull request merges.