Impressive the sheer increase of size since the passage from pure text to multimedia. or, is simply that Impdom is incompatible with graphic/sound format optimisers ?
(no polemics, please: actually I don’t have time to dig into story files’s resources for satisfying the mere intellectual curiosity above…
Very interesting! The 2018 comp had 77 entries, the 2019 comp had 82, and now 2020 has 104. Yet the total size more than doubled from 2018 to 2019, and doubled again from 2019 to 2020.
The filesize limits were raised, so it’s possible people were able to plan for larger games. In 2018 I think it was limited to 25 MB. Last year it was 75 MB and I think it was raised again recently.
Javascript doesn’t take up much space. My game engine is just over 3000 lines and isn’t minimized and it only takes up 82kb. A “hello world” twine game is about 1mb.
So yeah, it’s probably just a ton of multimedia.
It’s not going to be as small as something byte compiled, no… But like I said, a twine game with only “hello world” sits at 1mb. But that’s all of the overhead there is. The Twine engine and jquery and react libraries won’t grow larger as your game does.
IIRC, twine just dumps your text straight into the HTML file too, so it’s not like it has odd JSON overhead either (which my own engine admittedly does, causing the compiled script to be slightly larger than the original text).
I’m not sure where the 1 MB number is coming from. A hello world story in Harlowe 3 or Snowman 2 is 315K, 492K in SugarCube 2, and 135K in Chapbook. To get even more pedantic, I don’t believe any of these include React.
I think what mother’s referring to is that a published Twine 2 story contains the metadata needed to import it back into the editor, like passage positions, which was an intentional decision. So there is for sure an overhead there.
Wow. It sounds like you’ve put in quite a lot of work to keep the size down. Much more work than I’d be willing to put in. o.o
Are the benefits worth the effort for you? I’m all for optimization, but when it’s only saving a few megs that your PC or phone will load in a second, I just kind of… don’t care? Maybe that makes me a bad person.
Using AXMA, my compiled index.html file is 2.9 MB. I have somewhere in the realm of 800 passages in my game, one large static background image, and probably about 20 short sound clips embedded in the HTML.
The regular version of my game with the external graphics (not too bad) and music (lots!) when zipped makes a distribution file of 96.4 MB.
However, I was still in the mindset that the limit this year was going to be 75 MB. (I’ve seriously been doing test uploads since they opened the site in June when 75 MB was still set as the limit.) So I created a “small release” version of all the music with slightly-reduced bitrates. This took the IFComp release down to 61.3 MB.
Turns out in hindsight I didn’t need to do this, but it makes the game assets load a bit faster online. The full version is up on itch.io, and the only difference is the music has a bit more bass if you have good headphones or speakers.
I don’t have a full game to compare with, but that Monster demo of mine is somewhere around 1250 - 1500 lines of story script (I have it split up into 12 separate files now and I’m too lazy to get a real count), 370 of JS, 90 of HTML, and 400 of CSS. The total file size after compiling is 201kb, plus 340kb of fonts and icons.
Not that that means anything. I just wanted to share too.
ops. really old custom of mine, harking back to 1980s and early Ultima RPGs… z key for ztat (stat) the custom of using ztat instead of stat when dealing with gaming-related statistics (as is the case here, indeed) stuck…
now an interesting cognate question: there’s people whose actually write xamine instead of examine ?
Actually, I 'fess up that I have even given compass-relative directions IRL: turn north there instead of turn left, and so on… but everyone known that I’m a Naval historian, often using Navalese: “vira” (steer) instead of “gira” (turn), and these IF lapses don’t give me much undue embarassment.