Receiving error when trying to join session

22 views
Skip to first unread message

alexs...@digiplaygaming.com

unread,
May 6, 2019, 6:35:25 PM5/6/19
to emscripten-discuss
Hey all, we've ported an Unreal Engine 4 game to the web, and it works great in solo mode (you can play against the bot). But when trying to search for or join a dedicated server in the main menu GUI, we encounter an error page which I've attached for reference. We believe it's because we haven't set up WebSockets for our game, but are unsure of how to properly implement this. Any input would be really appreciated. Thanks!
error44.JPG

Floh

unread,
May 7, 2019, 6:22:44 AM5/7/19
to emscripten-discuss
This may not be trivial because WebSockets are implemented on top of TCP, and require(?) a client-server model, while many multiplayer games use UDP and a peer-to-peer model.

So don't be surprised if you need to rip out and rewrite your entire networking code ;)

Emscripten's socket API wrapper may help a bit when you're currently only using TCP-based sockets and a client/server model, but there are still a few important differences to native sockets (mainly that emscripten sockets work in non-blocking mode at all times).

Your best bet may be replacing the lower-level networking code with a library like ENet or HumbleNet:



But I don't know the current state of either of those libraries.

Cheers,
-Floh.

Alex St. Louis

unread,
May 7, 2019, 12:46:56 PM5/7/19
to emscripte...@googlegroups.com

That makes sense, from what we've found through research, it seems that if networking code is set up through blueprints, it gets translated over to WebSocket code when the game is exported and built for the Web. But a library like HumbleNet is definitely necessary long term for having high server traffic while keeping latency low, which the WebRTC feature helps out with. Would you be able to help us implement this? You're in our DigiPlay Discord, if I remember right :P

--
You received this message because you are subscribed to the Google Groups "emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/407191b3-c7df-4007-80eb-f8d643c64b48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages