DXFramework
Encyclopedia
DXFramework is a simple, illustrative, general purpose 2D (and 3D) computer game engine for Microsoft Visual Studio using Microsoft’s DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

technology, version 9.0c.

DXFramework is currently running version 1.0. It has 3 revisions for C++ available for download on their website, as well as a XNA studio express version. It requires Microsoft Visual Studio 2005(or express), the latest DirectX SDK, the Windows SDK, as well as a Python Interpreter. All of these are available from the DXFramework Wiki.

The original version of DXFramework was written by Corey Johnson and Jonathan Voigt. The DXFramework 0.9.4 rewrite was completed by Jonathan Voigt. DXFramework is currently maintained and managed by Jonathan Voigt at the University of Michigan.

It has been used at the University of Michigan since 2002 and University of Massachusetts Dartmouth since 2008 with success in game design classes focusing on arcade style games.

Examples

Adding a sprite into a software being made using DXFramework.

dxf::Sprite varname;

Written in the header file of a class this declares the variable “tank” as a sprite.

varname.CreateFromFile(L"name.ext");

This is written into the .cpp file that the header is imported into; it will attach an image onto the sprite variable to be rendered when the program runs.

ClassName red;

Add this into play.h(default in a new game) and “red” can then call any of the necessary Tank functions it would need to load, unload, render, or update.


----


Add a new class to be used in a game; this is where the sprites are controlled.

void name::Load {
//This is where sprite images are loaded and initial values are declared.
}

void name::Render {
//This is where the sprite(s) of “name” are rendered, for 2D games the
//sprite variables would be called with .Render2D.
}

void name::Unload {
//This is where the sprites are unloaded from the program, this is called by adding //.Unload to the sprite variable.
//Removing them without unloading can cause many problems in a program.
}

void name::Update {
//This is where the sprite rendering coordinates can be changed, color changing, or other //methods can be called to edit the sprite such as rotating the sprite.
}

A “name” object would then added into “play.h” to be used to call any “name” functions or unprotected variables.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK