4 ms·
This is very true. I created an open source framework to help developers build scalable real-time systems and I tried to focus on multiplayer games at one point
by cryptica 7y ago
This is very true.
I created an open source framework to help developers build scalable real-time systems and I tried to focus on multiplayer games at one point; I thought it would be a good idea to ride the wave of web-based multiplayer .io games by targeting those developers but I ended up realizing that they're better off just using raw WebSockets. My framework could only help in terms of producing the initial prototype.
The profit margins on ad-sponsored web-based multiplayer games are paper thin. They don't care about code structure or cleanliness at all. If someone can make fugly code that performs 10% better, that can make the difference between a profit or a loss or it can mean doubling profits/earnings from the game.
This is very different from most software businesses where even a solution that performs 10x worse is still acceptable if it makes for cleaner code that is easier to maintain and can handle changing requirements better.
Micro-optimizations and clean code are mutually exclusive IMO. Like for example, people may be tempted to send JSON objects with nice descriptive properties like 'direction', 'keyCode', etc... But in the end it's faster to just send a raw string or binary packet without any property names; just pass raw integers directly in a certain order and the receiver decodes the message assuming a certain order. This is extremely inflexible at the protocol level but it performs really well (I.e. you can't easily add new properties later or make some of them optional without breaking the current protocol).