Writing MMPORG games with DirectX 9
This tutorial will show you step by step how to build your own DirectX 9 application.
We will start with the minimum application to get an overview of the dynamic behaviour of the DirectX 9 helper class, which is supplied by the Microsoft DirectX 9 SDK.
To compile the examples, you need Microsoft Visual C++ 6.0, and Microsoft DirectX 9.0 SDK Update (Summer 2003).
The SDK (=Software Development Kit) can be downloaded for free
from
here
.
Tutorial 1
will show how to make a minimum DirectX 9 application. The application does nothing much, it just opens a window, which you can switch to fullscreen mode by pressing Alt+Enter, and back to window mode with the same key combination. Esc key will exit the application.
Tutorial 2
will show how to add inherit the DX9 helper class, and make your own function overrides. Without adding our own function overrides to the helper class, we can obviously add no own code to the default application. We will start with inheriting the CD3DApplication class and then adding our own class constructor to set the window title and start-up width and height of the window.
Tutorial 3
will show how to add some simple text output to the graphical DX9 screen. We need to inherit few more standard methods and add the appropriate text class methods to those. These new methods are basically managing the redrawing, resizing, initializing and destruction of the screen.
Tutorial 4
will show how to add a simple model and display it. We are using the X file format, which can be generated by hand with a text editor, or converted from almost all 3D-designer applications, like 3D Studio, 3D Studio Max, gmax (a free version of 3D max), Maya, AutoCAD, etc..
Tutorial 5
will show how to add the camera class, so we can move and look around like we are used from 3D First Person and 3rd Person games.
Tutorial 6 will show how to add collision checks, so you can already build your own landscapes, cities, etc.. just by populating the world with different models. There will be no fixed ground, but the ground will be made out of models, which allows much more dynamic content than hardcoded grounds.
With pure model landscapes we can also simulate easily water, air, swamps and different kinds of materials which do not only collide with the player model and other models, but also gives the possibility to collide with arbitrary levels of density into them.