Instructions
Download the source code for an open-source online multiplayer game like AssaultCube or BZFlag. The source code is the set of text files that contain the instructions telling the game how to run. It will be on the same site as the game's executable file.
Read the documentation that came with the source code. The documentation specifies the programming language the game's developers used to write the game's source code.
Install a free development kit for the programming language. Oracle provides a kit for Java development, and Open Watcom provides one for C and C++ development.
Read, in a word processor, each source code file of the game. This will begin to show you how the game works. You won't understand most of the statements, but those you do understand will provide a foothold for learning the rest of the code. In particular, read the comments, which are non-executable statements explaining what a section of code does. These will appear within text portions like this: "/* This is a comment */."
Memorize chunks of code such as complete source files. Memorization promotes understanding, as neuroscience professor Dr. Bill Klemm of Texas A&M university has said. Memorize with flash cards, or any technique you've used to learn another subject, such as vocabulary terms for a foreign language.
Step through the code using your development kit's debugger. Read the kit's documentation for detailed instructions on using this tool. Stepping through code means executing instructions one at a time. This process shows exactly how the game's variables and statements work. Repeat this step until you understand the purpose of either each variable or each statement in the program.
Delete portions of code, then recompile the program and note the exact effects on game play that your deletion caused. For example, if you notice that a character's right leg is missing after deleting a particular function, write in a journal that the function you deleted was essential to simulating the character's right leg.
Look for and change any constant or text string in one of the game's source files. For example, change the five to three for the hypothetical statement "LivesPerCharacter=5;". This step introduces you to programming the game. Repeat the step for each string and numerical constant in the game.
Write the source code that affects the non-constant variables in the game. For example, change a character's appearance, or the environment the game is set in. The knowledge you gained from studying the game in steps five through seven will enable you to write this source code.
Repeat the previous step until you can't recognize the original game any longer. When this happens, you'll have completed your own online multiplayer game.