Visual Basic (VB) is a programming language and development environment that Microsoft made to simplify programming for their Windows operating system. Among Visual Basic's tool set are functions for creating and manipulating virtual 3-D objects, which VB programmers use to make simulations or games. An essential phase of writing 3-D games with Visual Basic involves rotating, scaling and moving objects in 3-D space. These three actions are collectively called object transformations. Making your own 3-D game in Visual Basic gives you the chance to craft a dynamic virtual world matching your interests and design ideas.
- Skill level:
Other People Are Reading
Things you need
- Visual Basic development environment
Download and play one or more open-source (free) 3-D games written in Visual Basic, such as NARC3D and Anthony's Buttonz.
Write on paper during gameplay the aspects of the game you'd like to change and those you'd like to keep. For example, you may write "This shooter game would make more sense in a Wild West setting." Or, "The graphics are realistic, but the beginning levels are too easy. Players shouldn't get to level two until earning 500 points." Be as specific as possible in writing changes you'd like to see in the game.
Download the source code for one of the games you played, then print each of its source code files with the "Print" item of the "File" menu in the VB development environment. Read through each file, paying special attention to any comments (text demarked with the single apostrophe, -'-). The comments help explain the game's algorithms.
Click the "File" menu's "New project" item to start a new VB project. Type the game's source code from the printouts you made in the previous step. This instruction will deepen your understanding of the game's source code by forcing you to read the code carefully.
Play the retyped game by pressing "F5" in the VB coding environment. If the gameplay doesn't proceed as you expect, debug it, beginning with pressing the "Stop" button on the toolbar to end the game. Compare the source code you typed with the original printouts. Optionally, trace (i.e. execute) the program line by line by pressing "F8." Read the development environment's topics for the search term "debugging" to identify and correct the errors.
Delete one of the source files you typed, then retype it from memory. Refer to the file's printout only as needed. Repeat this step until you can type the file without referring to the printout.
Repeat the previous step for the remaining source files in the game. Doing so will yield an understanding of the game's logic that you can use to begin changing the game.
Sort the list you wrote in Step 2 to place the simplest modifications at the top of the list. Write the code implementing the list's top item. For example, if the item reads, "Give the Gorgon character only 50 life points at the game's start, not 75," you might replace the "75" with "50" in the statement "Gorgon.LifePoints = 75."
Play the modified game, and debug it as needed with Step 5's instructions.
Write the source code for the remaining items on your change list. If the resulting game still resembles the original, write and program the source for a new list of changes.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for