Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

How to use Butler for HTML games?

A topic by Multiplex Games created Nov 19, 2016 Views: 3,575 Replies: 16
Viewing posts 1 to 3

I have an HTML game that's around 50MB. It takes a while to upload the whole zip files when updating the game so I installed butler.

However I didn't really understand how does it work for HTML games. Is butler only good for downloadable games ?

Uh nevermind, it's already there in the butler manual, albeit a little bit obscure

Tagging a channel as 'HTML5 / Playable in browser' needs to be done from the itch.io Edit game page, once the first build is pushed. The page also needs to be set to 'HTML' rather than the default 'Downloadable'.

Hey, glad you found the relevant docs section :) Do you have any pointers on how to make it less obscure? We certainly want people to find out how to do it easily!

(2 edits) (+2)

Actually yes :)

On this page https://itch.io/docs/butler/pushing.html

Just under "Channel names" headline, another headline "HTML / Playable in browser Games" should do the trick. Also adding this headline to the contents column on the left, under "Pushing builds" could make it even more visible.

(+3)

Done! Changes will propagate in a bit, since the docs are cached by our servers.

(+1)

Wow! I'm totally impressed with the reaction speed 8D

Sorry, I still don't get it. How do I push a patch for html5 game if there's no channel? butler won't do that.

(+1)

So, you always have to specify a channel when pushing with butler, like so:

butler push folder user/game:channel

If your game was previously uploaded via the website, you'll just need to upload it once with butler with a channel name of your choice (that contains 'html5'), delete the old one, and mark the new one as "This file will be played in the browser", and you're all good to go!

The next time you want to upload an upgrade, use the same channel name you just created, and it will update the embed, and distribute patches to itch.io app users. Hope that clarifies things!

(+1)

Yes, thanks you, that makes a lot of sense. 

(1 edit)
(that contains 'html5')

I was under the impression you could tag any channel for that, does it really require html5 to be within the channel's name?

You can pick any upload to be played in the browser, regardless of the channel's name.

Channel names only matter for the first push - since it determines what platforms the new upload is going to be tagged with. That can always be changed in the Edit game page, though!

Hey! I know this is an old post but I just started trying the same thing, use butler to update an HTML game. I'm still lost, what exactly is a "channel"?

As Amos showed above:

butler push folder user/game:channel

A channel is just a name for you to use to distinguish between different files offered on a game. So for example, I always upload a ZIP file for Windows, for Mac OS, and for Linux. So I use channels named "windows", "macos", and "linux" to keep track of which one is which.

Gotcha, but I'm still confused. Where do these channel names come from? The docs say "Tagging a channel as 'HTML5 / Playable in browser' needs to be done from the itch.io Edit game page, once the first build is published", but in the edit game page there's nothing like "channels".

Is there any "butler for dummies" tutorial out there? I really have a lot of questions and I can't find any well-explained resource. :(

(+1)

You make up whatever names you want when using butler. Once you have pushed the first build with butler, they will show up on the edit page for a game.

Ask away, and I will answer what I can. I can also look into getting Amos / Leafo to look into changing the wording of the docs to be a little easier to understand if I can think of a better way to word it.

(+2)

Awesome, thanks a lot. I gave it a try and finally got it to work. It's way faster than uploading a zip from the edit page, so that's a good thing.

I figured out the answer to some of my questions, which I write here below for what is worth for any beginner:

  • First of all, what to upload: the traditional publishing process for HTML games on itch involves:
    • Zipping the entire directory containing the game
    • Go to the edit game page.
    • Delete the old zip you had published (if any).
    • Upload the new zip.
    • Go grab a coffee,  walk the dog and watch The Godfather trilogy while you wait.
    • Check the "This file will be played in the browser" field and test your game.
  • However (and this is what the docs don't mention), with butler you don't upload the zip but the directory; no need to create a zip, delete old versions, waiting for hours or reconfiguring the new version. BTW I created I batch file beneath my game directory with the push command, so when I want to upload a new version I just double click it and wait (much much less than before).
  • The mystery of "channel names": It would be great if the docs mentioned what this is. They just say "The name of a channel has meaning..." ok but what are they? It would be worth to mention they're like arbitrary tags set from butler, and a small example of how they look. For instance, in my case, doing something like "butler push gamefiles edu/beginning:html5" where  "gamefiles" is the directory that contains the index.html file and "html5" is my "channel name", once butler is done you'll find something like this in the edit game page.

The image is necessary in the docs because this is something you never see before using butler, so it's hard to understand.

  • Once butler is done, a message appears in the console indicating "Build is now processing, should be up in a bit (see 'butler status')" but I couldn't find anything in the docs about the status option. I just figured out I had to use almost the same syntax as "push" to see the status of my upload (butler status user/game:channel).
  • The only strange thing I found was when I actually tried to run the game after uploading it with butler. I went to my game page and pressed the "Run Game" button. Unlike other situations, when a loading bar appears with the message "loading game for the first time", it just printed a dark grey screen with black text (almost unnoticeable): "AccessDeinedAccess denied. Anonymous caller does not have storage.objects.get access to itchio/html/[a_number_here]/index.html". I have no idea why this happened, but it got fixed after I uploaded my old zip again, set it as executable, saved the game, then changed the executable again to the one pushed with butler and saved the game again. WEIRD.

Even in my usage of butler, I've actually never seen an image like that while editing a game. o.O Perhaps because I haven't done web uploads with it? To be honest I find your confusion with the channel names mystifying because it was obvious to me, but if one person has difficulty with it, there's likely to be more, so I agree the docs should be modified.

As for the error you encountered, you really should point that out to the Itch.io team because that's probably something they need to look into. Glad it's fixed for you now though. ^^

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