- Home /
Block Perspective in Top-Down 2D Games
I've been recently working on a top down 2D game that has a perspective on the world like Nuclear Throne or Bomberman:
(Like this) https://www.rockpapershotgun.com/images/15/dec/nuc3.jpg
Where blocks jut out of the ground and they have a little depth to them, however, I can't seem to figure out a method to tile these. Would a method be to simply create one sprite and then have the blocks tile in a way where the 2nd face isn't visible? Or would you have to alternate between 2 sprites? One for when the 2nd face is visible and another one where it isn't?
Anyway I'm having trouble figuring this out, if someone could send me some project examples or something like that it will be much appreciated.
Thanks
Since they are all at the same angle, and the angle doesn't change when the camera moves around: can't you simply draw all your "southern-wall-edge" tiles with that perspective? (Create/draw a new tile for "southern-wall-edge", in your image drawing program.)
Answer by GIRsMySpritAnimal · Jan 13, 2017 at 08:35 AM
I don't have a lot of time ATM to write this so I apologize if it's not perfect
If I'm understanding you correctly you want a 2.5D game with an Isometric camera like Pokemon Yellow/Red/Blue/Green. Having 2 sprites with a block in the way won't work since it could have varying degrees of how much the rock covers something and could become very tedious and a waste of time. The reason a block overlaps a character/CPU is because it's in front of that character. Like if you put your right hand in front of your left.
One of the ways I created a 2.5D game in Unity a while ago (there may be way better ways now since it was a few years ago and there was no 2D option so I made it 3d with 2d graphics) is by creating a tile map with each tile farther back on the Y value of the map so it's "behind" the last tile and then adding objects like this block (which technically isn't "jutting out" it's just in front of something) on a higher layer than the tile behind it on the map so it's on that tile and covers the one behind it and when the player moves on a farther back tile they change to that layer so they appear behind it.
Again this was a while ago so I'm sorry if it's no longer one of the better ways (probably not) and I dont have a lot of time. I recommend googling 2.5D games in unity to get some tutorials that can teach you better than this forum probably can.
small update: Look here at this unity doc to help decide exactly how you may want to set it up. It has changed quite a bit since I last used it so this could help with a lot of your project
Answer by JxWolfe · Jan 13, 2017 at 08:36 AM
I would use different sprites, One with the edge and an other without it
Generally it's good-form to up-vote a comment or answer you agree with, rather than posting your own version.