VDEngine (DirectX, C++)
by Varkalas D`Lonovan
(since December 2008)



TODO List:
~~~~~~~~~

* Take a close look into the Render functions.  Remove anything not used, etc.
* NPC functionality
* Set up a time/frame-based manipulation or synchronization in the game loop
* Get sound to work
* Get music to work
* Setup options
* Start working on OpenGL
* NOTE:  I believe that if a file is saved using CreateWorld() with the current code, 
         then if one changes the name of the directory it may not work (test that)...
         and if the disk location is changed (i.e. C:\ to E:\) it will fail as well.
         This could be a potential problem for anyone other than myself using the software.
* NOTE:  Currently using ID3DXSprite, would IDirect3DTexture9 be a better choice???
* NOTE:  If sprites stop loading awkwardly after using Open File Box dialog, the
         default directory needs to be reset

Plans:
~~~~~

* VDEngine Layout (TODO - Set this up as a Win32 application)
	- Map Name: ___________
    - [Save Map] button   [Load Map] button
    - -------------------------------------
    - () Insert Tile
    - Load Background Sprite
    -     Tile Type:
          () null
          () open
          () impassible
          () new area
	- Insert NPC (add VDNPC which loads a name from the NPC database)
	  clicking on a box will set the NPC's location and add to the world/map's list of NPC's
    - Load NPC Sprite
    - List or drop-down box showing all creatures
    - Another list showing only the spawn creatures the user has setup
* NPC Maker
	- NPC Name: _____________
	- Save
	- Load
	- List of things to say:  Text area:
	  [ 1                  ]  [                     ]
	  [ 2                  ]  [                     ]
	  [ 3                  ]  [                     ]
* Creature Maker
* Item Maker
* Game will have - the world (VDWorld) which has a 2D array of tiles (VDTile)
                     - VDTile has spawning data (each tile with creature name and a probability)
                 - a list of NPC's will contain all NPC data such as name, location
                 - a list of creatures with data such as name, HP, defense, item drop tables, etc.
                 - a list of items with data such as name, attack, str, dex, proc, etc.

*************
* Main Loop *
*************

(wiki)
check for user input
run AI
move enemies
resolve collisions
draw graphics
play sounds

(one version)
Get elapsed time
Handle lost/reset graphics devices
Get player input
Perform A.I. and game logic
Handle sound
Render
Synchronize display

**************
* Data Types *
**************

		signed						unsigned			size
char	-128 to 127					0 to 255			1 byte
short	-32768 to 32767				0 to 65535			2 bytes
int		-2147483648 to 2147483647	0 to 4294967295		4 bytes
long	-2147483648 to 2147483647	0 to 4294967295		4 bytes

**********************
* Important Keywords *
**********************

private:	accessed only by that class
public:		accessed by all code
protected:	accessed by that class and its subclasses
inline:		
virtual:	used to denote polymorphism (use on destructors with classes that have subclasses!! otherwise, subclass's destructors won't get called)

class A, class B : A
both have functions X
if function X is called from a B object, it still uses A's function X
unless!  we have class A make it a virtual X

*********************
* Memory Management *
*********************

What's the difference in speed and memory allocation (RAM, hard disk, etc.)
with the following two instances:

1.  Creature aCreature;
2.  Creature *aCreature = new Creature();

1.  An instance
2.  This is allocated, uses constructor/destructor, and needs to be deallocated