[Mostly solved] Running game in browser results in crash

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
45
Reaction score
36
First Language
English
Primarily Uses
RMMV
I would like to release an in-browser version of my short game, but I keep having difficulties with running its index.

Depending on how I deploy my game, I can get one of two kinds of error messages.

If I choose to encrypt my images and audio files, which is what I do when I release my game for download, then I get an error of "failed to load: img/pictures/filenamehere". That doesn't happen if I run the game from the exe, which has no problems, but only when I try to run it from the index file.

And if I choose to deploy my project without encryption and attempt to load the index file, I get this:

webdeployment2.png

All of the json and plugin files are still intact in the www folder, so I'm not sure why it is displaying this.

I should also add that this project does use a plugin to load images on the title screen. I'm aware this causes issues with deployment, which I try to get around by not excluding all my files or trying to load my pictures in a common event. But that doesn't seem to make a difference when trying to run in-browser.

I even tried this with a test project that has no image plugins and I still get the same kind of error in the spoiler tags.

I'd like to release an in-browser version of this on Itch.io, but if I can't even run the index file myself, then I don't think it would work there either.

Thanks.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,519
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
the problem is that your file structure uses letters that are forbidden under networking rules, letters that the browser can't handle.
in this case the spaces - or why do you think they are replaced by %20 on every error message?
That is an override that functions in windows only and is not even guaranteed to work under windows either.

remove all spaces (and any other letters that are displayed as a %-number-code on error messages) and try again, either it will work or you'll get the next error message. Use _ instead, that is an allowed symbol.
 

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
45
Reaction score
36
First Language
English
Primarily Uses
RMMV
the problem is that your file structure uses letters that are forbidden under networking rules, letters that the browser can't handle.
in this case the spaces - or why do you think they are replaced by %20 on every error message?
That is an override that functions in windows only and is not even guaranteed to work under windows either.

remove all spaces (and any other letters that are displayed as a %-number-code on error messages) and try again, either it will work or you'll get the next error message. Use _ instead, that is an allowed symbol.
So I tried your suggestion by removing the spaces and any symbols from the folder name that could cause issues. And unfortunately, it is still crashing on me with a similar error message.

webdeployment2.png

After taking this screenshot, I also tried renaming the folder to "tibbyweb" in lowercase and same deal.

Or do you mean that I have to rename the project folder itself before deploying it?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,519
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
I wrote in my original answer that changing the folders might not solve the error, but you have to solve problems step by step, and the spaces were one problem.

the engine has problems loading the database. so let's check the next possibilities. No, renaming the project folder can be done any time, but your question raises another question:
what is your project folder, and what is your deployment folder?

they must never be the same - deploying into your project folder will damage and overwrite some of your project files, and you'll have to repair the project folder to make any future playtest and deployment correctly workable again.
 

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
45
Reaction score
36
First Language
English
Primarily Uses
RMMV
Project folder is located in,
Documents > a folder I used to store my projects > Tibby and the A-Maze-Ing Box

When I deploy my project, I just deploy it to documents. The project folder and deployed folder do not share the same space and they never have. And I have this same problem with all my other projects, so I don't think it is just this project alone.

So I tried renaming the project folder itself before deploying and I still have the same crashing. (I deployed it in a different folder this time and no difference.)

I do not believe I'm doing anything wrong with the deployment to cause this. I do not check off "exclude unused files" (which doesn't explain why choosing to encrypt means it cannot load images in the pictures folder). And if I don't encrypt, then I get database errors.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,519
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
please go to your project folder (important! project, not deployed version) and check the following things:
1) use a text editor to open the js/rpg_core.js file. What is the version number in the title line of that file? (no number means 1.0)
2) is there a www folder in the project folder?
 

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
45
Reaction score
36
First Language
English
Primarily Uses
RMMV
rpg_core.js is v1.6.2

My project's folder looks like this,

webdeployment2.png

I think the www folder is only created when you deploy a project. There is always one in any deployed folders.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,519
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
I think the www folder is only created when you deploy a project. There is always one in any deployed folders.
yes, and if it ends up in the project directory that is an indication of the problem mentioned above.

Is there any chance that you might have confused several different folders?
Because the very first screenshot of the error message shows an www folder in the path with a folder "Tibby and the A-Maze-Ing Box" which you say you use for your projects but not for deployment in the post above. Repairing that will require more than just deleting the www folder however.

and the engine not being able to read encrypted files was a classic error when the project engine version was pre-1.3 because the encryption was only introduced with 1.3 and previous core files couldn't handle it.

everything in your errors points to these classic errors or something similar that really messed up your files, but that would not fit with your later answers that all show correct results.
can you give a screenshot of your plugin manager with all plugins and their order listed?

Ah - one idea:
Project folder is located in,
Documents > a folder I used to store my projects > Tibby and the A-Maze-Ing Box
can you please give the full folderpath in the format
c:\foldername\foldername\ ...
do not use the shortcut of "documents" or descriptions, there might still be something else hidden behind the windows shortcut "documents" depending on how your windows is configured.
 

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
45
Reaction score
51
First Language
English
Primarily Uses
RMMV
Folder structure should not matter unless you are using a plug-in that was written 'wrong'. more likely is that your web browser isn't loading local files due to a security setting.

You'll have to 'host' your game as a website using something like SimpleHTTPServer to get it to work.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,519
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
@MechPen unfortunately you are wrong on both counts.
wrong folder structure has been known to cause problems - which is one of the reasons why the internal playtest changed the root folder to a virtuel one instead of using the original path like in the early MV versions.

and while some browsers have a restrictive default against local files, that is not the case everywhere - default firefox for example never had a problem running maker-games locally without that virtual hosting.
But it is a possibility, so @HiddenAlchemist which browsers have you tested with your game?
 

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
45
Reaction score
36
First Language
English
Primarily Uses
RMMV
My default is Firefox and I also have Google Chrome. I've tried it on both browsers and it is the same thing.

Should I just give up on trying to make a web version of this?

Edit: These are my plugins.

webdeployment2.png

And the project folderpath is,

C:\Users\14037\Documents\RPGM MV Games\TibbyAmazingBox

I should also point out that I'm running a very new version of MV. I bought this on Steam last year and installed it on my PC this year. So this is not a case of me previously having an older version and updating it. Mine would've already been version 1.6.2 after the initial install.
 
Last edited:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
32,519
Reaction score
8,147
First Language
German
Primarily Uses
RMMV
Should I just give up on trying to make a web version of this?
all the games are HTML5-based, the exe is nothing but a dedicated browser to start the index.html

I suggest changing "RPGM MV GAMES" to "RPGM_MV_Games" to remove the spaces there.

I have to admit that I'm currently out of ideas. If you transfer the files to another computer and test it there (perhaps at a firend), does the same happen?

have you tried validating the files through steam to check for errors in the editor files?
 

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
45
Reaction score
36
First Language
English
Primarily Uses
RMMV
So, I seem to have solved the issue now.

If the game exe is just a specialized browser, then the project itself seems to be fine as it runs without issue through the exe. The problem must either be with my PC or my browsers.

I decided to go ahead and upload a browser version of my game to Itch.io (no encryption), and it runs perfectly fine on the website. There is no crashing, the resources load, and the game is able to save and reload without issue.

So even though I still have no idea what was causing me problems with running the index file, everything else runs smoothly on Itch.io. All the same I am thankful for your help and suggestions.

By the way, I did also follow your suggestion by verifying the files on Steam. It only said it was finished with the process, so I assume that means there were nothing wrong with the files.
 

HiddenAlchemist

Veteran
Veteran
Joined
Jan 6, 2021
Messages
45
Reaction score
36
First Language
English
Primarily Uses
RMMV
That doesn't explain though why it also crashed when I tried opening it in Google Chrome, unless Chrome has the same thing.

I did look through my Firefox configurations to see if WebGL was disabled, and it is in fact enabled.

I think this is just one of those things that I don't think can be answered. I got it to work on Itch.io anyhow, so I'm good with that.
 

MechPen

Veteran
Veteran
Joined
Nov 4, 2018
Messages
45
Reaction score
51
First Language
English
Primarily Uses
RMMV
Chrome has had that setting pretty much from the beginning, which is why the developer blog covers both browsers.
 

Latest Threads

Latest Profile Posts

Only eaten once during breakfast. No lunch
Not that I have any use for them, but Humble Bundle has a new RPG Asset Bundle available for those interested. You can find it here. Happy asset hoarding. :LZSwink:
Tired of just doing mobile. Now you can Play the game in ur Browser! https://bigmala-productions.itch.io/rpg-forever
I managed to fix my car at last... :biggrin:

Forum statistics

Threads
111,282
Messages
1,059,914
Members
144,588
Latest member
nmiyazaki
Top