Monday, March 30, 2015

Make Your Own Virtual World Game For Free

A virtual world game is one that immerses you in the persona of a virtual person.


A virtual world game, also known as an RPG (role-playing game) and MMORPG (massively multiplayer online RPG), is one that immerses you in a virtual, computer-based persona. Making your own virtual world game potentially includes designing the game, starting with initial sketches and written descriptions. It also involves writing program code to simulate artificial intelligence for the game's opponents and to access routines for rendering the game's graphics and sound. Developing your own virtual world game, besides the satisfaction it yields, will build skill you can apply to other programming projects, such as 3-D modeling or multiuser networking applications.


Instructions


1. Download the source code for NetHack, PlaneShift, Hack and Slash, or another open-source (free) RPG or MMORPG game.


2. Compile the source code into an executable program, referring to the instructions accompanying the source code for details.


3. Run the program and play the game. Take notes on things you like about the game as well as on aspects you'd like to change.


4. Read the documentation that accompanied the game and then open one of the source code files in an integrated development environment (IDE), text editor (such as Notepad) or a word processor.


5. Read each line of the source and write comments under or next to those statements that you understand. For example, for a treasure-gathering game like Dungeons and Dragons you might see code that looks like this:


If (blnPlayer1PicksUpGold) {


Player1LifeUnits = Player1LifeUnits + 20;


}


The comment you might write for such a code block might be "If player 1 collects gold treasure, increase his life energy by 20 units." Repeat this step for the remaining source files.


6. Retype the source code into a new set of files, referring to printouts of the original source files for guidance. This action will force you to read the source carefully. As you understand more program statements during this step, write additional comments for them. Compile and run the retyped game.


7. Delete the source code file that you understand best and then retype it from memory, referring to the original source only as needed. This recitation will urge you to think more deeply about how the code works.


8. Repeat step 7 until you can recite the source code file completely from memory and recompile and play the resulting game.


9. Learn the code for the remaining source code files in the same way as the first file, using steps 7 and 8 to guide you. Completing this step will give you sufficient skill to begin making changes to the game, which is the first step in developing your customization of it.


10. Write the program code that implements one of the superficial items from the list you wrote in step 3. For example, the code that makes a character's eye's blue (e.g. "Player1.EyeColor = BLUE;") might now look like "Player1.EyeColor = GREEN;" to make the eyes green.


11. Recompile the game and play it. Make one or two other superficial changes to the game. After the game compiles and runs successfully, make a more complex change. For example, prevent a treasure-hunting character from gaining points after collecting a particular kind of treasure, such as silver or jewelry.


12. Write the program code for each of the remaking items on step 3's list. If you can still recognize the original game as you play your customized version of it, make a new list with more extensive modifications. This process of progressive design and coding will eventually yield your own, original game.

Tags: source code, code that, program code, this step, virtual world