below is a zip file of the tiled game engine in action.
this is the code that handles this engine.
// include our main header file
#include "Main.h"
//#include <stdio.h>
#include <string>
#include <fstream>
#include <vector>
#include "graphicspart.h"
GRAPHICSPART *graph;
#include "HandleEnemyBrains.h"
//#include "global.h"
#include "rapidxml.h"
#include "base64.h"
#include "brainspart.h"
#include "astarlibrary.h"
using namespace rapidxml;
using namespace std;
// declare our app
app App;
#include "xmlengine.h"
void app::Begin ( void )
{
xpos=960;
agk::SetPhysicsWallRight(0);
agk::SetVirtualResolution (960,640);
agk::SetPhysicsGravity(0,15);
parse=new xmlmapeng("map.tmx");
patheng=new BRAINENG();
playerbrains=new BRAINENG();
background=parse->makemapfromlayer("Tile Layer 1");
graph=new GRAPHICSPART(background,5,"media/texture 0.png",parse->returnorientation(),parse->returntileheight(),parse->returntilewidth(),parse->returnheight(),parse->returnwidth());
sprite2=agk::CreateSprite(agk::LoadImage("media/add.png"));
//addenemysprite("media/add.png",0,100,1,100);
//addenemysprite("media/add.png",100,200,1,100);
//agk::SetSpriteShape(sprite2,3);
//agk::SetSpritePosition(sprite2,800,250);
agk::SetSpritePhysicsOn(sprite2,2);
//agk::SetSpritePhysicsOn(sprite[0],2);
//agk::SetSpritePhysicsOn(sprite[1],2);
playerbrains->InitPlayerFollowPath(sprite2,graph->Return2dmap());
pathpoints=parse->Setpolyline("Object Layer 1",1);
catcher=agk::CreateSprite(agk::LoadImage("media/catcher.png"));
agk::SetSpritePosition(catcher,pathpoints[0],pathpoints[1]);
agk::SetSpriteOffset(catcher,agk::GetSpriteWidth(catcher)/2,0);
agk::SetSpritePosition(sprite2,pathpoints[0]+30,pathpoints[1]-5);
//patheng->initFollowPathVars(catcher,2,30);
agk::SetSpriteGroup(catcher,1);
agk::AddVirtualButton(1,50,550,100);
agk::AddVirtualButton(2,800,550,100);
agk::AddVirtualButton(3,900,550,100);
graph->ApplyPhysicstoLayer(1);
vector<int> tempt=graph->returnvec();
for(int ic=0;ic<tempt.size();ic++)
{
agk::SetSpriteGroup(tempt[ic],2);
}
}
void app::Loop ( void )
{
CenterScreen(sprite2,2);
//brains->FollowPath(
//patheng->
patheng->FollowPath(catcher,pathpoints,30,true);
//playerbrains->ResetPlayerFollowPath(sprite2,30,parse->returntileheight(),graph->Return2dmap(),1000);
resetenemypath(1);
patheng->CheckRayCast(sprite2,1);
agk::SetSpritePhysicsAngularVelocity(sprite2,0);
agk::SetSpriteAngle(sprite2,0);
int velocity=0;
if(patheng->CheckRayCast(sprite2,1))
{
if(agk::GetVirtualButtonPressed(1)==1||agk::GetButtonState(1)==1)
{
agk::SetSpritePhysicsVelocity(sprite2,0,-60);
}
velocity=30;
}
if(agk::GetVirtualButtonPressed(3)==1&&agk::GetVirtualButtonPressed(1)==1&&patheng->CheckRayCast2(sprite2,2))
{
//agk::Print("true");
agk::SetSpritePhysicsVelocity(sprite2,agk::GetSpritePhysicsVelocityX(sprite2),-40);
}
if(agk::GetVirtualButtonState(2)==1||agk::GetButtonState(2)==1)
{
if(!patheng->CheckRayCastForward(sprite2,2))
{
if(velocity>=0)
agk::SetSpritePhysicsVelocity(sprite2,-30,agk::GetSpritePhysicsVelocityY(sprite2));
else if(velocity<0)
agk::SetSpritePhysicsVelocity(sprite2,-30+velocity,agk::GetSpritePhysicsVelocityY(sprite2));
}
}
if(agk::GetVirtualButtonState(3)==1||agk::GetButtonState(3)==1)
{
if(!patheng->CheckRayCastForward(sprite2,2))
{
if(velocity>=0)
agk::SetSpritePhysicsVelocity(sprite2,30+velocity,agk::GetSpritePhysicsVelocityY(sprite2));
else if(velocity<0)
agk::SetSpritePhysicsVelocity(sprite2,30,agk::GetSpritePhysicsVelocityY(sprite2));
}
}
//agk::
agk::Sync ( );
}
void app::End ( void )
{
}
this is a tiled screen shoot shows where I define a path. To make your own level run this program once it will fail the first time,but it will make the folder where the map goes in your agk folder. I will fix this error Soon.

My engine will get that path and in my code I can assign a platform to that path. To change the level all you have to do is change it in tiled. Currently I only support one plateform that can be made, and one path that you can define you self. Also you can change the map in tiled. I getting the engine so that all you have to do is say trap layer, and maybe some extra plateforms and paths you can play with. I will update this so it is like a one level world editor where the user can just simply change the map in tiled and save it.
Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps.
Developed the tiled map engine seen on the showcase.
Veterian for the military.