There's a game I really like that I've been playing a lot recently. I bought it on Steam. (I'm not going to name the game, because the developers might browse HN, and at that point it's a worse way to contact them than just emailing them directly).
The reason I'm asking HN is because I don't know whether it's rude to ask a game company to open-source their game, or if perhaps it could be seen as a threat to their IP somehow. I don't want to make a bad first impression and ruin the chances of them releasing it, or just have them dislike me. I've read posts on reddit.com/r/gamedev that imply game developers often get people asking for their source code often, and that it's considered rude.
There are multiple reasons I want the game to be open source, but one reason is because I want to attempt to optimize it. It's a 2D pixel art game, but despite being visually simple, my computer lags when too many sprites are on screen, and the game always consumes a lot of memory. My computer has played games with more complex graphics while consuming less memory and lagging less; I'm certain the game's performance isn't close to optimal right now. So, I'd like to try optimizing it myself and see if I can change their code to make it run better. It seems like it was programmed in C++ with a few helper libraries, rather than a game engine like Unity, so it seems feasible.
The game was released almost a decade ago, but I'm pretty sure they're still profiting off of it, so it seems like it could go either way. I'm prepared for them to say no even if asking itself isn't considered rude.
There is a good precedent for "open code but closed license," with Barotrauma being one of the most successful examples. Just dropping your engine code is not going to get a game copycatted and hacked instantly. Barotrauma is even a multiplayer game with public lobbies!
At the same time, getting your code to a state where one can open source it is not trivial for various reasons.
Another alternative is to do what countless modders have done: Hack into the compiled code yourself and try to optimize it. This is above my paygrade, but its done more frequently than one would think.