Loirak Development Logo  

DirectX Programming and Game Development

Loirak -> DirectX
 

DirectX Programming

Introduction

Programming games, in my opinion, is the only programming worth doing(for fun anyway). Games have a wide appeal to users all over the world. Afterall, what are the chances of writing a spreadsheet or database interface, and having your friends spend hours admiring your work?

The best way to learn game programming is to actually write a game. I recommend that for every article on programming you happen to read, you write some sort of code to test what you have learned. Actually writing code will teach you much more than reading ever will.

Programming in Windows is not as bad as it seems, Microsoft (shudder) actually got something right with DirectX. No longer, do we need to figure out the video card, write drivers for 20 different sound cards, etc. It's all their for us. We just have to use it. Once you get the basics of Windows programming under DirectX, you can almost forget about the Windows environment/API.

Getting Started

Programming Games with DirectX is something you can't just jump into. You NEED to have some sort of programming experience before trying to tackle a subject like DirectX. If you have a good understanding of C/C++ you should be all right. The majority of DirectX Programming is done in C++. C programmers should be able to avoid classes/OOP fairly easily. You can also go against the norm and make your DirectX games with Visual BASIC, Delphi, or even Java. This site is geared toward C/C++ development.

With that said here is what you will need :

  • A Compiler. Visual C++ 4.0 and higher. If you are a die hard Borland fan use 5.0 or greater.
  • Microsoft DirectX Home
You will need to be familiar enough with your compiler to get DirectX programs to run. I know what its like having problems with a compiler, they are without doubt the must fustrating becuase they generally take only mouse clicks to fix. The best thing todo is to go and search the newsgroups at google.

These days, you really don't need to buy books, or read a lot of articles. You can just dive into the programming. But there are still a few prerequisites. You will need a background in Linear Algebra, and using matrices/vectors to represent 3d objects. Then just goto the Microsoft DirectX home page and download the SDK. The current incarnation 8.1 is about 160MB. It comes with a ton of documentation for Visual C++, and Visual Basic. On top of that there are probably 40+ samples you can tinker with, and use as a spring board to create your own game. Be sure to check out Donuts 3d!

Source Code for DirectX

We figure the best way to learn game programming is to actually write a game, but not many people have time to step through the whole process. So this little page may be considered a resourcium for the time deprived. It gives you the power to find a couple of complete games/demos with free source code, and also some information about free libraries that make DirectX programming a no-brainer (well, not quite that easy)

DirectX Games with Full Source Code!

  • Tank Ravagers is a very simple directx game that does not have sound. You control a Tank and try to dodge falling missiles. The above link let you download the game, and the source has a step by step guide to help get you up and compiling the program.

[C/C++] [Gameboy] [Java] [DirectX] [Games] [Contact] [Loirak HQ]
Viewing: Loirak -> DirectX
© Copyright 1998-2024 Loirak. All rights reserved.
18 March 2024