Game File Size

Hi all, I’ve been M.I.A. for a while but had some recent inspiration to come back to my no-code game engine. I was curious, what are your general game file sizes? I’m looking for results from various authoring systems to compare to my own. I expect that the engine I’m making may result in file sizes that are larger than the standard since the end goal is a no-code solution, and so optimizing stuff on the author’s end is kind of impossible. For reference, the JSON file that my engine parses to run the “Cloak of Darkness” game is 16.2kb. This wouldn’t include the size of the game player itself, but that can mostly be ignored since it’s small-ish to begin with and doesn’t change… only the JSON file would scale with the size of the game being made.

So, if you have an old “Cloak of Darkness” game gathering dust in your authoring system file, let me know what its file size is and which system you use. I would greatly appreciate it!

4 Likes

I think it’s pretty hard to make a glulxe game with Inform 7/10 these days that’s smaller than like half a meg, so by that measure I think you’re doing fine!

6 Likes

Awesome, thanks for the insight! “Cloak of Darkness” is quite simple and small, and the way my engine works should, in theory, scale the JSON file (which is what the ‘games’ are saved as) linearly… so a full sized legitimate game would likely end up somewhere in that ballpark (maybe a bit larger). As long as I’m not a factor of 100 (or something like that) larger than the standard, then I’m okay with that :+1:

5 Likes

Just about any text game file counts as “tiny”. It’s graphics and audio resources that balloon up the size requirements.

Well, that’s true. Inform’s library has accumulated a lot of bells and whistles, all of which get compiled in.

6 Likes

I think it really depends on the program you use to make a game. Twine games tend to be between a few hundreds kb to a couple of MBs, increasing with each new passage added (and that’s without the added external assets, or base64 coded passages).

The Chapbook version (Twine) is 136kb. I’d wager it is similar for the other main Twine formats.

6 Likes

Loose Ends is 812k for the JSON game data, 69k for the icons used in the game, and 1.4M for the cover art.

Stormrider is 1.3M for the base64 encoded game data, 1.6M for the art displayed in game, 226k for the cover art, and 2.8M for the feelies.

The takeaway here is that I might be using an excessively high resolution for any image files I make myself…

4 Likes

Inform 7 example: 4.3MB

4 Likes

With the ZILF library in ZIL, I’d say Cloak of Darkness could fit in at under 96kb.

EDIT: About 30kb, or even less. Zork 1 is 83kb, and that’s 2-8 hours.

2 Likes

I’m not in front of my computer right now, but are you sure that’s right? My 90k-word-source-code game is only like 2.3 MB so I’m having a hard time imagining how Cloak of Darkness could be twice that size.

EDIT: I just compiled the code in the Cloak of Darkness example from the Recipe Book (#291); in Inform 10.1 it’s 579k.

4 Likes

Roger Firth’s original ‘Cloak of Darkness’ was written in Inform 6 and this is 50 kB, so if you can get it down to 16.2 kB, you’re doing really well.

As @DeusIrae and @zarf pointed out, for anything written in Inform 7, you can multiply that by a factor of 10. Large Inform 7 file sizes are the norm.

All my Inform 6/PunyInform games are under 100 kB, usually well under, whereas my Adventuron games are mostly under 2 MB, but this includes graphics and the engine itself.

My biggest game is an unpublished Glulx game that’s around 8 MB. This was written in Inform 6, but includes lots of graphics and some sounds. Multimedia is the killer when it comes to file size, especially music and sound effects.

6 Likes

what influence the size isn’t the library, but also the underlying story file format (whose can be from a simple database to an elaborate VM binary. And a 64-bit VM binary occupy much more space than a 16 bit binary, easily demonstrable with inform 6)

And, aside the library code size, some VM, notably z-code, tend to flat the curve of binary increase when other tend to keep a more or less increase of file size, esp. TADS (both 2 and 3), and sometimes the library’s philosophy contribuites to the increase of file size. Case in point: adv3Lite: isn’t “lite” in binary file size, but on different classes to keep track, but the easiness in coding (albeit the reduction in >CONSULT THE LIBRARY MANUAL remains a YMMV case… :wink: ) is at the price of having many class-specific properties and methods directly in Thing, so even creating an object can even increase the story file size more than fleshing that same object later.

But isn’t the file size but the narration what matters in IF: a well-written, compelling IF is the same gem, whether in .z3 story file format or .ulx or .t3, period.

Best regards from Italy,
dott. Piergiorgio.

2 Likes

Actually it is even smaller. A compilation without abbreviations or any other optimizations results in a file at less than 24kB.

4 Likes

Wow, that is incredibly impressive for Zork. My JSON files may be relatively small (16.2kb for COD, scales linearly), but the parser that must ship with the JSON file is quite large by itself, relatively speaking… I’m currently working on an export feature for my engine which will just copy the necessary JS and CSS into an html file, and then download that for the user… I just did this for COD and the entire package is 195kb - and I still have to add a saving and loading feature for game progress, so let’s just call it 200kb. Id expect that a legitimately sized game may run somewhere around 1mb or more. This is a lot for a text adventure (no additional media)… but I guess it’s the price one pays for using a no-code option engine, and at the end of the day, a meg or two is still less than a singular smartphone png image.

2 Likes

This is quite reassuring. But also my engine will not have any additional media… it’s as bare-bones-text as it gets (the way I personally like it). Does the inform version of COD have additional media (images, sound)?

So with my JSON file coupled with the parser that has to ship with it, my overall COD is about 200kb.

2 Likes

Huh, that’s weird. I’m getting the number from here:

Nope. You can play the Inform 7 version here:

1 Like

Ah, I see! That looks like the inform project file, which includes all sorts of extra stuff (like the skein, maybe? I don’t know how the Mac IDE works) - if you compile it I suspect you’ll get a story file closer to the number I posted (and smaller still if you compile to Z-code, I suppose).

Belatedly, the SHTAP game engine can do Cloak of Darkness in 10K of code, but it’s literally just a shell script and provides very little in terms of built-in functionality, so that’s basically cheating.

1 Like

I just realised that there is a version of ‘Cloak of Darkness’ included with PunyInform. This compiles to 27 kB as z3 or 28 kB as z5 without any attempt at optimisations, such as abbreviations.

4 Likes