Monday, February 11, 2008

Gravel

I tried out stacking speech messages on the top of the screen and keeping them there until sufficient real time elapsed. The problem with this is that the average time between messages, over a handful of messages (however many lines you're willing to have messages on), needs to work out to be less than the average real-time duration required to read each one. When turns can be dispatched at a rate of a couple dozen per second it's too easy to overflow the screen with messages.

My next idea to try is a variant of the “pull” method I suggested last time, where you would press a key to elicit speech. Instead, I'm thinking to try a “tooltip” approach, where speech is displayed after a short (real-time) period of inactivity. Of course, the player could have been deliberating and end up pressing a key immediately after the speech pops up, so this may just be shifting the problem. I could have speech require dismissal by the space bar; in combination with the tooltip approach it might not be onerous.

This weekend I managed to get in keystroke logging and playback, which should make it possible to view other people's games and see what works and what doesn't. The game ordinarily seeds its random number generator from the system clock, but I record the seed chosen in the log file so that playback will be identical. Other than that the only other thing in the file is a version number.

My game relies heavily on the Ctrl-plus-direction key combinations for using items in the world. I think eventually I will need a non-chord alternative for people who have cerebral palsy or want to play one-handed. I experimented with having the numpad Enter key function as a toggle-able alternative to the Ctrl key, with mixed results. I need some sort of on-screen feedback to make it work completely, and I might move it up to the numpad Plus key.

I intend for the player and NPCs to generate sounds as they move, with the noise level depending on the type of surface they're walking on. Previously I had had only creaky floorboards. A wood floor can have these sprinkled around. They're basically like invisible noise traps: every time you step on one it generates a noise.

Gravel, on the other hand, is a visible terrain type that makes noise. I got it partly implemented this week. In the Thief game I'm drawing my inspiration from, the player's noise level is a product of the surface they're walking on and their speed. In a turn-based game it's harder to have different movement speeds, but I think I've got something that basically works for the gravel. If your last turn was a move, and your current turn is a move, and the current turn ends on gravel, then a “crunch” sound effect is generated. Thus, you can walk silently on gravel by alternating movement turns with waiting turns, as demonstrated below.



The guards don't hear noises yet; I still need to implement that. One thing I noticed with the gravel, though, is that the little sound-effect text messages are possibly annoying. As a result I've been experimenting with color-coding the main character to indicate lighting, noise, and motion. Dim blue is unlit, silent, and still. Bright blue is unlit, silent, but moving. Bright cyan is noisy. Gray is lit but silent and still, and bright white is lit, silent, but moving. As you can see, the noisy state overrides all the others for purposes of display. Whether that will hold up or not remains to be seen.

I may also make gravel be something that is sprinkled around more sparsely, so that you can possibly avoid most of it by maneuvering carefully.

Finally, I put in secret doors. They look like walls, but if you bump them you get the door-opening message. These were easy but they increased my desired to clean up my door and window code so there's less duplication.

No comments:

Post a Comment