Hobbies And Interests
Home  >> Games & Cards >> Games

How to Make a 3D Online Multiplayer Game

Three-dimensional online multiplayer games bring together many different kinds of programs and programming procedures. These procedures include artificial intelligence for games, networking to communicate over the Web, and geometrical functions for transforming and viewing virtual structures in 3-D space. Programming such a project from the ground up would naturally be a daunting undertaking, but you can get assistance by studying existing games. Making your own 3-D online multiplayer game builds skills in many types of programming, which you can then apply to nongaming projects.

Instructions

    • 1

      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.

    • 2

      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.

    • 3

      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.

    • 4

      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 */."

    • 5

      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.

    • 6

      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.

    • 7

      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.

    • 8

      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.

    • 9

      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.

    • 10

      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.


https://www.htfbw.com © Hobbies And Interests