Ok, this is a export I got from my tiled engine. After importing TMX Files. Then in the menu I exported this code, my export also put sprites and pictures in a media folder. Basically I am trying to make a hole scenery but I need help with tier 1. This is what I have for tier 2 so far.
//
// AGK Application
// Made by My Sprite and Tile Engine
// Threedpointinspace
//
// include our main header file
#include "Main.h"
// let the compiler know we're using the AGK namespace
using namespace AGK
// declare our app
app App;
float tiledmapxpos[67]={0,32,64,96,0,32,64,96,0,32,64,96,0,32,64,96,96,128,160,192,448,480,512,544,96,128,160,192,448,480,512,544,96,128,160,192,448,480,512,544,96,128,160,192,448,480,512,544,608,640,672,128,160,192,224,256,288,352,384,416,448,480,512,544,608,640,672};
float tiledmapypos[67]={50,50,50,50,82,82,82,82,114,114,114,114,146,146,146,146,370,370,370,370,370,370,370,370,402,402,402,402,402,402,402,402,434,434,434,434,434,434,434,434,466,466,466,466,466,466,466,466,466,466,466,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498,498};
float tiledmapangle[67]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
int tiledmaprgbred[67]={255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
int tiledmaprgbgreen[67]={255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
int tiledmaprgbblue[67]={255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
int tiledmaptrans[67]={255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255};
int tiledmapxsize[67]={32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32};
int tiledmapysize[67] ={32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32};
int tiledmapframe[67] ={135,2,3,4,33,34,35,36,65,66,67,68,97,98,99,100,1,2,3,4,1,2,3,4,33,34,35,36,33,34,35,36,65,66,67,68,65,66,67,68,97,98,99,100,97,98,99,100,390,391,392,137,137,137,137,137,137,137,137,137,137,137,137,137,422,423,424};
int tiledmapmirror[67] ={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
//
// This is where you add your spritesheet
// The first sprite sheet Location is: //C:\Users\shawn\Pictures\tilemapeng.png
// Make sure you copy the media files in the proper directories
int SpriteSheet[67];
void TileMap()
{
SpriteSheet[0]=agk::CreateSprite(agk::LoadImage("media/tilemapeng.png"));
agk::SetSpriteAnimation(SpriteSheet[0],32,32,512);
agk::SetSpriteFrame(SpriteSheet[0],135);
...
SpriteSheet[66]=agk::CloneSprite(SpriteSheet[0]);
agk::SetSpriteFrame(SpriteSheet[66],424);
for (int icnt = 0;icnt<67;icnt++)
{
agk::SetSpritePosition(SpriteSheet[icnt],tiledmapxpos[icnt] ,tiledmapypos[icnt]);
agk::SetSpriteColor(SpriteSheet[icnt],tiledmaprgbred[icnt],tiledmaprgbgreen[icnt],tiledmaprgbblue[icnt],tiledmaptrans[icnt]);
agk::SetSpriteSize(SpriteSheet[icnt],tiledmapxsize[icnt],tiledmapysize[icnt]);
// include dbSprite here and the file location
// tiledmapxpos[icnt]
// tiledmapypos[icnt]
// tiledmapangle[icnt]
// tiledmaprgbred[icnt]
// tiledmaprgbgreen[icnt]
// tiledmaprgbblue[icnt]
// tiledmaptrans[icnt]
// tiledmapxsize[icnt]
// tiledmapysize[icnt]
// tiledmapframe[icnt]
}
}
this is what I have for tier 1 code.
rem
rem AGK Application
rem Made by My Sprite and Tile Engine
rem Threedpointinspace aka
rem
dim tiledmapxpos[67] as float =[0,32,64,96,0,32,64,96,0,32,64,96,0,32,64,96,96,128,160,192,448,480,512,544,96,128,160,192,448,480,512,544,96,128,160,192,448,480,512,544,96,128,160,192,448,480,512,544,608,640,672,128,160,192,224,256,288,352,384,416,448,480,512,544,608,640,672]
dim tiledmapypos[67] as float =[0,0,0,0,32,32,32,32,64,64,64,64,96,96,96,96,320,320,320,320,320,320,320,320,352,352,352,352,352,352,352,352,384,384,384,384,384,384,384,384,416,416,416,416,416,416,416,416,416,416,416,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448]
dim tiledmapangle[67] as float =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
dim tiledmapmirror[67] as integer =[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
dim tiledmaprgbred[67] as integer =[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
dim tiledmaprgbgreen[67] as integer =[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
dim tiledmaprgbblue[67] as integer =[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
dim tiledmaptrans[67] as integer =[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]
dim tiledmapxsize[67] as integer =[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]
dim tiledmapysize[67] as integer =[32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32]
dim tiledmapdepth[67] as integer =[50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50]
dim tiledmapframe[67] as integer =[135,2,3,4,33,34,35,36,65,66,67,68,97,98,99,100,1,2,3,4,1,2,3,4,33,34,35,36,33,34,35,36,65,66,67,68,65,66,67,68,97,98,99,100,97,98,99,100,390,391,392,137,137,137,137,137,137,137,137,137,137,137,137,137,422,423,424]
sizetiledmap=67rem
rem This is where you add your spritesheet
rem The first sprite sheet Location is
rem Make sure you copy the media files in the proper directoriesrem this is the map function.
function TileMap()
for i = 0 to size
rem include dbSprite here and the file location
rem tiledmapxpos[i]
rem tiledmapypos[i]
rem tiledmapangle[i]
rem tiledmaprgbred[i]
rem tiledmaprgbgreen[i]
rem tiledmaprgbblue[i]
rem tiledmapdepth[i]
rem tiledmaptrans[i]
rem tiledmapxsize[i]
rem tiledmapysize[i]
rem tiledmapframe[i]
next i
endfunction
Developer of Space Chips, pianobasic, zipzapzoom, and vet pinball apps. Developed the tiled map engine seen on the showcase. Veteran for the military.