A fake(?) isometric approach for Tilemap object in Torque X
by Jeheon Yu · 05/04/2009 (7:28 pm) · 16 comments
Inspired by Dan Pascal's greenRobot.
As one of the most lazy programmers in the world, i read Dan's article recently and got an idea that gives more isometric looking to Torque X tilemaps.
The main idea is to use 45-degree rotated tilemaps same as Dan's working.
With this, we can make and edit a tilemap level easily.
An individual tile shapes in 45-degree rotated tilemaps matches 1:1 width and heights, we need it 2:1 for more *regular* looks of isometric tiles.
Here comes a simple scene camera trick. Let's check this.

Main camera's default width & height ratio is 100:75, but let's change the height value to twice, 150.

and finish other tileworks like this...

and done!!!
Maybe the final render screen height would be squashed to half, tiles becomes 2:1 ratio isometric looks.
But other object would be squashed too, but we can stretch player and other objects' height twice like above.
It looks a bit wierd in TXB editor, but ok in gameplay screen.


I think other objects like UIs, indicators, etc. (except tilemap related objects) can be rendered with additional non-squashed scene camera.
Watch out for locating exact mouse click position if you're using mouse input. Maybe some additional tilemaps for mouse click check are useful.
(I prefer Xbox 360 gamepad and keyboard for now.)
Any suggestions are welcome.
And sorry for my poor english ;-)
As one of the most lazy programmers in the world, i read Dan's article recently and got an idea that gives more isometric looking to Torque X tilemaps.
The main idea is to use 45-degree rotated tilemaps same as Dan's working.
With this, we can make and edit a tilemap level easily.
An individual tile shapes in 45-degree rotated tilemaps matches 1:1 width and heights, we need it 2:1 for more *regular* looks of isometric tiles.
Here comes a simple scene camera trick. Let's check this.
Main camera's default width & height ratio is 100:75, but let's change the height value to twice, 150.
and finish other tileworks like this...
and done!!!
Maybe the final render screen height would be squashed to half, tiles becomes 2:1 ratio isometric looks.
But other object would be squashed too, but we can stretch player and other objects' height twice like above.
It looks a bit wierd in TXB editor, but ok in gameplay screen.
I think other objects like UIs, indicators, etc. (except tilemap related objects) can be rendered with additional non-squashed scene camera.
Watch out for locating exact mouse click position if you're using mouse input. Maybe some additional tilemaps for mouse click check are useful.
(I prefer Xbox 360 gamepad and keyboard for now.)
Any suggestions are welcome.
And sorry for my poor english ;-)
About the author
#2
This is very impressive! What a creative solution for achieving a classic isometric look. The only issue with this trick that concerns me is that all other scene objects will be distorted. You have to vertically stretch all other scene objects just to keep their correct representation. Otherwise, this makes a lot of sense. Well done!
John K.
www.envygames.com
05/05/2009 (12:02 am)
Jeheon,This is very impressive! What a creative solution for achieving a classic isometric look. The only issue with this trick that concerns me is that all other scene objects will be distorted. You have to vertically stretch all other scene objects just to keep their correct representation. Otherwise, this makes a lot of sense. Well done!
John K.
www.envygames.com
#3
are there any problems with z-ordering if you use tiles like trees or something else that would have a height in a real world?
05/05/2009 (9:19 am)
Hi Jeheon,are there any problems with z-ordering if you use tiles like trees or something else that would have a height in a real world?
#4
05/05/2009 (10:42 am)
looks very cool, we are waiting for isometric pack for TGB for years... so maybe ill make a try to torque X :D
#5
Thanks, John. I read your book and have learned much from it.
Once i had a plan to give a group name like objIso for all object
that needs some stretching and stretch that group objects at runtime.
But i coundn't determine the final screen apperance with that manner.
Manually stretching objects annoy me a bit, but i think it's
a better approach for handling game objects more precisely.
05/05/2009 (7:55 pm)
@John :Thanks, John. I read your book and have learned much from it.
Once i had a plan to give a group name like objIso for all object
that needs some stretching and stretch that group objects at runtime.
But i coundn't determine the final screen apperance with that manner.
Manually stretching objects annoy me a bit, but i think it's
a better approach for handling game objects more precisely.
#6
Maybe simple object collision isn't a problem as Dan's writings.
I think collision shapes like a rhomb (under foot of a object)
prefer over others.
Setting sort point to the exact center of the rhomb may solves
many z-order issue, but i didn't test it yet.
(maybe proper object material split is needed in case.)
Basically it's much difficult to give heights to all terrain.
(maybe true 3D Iso-terrains are better for all aspects)
But simple heights like building roofs, i got some idea for it.
(like using multiple tilemaps for roofs, etc.)
I plan to test another ideas including all above soon.
I'll post another writing when it's completed ;-)
05/05/2009 (8:02 pm)
@Markus :Maybe simple object collision isn't a problem as Dan's writings.
I think collision shapes like a rhomb (under foot of a object)
prefer over others.
Setting sort point to the exact center of the rhomb may solves
many z-order issue, but i didn't test it yet.
(maybe proper object material split is needed in case.)
Basically it's much difficult to give heights to all terrain.
(maybe true 3D Iso-terrains are better for all aspects)
But simple heights like building roofs, i got some idea for it.
(like using multiple tilemaps for roofs, etc.)
I plan to test another ideas including all above soon.
I'll post another writing when it's completed ;-)
#7
Thanks, Javier. I think if you already have TGB,
you don't need to change to TX/TXB for this.
(Because it's just a camera trick in editor,
not in the source code itself.
And i think TGB editor is better for many functionality)
05/05/2009 (8:12 pm)
@Javier :Thanks, Javier. I think if you already have TGB,
you don't need to change to TX/TXB for this.
(Because it's just a camera trick in editor,
not in the source code itself.
And i think TGB editor is better for many functionality)
#8
05/06/2009 (8:46 pm)
I believe the Isometric view is 30 degrees and orthographic is 45 degrees, but minor details lol
#9
05/07/2009 (5:34 am)
Looks alot like fallout 2. I love that game!
#10
I hope you continue to build on this. I'd love to see it develop further.
05/07/2009 (1:55 pm)
This is a really nice idea. Using render masks with multiple cameras should help you get around having to distort your sprites.I hope you continue to build on this. I'd love to see it develop further.
#11
@Matt: I love the whole Fallout series, too! I hope the final look will be somthing like Fallout Tactics or MetalGear-like jungle and fortress maps.
@Josef: Thanks :D I have a plan to use another cameras for GUI and minimaps, tactical markers, etc. Recently I'm afflicted with some strange behaviors of sort point. If I solve (or find some workaround) this problem, I'll post a further result as soon as possible ;-)
05/08/2009 (1:00 am)
@Taylor: Yeah that's minor details lol@Matt: I love the whole Fallout series, too! I hope the final look will be somthing like Fallout Tactics or MetalGear-like jungle and fortress maps.
@Josef: Thanks :D I have a plan to use another cameras for GUI and minimaps, tactical markers, etc. Recently I'm afflicted with some strange behaviors of sort point. If I solve (or find some workaround) this problem, I'll post a further result as soon as possible ;-)
#12
05/08/2009 (6:07 pm)
Yea. You could use the rpg kit to get started, but like John said you would have to completly modivy the objects.
#13
I was playing around with this and I found one solution for collision that works pretty good. Rather than using the tiles for collsion, you can put a blank sceneobject in and adjust it's collision polygon to match the terrain. This worked for me however it is kind of tedious. Thought I'd put that in here as it is one way to get around the collision errors that I started getting when using tilemap collision.
Brian
05/21/2009 (10:46 am)
Hey Jeheon,I was playing around with this and I found one solution for collision that works pretty good. Rather than using the tiles for collsion, you can put a blank sceneobject in and adjust it's collision polygon to match the terrain. This worked for me however it is kind of tedious. Thought I'd put that in here as it is one way to get around the collision errors that I started getting when using tilemap collision.
Brian
#14
I think I might have found out what is the source of your sorting issue. Tilemaps, as it turns out, do not sort on the individual tiles... so the bigger the tilemap, the worse the issue will be since the sort point for the whole tilemap is at the center. I'm not sure if there's a way to fix this since the sort point is part of the T2DSceneObject, not the tiles...
Brian
P.S. Sorry for taking so long to look into this, I only recently had time to look at it.
Edit:
I may be wrong, I just noticed that T2DTileObject extends T2DSceneObject. There's probably some way to mess with it's properties to fix this.
07/07/2009 (9:35 pm)
Hey Jeheon,I think I might have found out what is the source of your sorting issue. Tilemaps, as it turns out, do not sort on the individual tiles... so the bigger the tilemap, the worse the issue will be since the sort point for the whole tilemap is at the center. I'm not sure if there's a way to fix this since the sort point is part of the T2DSceneObject, not the tiles...
Brian
P.S. Sorry for taking so long to look into this, I only recently had time to look at it.
Edit:
I may be wrong, I just noticed that T2DTileObject extends T2DSceneObject. There's probably some way to mess with it's properties to fix this.
#15
http://experimentgarden.blogspot.com/2009/06/translating-mouse-position-over.html
11/27/2009 (2:18 am)
stumbled upon this...also take a look at the comments...http://experimentgarden.blogspot.com/2009/06/translating-mouse-position-over.html
#16
11/30/2009 (3:58 pm)
you can also rotate the camera, and all non rotated objects, at -45 or -30 degrees. it'll look the same but your collisions and movement will be beter.
Indie Core Games