Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

html game not loading

A topic by thebigswede created Jun 17, 2023 Views: 756 Replies: 3
Viewing posts 1 to 3
(1 edit)

I am trying to publish my game https://thebigswede.itch.io/earth-defense-force-nasa which I created using the three.js library. I packaged my application using vite build to create a standalone folder containing all the game assets and dependencies, which I then compressed and uploaded to the game page.

However, when the game loads the only thing that appears is a grey screen. Inspecting the page shows that the js and css files failed to load with the error code "Failed to load resource: the server responded with a status of 403 ()"

Moderator

Please double-check the game link, it points to a non-existent GitHub page instead.

Thanks for the heads up. The link is fixed.

(+1)

The issue has been resolved. The issue was caused by Vite, which is configured by default to change the path to find the javascript and css files to a static path instead of a relative one. Changing the build settings to produce relative paths instead fixes the issue.

This topic has been auto-archived and can no longer be posted in because there haven't been any posts in a while.