sparr: (Default)
I want a particular computer game to exist and be played by enough people that finding people to play and games to join is easy. The genre of this game does not have a name, and you've probably never heard of any games like it. Some example games in the genre are Atlantis (https://en.wikipedia.org/wiki/Atlantis_PbeM), Olympia (https://www.pbm.com/oly/), Eressea (https://www.eressea.de/), Lorenai (https://sourceforge.net/projects/lorenai/), and my personal favorite Overlord (http://atrey.karlin.mff.cuni.cz/~shade/academy/). They are very niche, with a peak player base across the whole genre of perhaps 1000 people 10-20 years ago; recently a new game of Atlantis started up, the first in a few years, and players were excited to find a few dozen others across the whole community. A key term in searching for them is "PBEM", which stands for "Play By EMail", but that is a generic term that also includes a thousand other games played via email from chess to diplomacy to mafia/werewolf to thematic role playing games.
 
A rough outline of the genre is as follows.
 
There is a fictional world, often inspired by fantasy tropes. The world is laid out on some sort of grid map, with locations on the grid having properties such as terrain, weather, population, animal and plant growth, towns and cities, and perhaps less common things like magical effects. Some grid locations might contain natural or artificial additional smaller nested locations, such as towns and cities, buildings, caves, etc, which connect to each other in ways other than the typical compass directions of the main world map. Minor activity happens in the world outside of players' control, such as economic changes, city development, monster and animal migrations, and similar things, but most major events are driven by the players.
 
In this world each player of the game controls a faction or nation or other grouping of individuals sharing some loyalty or purpose. The player has full knowledge of everything the members of their faction can see, and controls the actions of those members by giving them instructions about what to do.
 
The game operates in discrete time units, often conceptualized as months, sometimes as days. On a regular real-world schedule each player finds out what happened in the world during the previous game-world time that has passed and has the opportunity to submit new instructions at their leisure. A common configuration is for 30 game days or one game month to pass for every real world week, with players experiencing the game in discrete 30-day chunks. To be specific, submitting instructions on Monday or Friday has the exact same effect on the month of game time that is about to be processed.
 
The player's faction is often divided into logical groupings of people and items, which can be treated as single recipients of new instructions and single sources of new information. There are various ways to handle this, with different restrictions on the total number of different units of people that can be controlled at once, and how they might be structured.
 
Here is an example taken from a game I am currently playing. Below is an excerpt from a game report which I receive every two days and represents one game month of time passing. This excerpt focuses on a single unit:
 
Scout (1234): Rides from swamp (15,11) in Linsstu'ist to mountain (14,12) in Wenhin.
Scout (1234): Rides from mountain (14,12) in Wenhin to mountain (13,11) in Wenhin.
Scout (1234): Claims 10 silver for maintenance.
mountain (13,11) in Wenhin, contains Tranlastan [city], 17154 peasants
  (humans), $17497.
  Wages: $15.1 (Max: $3499).
  Wanted: 116 grain [GRAI] at $27, 178 livestock [LIVE] at $23, 198
    fish [FISH] at $24, 30 leather armor [LARM] at $67, 52 wine [WINE]
    at $287, 32 perfume [PERF] at $290.
  For Sale: 38 vodka [VODK] at $76, 25 gems [GEM] at $130, 686 humans
    [MAN] at $48, 137 leaders [LEAD] at $845.
  Entertainment available: $1046.
  Products: 35 grain [GRAI], 22 iron [IRON], 10 stone [STON].
Exits:
  North : ocean (13,09) in Atlantis Ocean.
  Northeast : ocean (14,10) in Atlantis Ocean.
  Southeast : mountain (14,12) in Wenhin.
  South : ocean (13,13) in Atlantis Ocean.
  Southwest : mountain (12,12) in Wenhin.
  Northwest : mountain (12,10) in Wenhin.
- City Guard (48), on guard, The Guardsmen (1), 120 leaders [LEAD],
  120 swords [SWOR].
* Scout (1234), Sparr (11), avoiding, behind, sharing, consuming
  faction's food, won't cross water, high elf [HELF], horse [HORS].
  Weight: 60. Capacity: 0/70/85/0. Skills: stealth [STEA] 2 (90).
- Unit (678), centaur [CTAU].
 
I have focused here on unit #1234 whose name is Scout. This is a unit under my control. In the previous turn I told it to move a couple of times, which it has done, ending the previous month in the described region which contains a city. The unit is composed of a single person, of the race high elf which has some effect on what skills they can learn to advanced levels later. The unit has a single horse, and ignoring some arithmetic could travel while carrying 10 weight units of cargo at riding speed or 25 units at walking speed. The unit has previously studied (under a teacher, as it happens, but that's not evident here) the stealth skill, which makes the unit harder for other factions to see and get information about, and also gives this unit the ability to attempt to steal or perform assassinations. Also I have a small amount of money available to any unit of my faction anywhere in the world, without them needing to carry it with them and I am currently spending 10 silver per month from that fund to keep this scout alive. My next wave of scouts are better trained in earning their own keep while they travel, but this one represents the earliest wave of scouts I sent out into the world.
 
Also shown are details about the region. In this game, the city itself isn't physically represented, it just describes a very high level of economic activity throughout the described region. Every region has some amount of wages that can be earned by working units, taxes that an army could collect, entertainment value that a performer or magician could earn from the population, and a few other aspects. Most regions have some resources that can be purchased and some that can be produced with the right skill. All of this is detailed here, and some of it might change over time depending on how I and other players interact with the region, and also on some background economic changes that the game itself implements.
 
There are also a couple of other units present. The city has a force of guards which are controlled by the game engine, and whose job is to prevent fighting or pillaging in the city, among a few other things. Finally there is a lone centaur controlled by some other faction that I cannot see any other information about.
 
Now I have a few days to talk to other players and consider my options, then I will send in a new set of orders telling this unit (and all of my others) what to do for the next month of their life. This particular unit has a future as a courier, carrying items and money from place to place, for which stealth and a horse (or, later, a flying horse or airship) are key.
 
I had intended to actually write about the game I want to build, but this explanation of the genre and the example have already run longer than expected. Next time I write about this, I will start to describe what I want to do differently than the previous games, in terms of interface and features and game mechanics. Stay tuned!
sparr: (Default)
TL;DR: Valve could save the world about two petabytes of storage just by deduplicating the contents of their localization/translation files, and it gets worse from there.

I've recently become annoyed as I realize just how bloated many modern games have become. This was a moderate problem 5-10 years ago, but it has gotten completely out of control since then. As I was making a short list of games I've recently considered installing but skipped due to their size (4GB for a top-down low-poly low-texture platformer? 30GB for a RTS? 83GB for a MMORPG?) I found myself installing a 117MB update for Steam itself. In the software-bloat mindset, this prompted an immediate "wait, what?", leading to the writing of this post.

First, I headed over to `/Applications/Steam.app` (yes, I am on a Mac, but [almost?] everything below is platform-agnostic except for the paths). Here we have a total of 4.6MB, comprised of 3.3MB for the binary, 1.1MB for a crash reporting library, and 0.3MB for translations. I'm not going deeper into the binary or library; let's say those are reasonably sized and necessary/useful. That brings us to the translations. Translations are great! I'm definitely not saying they shouldn't be there, or that they should be less thorough. However, I'm going to be specific about this problem, because it becomes more important later. The English strings appear number_of_languages times; Do we really need 26 copies of every string to be translated, including:

%appname% has changed where it stores game content from '~/Documents/Steam Content' to '~/Library/Application Support/Steam/SteamApps'. You have game files in the original location, and Steam was not able to move the files because files already exist at the new location. You may need to move the files manually, or delete the old files and download your games again. Continue anyway?


The labels for the strings appear number_of_languages*2-1 times, making 51 copies of "SteamBootstrapper_InsufficientDiskSpace". Finally, "[english]" appears a whopping 900 times, once for every string in every non-english language. A simple .tar.gz of this folder cuts the size by 92%. Assuming there's some good reason the files aren't compressed, the content could still be deduplicated and the necessary duplication handled in whatever code loads them, which might be an 60% reduction in size. I am hopeful that all of this was compressed when downloading, but that doesn't solve the problem of it wasting space on disk, which gets more important later.

Next, I went to `~/Library/Application Support/Steam/`. I realized there's a lot of user-specific stuff in there, so I created a new user to launch Steam once and get a clean slate. 202MB of downloads leading to 757MB of disk space used. I will mention here that installing apps and games for just one user, and requiring the installation effort and disk space to be duplicated for a second user, is a terrible paradigm when it's not explicit and intentional, but that's a different rant for a different post. Let's dive into that 757MB, and I'll skip any parts that I have no objections to.

168MB for `Steam/Steam.AppBundle/Steam/Contents/MacOS/package/` which contains a bunch of archives that *seem* to match up to extracted content in the other directories. Does `package/tenfoot_fonts_all.zip.vz.SOMEHASH` contain a copy of `tenfoot/resource/fonts/*`? If the Steam client can use these files to repair itself in case of damaged or lost files, that's great. If it can't, then why are they still there?

147MB for Chromium Embedded Framework. I can't blame Valve here; the fault for not sharing libraries like this with other applications and keeping them in a central place falls on the shoulders of Apple and Microsoft and the environments they have developed. I am potentially giving Google or Apple a bit of side eye here for 14MB of translations, 200-500kB per language, depending on who is to blame for the contents of the *.lproj/locale.pak files, and how much space is wasted in there.

137MB for the tenfoot (Big Picture) interface:

63MB for `tenfoot/images/` on which I just deleted 500 words of detail here upon realizing I hadn't covered even 10% of it. TGAs that should be PNGs, PNGs that should be JPEGs, including some that appear to already have JPEG artifacts, PNGs that should be vector graphics, and so on.

31MB for `tenfoot/localization/` which has the same data duplication problems as from Steam.app, writ large. 177856 copies of "[english]" and 26 copies of:

Intended to be used with a dual-stage trigger setup, Hip Fire allows a quick pull of the trigger to engage the click without engaging the threshold. A slower pull or hover will engage the threshold action. This allows for actions such as iron-sights to be set on the threshold and fire on the click, while still allowing a quick pull to click to fire without entering iron-sights. Additionally, once the click has been hit, the threshold won't be engaged until the trigger has been released outside of the threshold range, allowing it to be primed for additional clicks. Relaxed Hip Fire mode is a larger window before engaging the threshold, allowing a slower pull of the trigger to avoid it. This means the Threshold action will be slightly less responsive when intentionally trying to engage.


11MB for `tenfoot/sounds/`, most of which is ambient background MP3, but also a bunch of WAV sound effects despite the evidenced support for MP3s.

That's all for Big Picture, back to top level Steam contents.

36MB for translations in `public/`, again with all the duplication in the previously mentioned translation/localization files.

20MB for 'graphics/' which is full of TGA files that should be PNGs and/or procedurally generated, most notably the 4.2MB music_details_mask.tga that is just a checkerboard on top of a radial gradient, and clienttexture*.tga which are just gradients on a flat background.

The rest of the smaller directories contain many more examples of poor image format selection, duplicated translated strings, etc, which I won't further enumerate here. If Valve ever decides to address the problems above, they will probably solve the smaller instances of the same problems as a side effect.

Having gotten this far, my original "wait, what?" actually still remains unanswered. Almost everything I've just described seems mostly static, images and sounds and text files and third party libraries. The binaries and first party libraries are actually pretty small. I can't point to 117MB worth of content that I expect to have changed in the update today, let alone the ~300MB that I would expect from the compression ratio evident in the original client download. http://store.steampowered.com/news/38412/ has the changelog, where I see a lot of what should be code/library/driver changes, none of which touches on all the pieces of the client that seem to take up tens to hundreds of MB of space each. Maybe I'll find some insight into the update size. Maybe I'll go do this same teardown on those three games, or at least two seeing as how I don't even have 83GB of free disk space right now.

Profile

sparr: (Default)
Clarence "Sparr" Risher

February 2025

S M T W T F S
      1
2345678
9101112131415
16 171819202122
232425262728 

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 22nd, 2025 06:42 am
Powered by Dreamwidth Studios