Developer Diary – 84 – Representing a 3D World in 2D
In this video, I talk about the difficulties of creating a navigable 3D world represented with 2D art.
Hello and welcome to another in game developer diary! And so this developer diary is going to be kind of interesting, well hopefully interesting because I’m going to talk about the things that no one really thinks about when designing a game and certainly things that we didn’t have planned out when we started.
Firstly let me go through this door,
And then here you go right to left which seems reasonable.
You continue to go right to left until you go out the last door which leads you back to a hallway.
Now this is the same hallway as before, the question is say you want to progress further in this level, which way do you go? Do you go left or do you go right? So let me just use my little debug cheat here to get back.
Ok so this is the door we entered so it’s the same hallway, if you want to go further you would continue to the right. The idea is things are arranged such that left to right is forward, in this section of the level anyway. Now the interesting thing is if you open the same door again, imagine if you were entering a door on the back wall and then came into this room.
The actual way to go to progress further would be to the left. This was something that I completely didn’t understand, that you should actually be going to the left through these rooms for this to match the outside room. So to some extent people who go to the left after exiting the end door are actually going in the same direction but at least in my mind I didn’t think of this at all. To me it was like “Ok left to right is how we want the level to flow so we’ll arrange the rooms that way” but the problem is that we are creating a 2D representation of a 3D world. This can be quite challenging.
One of the games we looked at was ‘Resident Evil’ and that game has 2D renders of the background and static cameras, which can be frustrating as they have the tank driving controls for the character. However they were very fortunate in that they had two things going for them, one they had a map and two they could frame any camera angle they wanted. So we can move the camera a bit but it’s difficult to come up with new camera angles that are A) Not too jarring, like they’re not reversing the direction of everything but also continue with the flow we want. Because one of the things we want is that you don’t get confused when you go through a door, you know where to go and so for example we could have it so you go through this door
And then this door the camera’s all rotated around so you come out on the other side
Actually this is a feature I want to add at some point is the idea that we show the doors closing that you just came through, because I think it will help sort of connect the rooms and help suit your mind to fill in the idea that you’re in a 3D space with 2D representation.
We do our maps in a 2D top down view and then we realise some of the rooms and some of the directions we want we can’t frame with our camera or it would produce a weird thing, because basically you can only show the room from certain camera angles. Like for example because the door is on the back wall and this window is on the back wall this window basically can’t exist, it’s opening into a hallway. The solution for that of course would be to basically flip the camera in this room, so if we flipped this room the window would be on the opposite side of the mansion facing the outside. But then the problem would be that the camera would be flipped just for this room and you’d be travelling the opposite direction than the direction you’re travelling for the other rooms.
So it’s really a tough problem to solve and one that we weren’t fully equipped to solve, we didn’t really think it all the way through because we looked at ‘Lone Survivor’ and that game has doors in the foreground and we’re like “Oh well we’ll just arrange our rooms such that we don’t need that foreground door” which turned out to be really hard. I looked at ‘Maniac Mansion’ and so we have a similar sort of room for a screen, the perspective on the left and right walls kind of like the original ‘Maniac Mansion’ but I think everything is mostly left to right and they don’t do a lot of camera angles or trying to create much of a 3D space.
So yeah it’s a tough problem to solve and certainly one that I think would be worth thinking about if you’re trying to do a game like this. I mean certainly another solution is like the game ‘Home’. ‘Home’ basically is a 2D space, there are no doors on the back walls, there are no 3D aspects to it, you just move up and down stairs and left to right. Certainly that’s a good way to simplify things but I think for our game in which exploration is sort of a big and important aspect to it, at least in my mind, so that wouldn’t work very well.
Anyway the real question is I’d like to pose at the end of this is when you go through the door should you end up on the other side and go left to right or should you go right to left? Do we go with the way that would match the 3D world or do we go with the way that matches the direction that the player is used to going? I don’t really have the right answer so I’d really like to know what you guys think.