Making a game into a web port

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
LeafSpinner13
Slime
Posts: 7
Joined: Sun Dec 31, 2023 7:30 am

Making a game into a web port

Post by LeafSpinner13 »

Has anyone made a web port for one of their older games? Or has anyone made a web port for their games in general?

I just want know because I tried to make a web port for one of my games (picnic adventure) and that game was made on a older version of OHRRPGCE (Hróðvitnir) but it took a long time to load when I tried to play it on a browser so I deleted the web port version.

I want to know if it has worked for some game developers.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7732
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Re: Making a game into a web port

Post by Bob the Hamster »

Yes, I have a couple of my games on itch io as web playable.

I think it should work well for older games.

If slow load time was the main problem, maybe we can work on that

* How slow was it? Seconds? Minutes?
* Was it only slow on the initial load? Did it play normal after that?
* What is the filesize of the rpg file?
* Where were you playing it from? A local web server? Did you upload it to itch? Did you put it on some other web server?
* What browsers did you try? Chrome? Firefox? Safari? Edge? Other?
* Did you only test with one computer? Or did you try it with several? Were they all on the same internet connection?
LeafSpinner13
Slime
Posts: 7
Joined: Sun Dec 31, 2023 7:30 am

Re: Making a game into a web port

Post by LeafSpinner13 »

I tested the game on two computers (laptop and desktop) using Edge browser on the same internet. It never started on both computers. I don't remember the file size because I deleted the html versions when it didn't work. I also uploaded it to itch.io and tried to use it but it didn't work. (I deleted that html version too).
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7732
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Re: Making a game into a web port

Post by Bob the Hamster »

The filesize of the rpg file is probably one of the most important pieces of information.

Do you have a lot of music and sound effects imported into the game? There isn't much that can make RPG filesize too big other than music and sound
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7732
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Re: Making a game into a web port

Post by Bob the Hamster »

Oh, wait! You said you were using the Edge browser on both computers when you tested, right?

I have never used Edge, but I think it disables web assembly by default.

Check and see if it has something called "Enhanced Security Mode" or "Strict" mode turned on.

You can also try testing in other browsers
TMC
Metal King Slime
Posts: 4320
Joined: Sun Apr 10, 2011 9:19 am

Re: Making a game into a web port

Post by TMC »

According to caniuse.com only Edge 15, released in 2017, had WebAssembly supported but disabled by default, so that doesn't sound likely to be the problem.

But "it never started" doesn't sound like it was loading too slowly, but it was outright broken. (But was Edge using a lot of CPU, or just idle?) If something is broken, look in your Browser Console (or whatever it's called in your web browser) for error messages.

Also, see whether web ports of other OHR games work.

How old a game is makes no difference to whether it's supported by the web port of the OHRRPGCE. If it runs on the latest desktop version then it's meant to work the same in the web port.
LeafSpinner13
Slime
Posts: 7
Joined: Sun Dec 31, 2023 7:30 am

Re: Making a game into a web port

Post by LeafSpinner13 »

Bob the Hamster wrote: Fri Jun 20, 2025 10:28 am The filesize of the rpg file is probably one of the most important pieces of information.

Do you have a lot of music and sound effects imported into the game? There isn't much that can make RPG filesize too big other than music and sound
I tried re-uploading picnic adventure game to itch.io and it worked but the game still wouldn't load on the edge browser. I also uploaded a game without music and I had the same results with previous game: works in itch.io but not on edge browser. I also tried the chrome browser for picnic adventure but it didn't work. When I tried the firefox browser, it said 'Exception thrown, see JavaScript console' but I haven't use firefox in a while.

At least it works in itch.io.
User avatar
Bob the Hamster
Lord of the Slimes
Posts: 7732
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Re: Making a game into a web port

Post by Bob the Hamster »

Were you trying to open the web port saved on your hard drive and not uploaded anywhere?
TMC
Metal King Slime
Posts: 4320
Joined: Sun Apr 10, 2011 9:19 am

Re: Making a game into a web port

Post by TMC »

Oooh, yes, that's what it sounds like. Unfortunately, you can't do that directly. It used to work until a few years ago, but since then all the web browsers have decided that it's unsafe to allow a .html file that you open on your local drive to read other files on your drive. It's super annoying. So it's not the OHRRPGCE's fault, but what is our fault is not explaining that and telling you how you test your web game without uploading it anywhere.

I believe you can run "chrome --allow-file-access-from-files index.html" from the command line, or from a Windows shortcut, to get Chrome to allow reading local files, where index.html is the file exported from Distribute for Web. At least, that works in an old copy of Chromium for Linux.

I don't know of the equivalent for Edge or Firefox. Otherwise, you need to run a web server on your computer. A web server can be a tiny program, so I actually want to include one with the engine. Until then you'll need to find one. If you have Python installed you can run "python -m http.server" in the directory containing your index.html file.
Post Reply