Tag Archive | zombies

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.
Advertisements

Possession Dev Log – Day 2


Didn’t get much done today. My phone didn’t change for DST, so I ended up waking up at used to be my normal waking time, which was now an hour later, and I had to be at work earlier than usual.

I did make it so that spells can be cast on areas (before they could only be cast on creatures), and wrote “friendly” monster AI, which combine to result in this:

possess5 zombies

Dead and Dirty in Dubai Part 9: Oscar Moments


(Just joining us? Go back to the beginning of the story.)

“Hey lady!” shouted Alex, “Over here!”

They had jumped dramatically through the window of the hotel to rescue Jenny. She caught sight of them and ran over.

“Come on y’all, back in the hotel!” shouted Billy.

The three of them ran back to the hotel and dove through the window not a moment too soon. Jenny’s pursuers howled in heat and anger that their quarry had escaped. The three of them sat on the floor panting, when Billy looked up.

“Oh hey there sweet pea, I wondered where your pretty little self got off to there,” he said, smiling at the woman he met in the bar.

The woman smiled back, but her smile was filled with razor sharp teeth that dripped with blood. She lunged at Alex, biting him on the arm.

“Shit!” he screamed, shaking her off, “Back out the window!”

“Wait!” Billy said, taking a bottle of booze out of his pocket. “Gonna drive off those sons of guns first.” He fashioned himself a molotov cocktail, lit it on fire, then through it out the window. The three followed.

Unfortunately, they found themselves in a writhing mass of horny zombies. To make matters worse, several of the zombies were now on fire. Jenny was the first to go down. By playing hard-to-get, she’d annoyed and upset the zombies even more. Alex was futilely trying to beat of a paramour of his own. Billy, on the other hand, had caught on fire when one of the flamboyantly flaming zombies started to dryhump him.

As Billy went down in flames, he caught Alex’s eyes one last time. Alex looked at him sadly from beneath a pile of writhing bodies.

“Young man,” Billy said, haltingly, “I ain’t known you that long but I got somethin I gotta tell ya.”

“What’s that?” asked Alex, choking back a sob that was partially caused by this heartfelt moment, and partially from the intense sense of violation he felt.

“I gotta tell ya…”

Moaning and groaning.

“…that even though…”

Disgusting slurping noises.

“…you’re just some no-good punk kid…”

“What? What?” Alex shouted, straining to reach Billy, knowing deep in his heart that Billy was going to say what both of them knew, to reveal the powerful forbidden feelings that they’d felt for each other since the moment they’d met. That he would tell him how different things would have been under different circumstances, how this whole horrible apocalypse had ruined everything but still, they’d found a brief moment of happiness in the few minutes they’d spent together.

“…the Baby Jesus loves you.”

Dead and Dirty in Dubai Part 8: How Not to Get a Tip as a Waiter


Bear Grylls looked up from his meal. “Did you hear that?” he asked.

“Well gee Bear I dunno,” said Tim, “What’d it sound like?”

“This is why I’m famous and you’re only the cameraman, Tim,” said Bear. “It sounded almost like…a small bell.”

“There was a bell on the door of the restaurant,” said the doctor.

“I bet it was the bell on the door of the restaurant,” said Bear, “Let’s check it out.”

The trio crept to the door of the kitchen and peeked out into the dining room. There, they were horrified to see several zombies sitting at the tables, pounding their silverware and  loudly demanding their meals.

“Gee Bear, that’s a lot of zombies dontchaknow,” whispered Tim.

“Now look,” Bear said, pulling back into the kitchen “Things look pretty bad right now, but I didn’t get to be the most famous survivalist in the world by giving up when things look bad. I’ve got a plan.”

“Hello!” the three shouted as they glided out of the kitchen wearing the clothes that used to belong to the waiters of Luigi’s. Each of them held a covered silver platter in their hand and they approached the nearest table. The zombies looked up at them and grinned.

“Tonight, for your first course,” said the doctor.

“We’re just so proud to present to you,” said Tim.

“Your death! Um…second death!” shouted Bear, as the three whipped the cover off of the platters to reveal meat cleavers and other various knives.

In the aftermath of the bloody battle, the three sat on the floor exhausted.

“Where’d you learn to be so good with a knife?” Bear asked the surgeon.

All of a sudden, three police officers kicked down the door.

“Freeze!” they shouted, “We’re shutting this place down for not paying your rent!”

“There’s a zombie plague infesting the city and you’re worried about rent?” asked the doctor, amazed.

“You have the right to remain silent, so shut up!”

“Make sure you get this on camera,” Bear whispered to Tim. “Confrontations with armed maniacs always bring the ratings up.”

Bear stood slowly, holding his hands in front of him in a gesture of peace. “Officers, there’s been a mistake,” he said, as he grabbed for the nearest one’s gun. Unfortunately, another one of the officers noticed this and smacked him in the face with a shotgun, shattering his skull. Bear Grylls collapsed, dead.

Dead and Dirty in Dubai Part 7: Sexy Hotel Rendezvous


(Just joining us? Go back to the beginning of the story.)

Billy walked out of the bar into the main lobby of the hotel, zombie chick in tow. He spotted Alex, who was looking around the room in a panic.

“Well now what’s the problem here?” asked Billy.

“There’s a bunch of sex freaks outside,” Alex said, “And pretty soon they’re gonna be in here! We gotta get out!”

Billy took a look out the front door, which had been shoddily barricaded by Alex. The zombies outside were humping the door furiously in an attempt to get in.

“Well now y’all just calm down,” Billy said, kneeling, “We gotta pray to the Baby Jesus for strength.”

Alex looked around the lobby in a panic as Billy prayed. “We can’t go out the front, I guess we gotta break into one of the rooms and get out the window that way,” Alex said, rushing at one of the doors, trying to break it open.

“Hey now calm down son!” shouted Billy, “Don’t go breakin’ those doors down! I own this place!” He took a key out of his pocket and calmly unlocked the door.

Alex ran to the window and looked out. He gasped in horror as he saw Jenny running towards the hotel. “Look, those perverts are chasing that woman! We gotta save her!”

“Alright,” Billy said, “I guess that would be ’bout the most polite thing to do.”

Billy’s date said nothing, but stood in the room drooling on herself.

Dead and Dirty in Dubai Part 6: Umano Parmigiana


(Just joining us? Go back to the beginning of the story.)

Bear, Tim and the doctor made it to Luigi’s fairly uneventfully. Walking into the restaurant, however they were assaulted…by a delicious smell!

“Well gee Bear, that smells great!” Tim said, licking his lips.

“Right, yes, I think we’ve hit the motherload here,” Bear said, beckoning for the camera. “Apparently when the zombie attack hit, the chefs in this restaurant fled, leaving a delicious meal behind for any survivors.”

They walked into the kitchen and soon found the oven that was producing the smells. Opening the oven, they found their worst fears realized…inside was a human body!

How nice of you to join us for dinner,” groaned a seductive voice. Turning around, they saw a zombie leaning provocatively against the door frame, blocking the exit. “Maybe afterwards, we could go to my place for a bit. Or a bite.” The zombie laughed pervertedly.

The three heroes looked at each other, then grabbed the knives off the counter. The zombie was soon dispatched.

Bear motioned for Tim to begin filming him. “Sometimes,” he said, “When you’re in the wilderness and starving to death, you don’t have a lot of choice. Sometimes you have to eat things you never thought you’d eat…”

Dead and Dirty in Dubai Part 5: Indiana Jonesing


(Just joining us? Go back to the beginning of the story.)

In the middle of the city square, a group of zombies rushed from the west to the east, growling and snarling and clawing, blood dripping from their mouths.

On the eastern side of the city square, a more colorfully dressed group of zombies rushed towards the west, moaning and groaning and pelvic thrusting, something entirely different dripping from their mouths.

The two groups met in the center, a frenzy of destruction. Zombies scratched and clawed at zombies who mounted and humped other zombies.

Suddenly, both groups were scattered as a jeep plowed through the center, rendering zombies of both types into colorful stains on the ground.

Inside sat the famous archeologist Jenny Zaland, her driver José, and assistant Phil.

“Remind me again why we had to come back into the city?” asked José.

“Those relics in my hotel room are priceless. We can’t let them be destroyed,” Jenny told him for the thirtieth time.

“Watch out!” shouted Phil, as José swerved around a group of undead women who had planted themselves in the road and were hiking up their skirts at the passing car.

“Those artifacts we found at the site could change the course of world history,” Jenny continued. “We’ve got to get them somewhere where they can be properly studied.”

“Why’d you store them in your hotel room anyway?” grumbled Phil.

As the jeep passed an alleyway, they were suddenly ambushed by a group of sexy zombies who pounced on the car and began drooling on the windshield. José screeched and turned the wheel, causing the car to flip. Jenny was thrown out of the car, but miraculously landed in a soft pile of rotting bodies. José and Phil were not so lucky, though. The car hit a wall and caught on fire. The zombies approached the two, desire in their eyes.

“Shit,” Jenny muttered, climbing out of the pile of bodies. She noticed her archeological pick had been thrown out of the car as well and was lying in the road in front of her. Unfortunately, as she bent over to pick it up she attracted the attention of a particularly perverted zombie who happened to be nearby. He pointed at her and shouted, and she took off running towards the hotel, several randy zombies in pursuit.

%d bloggers like this: