so let’s say I want to implement an ingame store where you can unlock e.g. weapons (currency is earned for every game played), what’s the best practice to get and store the data from a remote database?
Send a POST request to my webserver and return the values after a token is supplied which authenticates the user?
Are there any resources for something like this (not speaking of REST calls in C++, but more about how UE4 multiplayer games actually implement persistent data, like the mobas which are made with UE4)? Also the game sever would need to verify that said player is allowed to use the weapon, character or whatever ingame.
Yes you are correct. The best way (IMO) is to have usually a RESTful services Website (for example Microsoft WebAPI) but of course, simple PHP would be good enough. I’m currently figuring out that myself now too and I can recommend this: link
The code for creating a simple POST with php webserver is easy to understand, if you have trouble ask me I’ll explain.
If I manage to get things working I’ll notify you
EDIT 1: Oh I also forgot to mention VaRest plugin. Does the same thing just via Blueprints.
Yeah I don’t say it was the best solution, but it has the code to make it working
I’m just unsure how to use those UObject inside the editor. First things that come to my mind are: #1
Create a pointer to that UObject class that holds all the HTTP handling and initialize it in the constructor
Create a C++ Component and use it wherever I want?