2D Toolkit Forum
2D Toolkit => Support => Topic started by: skisos on August 14, 2014, 09:33:38 am
-
Hi everybody!
I'm working on a pseudo Top-Down RPG using tk2d Tilemap. I really like the tool but I would need a "diagonal tile", as seen in "Legend of Zelda: A Link to the past" or here: http://knightgirl.robotknight.com/unity-builds/v2.1a.html and I don't know how I can get it.
I don't want to use colliders to keep the player inside the "walkable" area, I just use the tilemap as the "logic" behind my sprite background (telling the player things like "you can walk here", "you cannot pass through here", etc). Currently, I can move my player around the "walkable" tiles and get stuck on the "wall" tiles, but if I want to make a "diagonal road" I have to make them with tiles and the player can't walk through them very well as he gets stuck:
[ ] : tile
/| : diagonal tile
|/ : diagonal tile
What I have:
[ ] [ ]
[ ] [ ]
[ ] [ ]
What I'm looking for:
/| [ ] [ ] |/
/| [ ] [ ] |/
[ ] [ ] |/
How could I achieve that? Any ideas about how to approach to this? Should/Could I edit the mesh of a specific tile?
Thanks!
-
Those are just drawn diagonal tiles in addition to square tiles. I don't think theres anything special about it. If you notice there are only 2 diagonal angles in that demo
-
Those are just drawn diagonal tiles in addition to square tiles. I don't think theres anything special about it. If you notice there are only 2 diagonal angles in that demo
thank you four your reply unikron, I was editing my previous post to explain it better.
Could I achieve what i'm looking for?
-
You will need much more robust and possibly complicated collision detection if you stop using the physics. You will need to store the slope of each tile somewhere.... I'm not sure if I know any tutorials on doing handling the collision response after that step - probably worth googling about it. Its totally outside the scope of the tilemap editor though. You can do it by turniing off collision generation in tk2d tilemap and doing it yourself.
-
You will need much more robust and possibly complicated collision detection if you stop using the physics. You will need to store the slope of each tile somewhere.... I'm not sure if I know any tutorials on doing handling the collision response after that step - probably worth googling about it. Its totally outside the scope of the tilemap editor though. You can do it by turniing off collision generation in tk2d tilemap and doing it yourself.
I think I didn't explain myself very well, sorry about that :-[
My game uses a top-down camera so I don't really need the slope data. Check out this screenshot of another game:
(http://i.imgur.com/XG6F5z9.png)
I'm looking for something similar, "diagonal roads" where the player can walk on (as they are "walkables"), but currently my roads aren't diagonal at all as my tiles are squared and the player gets stuck on them, so I would need to "cut" some tiles or to be able to paint a "triangular" one.
(http://i.imgur.com/1bcVmzl.png)
-
But you do need the slope data even for this. How are you to otherwise know to smooth out the diagonal lines? You'll need different tiles for that though, you can't automatically smooth that data out.
-
I didn't think about that... Any workaround to solve this?
-
No not really, I can't think of any way of guessing this information.
-
Ok so I have to think a new way for this. Thanks for your help