PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Tile Studio

Hi, I wanna get to grips with tile explorer so I can write some different stlye games.

I have looked at the tile designer and it all looks pretty straight forward to operate.

The first problem is though, when i want to export the tiles and map from tile designer to gapidraw, what .tsd do i use?? In the code for the gapidraw tile demo it says that it has been modified for use with gapidraw, but it doesn't say how to export it, or am i just being thick.

Next thing is there a tutorial anywhere that shows just how to place a simple map on the screen?? or could someone break the sample code into meaningful sections. I could possibly get my head around this bit if i look into it , but just need to get something meaningful that i know i can use out of tile desginer first.

Thanx for any help in advance.

Matt.

Croccy22
I have just done C# map viewing code for gapidraw.net. I will be converting that into c++ over the next week or so. Becuase I want to be able to load maps on the fly, I created my own tsd to save the maps to a text file and png file. I then read that as required.

My tsd is as follows:
Code:

; create the graphics files
#tileset
#tilebitmap <TileSetIdentifier>.png 320
#end tilebitmap

#map
#file <ProjectName>_<MapIdentifier>.map.txt
Versn: 1
TlSet: <TileSetIdentifier>
TWdth: <TileWidth>
THght: <TileHeight>
TPosX: <TransparentPosX>
TPosY: <TransparentPosY>
TColR: <TransparentColorR>
TColG: <TransparentColorG>
TColB: <TransparentColorB>

MName: <MapIdentifier>
MWdth: <MapWidth>
MHght: <MapHeight>
MSqce: <SequenceCount>

#sequence
Seqce: <SequenceNumber>, <SpriteLength>,
#sequencedata
<TileNumber>,
#end sequencedata
#end sequence

----- Tile X, Y, TileNumber,Bounds,MapCode\n
#mapdata
Tiles: <X>,<Y>,<TileNumber>,<Bounds>,<MapCode>\n
#end mapdata
#end file
#end map

#end tileset


and produces output like this
Code:

Versn: 1
FType: Compact
TlSet: Blocks.png
TWdth: 32
THght: 32
TPosX: 30
TPosY: 1407
TColR: 255
TColG: 0
TColB: 255

MName: Small
MWdth: 4
MHght: 4
MSqce: 1

Seqce: 1, 16,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,

----- Tile X, Y, TileNumber,Bounds,MapCode
Tiles: 0,0,23,12,0
Tiles: 1,0,23,4,0
Tiles: 2,0,23,4,0
Tiles: 3,0,23,4,0
Tiles: 0,1,23,8,0
Tiles: 1,1,0,3,0
Tiles: 2,1,0,8,0
Tiles: 3,1,23,2,0
Tiles: 0,2,23,8,0
Tiles: 1,2,0,6,20
Tiles: 2,2,0,12,20
Tiles: 3,2,23,2,0
Tiles: 0,3,23,9,0
Tiles: 1,3,23,1,0
Tiles: 2,3,23,1,0
Tiles: 3,3,23,3,0


TlSet is the name of the bitmap produced

Tiles is the tile array.
Tilenumber is the tile to display from the named png file.
1 is the first tile
0 means no tile
-ve numbers mean a sequence (-1 is 1st sequence, -2 is second etc

From here it is fairly straight forward to produce tile viewing code. I did it in about 400 lines of code so it is not to hard. If you can read c#, I can post the code, otherwise get hold of me next week when I should have done the c++ port.

Sean