Revisiting room-based camera control yet again

The camera control system is a continually evolving and complicating machine, one I’m positive I’ll keep tweaking right up until the release of the game. At the moment, I’m still trying to come up with ways to resolve relatively fundamental issues, such as something I call “room peeking.” The following video demonstrates the problem:

The empty area the camera briefly pans over as the character turns the vertical corner in that room is part of another room in the map (or could be; it’s just empty space right now). Under no circumstances should you be able to sneak a peek into an adjacent room by walking its perimeter, and the camera needs to enforce that constraint. I have some ideas for making that the case which I’ll be working on later this week. In case this issue isn’t clear, the image below illustrates what I’m talking about. The area on the map to the left of the character’s current position shouldn’t ever be seen, since it’s not part of the current room.

Still my favorite implemented feature

There are some related issues I’m noticing as well, such as the fact that the screen doesn’t divide perfectly into 64-pixel tiles, which means I’ll need some sort of obscuring border around the screen for the PC version (the XBox version should be fine, since TVs cut off the edge of the display anyway). More testing is in order.

Today I had to spend some time paying down some design debt, climbing out of a hole I dug by writing a camera and mapping system without fully understanding the requirements of it. This is the way of all software, and I’m still very much committed to learning game design the hard way. It feels good to have a much cleaner implementation in place now, with better separation of concerns and responsibilities — but it still kind of smarts to spend a whole evening slinging code to end up where I started.

Leave a Reply

Your email address will not be published. Required fields are marked *