So, I’ve been wondering whether to make my game true 2d, or 2d with depth like in the old TMNT arcade games. I would have outright picked 2d with depth, as it looks a lot better and expands gameplay, but I’m not too sure how I would perform collision with that (would the box2d shipped with libgdx work? I honestly don’t know). I looked at this thread: http://forum.unity3d.com/threads/158842-Side-scroller-with-depth-(TMNT-Double-Dragon) but there was only 1 reply, “You’ll need to decide whether you’re doing 2D or 3D. That’s more an art decision than a programming one”
xD
There’s probably other problems with 2d and depth that I haven’t thought of, but any help is appreciated.
I would use a 3D collision system (eg. bounding boxes). The rendering would be fake… simply adjust a sprite’s Y value and size based on the Z value of the entity’s bounding box. Order your sprites by layer (background, middleground, foreground) and then by Z position / depth.
Also see this answer:
Why not go full 3d with 2d collisions?
You can just leave 3D out of the picture by setting your gameplay at z == 0 just like I did with this game (2d sprites are still in a 3D world, but collisions are in 2D):
http://rel.phatcode.net/index.php?action=contents&item=Pyromax-Dax
Source is in the /source folder.
Because in the old TMNT games and so on you can actually walk in the depth axis.
I’d do it with 3d collisions. but fake the rendering like davedes suggested.
Mike
@davedes
Sorry for the extremely late reply, but I’ve been pretty busy. How do you suggest I go by bounding boxes, just have a thickness/depth variable in each player/enemy class? Will this still work with a high-level library like libgdx’s box2d?