• Register
Post news Report RSS How Kevin Bacon Helped Make Malevolence

My project team have the distinct honor of listing actor Kevin Bacon in the ‘Special Thanks’ portion of our credits, but I doubt he has any idea that he’s in there. The fact is, he’s had a very large – albeit unknown – influence on the game’s development.

Posted by on

My project team have the distinct honor of listing actor Kevin Bacon in the ‘Special Thanks’ portion of our credits, but I doubt he has any idea that he’s in there. The fact is, he’s had a very large – albeit unknown – influence on the game’s development.


The game is Malevolence: The Sword of Ahkranox, which I have been project lead on for over two years now, and its engine is quite different to most games due to the fact that the entire game world is procedurally generated, infinite and also persistent.

Being infinite AND persistent, the team’s main challenge was to keep the game interesting so long as the player kept playing (not an easy task). We, of course, took the path of procedural item/weapon creation, even going so far as to make the game procedurally generate the graphics for the weapons, to ensure plenty of new gear to find. That, however, can only last for so long, and procedurally generated countryside, dungeons and towns can only entertain a player for so long before they all start to look the same. So we put our heads together and came up with a solution. We all agreed that would couldn’t keep the players interested infinitely, but we can take steps to ensure they get maximum enjoyment and re-playability out of the game while they do play it.

What we came up with in the end was the quest and dialog system, and the way they interacted. Both were to be procedurally generated and intricate enough to ensure long-time interest from the player. But how does Kevin Bacon get involved with this? The answer lies in his namesake header file:


Some readers will be familiar with the Six Degrees of Kevin Bacon game back in 1994. The basic concept was that you could take the name of anyone involved in the Hollywood film industry, whether they be an A-List actor or an isolated gaffer somewhere on an obscure film, and within no more than 6 steps, be able to link them to Kevin Bacon. For example, one of the voice cast in my game Malevolence, Karen Kahler, was in the short film “The Magician” with actress Jackie Zane, who was in the film “Burning Palms” with actor Nick Stahl who acted in the movie “My One and Only” with Kevin bacon. Thus, her “Bacon Index” is 3 (and through Karen, mine is 4!). Make sense?

Well, it’s that system (or a modification of it) which the NPCs in Malevolence work with.

Let’s say that the player enters a town and talks to an NPC. The game determines that this NPC will have a quest for them, and so the game spreads its feelers out and works out what is relatively close to the town, and how far away each location is. Since the game world is generated procedurally, it does this process dynamically:


First the game procedurally generates the quest. The engine first selects what type of quest to generate and settles on an item centric quest. It then generates an item, and an incident and comes up with a backpack which was lost. Once this is done, the NPC tells the player that they need help recovering their backpack from a dungeon that they were exploring. Only the catch is, they fled the dungeon so quickly that they don’t remember where it was.
While this is happening, the engine consults the memory map shown above and looks at the area around the town for a few kilometers, then chooses a dungeon that is close enough to not be too far away, and far enough away that the player will have to search for it. However, once it has found a dungeon, it doesn’t let the player know where it is like most games. It is now the player’s mission to search for it.

Now that you know that there is a dungeon out there somewhere with a backpack in it, you can ask around to get more info. The engine, however, is processing the dungeon’s “Kevin Bacon Index” in the background. The main difference, however, is that not everyone knows everyone else perfectly well, so if one person gives you information, they may not be 100% sure about the information. So when you get a map of people like this:


You can see the percentages between them all. That shows the familiarity of the characters between them. So, if you speak to NPC ‘A’ and ask them about nearby dungeons, they will tell you that they have no idea about that sort of thing, but their friends Steve and Kyle might. If you speak to Steve, he may refer you to Kyle or pass you on to Bob the Blacksmith, who he’s fairly sure knows a mapmaker and a woodsman, who would probably have a better idea about dungeons in the area. When you speak to Bob the Blacksmith, he’ll tell you about Keith the Woodsman, who is familiar with the local wilderness, but will more likely put you on to Kevin the Mapmaker, who knows Keith the Woodsman quite well and may be able to help you himself (with his maps). These NPCs may all be in the same town, or they may be spread between multiple towns. It’s all generated by the procedural engine, but it’s how the player FOLLOWS the path that defines how well the quest will work out.


If a player is clever and good at deduction, they may have an easy time of it – for example, if they followed the path ABDEF, while it may not be the most direct route to Keith, they will get some accurate maps out of it, and maybe even a new weapon to help clear out the dungeon to find the backpack. But if they don’t follow good advice, they may have a far less fortuitous way. And keep in mind that due to the lack of familiarity between certain NPCs, sometimes the player will get false information in their searching, which can slow them down quite a bit.

However, not all quests in the game will work like this. The quests are divided into two quest types. There are the multi-tiered quests, as mentioned above, and “b*tch quests” which are your standard “there’s a dungeon, clean it out” or “there are rats in my basement, kill them”. On top of that, even when a player is assigned a multi-tiered quest, sometimes they will have 3 steps to complete, sometimes they will have 20, it all depends on how the cookie crumbles in the procedural generation.

Making a game which is infinite AND persistent has provided countless challenges to us as a dev team, but the solutions to intricate problems are often the most unique. I hope you enjoyed reading about this little section of our game, and if you ever end up playing it and you see Kevin Bacon in the credits, you’ll now know why.

Remember to follow us everywhere with these links!

Post comment Comments
Expack
Expack - - 312 comments

The procedural questing system looks awesome! It reminds me a bit of how you could ask NPCs in Daggerfall about quest items (yes, I am aware that that game is one your influences in making Malevolence). However, will there be more types of quests other than fetching backpacks?

Also, I know this would be insanely-complex (if not impossible) to do, but have you considered doing a procedural voice-acting system? How it would work would be similar to how they did the voices for WALL-E and EVA in the Pixar movie "WALL-E". Namely:

1. Have the actors you want to use record gameworld-originating generic phrases and words in a neutral tone.
2. (Preferable IMO, but not required) Create a system which can string these words and phrases together in a near-seamless fashion.
3. While the voice audio is playing, have the game's audio engine modify the voice audio's pitch and/or tone throughout the dialouge based on the character's mood, desired inflection, etc.

Step 1 is critical for Step 3 because it easily provides a sort of aural canvas on which you can 'paint' pitch and tone.

Keep up the awesome work!

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

We'd love to do that, but it'd just end up sounding awful :( we had a play around with getting it to work and I just think that technology isn't quite there yet...
But yes, there will be many more types of quests than retrieving backpacks! We've got item centric quests, NPC centric quests, location centric quests, magic centric quests, etc. Each of these can have factors such as "search for", "retrieve", "destroy", "get more info on", etc. It's very thorough!

Reply Good karma+1 vote
Expack
Expack - - 312 comments

If stringing phrases and words together wouldn't work, how about stringing sentences together? For example:

"I recently made a trip to a faraway castle." "While there, I lost my favorite dagger." "Would you be willing to get it for me?" "I'd be willing to pay you quite the sum of money."

I understand that doing a procedural voice acting system like this would be time-consuming to record every line, and I also understand that you wouldn't have the same sort of variation as you would with stringing words and phrases together, but I think it would be a good compromise given the current state of technology.

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

We actually tried that method, too, and it ended up coming across as a bit repetitive. Still, we thought we'd give it a go, but then we budgeted it out and we'd never be able to afford getting that many lines from that many voice actors! We're only a mere independantly funded group and our budgets are rather low :(

Reply Good karma+2 votes
Sph!nx
Sph!nx - - 722 comments

Today I've learned a new thing. Thanks.

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

And there's more where that came from! :D Thanks for reading!

Reply Good karma+1 vote
myxale
myxale - - 666 comments

This is probably the most interesting thing I read this whole month!
Cool 's not a strong enough word!

And now I wonder what my Bacon-Index might be!

cheers!

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

One should always be aware of one's Bacon Index :)

Very glad to hear that you enjoyed it!

Reply Good karma+1 vote
Rayman51
Rayman51 - - 201 comments

today, kevin bacon learned me something ... who knew hollywood actor could have been that useful XD ?

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

He's been very helpful! XD

Reply Good karma+1 vote
Rayman51
Rayman51 - - 201 comments

that would also mean... well, is there any chance that there might be a central character in the game?

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

Player encountered KEVIN BACON

Player uses FOOTLOOSE

It's super effective!

Reply Good karma+1 vote
DoctorSpanky
DoctorSpanky - - 1,733 comments

So you can confirm that Kevin Bacon will be in the game then?

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

Unfortunately not. But a) he'll be in the credits and b) with our procedural name generator, there MAY WELL BE an NPC called Kevin Bacon! If you find him when you start playing, let me know! Pics or it didn't happen!

Reply Good karma+1 vote
Rayman51
Rayman51 - - 201 comments

something like : " A WILD BACON APPEAR!!!" "player use masterball" it's super effective!!!!!

Reply Good karma Bad karma+1 vote
StoneCrowUK
StoneCrowUK - - 308 comments

wow, sounds amazing!

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

Thank you! :D

Reply Good karma+1 vote
booman
booman - - 3,650 comments

Interesting method... I hope it play out well in Malevolence. Sounds like there will be plenty to do and lots of NPC's to interact with. I'm hoping there are plenty of quests that aren't too redundant requiring us to trample the same areas 40 times.
I had that problem with Witcher... the world was small compared to Elder Scrolls games and I had to run around the sample places over and over and over and over...

Reply Good karma Bad karma+2 votes
SIGILL
SIGILL - - 1,157 comments

I agree about The Witcher, the repetitive running around kind of ruined the game.

Anyway... this quest/dialog system sure is interesting. You guys keep coming up with all these cool concepts, it's making me kind of jealous :( (That's a good thing.. it's my attempt at writing a compliment :P)

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

lol thank you :) there are more to come, too!

Reply Good karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

Oh, don't you worry :) the world of Ahkranox is infinite in size, and we plan to make use of all of it ;)

Reply Good karma+2 votes
Dbn404
Dbn404 - - 35 comments

This sounds extremely interesting as usual.
I haven't been keeping tabs on this project for a few months, I get into these periods where I just don't want to do anything programming related, so yeah.
Today a new idea for a game suddenly popped into my head and I started poking around TGC forums again and I naturally came here right away. :)
Can't wait to get more of your amazing updates!

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

Thank you! We'll be putting more up soon!

Reply Good karma+1 vote
Expack
Expack - - 312 comments

Just read this article on AltDevBlogADay - heck, it even got reprinted on Gamasutra ( Gamasutra.com )! Congrats!

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

I know, right? It was so cool to get put up there! And twice, too! I wrote this one, too Gamasutra.com

Reply Good karma+1 vote
Rayman51
Rayman51 - - 201 comments

and by the way, is a main scenario ready ? i mean, it sure is funny to run around and loot in an infinite world, but won't it get boring without a story ?

Reply Good karma Bad karma+1 vote
CumQuaT Author
CumQuaT - - 776 comments

Yep, it's all there. Just focusing on getting the world generation working nicely first :)

Reply Good karma+1 vote
Rayman51
Rayman51 - - 201 comments

thank about that XD I was starting to get scared about that . I mean, how can an RPG be an RPG , without a story XD ?

Reply Good karma Bad karma+1 vote
Post a comment

Your comment will be anonymous unless you join the community. Or sign in with your social account: