How do I publish on custom Server


#1

Hi created a Game with GDevelop and already tried to publish it on Itch.io. And it worked pretty well.
But the thing is that I worked with a Team on a Webapp where users can login with there username an password and in this app we would like to run the game.
The game needs to call our web api via REST Calls (gedevelop event: request to a webpage) to generate gamestuff inside, based on User Account information.
But before this can happen the game must authentify itself at our backend. And it needs to get the login credential from our webapp for that.

I think for this the game must run on ower own server and not on itch.io or a other 3rd party.
So i would like to know: How do I publish a GDevelop game on web using a custom server?

I hope you can help me with that. Thx :blush:


#2

Every web deployment is going to be different. While possible, it is exceptionally unlikely anyone’s going to be able to give you direct instructions for your scenario.

Please keep in mind, there is no special Itch.io instructions. If you want to publish to the web, you just need to use the local HTML5 export option in GDevelop. Those files will work anywhere you can publish HTML code and assets.

As far as your API call questions, you’ll need to familiarize yourself with the network events and commands in the Wiki: http://wiki.compilgames.net/doku.php/gdevelop5/all-features/network#network


#3

Hoy does your webapp work? I guess it is possible to authenticate with api calls to your webapp or to make a popup that will make it work. For example you can create a popup with a get parameter containing a key, and gdevelop continuously calls an api (maybe site.com/auth/isAuthFinished?key=keyfromgdevelop) and the server changes the output of that api when the user authenticated.


#4

For the first try i accessed the api with a pair of a hardcoded user and password, for testing and that worked well. The app in frontend ist build with vue.js and we have one vue component that should contain the game.

At the moment we added the game via itch.io and an Iframe but that means if a user will login he will enter the startpage and he can access his profil inside the app an other stuff but of course not the game because the app can’t pass a token or the login date through the Iframe via itch.io into a game variable, so that the game can access the api.