Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
0

Confused about uploading game/playing in browser

A topic by Nebulosus created Feb 20, 2019 Views: 6,481 Replies: 16
Viewing posts 1 to 5

Hello all,

I created a game via Unity and I initially exported it as a WebGL game, but the lighting doesn't look anywhere near as good as my original game. I exported it as a standalone game, which runs via an exe. Is there any way to upload that so it would work in the browser? I know it's supposed to have an index.html file in it, but this export doesn't have that. I even tried simply uploading it and changing the option to downloadable, rather than play in browser, but visiting my page after save says that the game is unavailable. Does anyone have advice, or even another way of exporting it? I am super new to this, thanks for bearing with me.

Moderator

There's no way to play an .exe in the browser. But on Itch.io any HTML game can also have downloads. Solution: export your game both ways. Upload both versions. Mark the WebGL one as a file to be played in the browser. People will be able to download the other one too, if they prefer.

Okay cool, I will just do that then, thank you!!

It says after I upload the .zip file that it can't find the index.html file. I added a file called that exactly in the .zip file but it still says it can't find the index.html file. I am extremely confused and believe that I am just making the index.html file wrong and just don't know how do it. I made my game in Clickteam Fusion 2.5 Free Edition so the html file was the only way I could build the game.  I'm a noob to coding in html and don't know that. Any advice would be extremely helpful.(I posted it in here because it was the  closest  thing I could find for a problem like this.)

Moderator

What files does Clickteam Fusion export?

(2 edits)

It's called HTML5, I haven't looked into it specifically 

Moderator

I figured as much. What's the exact list of files it exports for your game?

(1 edit)

The .zip file? I'll put it up later when I get home

Moderator

So it exports a .zip file? Look inside and see what you can find.

(1 edit)

It wasn't previously a .zip file but I had compressed it during my troubleshooting. This is what the original file contained. The html file opens it in the browser and the folder "src" contains a JavaScript file called "Runtime". The file does work if you open it in the file itself.

Moderator

There's your problem. It's supposed to be a .zip like that, but the file called "Stickman Standoff.html" should be called "index.html" instead. Only needs to be that way in the .zip file you upload.

So should I rename the file or what should I do?

Moderator

That's right! Rename the file inside the .zip archive (or before you create the archive).

I'm might try putting the compressed file up as download and see if that would work

Sorry for necro-ing this (it's still near the top of the tips forum and I ran into the exact same issue and it almost drove me mad):

The reason your lighting (or anyone else running into this) looks so different is because of the exported quality settings for WebGL builds. You can fix it by using deferred lighting, which makes lights much more efficient (but can't be used with an orthographic camera or for certain lighting effects), or by bumping up the number of pixel lights allowed in the player quality settings:

https://forum.unity.com/attachments/qualitysettings-png.203841/

Pixel lights are pretty expensive on performance, but so long as you aren't pushing the boundaries anywhere else you should be okay (I would try deferred lighting first though). I bumped up the pixel light count for my game Archipelago (up to 12, I think) and it looks pretty close to how it did in the editor: https://gedig.itch.io/archipelago