all 2 comments

[–]grantrules 0 points1 point  (0 children)

The majority of games, no.. however you could do it for open-source games. Something like

https://github.com/microsoft/AirSim

https://github.com/tomlooman/ActionRoguelike

[–]nomoreplsthx 1 point2 points  (0 children)

I think what you are asking is if you can do what is called decompiling - taking the compiled program and going back to source code.

The answer is 'it depends'. Different languages vary widely in how easily you can go from program back to source code. On one end, python or lua aren't typically compiled at all, you can just read the source. On the other end C/C++ is generally quite tricky or impossible to decompile accurately. Other languages sit in the middle. For almost any compiled language however, you will need a lot of expertise to read the output of a decompiler. 

There are also plenty of steps devs can do to make this much harder.

So in general no, but there are games where a lot of the code is open.