turrier.fr

Source : ct|15.02.08

< Tutorials Computer, Multimedia, Chinese

Program with Visual Studio and Dark GDK

The object of this tutorial is helping to start, those who want to learn to program with Visual studio 2008 and Dark GDK (the famous games development Kit ).

Install the environment

At the date of writing those lines (February 2008), following operations can be executed free. 1) Install Visual Studio 2008 Express C++ on your computer (via internet, on the microsoft web site - heading VS2008 express). 2) Install Directx9 ( download the file "dxsdk_ aug 2007 exe", via internet, on the microsoft web site). 3) Install Dark GDK (download the package file "DarkGDK.msi ", via internet, on the Dark GDK web site). To make appear the Dark GDK project models, in the menu " Files/New project" of Visual Studio 2008 Express C++, you must execute following operations (otherthise you will not see those types of project in VS2008 Epress C++ version).

image1

4) We will suppose that the assigned name of your computer it "ct" (for example...) If the name of your computer is not "ct" (that is probable...) but "Autrechose", also replace "ct" by "Autrechose" in all that follows. Copy the content of the directory "C:\Program Files\The Game Creators\ Dark GDK\Wizards\ Projects in the directory "C:\Documents and Settings\ct\Mes documents\Visual Studio 2008\ Dark GDK". Create the directory "Dark GDK" if it does not exist .The three copied under-directories contain the three models of VS2008-DarkGDK projects.

image2

5) Put the contents of the directory "C:\Program Files\The Game Creators\Dark GDK\ Wizards\ Files" in the directory "C:\Documents and Settings\ct\Mes documents\Visual Studio 2008\ Wizards". If it does not exist , create the directory "Wizards".

image3

6) In the three files DarkGDK- 2DGame.vsz, DarkGDK-3DGame.vsz and DarkGDK-Game.vsz, verify that the paths of the project models are well specifyed, as indicated hereafter. If you are in France, verify that the directory "Mes Documents" is well indicated (and not "My Documents"...) in those files.
You must have : Param="ABSOLUTE_PATH = C:\Documents and Settings\ct\Mes Documents\Visual Studio 2008\Dark GDK\Dark GDK - 2D Game\Dark GDK - 2D Game", Param="ABSOLUTE_PATH = C:\Documents and Settings\ct\Mes Documents\Visual Studio 2008\Dark GDK\Dark GDK - 3D Game\Dark GDK - 3D Game" et Param="ABSOLUTE_PATH = C:\Documents and Settings\ct\Mes Documents\Visual Studio 2008\Dark GDK\Dark GDK - Game\Dark GDK – Game".
Once this in place, the 3 models of Dark-GDK projects must appear in the Wizards type (menu option "File/New Project").

image4

The first programme

Create, compile and execute a skeleton of program. 1) Run Visual C++ 2008 Express; 2) Click "File/New/Project"; 3) Choose "Wizards/DarkGDK-Game";

image5

4) Indicate a name (« essai » for instance ) and a directory for the project and click « OK »;

image6

The project "essai" and the associated source file "main.cpp" are then automatically generated by Visual C++ in the chosen directory;

5) Click twice on the icon of the file "main.cpp", which is present in the project window of Visual C++;

image7

6) In the "main.cpp" listing which appears, insert the instruction dbText(0,0, "Bonjour!") just after the line dbSyncRate(60);

image8

7) Click "Debug/Start debugging". Visual C++ compile, link and execute the program.

image9

The project and the associated files are automatically saved in the directory "essai".

image10

Useful files are the source file "main.cpp" and the executable file "essai exe".


Valid XHTML 1.0 Transitional

© http://turrier.fr (2007)