Webserver requirements / upload game to a webserver


First of all a little background info.
For a project, I want to make a very easy/basic platform game.
Because I don’t have any experience with making a game, I searched on google and came across this “Platform tutorial” Platformer Tutorial, Part 1: Getting Started [GDevelop wiki] . Because the game they made in the tutorial was exactly what i needed, I followed the tutorial stap by stap even with the assets they provided.

Because this game is a little piece of the project, I want it to be very accessible for everybody (Phone, Tablet and computer (Android, Linux and Apple)). So the idea was to put it on my website so it can be played from there, in a browser (no need to download or install something).

Before I spend all my time in making the (real)game I want to make sure it will work when I put it on my site(put it on the webserver I rent for my site).

So I exported the game as a local folder and this is where the problem started.

To test it a friend of mine has put it on his local (experimental/test) webserver and it worked. The game loads and can be played. So than I put it on the webserver where my website is hosted and it didn’t work, I only get a black screen.

the server from my friend is a raspberry pi with ‘Raspbian’ as the OS (a derivative of Debian Gnu/ Linux) and nginx on it.

the webserver from my site is a linux server with on it:
Apache version 2.4.46
PHP version 7.0.33
MySQL version 10.3.27-MariaDB
Perl version 5.16.3

Could someone help me or have an idea why it doesn’t work?
Many thanks in advance.

Seems very strange; I’ve done a few browser games and haven’t had any problem getting it to work.

I’m curious, where are you attempting to host it? Is it shared hosting? Or a server you can admin?

It could be your hosting has some sort of limitation in the web directory; whether a size limitation or a file type limitation is hard to say.

Did you test it on the same machine/same browser? It could be a browser issue if you’re missing a plugin or have something outdated.

The hosting is by a hosting company, so it’s shared hosting.

I did the test on the same machines (macbook and a android phone) and the same browsers (firefox and chrome).

When I take a look on the visiter section of the webserver you can see that all the requested filles are transferd (to the visiter of the url) but still I get a black screen and nothing happens.

At the black screen, try pressing ctrl+shift+i and check the console for errors. :man_shrugging:

Another thing you can try to diagnose the problem is to upload your game somewhere that you know supports browser games ie itch.io or gamejolt.com (both free).

If you upload it there and it works, you can deduce the problem is with your webhosting. If this is the case, I’d recommend you send a ticket to the hosting and see if they can help you get it configured properly.

If you upload it there and it doesn’t work, something may be wrong with your game. If this is the case, maybe try running a preview with the debugger/performance profiler and see if you can locate any problems. It doesn’t take much to break the game… a comma, a parenthesis, a quote, or the lack of any of these can make your game stick on loading. Usually the expression helper will find these errors but not always.

Also, most shared hosting does not allow game hosting because it can be very resource intensive… you may want to check the terms of service of your web host so you don’t get in trouble. I tried a few years ago to run a game on shared hosting and got banned very quickly.

My gut feeling is that this is a problem with your web host since you were able to get it working locally on the test server… Assuming there were no changes in the version you tried on the Rasperry PI and the version you uploaded to your web host.