Game Development Community

Editor: align tile grid with camera. how to?

by Pedro Vicente · in Torque Game Builder · 12/04/2011 (9:27 pm) · 5 replies

I am using the TGB Editor to design a tile mapped layer.

I want to align the tile layer grid with the camera, so that half drawn tiles do not show up.
How to do this in the editor (or in script ) ?
Seen better in this image

www.space-research.org/games/garage_games/129019.png

#1
12/04/2011 (10:41 pm)
If you make your resolution 800x600, and your camera 800x600 then your units are 1 pixel. Now make your tilemap parts 50 pixels square and your entire tilemap will need to be 16x12 tiles to fill the screen exactly. Remember to click 'size object to layer' to resize the tilemap once you've entered the values, and to position it at 0, 0.
#2
12/04/2011 (11:05 pm)
Thanks Conor, that did it.

I am following this excellent tutorial

tdn.garagegames.com/wiki/TGB/MiniPlatformerTutorial

but never got the chance to use much the TGB editor, since I have been doing things only by script; kind of a neat tool.

Interesting exercise to follow the changes the editor does to script files: do the changes under revision control (e.g svn ); that way every bit of change is immediately marked in svn.

result of camera and tile map changes:
www.space-research.org/games/garage_games/129019_02.png
#3
12/04/2011 (11:21 pm)
unrelated issue:

would there be any interest in making the tile layer binary format ".lyr" to be a text format, like XML like ? The advantages:

1) easily edited
2) avoid (or minimize) portability issues between version changes
#4
12/06/2011 (4:47 am)
Pedro - agreed, and it would be good if the particle .eff files were a text format too.