How does source code turn into PC games?

2.15K views

I understand that game developers type thousands of lines of code for a single game such as any version of a game anyone of us plays every day. How could their source code stored in many files of the game can be executed through a single application and I can play the game itself? What is their code’s journey to our PCs?

In: Technology

9 Answers

Anonymous 0 Comments

A program called a “compiler” takes the source code and translates that to machine code…binary codes that the computer hardware actually understands. This includes pulling in other files of code, references, etc. The output of that process is an executable program for a particular hardware and OS. So the binary file will be different for an Mac or a PC or PS4.

You download that program, as well as all the “game assets” to support it (graphics, textures, maps, data, etc.). The assets are usually a lot more of the size of the game than the program.

When you go to run the program, the operating system copies the first part of the program into RAM (random access memory) then looks at the first entry and does whatever it says. And now you’re running the game.

You are viewing 1 out of 9 answers, click here to view all answers.