Download

Where to store data files for multiplayer game

I am working on understanding how the architecture for games like LoL, Dota, SC2, etc work.

I want to load json files that describe the different characters that the player can choose from to use in the match.
So, something like this http://ddragon.leagueoflegends.com/cdn/6.6.1/data/en_US/champion.json

I am wondering where the best places is to store these. Should they be stored on the filesystem of the server or in the database?
If they should be stored in the database is there any examples of using ue with a database?

My current setup is with listen servers and steam. I don’t have a dedicated server up at the moment. Is a dedicated server required for this?

Obviously I can’t just store the file client side or the player could make changes to it and cheat.

Can anyone explain how this all should work? Any examples are greatly welcomed :slight_smile:

An easy approach would be using a rest framework for UE4: GitHub - ufna/VaRest: REST API plugin for Unreal Engine 4 - we love restfull backend and JSON communications!

You can then store all the data in a database and create a rest framework to query the data. A rest framework is basically a website serving json (can be other data formats) files which you can retrieve with HTTP calls.

Client: makes HTTP requests to your server to obtain gameplay data. If you would need client specific data you could also implement an authentication scheme for this.

Thanks for the link. Would this be able to support a large user base? I am planning on pretty small matches 5v5, but I need to support a lot of matches at once.
Is the preferred way still a dedicated server?

Yes, you just need a more powerful server and the correct technology. One of the most known are ASP.NET Core (WebAPI) or Node.js. Both work very good, tho even simple PHP scripts can do the job.

And yes database is the best storage place for such data.

Is the data static for the most part? If so, you could probably just use a distributed server which sends simple json. You could then write an updater which pushes out updates.

However, be careful with ‘scale’. If your player base is going to be in the thousands, I wouldn’t worry all that much. If your player base is going to be in the hundreds of thousands … then you need to consider scale.

Lastly, if you can just distribute these with the client; I wouldn’t worry about clients trying to hack them. After all, the server has the real values so the only person cheating is themselves!