I had fairly good results swapping textures on a 3D plane (a POC to see if animating sprite sheets or individual sprite frames would work ok).
My next test was to create a simple tile map based on 3D planes, also testing the MousePick() which proved easy to find a given tile onclick. For my purposes, I placed a camera always looking Top/Down... and x-rotated the planes by -90 to place them flat. I tested tile maps up to 100x100 still running around 60fps (granted, my laptop is i7 w/ NVIDIA Quadro 2000M -- but not top notch by any means).
Here is the source for the Application class I'm using for testing:
public class Application
{
// private properties
static int MapWidth = 10;
static int MapHeight = 10;
static int TileWidth = 128;
static int TileHeight = 128;
static int SelectedTileId = -1;
static int SelectedTileX = 0;
static int SelectedTileY = 0;
static List<DarkGDK.Basic3D.Plane> MapTiles;
static List<DarkGDK.Basic3D.Plane> MapTileEffects;
static List<DarkGDK.Basic3D.Plane> MapTileObjects;
public static Timer TimerAnimation { get; set; }
public static void ProcessAnimations()
{
}
public static void HandleMouseInput()
{
Object3D mySelectedObject = Mouse.Pick();
if(mySelectedObject != null)
{
mySelectedObject.WireFrame=true;
Text.ShowText(0, 15, "Tile Coord : " + mySelectedObject.X + "," + mySelectedObject.Y + "," + mySelectedObject.Z );
Text.ShowText(0, 30, "Tile Position: " + mySelectedObject.X / TileWidth + "," + (int)(mySelectedObject.Z / TileHeight));
Text.ShowText(0, 45, "Picked Id : " + mySelectedObject.Id);
}
}
public static void HandleCameraControls()
{
// position camera [top down]
// default controls will be replaced with move and strafe
DefaultCamera.ControlDefaultUsingArrowKeys(2, 2);
DefaultCamera.CurrentAngleX = 90;
}
static void InitCC()
{
// configure sync
Core.SyncOn();
Core.SyncRate(0);
// setup a dummy control device
// Joystick.SetControlDevice("");
// refresh and load
Core.Print("Please wait, initializing...");
Core.Sync();
Core.Sync();
// camera init [always top down]
Core.DrawSpritesLast();
DefaultCamera.BackdropOff();
DefaultCamera.AutoCamOff();
DefaultCamera.PositionCurrent(400, 600, 300);
DefaultCamera.CurrentAngleX = 90;
// 2D is in back of 3D [for sprite effects]
Core.DrawToBack();
// Set media working directory
DarkGDK.IO.File.SetCurrentDirectory("../../../Media");
// Color key is (0,0,0)
DarkGDK.Basic2D.Image.SetColorKey(Color.Black);
// we are testing tile maps here
MapTiles = new List<Plane>();
DarkGDK.Basic2D.Image tempImg = new DarkGDK.Basic2D.Image("FloorTiles/GrassBorderSouth.png", true);
for (int i = 0; i < 100; i++)
for (int j=0; j < 100; j++)
{
DarkGDK.Basic3D.Plane myNewPlane = new DarkGDK.Basic3D.Plane(128, 128, tempImg);
myNewPlane.SetTransparency(false);
myNewPlane.XRotate(-90);
//myNewPlane.YRotate(-45);
myNewPlane.Position(i * 128, 0, j * 128);
MapTiles.Add(myNewPlane);
}
}
public static void GameLoop()
{
try
{
InitCC();
// --> frame loop
while (DarkGDK.Engine.LoopGDK)
{
// clear frame
DarkGDK.Core.ClearScreen();
// drawing and logic
// mouse input
HandleMouseInput();
// handle camera
HandleCameraControls();
// show fps
Text.ShowText(0, 0, "FPS: " + DarkGDK.Display.ScreenFPS.ToString());
// sync frame
DarkGDK.Core.Sync();
}
}
catch (Exception ex)
{
}
} // end game loop
}
Next test will be multiple layers (for tile map) as well as animated characters (texture swapped planes) to get an idea of where the perf is on legit scene.