Sleuthhounds Production Update – Implementing Two Characters
February 5, 2016
Last week I wrote about how having two playable characters—both Pureluck Homes and Jane Ampson—in one game lead to some interesting design challenges. Moving beyond the high level design of a game, having two such characters also gives rise to challenges in the nuts and bolts production of the game.
Just Walking Around
Once I turned my attention from the design of the game to the implementation, I was able to get both Homes and Ampson walking around within the same room in very short order. As a bit of background, when you’re playing an adventure game and you click on a given area that you want to interact with your player character typically needs to walk close to that area (after all, it just wouldn’t do if a character could flip a light switch from the far side of the room without crossing the intervening distance first). From a programming standpoint the player character needs to be told to move to position P.
All well and good until you get two potential player characters in the room. One of the things I discovered very quickly was that if I was playing as Homes and had homes go to position P and then I switched to Ampson and had Ampson also go to position P that, compositionally, the result did not look very good.
As shown above, when two characters walk to the exact same spot they overlap in an ugly fashion. This overlap breaks the illusion of depth that the game is trying to convey. After all, the characters should feel like they have depth and mass and occupy space.
To handle this situation, I changed my game code to move characters out of the way if they were going to end up at or very near the same point. For example, if Homes is standing at position P and the player is playing as Ampson and also moves Ampson to position P, then the game will realize Homes is in the way and move him a little distance away. Here’s the result:
It’s a little bit of extra work, but it helps to preserve the sense of depth and space in the game world. If I’ve done my job right, then players won’t even realize that the characters are thin as paper and could stack on top of one another in ugly ways. Of course, if you’re reading this blog then you’re in on the secret. Sh. Don’t tell anyone.
Whose Line Is It?
Something featured in previous Sleuthhouds computer games are various close up scenes. These are places where the main room the player is in is temporarily replaced with a close up of a section of the room for closer examination.
In previous games it didn’t seem necessary to include a visual representation of the player character in these close ups. The conceit was that the player was looking through the eyes of the character and so wouldn’t see themselves.
The problem with having two playable characters and going into a close up comes about when they start talking. With two characters talking back and forth, neither of which you can see, how do you know which character is saying what line? Sure, once the voices are recorded and incorporated you can (hopefully) tell that way. But if you’re hard of hearing or you have the voices turned off…big trouble.
The solution then, was to incorporate silhouettes of the characters into the scenes. By placing one character on the left and one character on the right, it became possible to similarly place where the speech bubbles appear so that it’s clear as to which character is speaking.
Double the Characters, Double the Work
When designing my games I typically focus on the critical path through the games. That is, all of the interactions that the player has to do in order to finish the game. Beyond that, there are a lot of non-essential things that players can do in the Sleuthhounds games. For example, every inventory item that can be picked up can be used on every other inventory item or on any of the hotspots in any of the rooms that can be investigated. Even wonky things like using an umbrella on a ladder can be tried.
The thing is, each of those non-essential interactions has to be custom programmed into the game. And when you add a second player character in, you want to have that character give different, character appropriate responses to each of those actions. So at a stroke, the amount of dialog writing and recording and the amount of programming needed has almost doubled.
It goes even farther than that. Supposing you have a normal light switch in a room. Well, flipping a light switch doesn’t require any sort of special skillset. As such, if you have two player characters you’d expect both of them to be able to flip said switch. And that means that you need to have an animation for both characters to flip that switch. Animations are expensive in terms of how long they take to create versus how long they typically show on screen for.
As I got more into the implementation of two characters I saw more and more how it would be very easy for the amount of work to double with very little gain. It was at that point that I took a step back and did some more design work. With a bit of thought on a per case basis I was able to figure out ways to limit the amount of dialog needed and the amount of animations.
To be sure, there is still some doubling up and I think there always will be. But the lessons I’ve been learning will be useful in the future for determining ahead of time how to limit the amount of work needed on my part without noticeably limiting the playing experience.
Conclusion
Incorporating two player characters into anything more complex than a very basic scenario does have consequences on the production of a computer game. If you’re not careful, you can easily double the amount of work you have to do with very little gain. However, I’ve found that with a bit of creativity, two characters can be accommodated without an undue amount of extra work and with bringing a lot of play value to the fold.
Even so, I’m not sure I’d care to try for three. ;-)