I’m investigating making an isometric style game similar to this:
http://youtu.be/Pjkhw0crcOs?t=2m50s
This style game is essentially 2.5d, similar to games like King’s Quest, with 2d sprite characters moving around in an isometric view, with layered sprites for structures like buildings, trees, etc. You walk around a scene, and then reach an edge and move to the next screen. The camera may scroll a bit across the scene before it reaches the edge.
From a technical perspective, I was thinking of the following:
Using the new 2d features of Unity, a scene would consist of:
- A background layer - always behind everything else.
- A mid-ground layer, where buildings, trees, etc. as well as the characters move around on.
- A foreground layer, always in front.
I’d like to use the Unity editor to place sprites in the mid-ground layer, then attach a script to them which sets their “Order in layer” (Renderer.sortinOrder) value based on the screen Y position. That is, the higher they are in screen space, the further back they are in the layer.
Since characters move around in the scene, I might be constantly re-sorting the sprites, but perhaps would only have to re-sort the movable sprites through some trickery (leave large gaps between the sorting order values of the static sprites).
Extra thoughts:
I’d like to create a prefab gameobject, with one sprite that renders to one layer, and another sprite that renders to a different layer. For example, I’d like to have a building render to the mid-ground layer, and a shadow sprite render to the background layer, and have them both move simultaneously when placing them in the editor.
Okay, so does anyone have an opinion on this approach?
Thanks,
Clay