From 71cfda093d9ef79395d6ee1c4afdb3441e28d9f4 Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Mon, 8 Apr 2024 22:29:21 +0100 Subject: [PATCH 1/2] Massive code clean-up, all tests still pass. ...but I'm still struggling to understand how it works and how I use it. Memo to self: document your code better. --- doc/On-sex-and-sexual-violence.md | 69 ++++++++++++ ...anning-algorithm-for-craftworker-npcs.html | 2 +- docs/codox/API_Spec.html | 2 +- docs/codox/Appraisal.html | 2 +- docs/codox/Baking-the-world.html | 2 +- docs/codox/Biomes_and_ecology.html | 2 +- docs/codox/Canonical-dictionary.html | 4 +- ...on_of_tasks_between_server_and_client.html | 2 +- docs/codox/Dynamic-consequences.html | 2 +- docs/codox/Further-reading.html | 2 +- docs/codox/Game-engine-integration.html | 2 +- docs/codox/Game_Play.html | 2 +- ...p_scripted_plot_and_Johnny_Silverhand.html | 2 +- docs/codox/MVP-Roadmap.html | 2 +- .../codox/Modelling_democracy_and_morale.html | 4 +- docs/codox/Not_my_problem.html | 2 +- docs/codox/On-sex-and-sexual-violence.html | 103 +++++++++++++++++- docs/codox/Organic_Quests.html | 4 +- docs/codox/Pathmaking.html | 2 +- docs/codox/Populating-a-game-world.html | 2 +- docs/codox/Roadmap.html | 2 +- docs/codox/Selecting_Character.html | 2 +- docs/codox/Settling-a-game-world.html | 4 +- docs/codox/Simulation-layers.html | 2 +- ...ad-of-knowledge-in-a-large-game-world.html | 2 +- .../Things_Voice_Interaction_Enables.html | 2 +- docs/codox/Uncanny_dialogue.html | 2 +- .../Voice-acting-considered-harmful.html | 2 +- ...journeyman.the-great-game.agent.agent.html | 2 +- ...rneyman.the-great-game.agent.schedule.html | 2 +- ...eyman.the-great-game.buildings.module.html | 2 +- ....the-great-game.buildings.rectangular.html | 2 +- ...urneyman.the-great-game.gossip.gossip.html | 2 +- ...yman.the-great-game.gossip.news-items.html | 2 +- ...eyman.the-great-game.holdings.holding.html | 2 +- ...yman.the-great-game.location.location.html | 2 +- ...urneyman.the-great-game.lore.digester.html | 2 +- ...yman.the-great-game.merchants.markets.html | 2 +- ...e-great-game.merchants.merchant-utils.html | 2 +- ...an.the-great-game.merchants.merchants.html | 2 +- ...man.the-great-game.merchants.planning.html | 2 +- ...reat-game.merchants.strategies.simple.html | 2 +- ...yman.the-great-game.objects.character.html | 2 +- ...yman.the-great-game.objects.container.html | 2 +- ...an.the-great-game.objects.game-object.html | 2 +- ...cc.journeyman.the-great-game.playroom.html | 2 +- .../cc.journeyman.the-great-game.time.html | 2 +- .../cc.journeyman.the-great-game.utils.html | 2 +- ...neyman.the-great-game.world.heightmap.html | 2 +- ...rneyman.the-great-game.world.location.html | 2 +- ...cc.journeyman.the-great-game.world.mw.html | 2 +- ...ourneyman.the-great-game.world.routes.html | 2 +- ...journeyman.the-great-game.world.world.html | 2 +- docs/codox/index.html | 9 +- docs/codox/intro.html | 3 +- .../journeyman/the_great_game/agent/agent.clj | 102 ++++++++++------- .../the_great_game/objects/container.clj | 4 +- .../the_great_game/proving/core.clj | 43 +++++--- workspace.code-workspace | 3 - 59 files changed, 323 insertions(+), 123 deletions(-) diff --git a/doc/On-sex-and-sexual-violence.md b/doc/On-sex-and-sexual-violence.md index 3bdaaca..2936f15 100644 --- a/doc/On-sex-and-sexual-violence.md +++ b/doc/On-sex-and-sexual-violence.md @@ -40,6 +40,75 @@ If we're going to represent a society in which public sex is normal, then we're By 'eroticised', I'm meaning deliberately intended to trigger sexual feelings in the audience — which, if the player character is present, includes the player. +### Breeding strategies for non-player characters + +In order to model population growth, I need to model when two NPCs will have sex; I need to model (roughly) when two NPCs will choose to have sex. + +This is different for female NPCs to male NPCs (and female NPCs will be much more cautious, because of the risk/cost of pregnancy), so let's consider each in turn. + +**Note that** sex happens if and only if the conditions for both the female partner and the male partner are met. + +**Note that** we're considering heterosexual sex only here because what I'm currently modelling is population growth, and only heterosexual sex leads to pregnancy. + +#### Generalised breeding strategy for a female NPC + +A female NPC will have sex with a male NPC: + +1. Long term relationship + 1. Her life goal is `:ancestor`; + 2. His life goal is either `:ancestor` or `:citizen`; + 3. Her attitude towards him is +2 or above; + 4. They reside in the same dwelling, *or* one or other of them is of no fixed abode (in which case they will reside in the same dwelling); + 5. All other levels in her hierarchy of needs are currently satisfied. +2. Passion + 1. His attitude towards her is +4, and + 2. Her attitude towards him is also +4; + 3. All other levels in her hierarchy of needs are currently satisfied. +3. Social climbing + 1. Her life goal is `:climber` and + 2. His social rank is two or more higher than hers (counting `:bonnet-laird` as above `:master`); + 3. All other levels in her hierarchy of needs are currently satisfied. +4. Transactional + 1. Need + 1. She is hungry and broke; and + 2. He has surplus food and/or money. + 2. Coercion + 1. He has something she urgently wants (the example I'm thinking of is he has abducted a child); + 3. Sex work + 1. Her life goal is `:hoarder`, and he has surplus money; or + 2. It's possible I make sex work an actual career choice -- a craft of its own. +5. Rape + 1. If she is a slave and he is her owner; + 2. If he has defeated her in a fight; + 3. If she assesses that he will defeat her in an impending fight; + 4. Possibly, to distrct him from doing worse things to people she is protecting (e.g. children) + +#### Generalised breeding strategy for a male NPC + +1. Ancestor + 1. His life goal is `:ancestor`; and + 2. His attitude towards her is +2 or above; + 3. All other levels in his hierarchy of needs are currently satisfied. +2. Long term relationship + 1. His life goal is `:ancestor` or `:citizen`; + 2. Her life goal is `:ancestor` or `:citizen`; + 3. His attitude towards her is +2 or above; + 4. They reside in the same dwelling, *or* one or other of them is of no fixed abode (in which case they will reside in the same dwelling); + 5. All other levels in his hierarchy of needs are currently satisfied. +3. Dynastic + 1. His life goal is `:conqueror`; and + 2. Her social rank is `:ariston` or above; + 3. She has no other existing long term sexual relationship; + 4. All other levels in his hierarchy of needs are currently satisfied. +4. Social climbing + 1. His life goal is `:climber`; and + 2. Her social rank is at least one higher than his; + 3. All other levels in his hierarchy of needs are currently satisfied. +5. Casual + 1. His attitude towards her is +1 or above; + 2. All other levels in his hierarchy of needs are currently satisfied. + + ## Sexual violence between non-player characters In a world in which there are characters who are thuggish, who seek to dominate, terrorise and subdue other characters, whether those characters are outlaws or soldiers or aristocrats, to pretend that rape would not be used as a means to dominate, terrorise or subdue is… bowdlerisation. It's unrealistic, and it's a morally indefensible choice. diff --git a/docs/codox/A-generic-planning-algorithm-for-craftworker-npcs.html b/docs/codox/A-generic-planning-algorithm-for-craftworker-npcs.html index b5e93fa..35fec7a 100644 --- a/docs/codox/A-generic-planning-algorithm-for-craftworker-npcs.html +++ b/docs/codox/A-generic-planning-algorithm-for-craftworker-npcs.html @@ -1,6 +1,6 @@ -A Generic Planning Algorithm for craftworker NPCs

A Generic Planning Algorithm for craftworker NPCs

+A Generic Planning Algorithm for craftworker NPCs

A Generic Planning Algorithm for craftworker NPCs

Preamble

The Great Game requires a number of different crafts to be performed, both because the economy depends on the products of those crafts and to provide verisimilitude and set dressing. Some of those crafts, the relations between them, and the progression within them are set out in Populating a game world.

For the purposes of planning work, only Master craftspeople are considered.

diff --git a/docs/codox/API_Spec.html b/docs/codox/API_Spec.html index 8f32fc1..72e1bf8 100644 --- a/docs/codox/API_Spec.html +++ b/docs/codox/API_Spec.html @@ -1,6 +1,6 @@ -API Spec (unfinished)

API Spec (unfinished)

+API Spec (unfinished)

API Spec (unfinished)

If the Gossip system is ever to be deployed in practice at all, it will need to be deployed as a library add-on to someone else’s game, since in practice The Great Game will never be even nearly finished. The game engine already knows many of the things the Gossip system needs to know; that we need to define is an interface which allows Gossip, considered as a subsystem, to query the game engine.

My preference is still that Gossip should be written in a Lisp-like language - and, for now, in Clojure - simply because that is most comfortable to me. It needs bidirectional socket communication with the game engine, over which it sends either extensible data notation or JavaScript Object Notation, with a preference for the former.

Tracking what happens in the world

diff --git a/docs/codox/Appraisal.html b/docs/codox/Appraisal.html index e6ead9b..a61a0a2 100644 --- a/docs/codox/Appraisal.html +++ b/docs/codox/Appraisal.html @@ -1,6 +1,6 @@ -Appraisal (unfinished)

Appraisal (unfinished)

+Appraisal (unfinished)

Appraisal (unfinished)

What is Appraisal

There’s an thing that all non player characters can do, which varies greatly from person to person, and which is of particular importance to merchants, and that is appraisal.

Each category of goods has different dimensions of quality. A sword may be evaluated, for example, on

diff --git a/docs/codox/Baking-the-world.html b/docs/codox/Baking-the-world.html index 1e215e7..387459e 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

Devorgilla's Bridge in Dumfries, early fourteenth century

Devorgilla’s Bridge in Dumfries, early fourteenth century. This clearly shows how a genetic buildings approach to bridges can be made to work: a single element is repeated to span the necessary distance. That element can be stretched vertically and laterally to match the location, and can be rendered in different stone finishes to match local geology.

diff --git a/docs/codox/Biomes_and_ecology.html b/docs/codox/Biomes_and_ecology.html index f0bd159..cc2c0f1 100644 --- a/docs/codox/Biomes_and_ecology.html +++ b/docs/codox/Biomes_and_ecology.html @@ -1,6 +1,6 @@ -Biomes and ecology (unfinished)

Biomes and ecology (unfinished)

+Biomes and ecology (unfinished)

Biomes and ecology (unfinished)

The motivation for this document was to explain the mulberry trees in the Tcha valley, and think about why Tchahua is especially a centre for the silk trade

Broader geography

The broader geography of the world is not a matter for this document, but TODO: there isn’t yet a document which usefully describes it, and there needs to be.

diff --git a/docs/codox/Canonical-dictionary.html b/docs/codox/Canonical-dictionary.html index b0896f1..55a31d0 100644 --- a/docs/codox/Canonical-dictionary.html +++ b/docs/codox/Canonical-dictionary.html @@ -1,6 +1,6 @@ -Canonical dictionary for this documentation

Canonical dictionary for this documentation

+Canonical dictionary for this documentation

Canonical dictionary for this documentation

Where a word is used in the documentation for The Great Game and its related projects, this file describes the canonical meaning of that word. This is because a lot of the concepts in play are messy and ambiguous, so that at times even I am confused by what I mean. The presence of this file is an acknowledment of this difficulty, and an implicit admission that not all the documentation is, at this stage anyway, consistent.

Actor

An actor is a thing which performs actions within the game world. Thus a tree is (almost certainly) not an actor, and things like sheep and rabbits that run about are probably not actors, but an animal which may pro-actively interact with the player character (such as a predator, or a beast of burden, or even a prey species which may flee) is an actor. In god mode, if implemented, the player can inhabit any actor within the game world.

@@ -12,7 +12,7 @@
  • innkeepers (and possibly some others) are gossips who do not move; rather, they gather information from gossips who do move, and all non-player characters local to the are deemed to know everything that their local innkeeper knows;
  • merchants (and possibly some others) are gossips who do move from place to place, and thus transfer news.
  • -

    See the spread of knowledge in a large game world.

    +

    See the spread of knowledge in a large game world.

    Heightmap

    A heightmap is a raster image of the world, such that the intensity in which an area is coloured represents the value of some variable, by default height, of that area.

    Holding

    diff --git a/docs/codox/Division_of_tasks_between_server_and_client.html b/docs/codox/Division_of_tasks_between_server_and_client.html index 9bedb72..9dff384 100644 --- a/docs/codox/Division_of_tasks_between_server_and_client.html +++ b/docs/codox/Division_of_tasks_between_server_and_client.html @@ -1,6 +1,6 @@ -Division of tasks between server and client

    Division of tasks between server and client

    +Division of tasks between server and client

    Division of tasks between server and client

    An alternative nomentclature I may use for this dichotomy would be planner and performer; it would be the same dichotomy. ‘Planner’ and ‘server’ are synonyms; ‘performer’ and ‘client’ are synonyms.

    What do I mean by the ‘server’?

    There is something which manages game state and things like the gossip network, merchant network, and major world events. This something is almost certainly written in some form of Lisp; I’d prefer Clojure but I don’t think it’s performant enough so probably Common Lisp. This means that it has inevitable pauses for garbage collection. Underneath this is a database which handles persistent storage of game state, which is probably an SQL database and quite likely SQLite.

    diff --git a/docs/codox/Dynamic-consequences.html b/docs/codox/Dynamic-consequences.html index 7955991..c3e974a 100644 --- a/docs/codox/Dynamic-consequences.html +++ b/docs/codox/Dynamic-consequences.html @@ -1,6 +1,6 @@ -On the consequences of a dynamic game environment for storytelling

    On the consequences of a dynamic game environment for storytelling

    +On the consequences of a dynamic game environment for storytelling

    On the consequences of a dynamic game environment for storytelling

    First, a framing disclaimer: in Racundra’s First Cruise, Arthur Ransome describes coming across a half built — and by the time he saw it, already obsolete — wooden sailing ship, in a Baltic forest. An old man was building it, by himself. He had been building it since he had been a young man. It’s clear that Ransome believed the ship would never be finished. It’s not clear whether the old man believed that it would, but nevertheless he was building it.

    I will never build a complete version of The Great Game; it will probably never even be a playable prototype. It is a minor side-project of someone who

      diff --git a/docs/codox/Further-reading.html b/docs/codox/Further-reading.html index e2f62a0..daa3914 100644 --- a/docs/codox/Further-reading.html +++ b/docs/codox/Further-reading.html @@ -1,6 +1,6 @@ -Further Reading (and watching)

      Further Reading (and watching)

      +Further Reading (and watching)

      Further Reading (and watching)

      Work by other people which is relevant to what I’m doing, and which I should study.

      ## Modelling the natural environment

        diff --git a/docs/codox/Game-engine-integration.html b/docs/codox/Game-engine-integration.html index 340d5e5..243a2c2 100644 --- a/docs/codox/Game-engine-integration.html +++ b/docs/codox/Game-engine-integration.html @@ -1,6 +1,6 @@ -Game-engine integration (unfinished)

        Game-engine integration (unfinished)

        +Game-engine integration (unfinished)

        Game-engine integration (unfinished)

        To build a game using these ideas we need a lot of things that are well understood and already implemented: rendering a world, moving models of characters in a world, and so on. This collection of technologies which allow us to realise an interactive realisation of a world is typically called a game engine.

        It’s my intention that the bits that I add to the mix should be open source in the hard sense of that phrase, fully free software released under GPL. They cannot therfore be directly linked to a proprietary game engine.

        But the current state of play is that the best and easiest to work with game engines are not open source; and while I could build a demo game using, for example, the Godot engine or jMonkeyEngine the result wouldn’t be as compelling and I believe the effort would be more considerable than if I use Unreal Engine, which is my current plan.

        diff --git a/docs/codox/Game_Play.html b/docs/codox/Game_Play.html index 76118e6..5678e3c 100644 --- a/docs/codox/Game_Play.html +++ b/docs/codox/Game_Play.html @@ -1,6 +1,6 @@ -Game Play

        Game Play

        +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. diff --git a/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html b/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html index 804fd9f..d82fe47 100644 --- a/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html +++ b/docs/codox/Gossip_scripted_plot_and_Johnny_Silverhand.html @@ -1,6 +1,6 @@ -Gossip, scripted plot, and Johnny Silverhand

          Gossip, scripted plot, and Johnny Silverhand

          +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. diff --git a/docs/codox/MVP-Roadmap.html b/docs/codox/MVP-Roadmap.html index b9a73b7..25bb614 100644 --- a/docs/codox/MVP-Roadmap.html +++ b/docs/codox/MVP-Roadmap.html @@ -1,6 +1,6 @@ -Minimum Viable Product, and a road map

            Minimum Viable Product, and a road map

            +Minimum Viable Product, and a road map

            Minimum Viable Product, and a road map

            Right, I’m bogged down thinking about the immensity of what I want to build, so I’m achieving nothing. So the first thing I need to state is what the Minimum Viable Product is, and the second is to outline a rough road map which takes us forwards a few steps from the MVP.

            The core idea here is to have a game world in which you can just say anything you like to game characters, and they can say sensible things back.

            But actually, I know that speech to text can be reasonably effectively done; and I believe with a slightly lower degree of confidence that text to convincing speech can also be done.

            diff --git a/docs/codox/Modelling_democracy_and_morale.html b/docs/codox/Modelling_democracy_and_morale.html index 18975e1..c06f3d3 100644 --- a/docs/codox/Modelling_democracy_and_morale.html +++ b/docs/codox/Modelling_democracy_and_morale.html @@ -1,9 +1,9 @@ -The Red Company: modelling democracy and morale (unfinished)

            The Red Company: modelling democracy and morale (unfinished)

            +The Red Company: modelling democracy and morale (unfinished)

            The Red Company: modelling democracy and morale (unfinished)

            Background

            The Great Game exists as a project on two levels. One one level, it’s a framework for building algorithms to build much more vibrant, and thus enjoyable game worlds; at another level, it’s about building a particular world, in which I want to tell stories.

            -

            The world in which I want to tell stories is a world which is based roughly on late bronze age to medieval Europe. It’s a world in which the region known as ‘The Coast’ – the southern littoral of the continent – had been a mostly-peaceful matrideic dispersed agrarian tribal society, which had been invaded some hundreds of years past by a warrior tribe with substantially better military technology.

            +

            The world in which I want to tell stories is a world which is based roughly on late bronze age to medieval Europe. It’s a world in which the region known as ‘The Coast’ — the southern littoral of the continent — had been a mostly-peaceful matrideic dispersed agrarian tribal society, which had been invaded some hundreds of years past by a warrior tribe with substantially better military technology.

            These warrior tribesmen have settled down as local tyrants or robber barons, parasitising on the indigenous communities, and have evolved into an aristocratic (‘Ariston’) class. In the meantime, a mercantile class has grown up and established important long distance overland trade routes; and significant towns (called ‘cities’, but of only at most a few tens of thousand inhabitants) have grown up around markets.

            These mercantile cities have been under the governance of powerful aristons known as tyrranoi, and the cities under their tyrranoi have competed militarily as well as commercially for control of strategic features on trade routes, such as bridges, fords, oases, mountain passes, and so on.

            In the very earliest days of the warrior invasion, the warriors themselves fought against the indigenous peoples, who had very limited military equipment and tactics. Later, as they settled into Aristons, they fought by leading feudal levies of partially-trained peasants. Over the past hundred years or so, mercenary companies have emerged of specialist, trained warriors, and because these have more fighting experience (and often better equipment) they tend to beat feudal levies. These mercenary companies are base loosely on the condottierri of fourteenth century Italy.

            diff --git a/docs/codox/Not_my_problem.html b/docs/codox/Not_my_problem.html index 78e3358..94dd37d 100644 --- a/docs/codox/Not_my_problem.html +++ b/docs/codox/Not_my_problem.html @@ -1,6 +1,6 @@ - Not my problem

            # Not my problem

            + Not my problem

            # Not my problem

            Introduction

            This document is essentially a catalogue of side-tracks which I do not have to go down when implementing The Great Game. Solved problems; or problems which are common to many other games, so if I don’t solve them someone else will. The object of doing this is to work down to a constrained set of problems which are genuinely things I’m trying to innovate, which I should focus on; which essentially come down to

              diff --git a/docs/codox/On-sex-and-sexual-violence.html b/docs/codox/On-sex-and-sexual-violence.html index 6883c83..aaab08d 100644 --- a/docs/codox/On-sex-and-sexual-violence.html +++ b/docs/codox/On-sex-and-sexual-violence.html @@ -1,6 +1,6 @@ -On Sex, and Sexual Violence, in Games

              On Sex, and Sexual Violence, in Games

              +On Sex, and Sexual Violence, in Games

              On Sex, and Sexual Violence, in Games

              For me the purpose of games is to provide worlds in which players can explore moral actions, and the consequences of moral actions. Sexual violence is something that happens in the real world, and which happens, even within the real world, more frequently in areas of poor governance and open conflict; and those are areas in which there are important moral actions, and important moral consequences, so they are areas in which it is interesting to set games.

              It would be ludicrous to argue ‘sexual violence is wrong, therefore we should not represent it in games.’ Killing people is also wrong, yet it is extremely common in games. However, sexual violence — and in particular the representation of sexual violence — does pose some specific problems that need to be addressed.

              Firstly, sexual violence is extremely gendered. Yes, male people are sometimes subjected to sexual violence, but nevertheless the overwhelming majority of victims of sexual violence are female. Yes, female people are sometimes — extraordinarily rarely, but sometimes — perpetrators of sexual violence, but nevertheless perpetrators of sexual violence are almost exclusively male.

              @@ -24,6 +24,107 @@
            1. Sex as part of a religious or other ritual event — this is related to, and is, sex as conscious performance, but the purpose of the performance is symbolic and/or sacramental. This doesn’t mean it is not eroticised, but it may not be eroticised.

            By ‘eroticised’, I’m meaning deliberately intended to trigger sexual feelings in the audience — which, if the player character is present, includes the player.

            +

            Breeding strategies for non-player characters

            +

            In order to model population growth, I need to model when two NPCs will have sex; I need to model (roughly) when two NPCs will choose to have sex.

            +

            This is different for female NPCs to male NPCs (and female NPCs will be much more cautious, because of the risk/cost of pregnancy), so let’s consider each in turn.

            +

            Note that sex happens if and only if the conditions for both the female partner and the male partner are met.

            +

            Note that we’re considering heterosexual sex only here because what I’m currently modelling is population growth, and only heterosexual sex leads to pregnancy.

            +

            Generalised breeding strategy for a female NPC

            +

            A female NPC will have sex with a male NPC:

            +
              +
            1. Long term relationship +
                +
              1. Her life goal is :ancestor;
              2. +
              3. His life goal is either :ancestor or :citizen;
              4. +
              5. Her attitude towards him is +2 or above;
              6. +
              7. They reside in the same dwelling, or one or other of them is of no fixed abode (in which case they will reside in the same dwelling);
              8. +
              9. All other levels in her hierarchy of needs are currently satisfied.
              10. +
              +
            2. +
            3. Passion +
                +
              1. His attitude towards her is +4, and
              2. +
              3. Her attitude towards him is also +4;
              4. +
              5. All other levels in her hierarchy of needs are currently satisfied.
              6. +
              +
            4. +
            5. Social climbing +
                +
              1. Her life goal is :climber and
              2. +
              3. His social rank is two or more higher than hers (counting :bonnet-laird as above :master);
              4. +
              5. All other levels in her hierarchy of needs are currently satisfied.
              6. +
              +
            6. +
            7. Transactional +
                +
              1. Need +
                  +
                1. She is hungry and broke; and
                2. +
                3. He has surplus food and/or money.
                4. +
                +
              2. +
              3. Coercion +
                  +
                1. He has something she urgently wants (the example I’m thinking of is he has abducted a child);
                2. +
                +
              4. +
              5. Sex work +
                  +
                1. Her life goal is :hoarder, and he has surplus money; or
                2. +
                3. It’s possible I make sex work an actual career choice – a craft of its own.
                4. +
                +
              6. +
              +
            8. +
            9. Rape +
                +
              1. If she is a slave and he is her owner;
              2. +
              3. If he has defeated her in a fight;
              4. +
              5. If she assesses that he will defeat her in an impending fight;
              6. +
              7. Possibly, to distrct him from doing worse things to people she is protecting (e.g. children)
              8. +
              +
            10. +
            +

            Generalised breeding strategy for a male NPC

            +
              +
            1. Ancestor +
                +
              1. His life goal is :ancestor; and
              2. +
              3. His attitude towards her is +2 or above;
              4. +
              5. All other levels in his hierarchy of needs are currently satisfied.
              6. +
              +
            2. +
            3. Long term relationship +
                +
              1. His life goal is :ancestor or :citizen;
              2. +
              3. Her life goal is :ancestor or :citizen;
              4. +
              5. His attitude towards her is +2 or above;
              6. +
              7. They reside in the same dwelling, or one or other of them is of no fixed abode (in which case they will reside in the same dwelling);
              8. +
              9. All other levels in his hierarchy of needs are currently satisfied.
              10. +
              +
            4. +
            5. Dynastic +
                +
              1. His life goal is :conqueror; and
              2. +
              3. Her social rank is :ariston or above;
              4. +
              5. She has no other existing long term sexual relationship;
              6. +
              7. All other levels in his hierarchy of needs are currently satisfied.
              8. +
              +
            6. +
            7. Social climbing +
                +
              1. His life goal is :climber; and
              2. +
              3. Her social rank is at least one higher than his;
              4. +
              5. All other levels in his hierarchy of needs are currently satisfied.
              6. +
              +
            8. +
            9. Casual +
                +
              1. His attitude towards her is +1 or above;
              2. +
              3. All other levels in his hierarchy of needs are currently satisfied.
              4. +
              +
            10. +

            Sexual violence between non-player characters

            In a world in which there are characters who are thuggish, who seek to dominate, terrorise and subdue other characters, whether those characters are outlaws or soldiers or aristocrats, to pretend that rape would not be used as a means to dominate, terrorise or subdue is… bowdlerisation. It’s unrealistic, and it’s a morally indefensible choice.

            So there has to be a mechanism for non-player characters to decide to commit acts of sexual violence towards other non-player characters. The player must at least hear of such events through the gossip network, and should be able to find the specific non-player characters involved, and speak to them. Whether it’s necessary to portray acts of sexual violence on screen is something I’m much less persuaded by, simply because it runs the risk of eroticising them.

            diff --git a/docs/codox/Organic_Quests.html b/docs/codox/Organic_Quests.html index 2308755..dc5d81c 100644 --- a/docs/codox/Organic_Quests.html +++ b/docs/codox/Organic_Quests.html @@ -1,6 +1,6 @@ -Organic Quests

            Organic Quests

            +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 offers a typology of quests as follows:

            1. Kill quests
            2. @@ -23,7 +23,7 @@

              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.

              +

              An escort quest is typically a request to take a specified non-player character safely through a dangerous area. It is thus very similar to a delivery quest, except that you are escorting a character rather than delivering an item.

              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

                diff --git a/docs/codox/Pathmaking.html b/docs/codox/Pathmaking.html index 6586e04..62bc5c1 100644 --- a/docs/codox/Pathmaking.html +++ b/docs/codox/Pathmaking.html @@ -1,6 +1,6 @@ -Pathmaking

                Pathmaking

                +Pathmaking

                Pathmaking

                NOTE: this file is called ‘pathmaking’, not ‘pathfinding’, because ‘pathfinding’ has a very specific meaning/usage in game design which is only part of what I want to talk about here.

                NOTE: Work on this is being carried on in a separate library, Walkmap, q.v.

                Stages in creating routes between locations

                diff --git a/docs/codox/Populating-a-game-world.html b/docs/codox/Populating-a-game-world.html index 46fc6cd..95844f1 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/Roadmap.html b/docs/codox/Roadmap.html index a322cec..c0558fc 100644 --- a/docs/codox/Roadmap.html +++ b/docs/codox/Roadmap.html @@ -1,6 +1,6 @@ -Roadmap (obsolete)

                Roadmap (obsolete)

                +Roadmap (obsolete)

                Roadmap (obsolete)

                This document outlines a plan to move forward from where I am in June 2021.

                NOTE: this document has been superceded.

                JMonkeyEngine

                diff --git a/docs/codox/Selecting_Character.html b/docs/codox/Selecting_Character.html index 4d13d95..cb5d790 100644 --- a/docs/codox/Selecting_Character.html +++ b/docs/codox/Selecting_Character.html @@ -1,6 +1,6 @@ -Selecting the Player Character

                Selecting the Player Character

                +Selecting the Player Character

                Selecting the Player Character

                Background

                Many computer role playing games, particularly older ones such as Neverwinter Nights, allow you to ‘design’ your player character from a fairly broad canvas. Race, class, attributes, gender and appearance are all selectable.

                Choice has eroded over time. For example the Dragon Age series, where you can chose between three races, two genders, and a small number of classes. In the Mass Effect trilogy, you play as Shepard, who is human and essentially a Fighter, but can be either male or female and whose appearance you can customise. You can play as either lawful good or chaotic neutral. In Cyberpunk 2077, you play as V, who is human, either male or female, essentially a Fighter, and chaotic neutral.

                diff --git a/docs/codox/Settling-a-game-world.html b/docs/codox/Settling-a-game-world.html index 5d90dc9..4be912d 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

                @@ -31,7 +31,7 @@

                That’s simple, but it provides a remarkable good model of population spread. however, it is essentially a grid and so doesn’t make for natural-seeming landscapes when considered as a three dimensional rendered world. How can we do better?

                Microworld Two

                The objective of this essay is to outline an algorithm for creating inhabited landscapes in which games can be set, which are satisfyingly believable when rendered in three dimensions. The objective of creating landscapes ‘procedurally’ – that is, with algorithms – is that they can be very much larger than designed landscapes for the same richness of local detail. This does not mean that every aspect of the final landscape must be ‘procedural’. It would be possible to use the techniques outlined here to create landscapes which were different every time the game was played, but it would be equally possible to create a landscape which was frozen at a particular point and then hand edited to add features useful to the game’s plot. And while I’m principally thinking in this about role playing games, this sort of landscape would be applicable to many other sorts of games – strategy games, god games, first person shooters…

                -

                The physical geography

                +

                Physical geography

                Consider our landscape as, once again, a fractally folded sheet on which any given point has characteristics based on its elevation and orientation. There are two critical levels – water level and treeline. The water level is, overall, sea level, but in the case of a localised depression it is equal to the lowest land height between the depression and the sea (lakes form in depressions). Computing the fractal sheet forms stage one in computing the landscape. Next, we need functions which, for any given point on the landscape, compute two different dimensions of soil fertility: water and warmth. We’ll assume a coriolis prevailing wind blowing from the west, bringing in damp air from an ocean in that direction. Western slopes are wetter than eastern slopes. In principle, also, there’s likely to be a rain shadow to the east of high ground leading to considerable aridity, but that may be too expensive to compute. Rain runs swiftly off steeper slopes, more slowly on flatter ground, so flatter ground is wetter than steeper ground. Water flows down hill, so lower ground is on the whole wetter than higher ground. This isn’t a precise model of soil hydrology, but I think it’s good enough. From each lake a watercourse follows the lowest possible path to the sea. Watercourses modify the land overwhich they flow, carving out a route at least sufficient to carry the amount of water collected in the watershed above each point. Where watercourses flow down steeper gradients, they carve out gullies, possibly with waterfalls. Where they cross shallower gradients or level ground, they become broader. Computing the watercourses becomes the second stage of computing the lanscape.

                Vegetation

                Now sprinkle seeds randomly across the landscape at a density of roughly one every ten square metres. Seeds which fall in water, ignore (? or make into water plants?). The position of the plant is taken from the random sprinkling. The species and size of the plant that grows from the plant are a function of the water and warmth functions described above, with latitude and longitude as seeds for pseudo-random functions delivering aspects like branching and so on – enough to make individual plants distinct and not carbon copies even of other plants of the same species, but nevertheless recreatable from just the latitude and longitude. So for each plant only two integers need to be stored, yet every time a player passes he will see an identically recreated world. Of course there is a trade-off between storage space and rendering time, and it may be more efficient to build and cache a detailed model of each plant. Like a lot of other things it depends on the game being designed and the processing power of the platform on which that game is delivered. As to how the functions which select the vegetation type work, obviously trees grow better in wetter places, grassland plants in dryer places; within the wetter places, coniferous trees are more prevalent where it is cooler, broadleaves where it is warmer. In the very wettest places, willows, alders and marshland plants. These plants – the seeded plants – are the feature plants of the landscape. When rendering the landscape the renderer would first apply a suitable local surface texture, for example, in grassland areas, grass.

                diff --git a/docs/codox/Simulation-layers.html b/docs/codox/Simulation-layers.html index 0bf1d03..f1105e4 100644 --- a/docs/codox/Simulation-layers.html +++ b/docs/codox/Simulation-layers.html @@ -1,6 +1,6 @@ -Simulation layers

                Simulation layers

                +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

                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 8a8728e..064fadc 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

                Note

                This version of this essay has been adapted to use the code in the-great-game.gossip.news-items, q.v.. The original version of the essay is still available on my blog.

                diff --git a/docs/codox/Things_Voice_Interaction_Enables.html b/docs/codox/Things_Voice_Interaction_Enables.html index d7dc60e..c7a5549 100644 --- a/docs/codox/Things_Voice_Interaction_Enables.html +++ b/docs/codox/Things_Voice_Interaction_Enables.html @@ -1,6 +1,6 @@ -Things Voice Interaction Enables

                Things Voice Interaction Enables

                +Things Voice Interaction Enables

                Things Voice Interaction Enables

                Organic quest routing

                In a world in which you can talk to non-player characters, and in which non-player characters know the directions to things which are local to their homes (and some, travellers, will be able to give you routes to things further away), when you need to get to your next waypoint you can just ask for directions. That much is easy.

                But something much richer occurred to me.

                diff --git a/docs/codox/Uncanny_dialogue.html b/docs/codox/Uncanny_dialogue.html index 231b823..496f36f 100644 --- a/docs/codox/Uncanny_dialogue.html +++ b/docs/codox/Uncanny_dialogue.html @@ -1,6 +1,6 @@ -The Uncanny Valley, and dynamically generated dialogue

                The Uncanny Valley, and dynamically generated dialogue

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

                diff --git a/docs/codox/Voice-acting-considered-harmful.html b/docs/codox/Voice-acting-considered-harmful.html index 0ec682b..d8711d4 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

                diff --git a/docs/codox/cc.journeyman.the-great-game.agent.agent.html b/docs/codox/cc.journeyman.the-great-game.agent.agent.html index 343bf76..f79e82a 100644 --- a/docs/codox/cc.journeyman.the-great-game.agent.agent.html +++ b/docs/codox/cc.journeyman.the-great-game.agent.agent.html @@ -1,6 +1,6 @@ -cc.journeyman.the-great-game.agent.agent documentation

                cc.journeyman.the-great-game.agent.agent

                Anything in the game world with agency; primarily but not exclusively characters.

                +cc.journeyman.the-great-game.agent.agent documentation

                cc.journeyman.the-great-game.agent.agent

                Anything in the game world with agency; primarily but not exclusively characters.

                ProtoAgent

                protocol

                An object which can act in the world

                members

                act

                (act actor world circle)

                Allow actor to do something in this world, in the context of this circle; return the new state of the actor if something was done, nil if nothing was done. Circle is expected to be one of