Game Development Community

MiniPlatformer & tile grid size issue

by Russell Morgan · in Torque Game Builder · 03/18/2008 (4:22 pm) · 1 replies

I've been trying my hand at the ninja miniplatform tutorial (http://tdn.garagegames.com/wiki/TGB/MiniPlatformerTutorial#Mini_Platformer_Update) and I've come across something I can't quiet figure out, hoping it's just because it's out of date.

Basically when I create a tile map at 10x10 with a tile size of 32 I get a huge tilemap that doesn't even come close to fitting into the default camera space (100x75). If I set both the number of tiles and the tile size to 10 then it becomes a bit more workable but doesn't look like quite the scale the images in the tutorial has. Are the values incorrect in the tutorial and for that matter is there any documentation on what these sizes really are? 100x75 doesn't really mean much to me in the context of an 800x600 game window.

Thanks, R.

#1
03/18/2008 (10:06 pm)
It should mean at least a bit to you. If your camera is set to 100x75 units, but 800x600 pixels for the window, then each of those in-game units translates out to 8 pixels on the screen. Essentially, you have in game units and real pixels. As for my folks and I, we tend just use the game's default resolution as the number of units. If you're doing something that very tile-based, it probably makes sense to have your game units be something that's related to the number of tiles you wish to display at any one time (at the default zoom level).

This comes up often and seems to be one of those things that people intuitively understand, but isn't explained sufficiently well by the number of questions about it.