VaRest is just for for HTTP communication, you need to have a HTTP server that reads DB and return result in form to use VaRest. But again VaRest is for HTTP, it does not really need to be used just for databases
I am using VaRest because I found the UE4AM example and thought it would be the solution, web is not my strong side.
Can you explain me how I can make this communication, or how I can make the connection directly from C++ on the engine ? (i don’t need any kind of security right now)
Connecting to the database really depends on what database you’re connecting too. Is is one of the AWS offerings / Azure offerings / MongoDB / Parse? There are many out there and each will have a slightly different interface. The actual type of database you use will have an impact to (SQL / NoSQL etc)
Personally, Id suggest that if you’re not familiar with these things you should consider Parse, which is well supported and helps mix DB technologies to fit your needs (NoSQL is much faster, but not always appropriate depending on what you’re trying to do).
The actual process of connecting will usually be firing off a http (hopefully https) web request to some end-point and you’ll usually include your username and password (or hopefully a access token) to authenticate as a user which can read and / or write to the database. You’ll probably need to wait till you get a response from that call, which will probably also include a cookie or access token so you don’t constantly need to re-authenticate.
From there, the actual calls you make will depend on what you want to do. To get a db record for your highscore for example you’ll send a https to something like /mysevice/mydb/getscore?id=100292, and you’ll get a response from that which you then parse and do with as you want.
Posting data to the database is very similar, but you’ll probably need to construct some more parameters with the http request, as well as format your data as a / xml request (depending on the service). Some will just let you pass in the data as http query strings but it does depend on the service and the purpose.
As the data you send / receive will probably be in , you’ll need to use a parser to understand that. The exact structure of that will again depend on the service and you’re implementation of the database.
Sorry that there isn’t anything specific in there, but like I said, without knowing your service we can’t be too much help. If you’re planning on hosting your own DB then think very, very carefully before you do. It’s very easy to trip yourself up and make big mistakes without understanding both the underlying DB tech and the associated web service.
I have an external database done, using php Admin. If i am right, i understand that if a want to make a connection between my game and external database from HTTP, all i need to do is installing VaRest?
I´ve found a tutorial that explains that, but i´m still trying to make it work.
I´m using database for Login screen and save some info input and other things.
I´ll try to follow this tutorial and i would tell you if i solve this.