From 7e76600f59568c164e6c5910d967f7177a5f747d Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Fri, 19 Feb 2021 23:41:08 +0000 Subject: [PATCH 1/4] A great deal of work mainly on high level documentation --- doc/Game_Play.md | 40 ++++++++++ ...sip_scripted_plot_and_Johnny_Silverhand.md | 74 +++++++++++++++++++ doc/{orgnic-quests.md => Organic_Quests.md} | 17 ++++- doc/Simulation-layers.md | 21 ++++++ doc/Uncanny_dialogue.md | 9 +++ doc/sexual-dimorphism.md | 4 +- docs/codox/Baking-the-world.html | 2 +- docs/codox/Game_Play.html | 31 ++++++++ ...p_scripted_plot_and_Johnny_Silverhand.html | 56 ++++++++++++++ docs/codox/NewCh1.html | 13 ++++ docs/codox/Organic_Quests.html | 45 +++++++++++ docs/codox/Populating-a-game-world.html | 2 +- docs/codox/Settling-a-game-world.html | 2 +- docs/codox/Simulation-layers.html | 13 ++++ ...ad-of-knowledge-in-a-large-game-world.html | 2 +- docs/codox/Uncanny_dialogue.html | 7 ++ .../Voice-acting-considered-harmful.html | 2 +- docs/codox/economy.html | 2 +- docs/codox/index.html | 2 +- docs/codox/intro.html | 2 +- .../modelling_trading_cost_and_risk.html | 2 +- docs/codox/naming-of-characters.html | 2 +- docs/codox/on-dying.html | 2 +- docs/codox/sandbox.html | 2 +- docs/codox/sexual-dimorphism.html | 6 +- docs/codox/the-great-game.agent.agent.html | 2 +- docs/codox/the-great-game.gossip.gossip.html | 2 +- .../the-great-game.gossip.news-items.html | 2 +- .../the-great-game.merchants.markets.html | 2 +- ...e-great-game.merchants.merchant-utils.html | 2 +- .../the-great-game.merchants.merchants.html | 2 +- .../the-great-game.merchants.planning.html | 2 +- ...reat-game.merchants.strategies.simple.html | 2 +- docs/codox/the-great-game.time.html | 2 +- docs/codox/the-great-game.utils.html | 2 +- docs/codox/the-great-game.world.location.html | 2 +- docs/codox/the-great-game.world.routes.html | 2 +- docs/codox/the-great-game.world.run.html | 2 +- docs/codox/the-great-game.world.world.html | 2 +- src/the_great_game/architecture.md | 40 ++++++++++ 40 files changed, 396 insertions(+), 32 deletions(-) create mode 100644 doc/Game_Play.md create mode 100644 doc/Gossip_scripted_plot_and_Johnny_Silverhand.md rename doc/{orgnic-quests.md => Organic_Quests.md} (76%) create mode 100644 doc/Simulation-layers.md create mode 100644 doc/Uncanny_dialogue.md create mode 100644 docs/codox/Game_Play.html create mode 100644 docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html create mode 100644 docs/codox/NewCh1.html create mode 100644 docs/codox/Organic_Quests.html create mode 100644 docs/codox/Simulation-layers.html create mode 100644 docs/codox/Uncanny_dialogue.html create mode 100644 src/the_great_game/architecture.md diff --git a/doc/Game_Play.md b/doc/Game_Play.md new file mode 100644 index 0000000..ec9b948 --- /dev/null +++ b/doc/Game_Play.md @@ -0,0 +1,40 @@ +# Game Play + +The principles of game play which I'm looking for are a reaction against all I see as wrong in modern video games. So let's set out what these are: + +1. Superpower: the player character has some special powers or skills that other characters in the game fo not have. + +2. Special status: the player character is 'the chosen one', 'the hero', or even just 'the Witcher' from the very beginning, without having done anything to earn those titles. + +3. Boss fights: some non-player characters have special, and specially strong, combat repertoire, and block progress in the game until you overcome them. + +4. Psychokiller: completing the game necessarily involves beating many, many other characters in combat. + +5. Slaughterhouse: the main way to interact with other characters is to kill them. + +7. The Script is King: everything is scripted. The player either can't diverge from the script, or if they do, will find no interesting content. + +6. Dumb and dumber: non-player characters, even important ones, have extremely limited vocal repertoire. + +Of these, the last two, I think, are key: they are the root cause of the other problems. In fact, to take it further, the real key is the last. We talk a lot about 'Game AI', but really there's nothing remotely approaching artificial intelligence ins modern games. Non-player characters do not think; they do not learn; they do not reason; they do not know. They speak only from the script. And they speak only from the script because of the fetish for voice acting. + +## Death to Dumb-Dumb + +As I've argued [elsewhere](), [repeatedly](), we can now generate a wide variety of naturalistic speaking voices, and have them narrate text. Now of course there's great deal of information conveyed in human vocal communication in addition to the words – of which emotion is only an example, although an important one. Generating voices with the right tone, the right emphasis, for different situations may be harder than I anticipate; there may be an '[uncanny valley](Uncanny_dialogue)' in which generated speech just sounds uncomfortably off. + +But it's a trade off. For possibly less than perfect vocal performance, you get the possibility of much richer repertoire. You get not only the possibility that non-player characters can talk about the weather, or gossip about their neighbours, or give you directions to local places of interest. You get the possibility that a non-player character's attitude to you may be conditioned by the fact that they've heard that you stole from their second cousin, or that you killed an outlaw who'd raped one of their friends. + +Suddenly, they can have attitudes about things that happen in the world, opinions about major political figures in it, about their neighbours, about you the player, which are not scripted, which are emergent. When they learn new information which conflicts with something they already knew, their attitudes will change, as that new information is integrated. Intelligent behaviour will emerge. + +And with the emergence of intelligent behaviour comes the emergence of possibilities for negotiation, for diplomacy, for dynamic, unscripted, friendships and romances. Which means, there are things you can do to interact with every non-player character, even ones who are not 'plot' characters, other than just kill them. + +And as now gameplay possibilities emerge, as new stories emerge organically out of the dynamically changing relationships between non-player characters in the world, the need for scripting decreases. + +The problem with scripting is that it greatly limits player agency. The story can only have one of a few predetermined -- literally, scripted -- endings. This is clearly expressed in [a review of Red Dead Redemption 2](https://youtu.be/_JRikiQyzLA) which I recomment to you; but is equally true of almost all other games. + +Dynamic side quests have fallen into disfavour, because, when they've been tried in earlier generation games, there were too few possibilities, and they became repetitive and boring. I don't believe, with the wealth of compute resource we now have, this any longer need be the case. On the contrary, I think we can now dynamically generate a wide range of different, and differently complex, side quests. I think, in fact, that these can [emerge organically](Organic_Quests.md) from the structure of the game world. + +## Death to Psycho-Killer + +If the main way a player can interact with non-player characters is to kill them, and if the player doesn't have a systematic combat advantage over non-player characters, then it's going to be a short game. This is why players in many or most video games do start with a systematic combat advantage, and that combat advantage tends to increase over the course of the game as the player becomes more proficient with the combat system, and acquires better weapons, armour and combat buffs. This in turn means that to keep combat 'interesting', the game either has to through larger and larger armies of 'bad' non-player characters against the player – a fault seen at its worst in [Dragon Age 2](https://youtu.be/Sc8Bn8yqPYQ?t=3150). + diff --git a/doc/Gossip_scripted_plot_and_Johnny_Silverhand.md b/doc/Gossip_scripted_plot_and_Johnny_Silverhand.md new file mode 100644 index 0000000..cdb7e36 --- /dev/null +++ b/doc/Gossip_scripted_plot_and_Johnny_Silverhand.md @@ -0,0 +1,74 @@ +# Gossip, scripted plot, and Johnny Silverhand + +I've been writing literally for years -- since [[Voice acting considered harmful]] in 2015 -- about game worlds in which the player speaks to non-player characters just by speaking the words they choose in their normal voice, and the non-player character replies using a pipeline that goes, essentially, + +1. Alexa/Siri style speech interpretation; +2. A decision on whether to co-operate based on the particular NPC's general demeanor and particular attitude to the player; +3. A search of the game state and lore for relevant information; +4. A filtering of the results based on what the particular NPC can be expected to know; +5. Generation of a textual response from those results based on a library of templates which defines the particular NPC's dialect and style of speech; +6. Production of audio using a [Lyrebird]{https://www.descript.com/overdub?lyrebird=true) style generated voice. + +As I've argued before, the game engine necessarily knows everything about the lore, and the current state, of the game world. It would be possible for any non-player character to answer literally any question about the game world, from who was mayor of Night City in 2020 to who lives in the apartment one floor up from yours, to what the weather is like in North Oaks just now. + +What individual characters know should, of course, be more limited. People who live in Japantown or Heywood are unlikely to know who lives in a particular apartment in Watson; only real old timers, like Rogue, are likely to remember who was mayor fifty years ago. That's the reason for filtering; but the filtering really isn't a big deal. + +Again, the generation of distinct voices for hundreds of non-player characters isn't any longer a big deal. Distinct social groups -- the corpos, and the different gangs such as Maelstrom or the Mox, will have their own argot, their own slang, their own habitual figures of speech which can be encoded into template libraries, while technologies like Lyrebird can produce an infinite range of realistic-sounding voices. + +In particular, they can mimic real voices. They can mimic the voices of real actors. They can mimic [Keanu Reeves](https://cyberpunk.fandom.com/wiki/Keanu_Reeves). + +So: how do you integrate this free form 'you can say anything to any character' style of play with scripted plot? + +Obviously, my vision -- as I've set out in [Organic Quests](Organic_Quests.md) -- is that many quests should emerge organically from modelling the lives, activities and motivations of non-player characters. But that's a radical vision and not one you can really expect many people to buy into until it has been demonstrated to work. I think that investors are still going to want to have confidence that there's something exciting in the game for players to engage with, and I think directors are still going to want to tell the stories they want to tell. + +So if I'm to sell the idea of free-form speech interaction with characters in the game world, I need an account of how it works with scripted characters voiced by high value actors in a scripted plot. I'm picking Johnny Silverhand as a core example, here, because I think he presents particular challenges. + +But I also think these challenges can be addressed very easily. + +In [Cyberpunk 2077](https://www.cyberpunk.net/), the player can't just go and find Johnny Silverhand, to speak to him. On the contrary, Johnny will just appear when the script calls for him to appear, and when he does he'll always initiate conversation. When a plot NPC initiates conversation with the player, the game could show -- as it does now -- a menu of things the player can say, with the implicit promise that selecting any one of these things will at least bring an interesting response which will expand one's knowledge of that character or of the lore. + +Just as the player does now, the player in a game with free form speech interaction could choose to say one of the things presented in the menu, and the implicit contract -- that this would lead to a new revelation, or would advance the plot -- would remain unchanged. But the player could also choose to go off script, to take the conversation in an unscripted direction, or just to end it. + +It should be said that in Cyberpunk 2077, unlike some other games, the player already has the choice to abruptly break off conversations, even with plot characters, so how the game handles breaking off the conversation does not need to change. + +How should the game handle unscripted responses in scripted dialogues? + +Well, the first and obvious thing is to parse the unscripted response to see whether it's a variant of one of the scripted responses, and if it seems that it might be, perhaps ask the player to verify that: + +> **V**: Just get on with it already. +> +> **Panam**: You mean, go to the shiv camp? +> +> **V**: Yes, dammit. + +But the second thing is to respond to the response exactly as the non-player character would if the player had initiated the conversation, using the pipeline given at the beginning of this essay. Of course, in the special case of Johnny Silverhand, he is -- at least initially -- decidedly hostile and extremely selfish, so his response will typically come at step two in the pipeline: + +> **V**: Hey, Johnny, what's the quickest way from here to Jig Jig Street? +> +> **Johnny**: What am I now, your fucking tour guide? +> +> **V**: Oh, come on, Johnny, help me out a bit here, Where's the nearest gun dealer? +> +> **Johnny**: How the fuck should I know? I haven't been here for fifty years, all I know is ancient history. + +The benefit of this interaction style is that these responses could be real acted responses by the voice actor (in this case, Keanu Reeves), which avoids the 'uncanny valley' risk that generated speech from a character the player has become used to interacting with may not sound quite natural enough. + +But, if we've used Lyrebird technology to capture and mimic Reeves' voice, and if Johnny is for some reason uncharacteristically mellow, then generated voice responses should be used. So suppose the player asks something which Johnny ought reasonably to know: + +> **V:** Hey, Johnny, what's between you and Rogue? + +That's lore. It's in at least one of the in-game 'shard' texts. The game engine knows it. A text can be generated for Johnny to respond: + +> **Johnny**: We were lovers, back in the day. + +In any of these cases, in order for the scripted plot to proceed, the non-player character can circle back to the thing they said that the player hasn't yet made an appropriate response to: + +> **Johnny**:But you didn't answer my question. *Repeats question*. + +or + +> **Johnny**: As I said before, *Repeats what he said before*. + +Again, for key plot characters, the voice actors can actually record multiple different canned texts of this form, so that, when played, they don't sound excessively repetitious. + +In short, it doesn't seem to me that it would be at all hard to integrate free form voice interaction with a modern scripted video game. The advantage is that player interaction with non-player characters would become far richer and more engaging, and consequently it would be much easier to allow the player to progress through the plot without the default outcome of every encounter having to be a blood-bath. \ No newline at end of file diff --git a/doc/orgnic-quests.md b/doc/Organic_Quests.md similarity index 76% rename from doc/orgnic-quests.md rename to doc/Organic_Quests.md index bf789b7..ae817b6 100644 --- a/doc/orgnic-quests.md +++ b/doc/Organic_Quests.md @@ -10,7 +10,18 @@ The structure of a modern Role Playing Came revolves around 'quests': tasks that 6. Syntax quests 7. Hybrids -'Gather quests' are more frequently referred to in the literature as 'fetch quests', and 'kill quests' are simply a specialised form of fetch quest where the item to be fetched is a trophy of the kill. A delivery quest is a sort of reverse fetch quest: instead of going to some location or NPC and getting a specific item to return to the quest giver, the player is tasked to take a specific item from the quest giver to some location or NPC. +'Gather quests' are more frequently referred to in the literature as 'fetch quests', and 'kill quests' are simply a specialised form of fetch quest where the item to be fetched is a trophy of the kill. And the trophy could be just the knowledge that the kill has happened. A delivery quest is a sort of reverse fetch quest: instead of going to some location or NPC and getting a specific item to return to the quest giver, the player is tasked to take a specific item from the quest giver to some location or NPC. + +Note, however, that if we consider a delivery quest to have four locations, where some of these locations may be conincident, then a delivery quest and a fetch quest become the same thing. Thus + +1. The location of the quest giver at the beginning of the quest; +2. The location from which the quest object must be collected; +3. The location to which the quest object must be delivered; +4. The location of the quest giver at the end of the quest. + +This characterisation assumes that at the end of each quest, the player must rendezvous with the quest giver at the end of the quest, either to report completion or to collect a reward. Obviously, there could be some quests where this fourth location is not required, because there is no need to report back (for example, if the quest giver was dying/has died) and no reward to be collected. + +Note that a location is not necessarily a fixed x/y location on the map; in a kill quest, for example, location 2 is the current location of the target, and moves when the target moves; location 3 and 4 are both normally the current location of the quest giver, and move when the quest giver moves. Hybrids are in effect chains of quests: do this task in order to get this precondition of this other task, in order to get the overall objective; obviously such chains can be deep and involved - the 'main quest' of every role playing game I know of is a chain or hybrid quest. @@ -45,3 +56,7 @@ Obviously, this doesn't stop you doing jobs you get directly paid/rewarded for, Related to this notion is the notion that, if you are asked to do a task by a character and you do it well, whether for pay or as a favour, your reputation for being competent in tasks of that kind will improve and the more likely it is that other characters will ask you to do similar tasks; and this will apply to virtually anything another character can ask of you in the game world, from carrying out an assassination to delivering a message to finding a quantiy of some specific commodity to having sex. So quests can emerge organically from the mechanics of the world and be richly varied; I'm confident that will work. What I'm not confident of is that they can be narratively satisfying. This relates directly to the generation of speech. + +## Stuff to consider + +The games [Middle Earth: Shadow of Mordor](https://en.wikipedia.org/wiki/Middle-earth:_Shadow_of_Mordor), and [Middle Earth: Shadow of War](https://en.wikipedia.org/wiki/Middle-earth:_Shadow_of_War) have a procedural story system called [Nemesis](https://youtu.be/Lm_AzK27mZY), which is worth a look. \ No newline at end of file diff --git a/doc/Simulation-layers.md b/doc/Simulation-layers.md new file mode 100644 index 0000000..ccd842b --- /dev/null +++ b/doc/Simulation-layers.md @@ -0,0 +1,21 @@ +# Simulation layers + +In essence, the environment for The Great Game is broadly descended from games like the original Elite space trading game, and Sid Meier's Pirates!, with some elements from political simulations like for example SimCity. + +That is to say there is + +## An economy simulation + +As goods are transported between cities, prices rise and fall based on simulated production and consumption. As prices of commodities rise, more citizens will take up trades which produce those commodities. The simulation needs to be sophisticated enough that, for example, as a city grows richer, its citizens may switch from preferring low cost textiles, eg perhaps wool or linen, to higher cost textiles, such as for example silk (or more complex weaves, or...) Similarly for foodstuffs and for beverages. + +Agricultural production will be affected by climate simulation. + +This is mainly a land game. Broadly, caravans take the place of ships in Elite or Pirates! Caravans are broadly made up of camels, although some may use mules or possibly horses. In any case, a merchant may own camels and hire camel drivers, or may hire contractor drivers who have their own camels; and there will also be whole teams of camel drivers with their animals which can be hired in a single contract. + +## A political simulation + +Broadly, aristons claim territories in an essentiallu feudal arrangement, drive out outlaws, and levy taxes. + +An ariston will be popular if their regime is stable, if taxes are low, justice is considered fair, oppression is low and depredations by outlaws are minimal. The more unpopular an ariston is, the more resistant the populace will be to paying their taxes, meaning the more military force needs to be diverted to tax collection and the greater the oppression. Taxes are required to pay soldiers and to maintain high roads, bridges, markets and other infrastructure. Merchants will prefer to travel routes which are better policed and maintained, which means more merchants trading in your markets, which means more tax. + +Aristons who can generate surplus can hire more soldiers, ascend the feudal hierarchy, and wage war against neighbours. diff --git a/doc/Uncanny_dialogue.md b/doc/Uncanny_dialogue.md new file mode 100644 index 0000000..2bad54b --- /dev/null +++ b/doc/Uncanny_dialogue.md @@ -0,0 +1,9 @@ +# The Uncanny Valley, and dynamically generated dialogue + +If the player is allowed to just speak arbitrary dialogue, then the conversation animation of the player character cannot be designed. If non-player characters are able to engage dynamically generated dialogue, in response to events in the game which are not scripted, then their conversation animation for those dialogues cannot be designed. So conversation animation must almost always be dynamically generated, largely from an augmented text of the speech act. With non-player characters, emotional content of a speech act can be generated by exactly the same process which generates the text. Extracting emotional content information from the player character's voice may be more challenging. + +It would be possible to avoid animating the player character's face by using a first-person camera. However, I don't personally find this makes for a very engaging game experience. + +These thoughts were prompted by a very interesting [video](https://youtu.be/NmLPpcVQFJM) and [Twitter thread](https://twitter.com/GameAnim/status/844961601732018176) about the perceived failings in the character animation system of Mass Effect Andromeda. + +This gets even more problematic if, rather than heavily signposting the player towards locations where plot points will happen, we allow the player to roam the world relatively freely, and cause plot events to occur where the player is at the appropriate phase in the plot rather than when the player arrives at a particular location. This not only means that important plot beats will happen in unpredictable locations but also that we may have to dynamically assign the non-player character(s) who interact with the player character in order to deliver the plot point. diff --git a/doc/sexual-dimorphism.md b/doc/sexual-dimorphism.md index 5325f5c..724864e 100644 --- a/doc/sexual-dimorphism.md +++ b/doc/sexual-dimorphism.md @@ -26,7 +26,7 @@ Another significant point is that women's ability to bear children ceases at a m ## Why have sex at all? -If a character has 'having children' - the **Ancestor** aspiration, in my typology - as their key aim, then they will want to have sex. But to have children in this sense is to have acknowledged children, so while a male character may be motivated to have multiple female partners, he will never the less have some degree of long term committment to them, and will want both to feel confident that the children are his and to be recognised by their father. +If a character has 'having children' - the [**Ancestor**](intro.html#aspirations-and-goals) aspiration, in my typology - as their key aim, then they will want to have sex. But to have children in this sense is to have acknowledged children, so while a male character may be motivated to have multiple female partners, he will never the less have some degree of long term committment to them, and will want both to feel confident that the children are his and to be recognised by their father. From the point of view of seeking to become an Ancestor, there is little benefit to the woman in having multiple partners, except in very harsh environments. It will be easier to give one partner confidence that all your children are his, and while a man can increase his number of potential progeny by having multiple wives, mistresses or other classes of long-term female sexual partners, a woman cannot. @@ -42,4 +42,4 @@ Sex, done right, is an extremely pleasant pastime. Sex can also be used to creat For women, sex with other women carries with it no risk of pregnancy, so can be enjoyed or used for any of these purposes in very much the same way as it can by men; in other words, particularly for women, homosexual sex can be more lighthearted and carefree than heterosexual sex. To what extend our notions of homosexuality and heterosexuality are cultural I simply don't know. But because no children will result, a woman can afford to be more promiscuous with other women than she can with men. -## How does this impact on +## diff --git a/docs/codox/Baking-the-world.html b/docs/codox/Baking-the-world.html index c588bd8..62eb476 100644 --- a/docs/codox/Baking-the-world.html +++ b/docs/codox/Baking-the-world.html @@ -1,6 +1,6 @@ -Baking the world

Baking the world

+Baking the world

Baking the world

Wednesday, 8 May 2019

Devogilla’s Bridge in Dumfries, early foourteenth century

In previous posts, I’ve described algorithms for dynamically populating and dynamically settling a game world. But at kilometre scale (and I think we need a higher resolution than that - something closer to hectare scale), settling the British Isles using my existing algorithms takes about 24 hours of continuous compute on an eight core, 3GHz machine. You cannot do that every time you launch a new game.

diff --git a/docs/codox/Game_Play.html b/docs/codox/Game_Play.html new file mode 100644 index 0000000..2743a62 --- /dev/null +++ b/docs/codox/Game_Play.html @@ -0,0 +1,31 @@ + +Game Play

Game Play

+

The principles of game play which I’m looking for are a reaction against all I see as wrong in modern video games. So let’s set out what these are:

+
    +
  1. +

    Superpower: the player character has some special powers or skills that other characters in the game fo not have.

  2. +
  3. +

    Special status: the player character is ‘the chosen one’, ‘the hero’, or even just ‘the Witcher’ from the very beginning, without having done anything to earn those titles.

  4. +
  5. +

    Boss fights: some non-player characters have special, and specially strong, combat repertoire, and block progress in the game until you overcome them.

  6. +
  7. +

    Psychokiller: completing the game necessarily involves beating many, many other characters in combat.

  8. +
  9. +

    Slaughterhouse: the main way to interact with other characters is to kill them.

  10. +
  11. +

    The Script is King: everything is scripted. The player either can’t diverge from the script, or if they do, will find no interesting content.

  12. +
  13. +

    Dumb and dumber: non-player characters, even important ones, have extremely limited vocal repertoire.

  14. +
+

Of these, the last two, I think, are key: they are the root cause of the other problems. In fact, to take it further, the real key is the last. We talk a lot about ‘Game AI’, but really there’s nothing remotely approaching artificial intelligence ins modern games. Non-player characters do not think; they do not learn; they do not reason; they do not know. They speak only from the script. And they speak only from the script because of the fetish for voice acting.

+

## Death to Dumb-Dumb

+

As I’ve argued elsewhere, repeatedly, we can now generate a wide variety of naturalistic speaking voices, and have them narrate text. Now of course there’s great deal of information conveyed in human vocal communication in addition to the words – of which emotion is only an example, although an important one. Generating voices with the right tone, the right emphasis, for different situations may be harder than I anticipate; there may be an ‘uncanny valley’ in which generated speech just sounds uncomfortably off.

+

But it’s a trade off. For possibly less than perfect vocal performance, you get the possibility of much richer repertoire. You get not only the possibility that non-player characters can talk about the weather, or gossip about their neighbours, or give you directions to local places of interest. You get the possibility that a non-player character’s attitude to you may be conditioned by the fact that they’ve heard that you stole from their second cousin, or that you killed an outlaw who’d raped one of their friends.

+

Suddenly, they can have attitudes about things that happen in the world, opinions about major political figures in it, about their neighbours, about you the player, which are not scripted, which are emergent. When they learn new information which conflicts with something they already knew, their attitudes will change, as that new information is integrated. Intelligent behaviour will emerge.

+

And with the emergence of intelligent behaviour comes the emergence of possibilities for negotiation, for diplomacy, for dynamic, unscripted, friendships and romances. Which means, there are things you can do to interact with every non-player character, even ones who are not ‘plot’ characters, other than just kill them.

+

And as now gameplay possibilities emerge, as new stories emerge organically out of the dynamically changing relationships between non-player characters in the world, the need for scripting decreases.

+

The problem with scripting is that it greatly limits player agency. The story can only have one of a few predetermined – literally, scripted – endings. This is clearly expressed in a review of Red Dead Redemption 2 which I recomment to you; but is equally true of almost all other games.

+

Dynamic side quests have fallen into disfavour, because, when they’ve been tried in earlier generation games, there were too few possibilities, and they became repetitive and boring. I don’t believe, with the wealth of compute resource we now have, this any longer need be the case. On the contrary, I think we can now dynamically generate a wide range of different, and differently complex, side quests. I think, in fact, that these can emerge organically from the structure of the game world.

+

Death to Psycho-Killer

+

If the main way a player can interact with non-player characters is to kill them, and if the player doesn’t have a systematic combat advantage over non-player characters, then it’s going to be a short game. This is why players in many or most video games do start with a systematic combat advantage, and that combat advantage tends to increase over the course of the game as the player becomes more proficient with the combat system, and acquires better weapons, armour and combat buffs. This in turn means that to keep combat ‘interesting’, the game either has to through larger and larger armies of ‘bad’ non-player characters against the player – a fault seen at its worst in Dragon Age 2.

\ No newline at end of file diff --git a/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html b/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html new file mode 100644 index 0000000..2061af4 --- /dev/null +++ b/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html @@ -0,0 +1,56 @@ + +Gossip, scripted plot, and Johnny Silverhand

Gossip, scripted plot, and Johnny Silverhand

+

I’ve been writing literally for years – since Voice acting considered harmful in 2015 – about game worlds in which the player speaks to non-player characters just by speaking the words they choose in their normal voice, and the non-player character replies using a pipeline that goes, essentially,

+
    +
  1. Alexa/Siri style speech interpretation;
  2. +
  3. A decision on whether to co-operate based on the particular NPC’s general demeanor and particular attitude to the player;
  4. +
  5. A search of the game state and lore for relevant information;
  6. +
  7. A filtering of the results based on what the particular NPC can be expected to know;
  8. +
  9. Generation of a textual response from those results based on a library of templates which defines the particular NPC’s dialect and style of speech;
  10. +
  11. Production of audio using a [Lyrebird]{https://www.descript.com/overdub?lyrebird=true) style generated voice.
  12. +
+

As I’ve argued before, the game engine necessarily knows everything about the lore, and the current state, of the game world. It would be possible for any non-player character to answer literally any question about the game world, from who was mayor of Night City in 2020 to who lives in the apartment one floor up from yours, to what the weather is like in North Oaks just now.

+

What individual characters know should, of course, be more limited. People who live in Japantown or Heywood are unlikely to know who lives in a particular apartment in Watson; only real old timers, like Rogue, are likely to remember who was mayor fifty years ago. That’s the reason for filtering; but the filtering really isn’t a big deal.

+

Again, the generation of distinct voices for hundreds of non-player characters isn’t any longer a big deal. Distinct social groups – the corpos, and the different gangs such as Maelstrom or the Mox, will have their own argot, their own slang, their own habitual figures of speech which can be encoded into template libraries, while technologies like Lyrebird can produce an infinite range of realistic-sounding voices.

+

In particular, they can mimic real voices. They can mimic the voices of real actors. They can mimic Keanu Reeves.

+

So: how do you integrate this free form ‘you can say anything to any character’ style of play with scripted plot?

+

Obviously, my vision – as I’ve set out in Organic Quests – is that many quests should emerge organically from modelling the lives, activities and motivations of non-player characters. But that’s a radical vision and not one you can really expect many people to buy into until it has been demonstrated to work. I think that investors are still going to want to have confidence that there’s something exciting in the game for players to engage with, and I think directors are still going to want to tell the stories they want to tell.

+

So if I’m to sell the idea of free-form speech interaction with characters in the game world, I need an account of how it works with scripted characters voiced by high value actors in a scripted plot. I’m picking Johnny Silverhand as a core example, here, because I think he presents particular challenges.

+

But I also think these challenges can be addressed very easily.

+

In Cyberpunk 2077, the player can’t just go and find Johnny Silverhand, to speak to him. On the contrary, Johnny will just appear when the script calls for him to appear, and when he does he’ll always initiate conversation. When a plot NPC initiates conversation with the player, the game could show – as it does now – a menu of things the player can say, with the implicit promise that selecting any one of these things will at least bring an interesting response which will expand one’s knowledge of that character or of the lore.

+

Just as the player does now, the player in a game with free form speech interaction could choose to say one of the things presented in the menu, and the implicit contract – that this would lead to a new revelation, or would advance the plot – would remain unchanged. But the player could also choose to go off script, to take the conversation in an unscripted direction, or just to end it.

+

It should be said that in Cyberpunk 2077, unlike some other games, the player already has the choice to abruptly break off conversations, even with plot characters, so how the game handles breaking off the conversation does not need to change.

+

How should the game handle unscripted responses in scripted dialogues?

+

Well, the first and obvious thing is to parse the unscripted response to see whether it’s a variant of one of the scripted responses, and if it seems that it might be, perhaps ask the player to verify that:

+
+

V: Just get on with it already.

+

Panam: You mean, go to the shiv camp?

+

V: Yes, dammit.

+
+

But the second thing is to respond to the response exactly as the non-player character would if the player had initiated the conversation, using the pipeline given at the beginning of this essay. Of course, in the special case of Johnny Silverhand, he is – at least initially – decidedly hostile and extremely selfish, so his response will typically come at step two in the pipeline:

+
+

V: Hey, Johnny, what’s the quickest way from here to Jig Jig Street?

+

Johnny: What am I now, your fucking tour guide?

+

V: Oh, come on, Johnny, help me out a bit here, Where’s the nearest gun dealer?

+

Johnny: How the fuck should I know? I haven’t been here for fifty years, all I know is ancient history.

+
+

The benefit of this interaction style is that these responses could be real acted responses by the voice actor (in this case, Keanu Reeves), which avoids the ‘uncanny valley’ risk that generated speech from a character the player has become used to interacting with may not sound quite natural enough.

+

But, if we’ve used Lyrebird technology to capture and mimic Reeves’ voice, and if Johnny is for some reason uncharacteristically mellow, then generated voice responses should be used. So suppose the player asks something which Johnny ought reasonably to know:

+
+

V: Hey, Johnny, what’s between you and Rogue?

+
+

That’s lore. It’s in at least one of the in-game ‘shard’ texts. The game engine knows it. A text can be generated for Johnny to respond:

+
+

Johnny: We were lovers, back in the day.

+
+

In any of these cases, in order for the scripted plot to proceed, the non-player character can circle back to the thing they said that the player hasn’t yet made an appropriate response to:

+
+

Johnny:But you didn’t answer my question. Repeats question.

+
+

or

+
+

Johnny: As I said before, Repeats what he said before.

+
+

Again, for key plot characters, the voice actors can actually record multiple different canned texts of this form, so that, when played, they don’t sound excessively repetitious.

+

In short, it doesn’t seem to me that it would be at all hard to integrate free form voice interaction with a modern scripted video game. The advantage is that player interaction with non-player characters would become far richer and more engaging, and consequently it would be much easier to allow the player to progress through the plot without the default outcome of every encounter having to be a blood-bath.

\ No newline at end of file diff --git a/docs/codox/NewCh1.html b/docs/codox/NewCh1.html new file mode 100644 index 0000000..09abe76 --- /dev/null +++ b/docs/codox/NewCh1.html @@ -0,0 +1,13 @@ + +Axiom

Axiom

+

It is at once natural and yet extraordinary; at once familiar and yet always uncanny. Strange, yet still a part of the landscape of my life since earliest childhood. Circular, about three and a half metres across, of unknown depth; filled with clear water which neither rises in time of flood nor falls in time of drought, which is never warm in summer yet rarely freezes in winter. And its level is always, always, always, about a metre higher than the level of the burn which flows around three sides of the rock through which it rises.

+

The well is liminal: a gateway between the world of air and the world of water, the world of men and the underworld, the world of sunlight and the world of darkness. It is the place where – my mother always claimed – I was conceived; and for too many people whom I have known, the gateway between life and death, through which none pass twice.

+

It is the Cauld Well: the Cauld Well of Scotland. The Well of Sorrows. According to folklore, a place of blessings and ancient magic. According to historians, the last site in Britain where the Celtic gods were regularly worshipped.

+

And it is mine.

+

Tentatively Curious

+

Cryptography is the science of hiding things. The modern methods of hiding things are well known; they’re based on mathematical problems which are very hard to solve unless you already have a known starting point. For now, they work very well; but the problem with mathematical problems which are very hard to solve is that computers are steadily getting better and better at solving things.

+

Encryption is important; it is everywhere. It secures our communications, our wealth, our identity, our secrets. Many people – people with a great deal of money to spend – are very interested in the science of hiding things: in ensuring things are hidden, or else in finding things which others have hidden.

+

Unfortunately, the person who I wanted to find, in the spring of 2015 – who I had wanted to find since I’d lost her in the autumn of 2012 – could not be found by solving hard sums. In that spring, in fact, lots of things were hidden from me. Things which were hidden in plain sight, which were urgently important;

+

Like A. A. Milne’s King John, I am not a good man. Like him, I have my little ways. And very often no one speaks to me for days and days and days; although, to be fair, these past three years I hadn’t much encourage them to.

+

The university mostly understood that. My research – and to some degree my name – still brought in money; my papers were still well received. I no longer taught undergraduates, but I had a select group of excellent postgrads. And my colleagues accepted that I needed time to grieve.

\ No newline at end of file diff --git a/docs/codox/Organic_Quests.html b/docs/codox/Organic_Quests.html new file mode 100644 index 0000000..392187e --- /dev/null +++ b/docs/codox/Organic_Quests.html @@ -0,0 +1,45 @@ + +Organic Quests

Organic Quests

+

The structure of a modern Role Playing Came revolves around ‘quests’: tasks that the player character is invited to do, either by the framing narrative of the game or by some non-player character (‘the Quest Giver’). Normally there is one core quest which provides the overarching narrative for the whole game. [Wikipedia](https://en.wikipedia.org/wiki/Quest_(gaming)) offers a typology of quests as follows:

+
    +
  1. Kill quests
  2. +
  3. Combo quests
  4. +
  5. Delivery quests
  6. +
  7. Gather quests
  8. +
  9. Escort quests
  10. +
  11. Syntax quests
  12. +
  13. Hybrids
  14. +
+

‘Gather quests’ are more frequently referred to in the literature as ‘fetch quests’, and ‘kill quests’ are simply a specialised form of fetch quest where the item to be fetched is a trophy of the kill. And the trophy could be just the knowledge that the kill has happened. A delivery quest is a sort of reverse fetch quest: instead of going to some location or NPC and getting a specific item to return to the quest giver, the player is tasked to take a specific item from the quest giver to some location or NPC.

+

Note, however, that if we consider a delivery quest to have four locations, where some of these locations may be conincident, then a delivery quest and a fetch quest become the same thing. Thus

+
    +
  1. The location of the quest giver at the beginning of the quest;
  2. +
  3. The location from which the quest object must be collected;
  4. +
  5. The location to which the quest object must be delivered;
  6. +
  7. The location of the quest giver at the end of the quest.
  8. +
+

This characterisation assumes that at the end of each quest, the player must rendezvous with the quest giver at the end of the quest, either to report completion or to collect a reward. Obviously, there could be some quests where this fourth location is not required, because there is no need to report back (for example, if the quest giver was dying/has died) and no reward to be collected.

+

Note that a location is not necessarily a fixed x/y location on the map; in a kill quest, for example, location 2 is the current location of the target, and moves when the target moves; location 3 and 4 are both normally the current location of the quest giver, and move when the quest giver moves.

+

Hybrids are in effect chains of quests: do this task in order to get this precondition of this other task, in order to get the overall objective; obviously such chains can be deep and involved - the ‘main quest’ of every role playing game I know of is a chain or hybrid quest.

+

My understanding is that what Wikipedia means by a ‘syntax quest’ is what one would normally call a puzzle.

+

An escort quest is typically a request to take a specified non-player character safely through a dangerous area.

+

Combo quests are not, in my opinion, particularly relevant to the sorts of game we’re discussing here.

+

So essentially quests break down into three core types

+
    +
  1. Fetch and deliver quests
  2. +
  3. Escort quests
  4. +
  5. Puzzles
  6. +
+

which are combined together into more or less complex chains, where the simplest chain is a single quest.

+

Given that quests are as simple as this, it’s obvious that narrative sophistication is required to make them interesting; and this point is clearly made by some variants of roguelike games which procedurally generate quests: they’re generally pretty dull. By contrast, the Witcher series is full of fetch-quests which are made to really matter by being wrapped in interesting character interaction and narrative plausibility. Very often this takes the form of tragedy: as one reviewer pointed out, the missing relatives that Geralt is asked to find generally turn out to be (horribly) dead. In other words, creative scripting tends to deliver much more narratively satisfying quests than is usually delivered by procedural generation.

+

But, if we’re thinking of a game with much more intelligent non-player characters with much more conversational repertoir, as I am, can satisfying quests emerge organically? In space trading games such as Elite, a primary activity is moving goods from markets with surplus (and thus low prices) to markets with shortage (and thus high prices). This is, in effect, a game made up of deliver quests - but rather than deliver quests which are scripted, they are deliver quests which arise organically out of the structure of the game world.

+

I already have working code for non-player character merchants, who move goods from city to city based on market information available to them. For player characters to join in this trading is an organic activity emerging from the structure of the world, which provides an activity. But moving merchants provides a market opportunity for bandits, who can intercept and steal cargoes, and so for mercenaries, who can protect cargoes from bandits, and so on. And because I have an architecture that allows non-player characters to fill economic niches, there will be non-player characters in all these niches.

+

Where a non-player character can act, so can a player character: when a (non-player character) merchant seeks to hire a caravan guard and a player character responds, that’s an organic escort quest.

+

The key idea behind organic quests is that the circumstance and requirments for quests emerges as an emergent behaviour out of the mechanics of the game world. A non-player character doesn’t know that there is a player character who is different from them; rather, when a non-player character needs something they can’t readily achieve for themselves, they will ask other characters to help, and that may include the player character.

+

This means, of course, that characters need a goal-seeking planning algorithm to decide their actions, with one option in any plan being ‘ask for help’. Thus, ‘asking for help’ becomes a mechanism within the game, a normal behaviour. Ideally non-player characters will keep track of quite complex webs of loyalty and of obligation - debts of honour, duties of hospitality, collective loyalties. So that, if you do a favour for some character in the world, that character’s tribe, friends, obligation circle, whatever, are now more likely to do favours for you.

+

Obviously, this doesn’t stop you doing jobs you get directly paid/rewarded for, but I’d like the web of obligation to be at least potentially much richer than just tit for tat.

+

Related to this notion is the notion that, if you are asked to do a task by a character and you do it well, whether for pay or as a favour, your reputation for being competent in tasks of that kind will improve and the more likely it is that other characters will ask you to do similar tasks; and this will apply to virtually anything another character can ask of you in the game world, from carrying out an assassination to delivering a message to finding a quantiy of some specific commodity to having sex.

+

So quests can emerge organically from the mechanics of the world and be richly varied; I’m confident that will work. What I’m not confident of is that they can be narratively satisfying. This relates directly to the generation of speech.

+

Stuff to consider

+

The games Middle Earth: Shadow of Mordor, and Middle Earth: Shadow of War have a procedural story system called Nemesis, which is worth a look.

\ No newline at end of file diff --git a/docs/codox/Populating-a-game-world.html b/docs/codox/Populating-a-game-world.html index 8a50174..e1886fc 100644 --- a/docs/codox/Populating-a-game-world.html +++ b/docs/codox/Populating-a-game-world.html @@ -1,6 +1,6 @@ -Populating a game world

Populating a game world

+Populating a game world

Populating a game world

Saturday, 6 July 2013

(You might want to read this essay in conjunction with my older essay, Settling a game world, which covers similar ground but which this hopefully advances on)

For an economy to work people have to be able to move between occupations to fill economic niches. In steady state, non player character (NPC) males become adult as ‘vagrants’, and then move through the state transitions described in this document. The pattern for females is different.

diff --git a/docs/codox/Settling-a-game-world.html b/docs/codox/Settling-a-game-world.html index f7b58df..357ea68 100644 --- a/docs/codox/Settling-a-game-world.html +++ b/docs/codox/Settling-a-game-world.html @@ -1,6 +1,6 @@ -Settling a game world

Settling a game world

+Settling a game world

Settling a game world

Wednesday, 30 December 2009

This essay is part of a series with ‘Worlds and Flats’ and ‘The spread of knowledge in a large game world’; if you haven’t read those you may want to read them before reading this. This essay describes how a large world can come into being and can evolve. I’ve written again on this subject since - see ‘Populating a game world’)

Microworld

diff --git a/docs/codox/Simulation-layers.html b/docs/codox/Simulation-layers.html new file mode 100644 index 0000000..24d074d --- /dev/null +++ b/docs/codox/Simulation-layers.html @@ -0,0 +1,13 @@ + +Simulation layers

Simulation layers

+

In essence, the environment for The Great Game is broadly descended from games like the original Elite space trading game, and Sid Meier’s Pirates!, with some elements from political simulations like for example SimCity.

+

That is to say there is

+

An economy simulation

+

As goods are transported between cities, prices rise and fall based on simulated production and consumption. As prices of commodities rise, more citizens will take up trades which produce those commodities. The simulation needs to be sophisticated enough that, for example, as a city grows richer, its citizens may switch from preferring low cost textiles, eg perhaps wool or linen, to higher cost textiles, such as for example silk (or more complex weaves, or…) Similarly for foodstuffs and for beverages.

+

Agricultural production will be affected by climate simulation.

+

This is mainly a land game. Broadly, caravans take the place of ships in Elite or Pirates! Caravans are broadly made up of camels, although some may use mules or possibly horses. In any case, a merchant may own camels and hire camel drivers, or may hire contractor drivers who have their own camels; and there will also be whole teams of camel drivers with their animals which can be hired in a single contract.

+

A political simulation

+

Broadly, aristons claim territories in an essentiallu feudal arrangement, drive out outlaws, and levy taxes.

+

An ariston will be popular if their regime is stable, if taxes are low, justice is considered fair, oppression is low and depredations by outlaws are minimal. The more unpopular an ariston is, the more resistant the populace will be to paying their taxes, meaning the more military force needs to be diverted to tax collection and the greater the oppression. Taxes are required to pay soldiers and to maintain high roads, bridges, markets and other infrastructure. Merchants will prefer to travel routes which are better policed and maintained, which means more merchants trading in your markets, which means more tax.

+

Aristons who can generate surplus can hire more soldiers, ascend the feudal hierarchy, and wage war against neighbours.

\ No newline at end of file diff --git a/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html b/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html index 9dd26f5..d20d166 100644 --- a/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html +++ b/docs/codox/The-spread-of-knowledge-in-a-large-game-world.html @@ -1,6 +1,6 @@ -The spread of knowledge in a large game world

The spread of knowledge in a large game world

+The spread of knowledge in a large game world

The spread of knowledge in a large game world

Saturday, 26 April 2008

part of the role of Dandelion, in The Witcher games, is to provide the player with news

Note

diff --git a/docs/codox/Uncanny_dialogue.html b/docs/codox/Uncanny_dialogue.html new file mode 100644 index 0000000..480c253 --- /dev/null +++ b/docs/codox/Uncanny_dialogue.html @@ -0,0 +1,7 @@ + +The Uncanny Valley, and dynamically generated dialogue

The Uncanny Valley, and dynamically generated dialogue

+

If the player is allowed to just speak arbitrary dialogue, then the conversation animation of the player character cannot be designed. If non-player characters are able to engage dynamically generated dialogue, in response to events in the game which are not scripted, then their conversation animation for those dialogues cannot be designed. So conversation animation must almost always be dynamically generated, largely from an augmented text of the speech act. With non-player characters, emotional content of a speech act can be generated by exactly the same process which generates the text. Extracting emotional content information from the player character’s voice may be more challenging.

+

It would be possible to avoid animating the player character’s face by using a first-person camera. However, I don’t personally find this makes for a very engaging game experience.

+

These thoughts were prompted by a very interesting video and Twitter thread about the perceived failings in the character animation system of Mass Effect Andromeda.

+

This gets even more problematic if, rather than heavily signposting the player towards locations where plot points will happen, we allow the player to roam the world relatively freely, and cause plot events to occur where the player is at the appropriate phase in the plot rather than when the player arrives at a particular location. This not only means that important plot beats will happen in unpredictable locations but also that we may have to dynamically assign the non-player character(s) who interact with the player character in order to deliver the plot point.

\ No newline at end of file diff --git a/docs/codox/Voice-acting-considered-harmful.html b/docs/codox/Voice-acting-considered-harmful.html index 7e5c1ad..b5fbd6c 100644 --- a/docs/codox/Voice-acting-considered-harmful.html +++ b/docs/codox/Voice-acting-considered-harmful.html @@ -1,6 +1,6 @@ -Voice acting considered harmful

Voice acting considered harmful

+Voice acting considered harmful

Voice acting considered harmful

Wednesday, 25 February 2015

The Witcher: Conversation with Kalkstein

Long, long, time ago, I can still remember when… we played (and wrote) adventure games where the user typed at a command line, and the system printed back at them. A Read-Eval-Print loop in the classic Lisp sense, and I wrote my adventure games in Lisp. I used the same opportunistic parser whether the developer was building the game Create a new room north of here called dungeon-3 the player was playing the game Pick up the rusty sword and go north or the player was talking to a non-player character Say to the wizard ‘can you tell me the way to the castle’ Of course, the parser didn’t ‘understand’ English. It worked on trees of words, in which terminal nodes were actions and branching nodes were key words, and it had the property that any word it didn’t recognise at that point in sentence was a noise word and could be ignored. A few special hacks (such as ‘the’, ‘a’, or ‘an’ was an indicator that what came next was probably a noun phrase, and thus that if there was more than one sword in the player’s immediate environment the one that was wanted was the one tagged with the adjective ‘rusty’), and you ended up with a parser that most of the time convincingly interpreted most of what the player threw at it.

diff --git a/docs/codox/economy.html b/docs/codox/economy.html index b5c7ecb..c8264d5 100644 --- a/docs/codox/economy.html +++ b/docs/codox/economy.html @@ -1,6 +1,6 @@ -Game world economy

Game world economy

+Game world economy

Game world economy

Broadly this essay extends ideas presented in Populating a game world, q.v.

Primary producers

Herdsfolk

diff --git a/docs/codox/index.html b/docs/codox/index.html index d645463..05dd2bc 100644 --- a/docs/codox/index.html +++ b/docs/codox/index.html @@ -1,3 +1,3 @@ -The-great-game 0.1.1-SNAPSHOT

The-great-game 0.1.1-SNAPSHOT

Released under the GNU General Public License,version 2.0 or (at your option) any later version

Prototype code towards the great game I've been writing about for ten years, and know I will never finish.

Installation

To install, add the following dependency to your project or build file:

[the-great-game "0.1.1-SNAPSHOT"]

Topics

Namespaces

the-great-game.agent.agent

Anything in the game world with agency

Public variables and functions:

    the-great-game.gossip.gossip

    Interchange of news events between gossip agents

    Public variables and functions:

    the-great-game.merchants.markets

    Adjusting quantities and prices in markets.

    Public variables and functions:

    the-great-game.merchants.merchant-utils

    Useful functions for doing low-level things with merchants.

    the-great-game.merchants.merchants

    Trade planning for merchants, primarily.

    Public variables and functions:

    the-great-game.merchants.planning

    Trade planning for merchants, primarily. This follows a simple-minded generate-and-test strategy and currently generates plans for all possible routes from the current location. This may not scale. Also, routes do not currently have cost or risk associated with them.

    the-great-game.merchants.strategies.simple

    Default trading strategy for merchants.

    Public variables and functions:

    the-great-game.utils

    TODO: write docs

    Public variables and functions:

    the-great-game.world.location

    Functions dealing with location in the world.

    Public variables and functions:

    the-great-game.world.routes

    Conceptual (plan level) routes, represented as tuples of location ids.

    Public variables and functions:

    the-great-game.world.run

    Run the whole simulation

    Public variables and functions:

    the-great-game.world.world

    Access to data about the world

    Public variables and functions:

    \ No newline at end of file +The-great-game 0.1.1-SNAPSHOT

    The-great-game 0.1.1-SNAPSHOT

    Released under the GNU General Public License,version 2.0 or (at your option) any later version

    Prototype code towards the great game I've been writing about for ten years, and know I will never finish.

    Installation

    To install, add the following dependency to your project or build file:

    [the-great-game "0.1.1-SNAPSHOT"]

    Topics

    Namespaces

    the-great-game.agent.agent

    Anything in the game world with agency

    Public variables and functions:

      the-great-game.gossip.gossip

      Interchange of news events between gossip agents

      Public variables and functions:

      the-great-game.merchants.markets

      Adjusting quantities and prices in markets.

      Public variables and functions:

      the-great-game.merchants.merchant-utils

      Useful functions for doing low-level things with merchants.

      the-great-game.merchants.merchants

      Trade planning for merchants, primarily.

      Public variables and functions:

      the-great-game.merchants.planning

      Trade planning for merchants, primarily. This follows a simple-minded generate-and-test strategy and currently generates plans for all possible routes from the current location. This may not scale. Also, routes do not currently have cost or risk associated with them.

      the-great-game.merchants.strategies.simple

      Default trading strategy for merchants.

      Public variables and functions:

      the-great-game.utils

      TODO: write docs

      Public variables and functions:

      the-great-game.world.location

      Functions dealing with location in the world.

      Public variables and functions:

      the-great-game.world.routes

      Conceptual (plan level) routes, represented as tuples of location ids.

      Public variables and functions:

      the-great-game.world.run

      Run the whole simulation

      Public variables and functions:

      the-great-game.world.world

      Access to data about the world

      Public variables and functions:

      \ No newline at end of file diff --git a/docs/codox/intro.html b/docs/codox/intro.html index ebeff11..59c29c7 100644 --- a/docs/codox/intro.html +++ b/docs/codox/intro.html @@ -1,6 +1,6 @@ -Introduction to the-great-game

      Introduction to the-great-game

      +Introduction to the-great-game

      Introduction to the-great-game

      The Great Game

      In this essay I’m going to try to pull together a number of my architectural ideas about the Great Game which I know I’m never actually going to build - because it’s vastly too big for any one person to build - into one overall vision.

      So, firstly, how does one characterise this game?

      diff --git a/docs/codox/modelling_trading_cost_and_risk.html b/docs/codox/modelling_trading_cost_and_risk.html index 58c4b74..b568591 100644 --- a/docs/codox/modelling_trading_cost_and_risk.html +++ b/docs/codox/modelling_trading_cost_and_risk.html @@ -1,6 +1,6 @@ -Modelling trading cost and risk

      Modelling trading cost and risk

      +Modelling trading cost and risk

      Modelling trading cost and risk

      In a dynamic pre-firearms world with many small states and contested regions, trade is not going to be straightforward. Not only will different routes have different physical characteristics - more or less mountainous, more or fewer unbridged river crossings - they will also have different political characteristics: more of less taxed, more or less effectively policed.

      Raids by outlaws are expected to be part of the game economy. News of raids are the sort of things which may propagate through the gossip system. So are changes in taxation regime. Obviously, knowledge items can affect merchants’ trading strategy; in existing prototype code, individual merchants already each keep their own cache of known historical prices, and exchange historical price data with one another; and use this price data to select trades to make.

      So: to what extent is it worth modelling the spread of knowledge of trade cost and risk?

      diff --git a/docs/codox/naming-of-characters.html b/docs/codox/naming-of-characters.html index 3258a8a..42d633a 100644 --- a/docs/codox/naming-of-characters.html +++ b/docs/codox/naming-of-characters.html @@ -1,6 +1,6 @@ -Naming of Characters

      Naming of Characters

      +Naming of Characters

      Naming of Characters

      Generally speaking, in modern RPGs, every character with any impact on the plot has a distinct name. But if we are going to give all non-player characters sufficient agency to impact on the plot, then we must have a way of naming tens or hundreds of thousands of characters, and distinct names will become problematic (even if we’re procedurally generating names, which we shall have to do. So this note is about how characters are named.

      The full name of each character will be made up as follows:

      [epithet] [clan] [personal-name] the [trade-or-rank] of [location], son/daughter of [parent]

      diff --git a/docs/codox/on-dying.html b/docs/codox/on-dying.html index d84d7de..3120d3a 100644 --- a/docs/codox/on-dying.html +++ b/docs/codox/on-dying.html @@ -1,6 +1,6 @@ -On Dying

      On Dying

      +On Dying

      On Dying

      Death is the end of your story. One of the tropes in games which, for me, most breaks immersion is when you lose a fight and are presented with a screen that says ‘you are dead. Do you want to reload your last save?’ Life is not like that. We do not have save-states. We die.

      So how could this be better handled?

      You lose a fight. Switch to cutscene: the battlefield, after the fight, your body is there. Probably no sound. A party of non-enemies crosses the battlefield and finds your body. We see surprise and concern. They gather around you. Cut to interior scene, you are in a bed, unconcious, being tended; cut to similar interior scene, you are in a bed, conscious, being tended; cut to exterior scene, you are sitting with some of your saviours, and the game restarts.

      diff --git a/docs/codox/sandbox.html b/docs/codox/sandbox.html index e5b4a25..f3a2a72 100644 --- a/docs/codox/sandbox.html +++ b/docs/codox/sandbox.html @@ -1,6 +1,6 @@ -Sandbox

      Sandbox

      +Sandbox

      Sandbox

      Up to now I’ve been thinking of the Great Game as essentially an RPG with some sandbox-like elements; but I think it may be better to think of it as a sandbox game with some RPG like elements.

      Why?

      The core of the game is a world in which non-player characters have enough individual knowledge of the world and their immediate surroundings that they can sensibly answer questions like

      diff --git a/docs/codox/sexual-dimorphism.html b/docs/codox/sexual-dimorphism.html index de010b7..25ce9d2 100644 --- a/docs/codox/sexual-dimorphism.html +++ b/docs/codox/sexual-dimorphism.html @@ -1,6 +1,6 @@ -Sexual dimorphism

      Sexual dimorphism

      +Sexual dimorphism

      Sexual dimorphism

      This essay is going to upset a lot of people, so let’s start with a statement of what it is about: it is an attempt to describe the systematically different behaviours of men and women, in sufficient detail that this can be represented by agents in a game world. It’s trying to allow as broad as possible a range of cultures to be represented, so when I’m talking about what I consider to be behaviours of particular cultures, I’ll say that.

      Of course, I’m writing this from the view point of an old white male. It’s not possible to write about these things from a totally neutral viewpoint, and every one of us will have prejudices.

      OK? Let’s start.

      @@ -17,7 +17,7 @@

      The essential trade-off in the traditional western marriage is that the man gets to have sex, and the woman gets to have protection for her progeny.

      Another significant point is that women’s ability to bear children ceases at a much younger age than men’s ability to father them.

      Why have sex at all?

      -

      If a character has ‘having children’ - the Ancestor aspiration, in my typology - as their key aim, then they will want to have sex. But to have children in this sense is to have acknowledged children, so while a male character may be motivated to have multiple female partners, he will never the less have some degree of long term committment to them, and will want both to feel confident that the children are his and to be recognised by their father.

      +

      If a character has ‘having children’ - the Ancestor aspiration, in my typology - as their key aim, then they will want to have sex. But to have children in this sense is to have acknowledged children, so while a male character may be motivated to have multiple female partners, he will never the less have some degree of long term committment to them, and will want both to feel confident that the children are his and to be recognised by their father.

      From the point of view of seeking to become an Ancestor, there is little benefit to the woman in having multiple partners, except in very harsh environments. It will be easier to give one partner confidence that all your children are his, and while a man can increase his number of potential progeny by having multiple wives, mistresses or other classes of long-term female sexual partners, a woman cannot.

      Why have children?

      In modern Scotland, I have met a lot of women with a strong drive to have children for the sake of having children, where the best explanation they could give is that it’s instinctual; it may be so. But beyond that, in many cultures children provide their (acknowledged) parents with care and security in their old age, may tend their graves and perform belief-related services after they die, and carry on their name and their stories into the future.

      @@ -25,4 +25,4 @@

      Why else have sex?

      Sex, done right, is an extremely pleasant pastime. Sex can also be used to create and maintain bonds of committment, to demonstrate social status, to defuse tense situations, and transactionally in many ways, both formal and informal.

      For women, sex with other women carries with it no risk of pregnancy, so can be enjoyed or used for any of these purposes in very much the same way as it can by men; in other words, particularly for women, homosexual sex can be more lighthearted and carefree than heterosexual sex. To what extend our notions of homosexuality and heterosexuality are cultural I simply don’t know. But because no children will result, a woman can afford to be more promiscuous with other women than she can with men.

      -

      How does this impact on

      \ No newline at end of file +

      ##

      \ No newline at end of file diff --git a/docs/codox/the-great-game.agent.agent.html b/docs/codox/the-great-game.agent.agent.html index 079a700..90c31c3 100644 --- a/docs/codox/the-great-game.agent.agent.html +++ b/docs/codox/the-great-game.agent.agent.html @@ -1,3 +1,3 @@ -the-great-game.agent.agent documentation

      the-great-game.agent.agent

      Anything in the game world with agency

      \ No newline at end of file +the-great-game.agent.agent documentation

      the-great-game.agent.agent

      Anything in the game world with agency

      \ No newline at end of file diff --git a/docs/codox/the-great-game.gossip.gossip.html b/docs/codox/the-great-game.gossip.gossip.html index 177c964..aa503f5 100644 --- a/docs/codox/the-great-game.gossip.gossip.html +++ b/docs/codox/the-great-game.gossip.gossip.html @@ -1,3 +1,3 @@ -the-great-game.gossip.gossip documentation

      the-great-game.gossip.gossip

      Interchange of news events between gossip agents

      dialogue

      (dialogue enquirer respondent world)

      Dialogue between an enquirer and an agent in this world; returns a map identical to enquirer except that its :gossip collection may have additional entries.

      gather-news

      (gather-news world)(gather-news world gossip)

      TODO: write docs

      move-gossip

      (move-gossip gossip world new-location)

      Return a world like this world but with this gossip moved to this new-location. Many gossips are essentially shadow-records of agents of other types, and the movement of the gossip should be controlled by the run function of the type of the record they shadow. The #run function below does NOT call this function.

      run

      (run world)

      Return a world like this world, with news items exchanged between gossip agents.

      \ No newline at end of file +the-great-game.gossip.gossip documentation

      the-great-game.gossip.gossip

      Interchange of news events between gossip agents

      dialogue

      (dialogue enquirer respondent world)

      Dialogue between an enquirer and an agent in this world; returns a map identical to enquirer except that its :gossip collection may have additional entries.

      gather-news

      (gather-news world)(gather-news world gossip)

      TODO: write docs

      move-gossip

      (move-gossip gossip world new-location)

      Return a world like this world but with this gossip moved to this new-location. Many gossips are essentially shadow-records of agents of other types, and the movement of the gossip should be controlled by the run function of the type of the record they shadow. The #run function below does NOT call this function.

      run

      (run world)

      Return a world like this world, with news items exchanged between gossip agents.

      \ No newline at end of file diff --git a/docs/codox/the-great-game.gossip.news-items.html b/docs/codox/the-great-game.gossip.news-items.html index ee90317..425c54d 100644 --- a/docs/codox/the-great-game.gossip.news-items.html +++ b/docs/codox/the-great-game.gossip.news-items.html @@ -1,6 +1,6 @@ -the-great-game.gossip.news-items documentation

      the-great-game.gossip.news-items

      Categories of news events interesting to gossip agents

      degrade-character

      (degrade-character gossip character)

      Return a character specification like this character, but comprising only those properties this gossip is interested in.

      degrade-location

      (degrade-location gossip location)

      Return a location specification like this location, but comprising only those elements this gossip is interested in. If none, return nil.

      infer

      (infer item rule)

      Infer a new knowledge item from this item, following this rule

      interest-in-character

      (interest-in-character gossip character)

      Integer representation of how interesting this character is to this gossip. TODO: this assumes that characters are passed as keywords, but, as documented above, they probably have to be maps, to allow for degradation.

      interest-in-location

      (interest-in-location gossip location)

      Integer representation of how interesting this location is to this gossip.

      interesting-character?

      (interesting-character? gossip character)

      Boolean representation of whether this character is interesting to this gossip.

      interesting-item?

      (interesting-item? gossip item)

      True if anything about this news item is interesting to this gossip.

      interesting-location?

      (interesting-location? gossip item)

      True if the location of this news item is interesting to this gossip.

      interesting-object?

      (interesting-object? gossip object)

      TODO: write docs

      interesting-topic?

      (interesting-topic? gossip topic)

      TODO: write docs

      learn-news-item

      (learn-news-item gossip item)(learn-news-item gossip item follow-inferences?)

      Return a gossip like this gossip, which has learned this news item if it is of interest to them.

      make-all-inferences

      (make-all-inferences item)

      Return a list of knowledge entries inferred from this news item by this gossip.

      news-topics

      Topics of interest to gossip agents. Topics are keyed in this map by their verbs. The keys associated with each topic are the extra pieces of information required to give context to a gossip item. Generally:

      +the-great-game.gossip.news-items documentation

      the-great-game.gossip.news-items

      Categories of news events interesting to gossip agents

      degrade-character

      (degrade-character gossip character)

      Return a character specification like this character, but comprising only those properties this gossip is interested in.

      degrade-location

      (degrade-location gossip location)

      Return a location specification like this location, but comprising only those elements this gossip is interested in. If none, return nil.

      infer

      (infer item rule)

      Infer a new knowledge item from this item, following this rule

      interest-in-character

      (interest-in-character gossip character)

      Integer representation of how interesting this character is to this gossip. TODO: this assumes that characters are passed as keywords, but, as documented above, they probably have to be maps, to allow for degradation.

      interest-in-location

      (interest-in-location gossip location)

      Integer representation of how interesting this location is to this gossip.

      interesting-character?

      (interesting-character? gossip character)

      Boolean representation of whether this character is interesting to this gossip.

      interesting-item?

      (interesting-item? gossip item)

      True if anything about this news item is interesting to this gossip.

      interesting-location?

      (interesting-location? gossip item)

      True if the location of this news item is interesting to this gossip.

      interesting-object?

      (interesting-object? gossip object)

      TODO: write docs

      interesting-topic?

      (interesting-topic? gossip topic)

      TODO: write docs

      learn-news-item

      (learn-news-item gossip item)(learn-news-item gossip item follow-inferences?)

      Return a gossip like this gossip, which has learned this news item if it is of interest to them.

      make-all-inferences

      (make-all-inferences item)

      Return a list of knowledge entries that can be inferred from this news item.

      news-topics

      Topics of interest to gossip agents. Topics are keyed in this map by their verbs. The keys associated with each topic are the extra pieces of information required to give context to a gossip item. Generally: