Game Engine Sources

DIRECT X TRAINING ENGINE

  1. Installation and requirements
  2. How to use it
  3. FAQ
  4. References

1. INSTALLATION AND REQUIREMENTS

Requirements:

Installation:

  • Go to https://bitbucket.org/Cthuga/direct-x-engine and download latest version of Engine
  • Install/Unzip Dorect X folder to any destination
  • Unzip folder “Engine_I” to any destination
  • Run *.sln file using Visual Studio Environment
  • Point for DirectX library in Visual Studio Environment. Check for example: http://www.rastertek.com/dx10tut01.html
  • Rebuild project hoping for no errors. If there would be some problems, please pm me

2. HOW TO USE IT

  • You should start examination from main.cpp
  • Description of all classes, methods and properties are in header files, when examining code I suggest routine described below:
  1. Examine code during debugging starting from main.cpp
  2. Most comments doesn’t exists in method body. If You don’t know what object,method or variable do, check object,method,variable declaration in header file of inspected class [TIP : usefull shortcut in VS = CTRL + F12 ]
  3. For fields and properties – if description in header file of inspected class is not enough, check header class definition for inspected property

Example: Debugging Graphic::Init

Step 1 – checking description of examined code

//Initialization routine 
//For more info about initialized instances check their descriptions in graphic class
if(!d3XCore.Init(hwnd, width, height, device, swapChain, renderTargetView, depthStencilView, font, config.configGraphic.FullScreen))

Step 2 – checking header class definition of graphic class

D3XCore d3XCore;    //This is Direct X controller. Check D3XCore.h for reference

Step 3 – checking header class definition of inspected property

//ClassName   : D3XCore
//LifeTime: Initialized during graphic initialization, shutduwn during closing application
//Description : Direct X Core. Initializing all important Direct X interfaces

//Name        : Init
//Description : Initialization of DirectX components which doesn't change during resizing routine
//Input       : hwnd         - handler to application
//      width        - width of the screen
//      height       - height of the screen
//      device       - reference to device pointer. Parameter would be filled with new value
//      swapChain        - reference to swap chain pointer. Parameter would be filled with new value
//      renderTargetView     - reference to render target view pointer. Parameter would be filled with new value
//      depthStencilView     - reference to depth stencil view pointer. Parameter would be filled with new value
//      font     - reference to direct x font interface pointer. Parameter would be filled with new value
//      fullscreen       - full screen flag
//Output      : true when no errors, else false

  • Remember that debugger doesn’t take steps into *.fx files !
  • One more important annotation: Engine is separated for two parts :
    • Core : that is almost everything with exception on :
    • Drawings : that’s part of game elements , not core engine. It would be later separated to different project actually for drawings there is :
      • DrawWorld : drawing models to scene
      • DrawTextInterface : draw text in each corner of the screen
      • DrawLight – draw lights to scene
      • DrawConfiguration – some fixed configurations dependent on game type

3. FAQ

Not at this moment

4. REFERENCES

Textures for presentation:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s