How does optimization work from a programmer's perspective?

I know game health is always a priority for the devs, so my question is how does it work? When programming a multiplayer game, when there are plenty of events happening at the same time and connected to five (sometimes six) different systems, how does the game provide things like good frame rate and connection? Just out of curiosity, because game development was always appealing to me :)

Tagged: Mod

Comments

  • That's probably a question for a Q&A Stream tbh - not something that we can easily answer here.

  • @Mandy said:

    That's probably a question for a Q&A Stream tbh - not something that we can easily answer here.

    Well, the question isn't directed at the devs specifically, though it would be nice to hear from them. I was hoping maybe someone from this community had some form of an answer, even if it's just speculation or theory.

  • @[Deleted User] said:

    I don't have much knowledge outside of maybe a few game developing groups in college (where I was mostly doing artwork and some minor coding), but generally it has to do with simplification and proper use of data structures.

    A 100MB image being converted to a lower resolution (revised at that resolution) is easier to render.

    Condensing multiple states into one or two can help with sending/receiving data (do I need to know that I'm hemorrhaging from sloppy butcher or Echoes, or just that I'm Hemorrhaging?). As well as using the smallest data types possible that still hold the same information. Sending a double 0/1 (32 bits) is more data than is needed for something like a boolean (1 bit). Using proper data structures and searches that allow for more efficient lookups, such as binary search on an array rather than simple traversal, using a Hashmap where possible for average O(1) lookup.

    And then there's the rendering engine which is dark magicks, I have no idea about this stuff, but presumably improving data structures in there is probably a good idea, or making things that are specific to your needs (though likely already very efficient, and if it's 3rd party probably can't be touched).

    All of which is time intensive though, so it's not like you can just go "Whee, I've improved the framerates by 30%!", unless for some reason you stumble upon some really, really shoddy work that can be quickly fixed.

    Though take all this with a grain of salt, it's been a while since I've done a lot of coding, and I really never touched network stuff. Mostly doing QA now.

    So it's all about resource management it seems. Or the simple explanation? That's my takeaway. But I kinda get it. Thanks for the reply!