Reputation: 57
I want to create multiplayer-only card game, where I'm hosting the servers and have full control over whats going on (Database, Game, Players, Accounts)
So client is basically just to log-in and display cards in right spots
As I have 0 any game engine, but I'm a backend developer - I can see doing server by myself (It's not hard card game) and managing everything
Buut I can't figure out good solution for communication
All I saw is TCP/IP plugins (one paid, one free, idk the differences)
But are there any good solutions for something like that? Unreal documentation shows their own networking API but it's mainly for FPS/ RPG games where sync and effects is needed and this is exacly what i don't want - only simple commands from server where server says ex. "Now cards are in this spot" "Game over" "Player 1 used Growl!" and client just display this changes
Upvotes: 1
Views: 1223
Reputation: 57
For Unreal Engine itself, you don't need any kind of plugins, as Unreal take care by itself of the networking using Replication Replication doc for UE5
What the Replication does is exactly what you need (replicating states across client and server) for game itself, but is a bit different than what you are looking for, as you pointed out.
In any native multiplayer architecture for Unreal, you'll have the server emulate the game and "playing" it on it's own, then tell the client what's going on with Replication (the object will be a cloned state of what is on the server, with server authority). It is a simplified explication and you'll find all the informations about replication on UE Forum or Documentation like here and there.
What you are describing does looks a lot like external API server (like used for backend web in any kind of sort) and can be use on Unreal, but it is a nightmare. The reason why is it's because you need to do aaaaaaaall the replication code yourself : ask the server for action, wait for answer, mitigate wrong data or network, handle all the fallback case, then implement all again on the server every logic you want to make multiplayer. And I will not even talk about the fact that server will have a very hard time to deal with the Unreal scene itself.
For more context on API-kind networking, you can look into older MMO game like TERA which was coded this way. It often involve developing your own network stack to plug in Unreal and so on.
I'm myself a backend developper but now specialized in Unreal Engine, and I can see the reason why you want to follow that API way. But it is very expansive and if you are discovering UE or want to start on, I strongely recommand you to use the native replication instead. It is already hard enough with it.
If you still really want to do it the API way, than you just have to integrate a TCP/UDP packet forger into Unreal (code it yourself I mean, or take a plugin that do it) than do all the dirty stuff to forge and forward the packet to your custom API server that you have to create on side (Nod.js stuff or whatever). It will work, but you will have absolutly no automatisation of any kind on Unreal end.
Upvotes: 1
Reputation: 3
The best option is to have WebSockets or HTTP connected to your Project.
Upvotes: 0