x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

RESTful server or UE4 server for Account/Ranked/purchases etc

Hello,

I am wondering which is the best option to setup a classic clients-server architecture to manage the account, sessions, purchase, XP, Ranked points, Level, customisation and friends list like fortnite, dota 2 or Starcraft. For now I went with a RESTful server, I can create an account, login, get a session ID and save what needs to be saved server-side.

This is fine but I wonder if this is the best way to achieve an ingame friend list, save all information regarding XP, ranked points, matches stats or customisation because it needs to go through an in-game server. Should I connect automatically the player to a "main menu" UE4 Server, make this server discuss with the RESTful server to get data ? Should I throw away the REST server and do everything through the UE4 server (with the database behind it etc) ? Is there another better option ?

I could write my own C++ server and handle everything by hand but there has to be a quicker thing to do.

rXp

Product Version: UE 4.18
Tags:
more ▼

asked Oct 29 '17 at 11:17 AM in Everything Else

avatar image

rXp
311 22 17 39

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I would keep it all like you already have it: RESTful/Web/PHP server. It is definitely more lightweight solution and easy to scale. UE4 server seems much heavier solution and you still need the same communication with DB. Also, how many simultaneous clients are you going to connect to UE4 server? You might need multiple server instances to handle all the clients/traffic. While on the web server you can easily handle almost unlimited clients, since it is all quick request/response messages.

more ▼

answered Oct 29 '17 at 03:43 PM

avatar image

Flash7
834 9 16 29

avatar image rXp Oct 29 '17 at 07:26 PM

Yeah but I would need to implement socket to make a friend list and invites etc... If I want interaction between players in the main menu, I need a socket and a connection. Should I switch to a full costume C++ server ? Socket etc

avatar image Flash7 Oct 29 '17 at 08:02 PM

I see you point.

Are you going to make your own list of friends or somehow get it from "fortnite, dota 2 or Starcraft"?

For interaction - if you need instant notifications, then yes, you will need to have a listening server with open socket, and have like TCP or UDP connection. The server part could be quickly done in C#, the client part, here is a great wiki - https://wiki.unrealengine.com/TCP_Socket_Listener,_Receive_Binary_Data_From_an_IP/Port_Into_UE4,_%28Full_Code_Sample%29

Obviously, it is all can be done using just Unreal that can handle connected players. The question is will you be able to connect all the players at once? If yes, then you basically already have the client-server solution and it can be better than custom server solution. The only thing to keep in mind would be that for most changes on a client side, you will need to redeploy the server as well, otherwise Unreal will complain that server and client have different versions and your clients will not be able to connect. While with a custom solution it is not a problem at all, as long as communication messages remain the same.

But quite honest, since you want interaction, probably be quick out of the door, and more likely you do not really expect hundreds of thousands users connected to your server(s) (you would probably be a big company at that point), Unreal server might work the best for you.

avatar image rXp Dec 06 '17 at 09:45 AM

I went for a full custom c++ server I implemented everything from socket with openssl to json serialization and compression with zlib to be fully compatible with UE4.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question