Problems with HTML export

Marko03970

Member
Hi,
Every time I export my project for html platform, and when I try to run index.html to test it in my browser, nothing happens. Just black screen in the browser. And I tried with Chrome (my default browser), Mozilla, Opera and it is not working, but when I tried to run it with Microsoft Edge, it was working, so I'm not sure, is the problem in my browser or in game maker exporting system?
 

rIKmAN

Member
Hi,
Every time I export my project for html platform, and when I try to run index.html to test it in my browser, nothing happens. Just black screen in the browser. And I tried with Chrome (my default browser), Mozilla, Opera and it is not working, but when I tried to run it with Microsoft Edge, it was working, so I'm not sure, is the problem in my browser or in game maker exporting system?
You'll need to upload it to a webserver / your webspace and open it from there.

When you run it from the IDE it uses a local webserver to serve the pages to you as if they were online, just clicking the index.html file in a folder on your computer won't work correctly.
 

Marko03970

Member
You'll need to upload it to a webserver / your webspace and open it from there.

When you run it from the IDE it uses a local webserver to serve the pages to you as if they were online, just clicking the index.html file in a folder on your computer won't work correctly.
But it is working when I run it with IDE. It is not working when I open index.html file. And also, it was working good before. Really don't understand what happened so it is not working anymore.
 

rIKmAN

Member
But it is working when I run it with IDE. It is not working when I open index.html file. And also, it was working good before. Really don't understand what happened so it is not working anymore.
It works from the IDE because as I explained It runs a local web server to serve the page to your browser.

Upload your game to some webspace and test it, it likely isn’t going to function correctly just by clicking the index.html file on your PC.
 
But it is working when I run it with IDE. It is not working when I open index.html file. And also, it was working good before. Really don't understand what happened so it is not working anymore.
When you run an HTML5 game from GMS2 it launches a micro web-server in a new tab which allows you to test your game locally.

Once you export your game, an index.html file is generated (which is intended to be uploaded to (and run on) a web server... It won't function when run locally UNLESS you install XAMPP on your development PC (which is basically a local (WAMP) server for development/testing.)

Once installed move the files generated by GMS2 into your c:/xampp/htdocs/ folder. You will be able to test any game(s) saved in this folder by clicking the index file (as long as XAMPP is running.)

Also make sure that Chrome isn't blocking popups and/or local JS?
 
Last edited:

Marko03970

Member
When you run an HTML5 game from GMS2 it launches a micro web-server in a new tab which allows you to test your game locally.

Once you export your game, an index.html file is generated (which is intended to be uploaded to (and run on) a web server... It won't function when run locally UNLESS you install XAMPP on your development PC (which is basically a local (WAMP) server for development/testing.)

Once installed move the files generated by GMS2 into your c:/xampp/htdocs/ folder. You will be able to test any game(s) saved in this folder by clicking the index file (as long as XAMPP is running.)

Also make sure that Chrome isn't blocking popups and/or local JS?
Yeah I used xampp before for my php projects so I know how to use it. Thanks!
 
Top