logo.jpg (7978 bytes)

Visual Basic game programming and using DirectX



Why Visual Basic for game programming?

Visual Basic is one of the easiest languages to learn, anyone is able to get a simple application up and running in 10 mins. You'll be able to create something that resembles a game faster than any other language

Secondly with today's super fast computers, any performance hit from the compiler will be relatively small. Now fast 3D graphics and sound performance are a reality by using DirectX (or OpenGL) in VB.

Game programming in Visual Basic can be worthwhile when there isn't alot of realtime graphics. Board games, role playing games, wargames and strategy games all fit the bill perfectly and will take far less time to get going than your average C++ beast. Either way, your focus should be on fun gameplay other than a flashy eye-candy presentation, graphics are not everything.

The next worthwhile application for VB in game programming would be level editors. Skill in this area would look quite favourable if applying for a job in the industry. The majority of level editors would be made in this language due to the speed you can "knock one up". In this case VB has all the power you need.

To have your code execute fast enough you will need to have at least VB 5.0 (Enteprise or Professional edition) from Microsoft, .NET being the latest going for around $100. Previous versions do not contain a native-code compiler so will be quite slow at run-time.

If you are making a level editor you can use various methods to display your graphics as speed is not an issue. The web contains many resources for this type of graphic display.

Otherwise I suggest take some time to learn how to use DirectX in VB which is much faster than the old bit-blit methods and allows 3D graphics. Playing sounds using DirectSound will be much easier than using the Windows API.

Here is a link to some source code to create a DirectGraphics screen. You will also need the 122Mb DirectX SDK from Microsoft.

I recommend investing in the book Visual Basic Programming with DirectX by Johnathan S. Harbour to make the learning process much easier. This book will give you excellent information for the beginner to advanced on VB game programming and also how you can use DirectX with VB.

Good luck with your Visual Basic game programming.

Back to main page