Games that are updated in course of their lifetime (through online updates), grow in size and I can understand that new textures, sounds and other stuff takes up space. What I'm interested in is - what if an update featured only code cleanup, a lot of old unused features and code were removed.

Does that mean the update would make the game client smaller in size?

I have general programming knowledge, but never had experience with developing game clients.

  • 1
    \$\begingroup\$ I'm voting to close this question as off-topic because it's not about an issue encountered while developing a game. \$\endgroup\$ – Vaillancourt Apr 3 '19 at 14:08
  • \$\begingroup\$ Developers will never clean up the game for the sake of cleaning up the game, as this is high-risk-vs-low-befefit. If they do that, it is because there are future planned updates that will eventually make the client grow again. \$\endgroup\$ – Vaillancourt Apr 3 '19 at 14:39
  • \$\begingroup\$ Sorry for off-topic, I've miss-read help center where it talked about architecture, game-related-APIs, tools as on-topic and missed the part where you must develop a game to ask a question (It seems here, designing architecture doesn't count as development, sorry again). \$\endgroup\$ – Gadge Apr 3 '19 at 16:42
  • \$\begingroup\$ No worries :) Designing architecture is development and is on-topic here. But the question here is not about an issue when designing a game; it's hypothetical, it's more discussion oriented and could be answered by yes or no. All of this makes it not a good fit for the model we have here. If you foresee this as an issue, you might want to rephrase it and make it something we could help you with. GDnet is a forum where such discussions are more welcome, or you could discuss this in the Game Development Chat, where anything goes (not that I want to turn you away from the site). \$\endgroup\$ – Vaillancourt Apr 3 '19 at 17:38

Yes this is possible. Less code can mean the executable shrinks.

Compiled code is generally pretty compact, so a non-trivial amount of code would need to be removed for the difference to be noticeable.

Refactoring or simplifying code has a tendancy to involve removal and this will cause the executable to shrink a bit. This can happen in an update to the game systems. An entire mechanic could be found to be broken and is subsequently removed from the game. Although a lot of game logic is handled by a server, some clients will run a large subset of the same code for prediction purposes, so a removal of that server code would mean a removal of client code as well.

Another more practical possibility is replacing a dependency. For instance, someone might use one or more parts of the boost library at first but later find a better replacement for the features they were using. Another example would be switching serialization libraries for performance reasons, but the new one they choose happens to have a smaller binary size.

| improve this answer | |

There is code in the client to handle actions that the player performs and code for displaying the world (among other things). If those change, the client size will change (either grow or shrink depending on behavior added/removed).
Much of the game code is on the server however, and doesn't directly affect client.

Unless new game mechanics are implemented that either affect how the game plays or the world renders, I imagine most games' client code stays the same between updates

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.