Tag Archive | ghosts

Possession 2: Speed Systems in Roguelikes


Fun(?) fact: Speed was the first R-rated movie I ever watched. And I haven't seen it since then.

Fun(?) fact: Speed was the first R-rated movie I ever watched. And I haven’t seen it since then.

Speed is a problem in turn-based games. It’s much easier to just have everyone move once per turn. Anything else just gets complicated, both from a programming and a gameplay standpoint. But given that the differences between bodies are such a big deal in Possession, I really want there to be some creatures that are weak but fast, and some that are strong and slow. Not to mention the possibilities of spells or obstacles that speed/up slow down creatures, and let the player (or their enemies!) run away or escape more quickly.

(I’m going to warn you right now, this post is a bit more in-depth in the development process than other posts have been. If you’re not really interested in game dev it might not be that interesting, but I’m putting it up so hopefully someone facing the same problems might be helped by it).

At first I tried a simple system where certain creatures either got an extra turn or lost a turn every X number of turns, but implementing it got kind of ugly and annoying. I decided to look into what other people had already done. I found this post, detailing a wide variety of time systems used in roguelikes, and decided to go with an energy-based system, which is apparently what Angband uses, which is somewhat appropriate I guess because even though I don’t really like it much now, it was the first roguelike I ever played.

Anyway, the basic way it works is, every creature has a “speed” rating that is added to their “energy” stat every turn. If their energy stat is above 100, they can move, and 100 is subtracted from it. If it’s above 200 they can move twice, above 300 three times, etc. Most creatures just have speed 100, meaning they move once a turn.

For example:

Creature Speed Energy, Turn 1 Energy, Turn 2 Energy, Turn 3
Bat 150 150 (moves once, reduces to 50) 200 (moves twice, reduces to 0) 150 (moves once, reduces to 50)
Zombie 50 50 (doesn’t move) 100 (moves once, reduces to 0) 50 (doesn’t move)
Caretaker 100 100 (moves once, reduces to 0) 100 (moves once, reduces to 0) 100 (moves once, reduces to 0)
The ghost moves faster than most creatures, so the player has a chance to run away. Click to enlarge.

The ghost moves faster than most creatures, so the player has a chance to run away. Click to enlarge.

Same goes for the player, of course. If they have above 100 energy, they can move, if not, a turn happens without them. If they have above 200 energy, their move is an “extra” move. They still move, as does any creature with more than 100 energy, but nobody’s energy increases that turn.

Double-jumping bats. Animated, click to view.

Player takes extra turns, then bat takes extra turns. Click to enlarge.

This system worked pretty well as-is, but it does run into a weird problem. I had bats and ghosts both faster than normal, but the ghost was slightly faster than the bat. It got an extra turn every two turns, and the bat got an extra turn every three. This resulted in, one turn, the ghost would move twice and the bat wouldn’t move, the next turn the bat would move twice and the ghost wouldn’t move. It didn’t make much sense.

Bat now takes extra move when player takes extra move. Animated, click to view.

Bat now takes extra move when player takes extra move.
Click to enlarge.

So, the get around that, I made it so that if the player is faster than a creature, the creature saves up enough energy to take an extra turn, it doesn’t actually take its extra turn until the player takes their extra turn. That seems to work pretty well so far. Might take some more tweaking as things continue, but we’ll see.

The other problem with this system is that all actions take the same amount of time. It’s not currently possible to have, for example, a creature who moves slowly but attacks at the same speed. Or a creature that can move 5 spaces per turn but only attack once. I’ll have to see if that’s something I want to invest the time into making possible.

On Speaking With Ghosts


Why would I want to talk to the dead? What could we possibly have to say to each other that would be of any interest?

“So I tried out this new pizza place the other day….”

“I haven’t eaten anything in 25 years. Way to rub it in.”

“Oh sorry. Let’s talk about you, then. What’ve you been up to?”

“Oh you know, not much. Just kind of floating around, rattling chains, moaning spookily, regretting having died with unfinished business, the usual. It’s been pretty lonely, really, it’s hard to get out when your physical manifestation is tethered to the spot you died.”

“That’s cool,” I’ll say, meaning the exact opposite. “Well, it’s been fun, but I gotta go.”

“Really? You just got here. What do you have to do?”

I don’t have to do anything, I’m just sick of talking to this boring dead guy. I can’t say that, though. I’m a sensitive guy and I don’t want to hurt his feelings. So I make something human up and hope he doesn’t remember enough about being alive to realize what I’m saying makes no sense: “I have to pee. You know how it is. Damn these bodies, always with their physical needs and stuff. You’re lucky, really. Anyway, I’ll see you later.”

“No you won’t because I’m an INVISIBLE GHOST.”

The Suicide Tree


Victoria Falls being the home of so many ghost stories, it stands to reason that its graveyard is an immensely popular tourist attraction. Strangely enough, its most famous occupant isn’t buried here, but is actually a tree! The so-called “Suicide Tree” stands almost in the exact center of the graveyard, a nearby headstone placed almost perfectly to allow someone to climb on it to tie a rope around the tree to hang themselves with. Local legend states that this is exactly what a young widow did on hearing the news that her husband had been killed in World War I.

It’s said that when you stand under the tree’s branches at night, you can hear the poor widow’s sobbing. However, after five teenagers were found dead, hung from the tree the morning after a full moon, the Victoria Falls Police decided to place an officer near the tree at night to dissuade any other potential suicides or vandalism, and do not allow anyone to approach it. They of course deny that you can hear sobbing under the tree. If you ask almost any of the officers though, most will admit that they’ve been too scared to try it for themselves!

%d bloggers like this: