[In development] Covert World


ElPoco

Hardcore Member
Joined
Feb 16, 2012
Messages
1,227
Age
40
Location
Paris, France
I have recently started working on a video game project that has been running in my head for many many years.

The concept

It's not actually a video game in itself but more a concept, and possibly an engine. Not an engine for display/audio/input, but an engine for world and story.

It all started some years ago, when I was the Game Master in some pen and paper RPG and some of my games involved complex intrigues with many individual or groups. In these cases I didn't really plan the story, I just had the starting point and the different stakeholders mapped out, and then I let the players loose in that context. Whenever something big happened, I re-evalutaed the situation of each stakeholder: what they knew, which resources they had, what their goal was and, according to all of this, what their course of action was going to be.

Back then I was also playing Mount & Blade, a sandbox game that let the player loose in a world with many different stakeholders... who just acted more or less randomly (or so it felt). And I realized it was the same problem with all sandbox games. Consider Elite. It had a huge universe, but this universe didn't feel very alive. At most there were a few random ships doing random stuff without any sense of story. You could, of course, always invent your own little story, but the world didn't care about it. Fast forward through Pirates, Mount&Blade and other similar sandboxy games released since, and it's more or less of the same. Graphics, sound, sometimes gameplay got better, but story did not. There are a few exceptions. Dwarf Fortress is able to tell some interesting stories... but even then it's more the result of a strange mix of situations that led, in the mind of the player, to some story.

This felt to me like what I did as a GM could be done by an algorithm. And in fact, that's already applied in some games, but it's mostly limited to strategy or management games. And that's a shame, because there's so much potential behind this. Crusader Kings II proved it, with its ability to create interesting stories and situations by giving more character to a strategy/management game. Imagine a RPG where the king has a Crusader Kings AI instead of a scripted NPC whose AI is limited to basic interaction with the game world and whose impact on the story will be limited to the scripted branches the developers have prepared for him. A RPG where when you warn him about the incoming threat, he doesn't do what he's scripted to do, but he assesses the situation and decide accordingly. It would open up so many possibilities: do you let the invaders take some fort so that the king would realize how important the threat is, at the cost of losing that fort (and possibly reputation if some people are aware that you could have prevented this)?

Some would say that Dwarf Fortress does this with its adventure mode. I haven't played enough of it to judge, but I think it lacks something important. From what I've seen, Dwarf Fortress will randomly drop the player in a random place of the random world. And that's not enough. A good story engine should notice interesting starting points, and be able to push the story in ways that keep it interesting.

Finding interesting statrting points is not that hard to do, there are some basic plots that can be recognized: a revenge, a difficult romance, an invasion, a quest for some artifact/lost object, etc. Keeping it interesting is mostly a matter of having interesting characters and relationships. That random NPC who saved your life in one fight? Turn it into a companion who'll follow you around, or make him come back later and remind you of this. Giving him personality might be a bit more difficult, but a few random character traits with associated behaviors and language can do at least as well as some major scripted RPGs.

TLDR: RPG/sandbox + strategy/management AI + story-aware AI = Good sandbox game

The Project

So my goal is to develop a proof of concept for this. Most of the work will, obviously, go into the management part and the story-aware part. Recently, I have been re-playing Sid Meier's Covert Action, a game from 1990 that has you play a spy and foil randomly generated international criminal plots. I've found the setup quite interesting. The plots imply a cooperation between multiple participants to achieve one goal, the basic structure is pretty rigid, but there's still a place for some freedom of action. This strikes me as a good candidate for a first proof of concept.

Hence "Covert World", which will simulate the world of international intrigue involving criminal organisations, governments, big businesses, NGO and medias. This world could then be used as a setting for a Covert Action "remake", but also for other games set in that kind of world.

How will it work?
So far my concept is this:

- First layer: simulate the daily business of the covert world. Ideally, this layer should consist of simple interlocking mechanisms, each mechanism being resolved by abstracted formulas. For example a criminal organisation will have n farms, which will produce x tons of drugs, which they will smuggle to the cities where they are where they will sell according to the demand and their presence there. All variables (like the demand, the presence, etc.) will be computed according to attributes and formulas.
The AI of each organisation will be able to adjust some cursors (for example a criminal organisation can decide to get more weapons, leading to higher power but also more visibility, etc.). Right now I'm thinking of having the AI automatically optimize some things that are pretty obvious (like selling to the most profitable market) but use fixed cursors for things that are more about choices and priorities (like should the organisation get more weapons or should it stay below the radar?) and then simulating some turns with these and killing off the least efficient organisations until there's a somehow stable situation.

- Second layer: Add characters, starting with the organisations leaders and key players. Characters have personality traits, probably some stats and have access to actions.
In the first layer, everything happens the same way turn after turn. The formulas and changes in cursors might lead to some evolution, but there is nothing to disturb the flow. That's what actions are for. Actions are one-shot decisions that can be fired up when some conditions are met. At each turn, the characters will go through the list of actions they can do and can choose to execute one, depending on the character's traits, the profitability of the outcome and probably some randomness (to avoid a too predictable AI). For example the boss of a criminal syndicate can choose to launch an all out attack on another one, or a member of that syndicate can try to take down the current boss, the leader of the local police can decide to strike against one criminal syndicate, etc.

- Third layer: Add relationships. This is a big part of what makes stories interesting. Friendships, love, betrayal, alliances. The goal is to go further than just a "likes" slider and introduce concepts like respect, favors, etc.

- Fourth layer: Add Goals. Goals will probably be actions with high requirements. Only a few major characters will have them, and they will be the source of most stories. To keep with the spy theme (and more exactly movie spy theme), goals could be stuff like become ultra powerful thanks to a doomsday weapon, assassinating a major character, destroying the economy of a country, causing a war, etc.

- Fifth layer: The story supervisor. This is the part that will tweak the naturally occuring stories to make them more interesting. For example, identifying the NPC you had most dealing with and making them more reccuring characters. The commander in chief of that evil general? He's the first guy you arrested, they've broken him out of jail so that he can have his revenge. You helped the local police to bust a gang, but it ended in a bloodshed with only you and one police officer? He's likely to get involved in whatever you're investigating next.

And then maybe have an actual game on top of this. I will add very basic interaction (like a turn-based text game with a list of action to choose from at every turn) as early as possible, and also open the code so that others can build their own games on top of it.

At least that's the plan for now. I'm sure it will have to be refined and adapted as development progresses.
------

Q. Will this be Open-Source?
A. Yes, I'll probably wait until the project is stable enough before I share it but one of the goal is to provide an "engine" anyone can use for their own game.

Q. What language do you use?
A. Java. Mostly because it's the one I'm most familiar with, and since I'm working on the Pandora in the train with no internet connection, I'd rather have something I can use without having to look up the documentation or help/tutorials regularly. I'm trying to keep it relatively simple so that it can easily be translated to other languages. And if it works well enough, I might switch to Lua or any other language that would make it easier to implement in other projects.

---

I'll probably do some kind of devblog in this thread. Don't hesitate if you've got questions or ideas!
 
Have you looked at gearheadrpg.com? I think the author has very similar goals (and some of his games are on the repo, nicely ported by ptitseb).
 
Have you looked at gearheadrpg.com? I think the author has very similar goals (and some of his games are on the repo, nicely ported by ptitseb).
I should probably take a look at updating the build on the repo, they are old now, and thoses github seems active...
[doublepost=1462357701,1462357605][/doublepost]@ElPoco : your ideas are interesting, but it also seem a huge thing. I'm curious to see what you do with all this mater.
 
@_jr_ : thanks for the recommendation, I'll check it out when I have time.

I had to put development on hold for a few weeks but the work is still in progress. I now have criminal syndicates that expand their drug traffic operations (growing, transporting and selling drugs) until they share the worldwide drug trade and corporations that slowly grow and expand, with the occasional loss (corporations day to day life is abstracted since it's not relevant to the game, they're only simulated for some specific businesses and opportunities). Both can also launder the money of the drug trade, with the possibility of a mistake leaving a trace that could allow someone to follow the money.

So far it has been pretty easy and straightforward, it's just a matter of deciding which part of the world to simulate and which to keep abstract and to find good formulas to get consistent and interesting results. I expect to have to tweak numbers here and there as more systems are added on top of one another.

For now, the groups don't interact with each other, this will be covered by actions. This is what I've started to work on, and there's a lot to do here. I'm working on a generic action mechanism so that it's easy to add new actions. Actions can have pre-requisites, they have a chance of success, effects (costs and gain both for the individual making the action and for its target when applicable) when succeeding and failing. These effects and the chance of success can scale depending on the investment (attacking a rival group with 1 guy will have a different outcome from attacking with a hundred). All these will be factored in to compute a desirability of the action (taking into account the personal traits and taste of the character: some might have little concern for their life but will resent having to spend money, etc.) which will let the AI choose which action to do.

So interesting stuff ahead, I'm curious to see how it will go.
 
Not sure if it would make it easier to re-write in Lua down the line, but I'm currently a fan of using LÖVE for developing on the go using my Pandora. I keep offline copies of the LÖVE wiki and Programming in Lua in case I run into problems.

It also helps that ptitSeb's port of LÖVE runs extremely well on Pandora.
 
Back
Top