Hosting a web build with Forge
Publish a Forge web build to its own address, served from Forge's storage on a host of its own: claiming the address, publishing, replacing and taking it down.
A web build can be published to Forge itself: its zip is unpacked into
Forge's storage and served at an address your project claims, such as
https://play.balaurengine.org/my-game/. It works like publishing to
itch.io, except the store is Forge.
Claim an address
Open the project from Projects and go to its Stores tab. The
Web hosting card takes an address: 3 to 40 lowercase letters, digits and
hyphens, not starting or ending with a hyphen. The card shows the full URL
once it is yours. Addresses are first come, first served, and a few that
read as the service's own (admin, www, docs and the like) are
reserved.
Move changes the address. The game you published stays live and answers at the new one; the old one stops answering at once.
Publish
On a build's page, a succeeded web target has Publish to Web hosting.
Confirm, and Forge unpacks the build and switches the address to it. The
switch happens after every file is in place, so a visitor sees the old
version or the new one and never half of each. The version it replaced is
then deleted.
Forge checks the zip on the way in and refuses it, leaving the live version alone, if a path in it leaves its folder, if it is larger than the host allows, or if it has more files than that. The note on the build says which.
What the address is, and is not
- Its own host. Your game never runs on the site you sign in to. Its JavaScript cannot reach your Forge account, and nothing on the hosting host sets or reads a cookie.
- Embeddable. The host sends no header that forbids framing, so the game
can sit in an
<iframe>on your own page. - Plain files. Every file is served as it is, with its type set from its
extension (
.wasmasapplication/wasm). There is no server-side code, and no directory listing. - Shared storage, in path mode. Games at
host/one/andhost/two/share an origin, so they sharelocalStorageand IndexedDB. Prefix your save keys with your game's name.
Take it down
Take down on the Stores tab deletes the files and frees the address. Deleting your account does the same for every game it hosts.
On balaurengine.org
Hosting may be part of a paid plan. When it is, the card says so, and publishing is offered once your account has the plan.