|
Creating Games in Visual Basic [Close Window] Introduction So you want to create the next mega smash hit PC game like Half-Life or SimCity? Want a job in the industry creating 3D games? Given all the people who have e-mailed me with questions about game development, getting started, getting a job, and getting advice, I imagine that there are a lot more of you who want to make games and have the ability to do so, but just need some answers. If you want to create your own computer game, you need to make a few initial decisions, such as the type of game you want to create, the programming language you want to use, and the operation system API you want to use. Types of Games There are many different types of computer games. The key types are listed here: Action games were first made popular by such titles as Doom and Tomb Raider. You control the actions of a 3D character as you wander around trying to solve a set of puzzles. These games are also known as first person shooters. Adventure games where you guide one or more characters on a quest. These games are sometimes known as role-playing. Arcade games are generally simple 2D games that involve manipulating as object through a maze to avoid a series of traps or firing at objects to prevent being destroyed. Classic examples of this type of game include PacMan, Centipede, and Space Invaders. Driving/flying games generally place you behind the wheel while you drive a car or fly an airplane. The classic example of this type of game is Microsoft Flight Simulator series of games. Platform games are 2D games where you guide a character through a maze to solve a puzzle. Their name comes from the fact your character walks or jumps from platform to platform while solving the puzzle. Puzzle games exist solely to solve puzzles. Examples of these games include the Solitaire game included with Windows. Simulation games attempt to simulate a particular environment. You are not allowed to directly control the game; rather you must indirectly control the game by modifying the various game parameters. An example of this game type is SimCity. Sports games provide a way to play games such as football, baseball, or hockey on your computer. Strategy games provide you with resources that you can directly control. These resources can be devoted to creating other resources, expanding to reach a goal or engaging in warfare. An example of this type of game is Civilization. What Language Should You Use? There are many languages that you can use to program and game programming is certainly not immune to this argument. Depending on whom you are talking to at any given time, you will receive a completely different answer to the same question. Visual Basic The Basic language has been around for some time now, and Microsoft has clearly captured the market with their version, called Visual Basic. The VB IDE is excellent, and even a novice programmer can pick it up and use it rather easily. As VB became the language of choice for developing business applications, third parties released countless ActiveX controls and add-ons that allow VB programmers to do things previously impossible. Today, Visual Basic is used by more than 3,000,000 programmers, making it the most popular language in the world. Now that Microsoft is supporting VB with DirectX, the language is becoming more popular for game developers, and with the .NET release, it appears that VB is on the edge to become a serious contender for game developers. Over the next few years, we are certain to see more commercial games written entirely in Visual Basic. DirectX With Visual Basic being the most popular language in the world, the next step for DirectX was to create libraries that were accessible to VB developers. The bottom line is that the more people use DirectX, the more popular it will be and the quicker it will become the industry standard. First with DirectX 7 and now with the version 8.1, Microsoft has continued and enhanced its commitment to the VB community. DirectX now includes type libraries for VB users and ActiveX-compliant programs to access the advanced graphics, sound, and multi-player technologies reserved for the C developers. This addition has opened the floodgates for DirectX development. With DirectX, VB developers can now create the games they always wanted, the multimedia projects they had to rely on C++ for, and much more. What is DirectX? DirectX is a suite of technologies and methodologies that give software developers a consistent set of APIs (application programming interfaces) that provides them with improved access to the advanced features of high-performance hardware such as 3-D graphics accelerators and sound cards. These APIs control what are called "low-level functions," including graphics memory management and rendering; support for input devices such as joysticks, keyboards, and mice; and control of sound mixing and sound output. The low-level functions are grouped into components that make up DirectX: Direct3D, DirectDraw, DirectInput, DirectMusic, DirectPlay, DirectSound, and DirectShow. Direct 3D – is the 3D graphics interface. It uses the hardware assists found in many video cards to create 3D displays that were impossible only a few short years ago. The 3D component includes lighting effects, materials, and shading. Direct3D is also referred to as the DirectX Graphics component. DirectDraw – is the heart and soul of DirectX 2D graphics, giving you many of the features needed for basic animation, such as blitting, clipping, and flipping. It gives you access to display devices while maintaining compatibility with the Windows graphics device interface. One of the strongest features of DirectDraw is that it will work with a number of display devices (video cards, monitor, etc.) DirectInput – provides an interface for a wide range of devices such as keyboard, mouse, and joysticks, and even devices that support "force-feedback", such as the Microsoft SideWinder Force Feedback game controller.
DirectMusic – allows you to play many different music formats on your computer, including MIDI and MP3. Direct Music is a sub-component of the DirectAudio library. DirectPlay – is a set of API’s that allow you to connect games over modem links, networks, and the Internet. Based on generalized communication capabilities, DirectPlay allows you to efficiently manage connections between hosts and clients. DirectSound – allows you to create or play various types of sounds in your computer, which are typically saved in .WAV files. DirectSound includes voice management and software 3D audio processing algorithms. DirectSound is basically a sound-mixing engine. DirectShow – is the streaming media component of DirectX. It enables the high-quality capture and playback of multimedia streams such as AVI, MP3, and WAV files. With DirectShow you can create DVD Players, Video Editing Packages, Converters, MP3 Players and Encoders, and other video/audio manipulation applications. Getting DirectX DirectX can be downloaded at Microsoft-DirectX. It is recommended that you download the SDK, which features full docs for the API as well as lots of example source code. Conclusion Visual Basic is a truly an awesome programming language that is fully capable of supporting game development. Visual Basic has proven itself as a multi-purpose language that millions of programmers worldwide use on a daily basis. With DirectX, Visual Basic now has the power to create cutting-edge games. Check out tutorials on this site as well as others (Links page) in order to begin learning how to create your awesome game using Visual Basic and DirectX. [Close Window] |