Visual Basic 3D Game Tutorial

Written by darrin koltow
  • Share
  • Tweet
  • Share
  • Pin
  • Email
Visual Basic 3D Game Tutorial
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. (binary world image by Attila Toro from

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:

Things you need

  • Visual Basic development environment

Show MoreHide


  1. 1

    Download and play one or more open-source (free) 3-D games written in Visual Basic, such as NARC3D and Anthony's Buttonz.

  2. 2

    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.

  3. 3

    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.

  4. 4

    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.

  5. 5

    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.

  6. 6

    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.

  7. 7

    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.

  8. 8

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

  9. 9

    Play the modified game, and debug it as needed with Step 5's instructions.

  10. 10

    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.

Don't Miss

  • All types
  • Articles
  • Slideshows
  • Videos
  • Most relevant
  • Most popular
  • Most recent

No articles available

No slideshows available

No videos available

By using the site, you consent to the use of cookies. For more information, please see our Cookie policy.