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

How to Make a 3D PC Game

PC games with 3-D elements simulate the way the human eye sees. They rely on code libraries whose functions transform and display virtual objects in 3-D space. Creating 3-D games for your PC relies on programming that calls on these code libraries, many of which are freely available. Although it's possible to make a 3-D game from scratch by reading tutorials, you can also learn how actual games are made by studying their source code. Making 3-D PC games gives you complete control over the environment, character and other elements of a game.

Instructions

    • 1

      Play an open source game like Scrabble3D or FreeOrion, then download its source code. The site you downloaded the executable game from will have a link for a zip, tar or other archive file holding the game's source files.

    • 2

      Extract the game's individual source files from the downloaded archive file. Read your archiving program's user guide for detailed instructions on extraction.

    • 3

      Open any word processor, then load into it one of the source files you extracted. Pick a file whose name clearly explains what the file's functions do. For example, GameBoardManagement.c or PlayerAttributes.java are good candidates.

    • 4

      Read each line in the source file, including all comments. Comments often appear after a semi-colon, have the syntax and spelling of regular speech and are bracketed by characters like "/* " or "'". Write new source code comments explaining the statements you understand. Repeat this step for the remaining source files.

    • 5

      Compile the 3-D game's source code using a free kit made for the language your game's source code was written in. For example, get the Java development kit for Java games or the GCC compiler for games written in C or C++ code. Read the kit's documentation for detailed instructions on compiling.

    • 6

      Make a change to one of the source's string or numeric constants for a statement you understand. For example, change the 50 to a 100 in the statement "if warrior[i].hasGold then warrior[i].points += 50;".

    • 7

      Compile and run the modified game. If the change you made doesn't work as you expected, note this in the source code comment then change another constant. Making small changes to the source verifies your understanding of the game.


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