Game Development Community

TileMap size questions

by Tom Testa · in Torque Game Builder · 07/03/2007 (7:06 am) · 2 replies

Hi,

I guess i'm not understanding what the tileCount and tileSize float values really represent if they aren't pixel dimensions.

I've looked through the docs, but I'm not sure what these values mean. If I have tiles that are 24 x 24 pixels and I set up my resolution for 1024 x 768 for the project that would give me 42 2/3 tiles by 32 tiles down.

How would I configure the tileCountX/Y and the tilieSizeX/Y values to do this?

I tried tileCountX = 43, tileCountY = 32, tileSizeX/Y = 24 but this doesn't seem to give me what I want.

What should I use?


Thanks


FROM THE DOCUMENTATION
===========================================

%tileCountX - Float
The number of tiles to create in the x direction.

%tileCountY - Float
The number of tiles to create in the y direction.

%tileSizeX - Float
The size of the tiles in the x direction.

%tileSizeY - Float
The size of the tiles in the y direction.

#1
07/03/2007 (8:40 am)
You set the tilemap size and the camera to 1024x768 as well, right? What are the undesired results?
#2
07/03/2007 (9:01 am)
@Tom - In TGB, size is in world coordinates. The "size" parameter for tiles is the same "size" as you would set for static sprites. In terms of how much of your "screen" it would take up, that would depend on the extent of your camera. TGB internally doesn't really think in terms of "pixels".