Tile maps offset when running the game
by Arden · in Torque X 2D · 09/29/2010 (7:41 pm) · 5 replies
Hiya guys,
I'm proceeding to adapt a game to a 1280 x 720 resolution, so I am scaling up several small tilemaps as well as other scene objects. The problem I have is that, while all other objects seem to be fine, tilemaps seem are displaced on screen by a certain constant offset when running the game. Width and height seem to have an impact on how far the offset is. This makes it virtually impossible to properly set the playing field.
I'm stomped. Any ideas?
I'm proceeding to adapt a game to a 1280 x 720 resolution, so I am scaling up several small tilemaps as well as other scene objects. The problem I have is that, while all other objects seem to be fine, tilemaps seem are displaced on screen by a certain constant offset when running the game. Width and height seem to have an impact on how far the offset is. This makes it virtually impossible to properly set the playing field.
I'm stomped. Any ideas?
#2
But I think I wasn't clear enough. Sorry about that:
What I mean is that the position for the tilemap object itself (not the individual tiles it contains) is different in the editor than when running the game. If I have all my tile map objects properly placed and other objects in the middle for instance, when I run the game the other objects are displayed at their proper location, but the tilemap objects are offset furter away.
This seems to be related to changing the grid size to a higher value to accomodate the new resolution, but I haven't found out why it does this so far.
Makes it very difficult to adapt a game currently running at 100 x 75 to a resolution of 1280 x 720 :(
09/29/2010 (9:05 pm)
Yeah, it's good practice to do that :)But I think I wasn't clear enough. Sorry about that:
What I mean is that the position for the tilemap object itself (not the individual tiles it contains) is different in the editor than when running the game. If I have all my tile map objects properly placed and other objects in the middle for instance, when I run the game the other objects are displayed at their proper location, but the tilemap objects are offset furter away.
This seems to be related to changing the grid size to a higher value to accomodate the new resolution, but I haven't found out why it does this so far.
Makes it very difficult to adapt a game currently running at 100 x 75 to a resolution of 1280 x 720 :(
#3
09/30/2010 (12:12 am)
change your camera size... you can do that in the editor. It will save you many headaches. 128X72 is a good camera size.
#4
09/30/2010 (3:52 am)
I'll try that first thing tomorrow. I guess I'm thinking too much about pixels and not enough about proportions in relation to the camera. Thanks.
#5
Thanks Will.
10/06/2010 (1:32 pm)
I changed the camera size to 1280 x 720 so 1 pixel equals 1 unit and that seems to fix it. Apparently the camera was the problem. Thanks Will.
Torque 3D Owner Henry Shilling
Smokin Skull