diff --git a/doc/Canonical-dictionary.md b/doc/Canonical-dictionary.md index 39d0fe5..681c67e 100644 --- a/doc/Canonical-dictionary.md +++ b/doc/Canonical-dictionary.md @@ -17,7 +17,7 @@ A `gossip` is an `actor` who exchanges news with other `actors`, even when the p 1. `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; 2. `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](The-spread-of-knowledge-in-large-game.html). +See [the spread of knowledge in a large game world](The-spread-of-knowledge-in-a-large-game-world.html). #### Heightmap diff --git a/doc/Modelling_democracy_and_morale.md b/doc/Modelling_democracy_and_morale.md index aa35d29..df4c0ac 100644 --- a/doc/Modelling_democracy_and_morale.md +++ b/doc/Modelling_democracy_and_morale.md @@ -4,7 +4,7 @@ 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. diff --git a/doc/Sandbox.md b/doc/Sandbox.md index 5d2410a..31b01d3 100644 --- a/doc/Sandbox.md +++ b/doc/Sandbox.md @@ -53,8 +53,6 @@ Most craft skills — especially in the learning phase — are not like One of the most enjoyable aspects of The Witcher 3 — still my go-to game for ideas I want to improve on — is simply travelling through the world. Although fast travel is possible I find I rarely use it, and a journey which takes fifteen minutes of real world wall clock time can be enjoyable in and of itself. This is, of course, a credit to the beautiful way the world is realised. -(It's worth noting that [Kenshi](https://lofigames.com/), a game I'm coming to greatly admire, does not allow fast travel at all, but has an equivalent of 'cruise control' — you can set a destination and then accelerate time and simply watch as your characters journey). - But nevertheless, in The Witcher 3, a decision was made to pack incident fairly densely — because players would find just travelling boring. This leads to a situation where peaceful villages exist two minutes travel from dangerous monsters or bandit camps, and the suspension of disbelief gets a little strained. Building a world big enough that a market simulation is believable means that for the individual, the travel time to a market where a particular desired good is likely to be cheaper becomes costly in itself. Otherwise, there's no arbitrage between markets and no ecological niche for a merchant to fill. The journey time from market to market has to be several in-game days. An in-game day doesn't have to be as long as a wall clock day, and, indeed, typically isn't. But nevertheless, doing several game days of incident-free travel, even in beautiful scenery, is not going to be engaging — which implies a fast-travel mechanic. @@ -66,3 +64,5 @@ So I'm thinking of a different mechanism: one I'm calling cruise control. You set out on a task which will take a long time — such as a journey, but also such as any routine task. You're shown either a 'fast forward' of your character carrying out this task, or a series of cinematic 'shots along the way'. This depends, of course, on there being continuous renderable landscape between your departure and your destination, but there will be. This fast-forward proceeds at a substantially higher time gearing than normal game time — ten times as fast perhaps; we need it to, because as well as doing backgound scenery loading to move from one location to another, we're also simulating lots of non-player agents' actions in parts of the world where the player currently isn't. So a 'jump cut' from one location to another isn't going to work anyway. The player can interrupt 'fast forward' at any time. But also, the game itself may bring you out of fast forward when it anticipates that there may be action which requires decision — for example, when there are outlaws in the vicinity. And it will do this **before** the player's party is under immediate attack — the player will have time to take stock of the situation and prepare appropriately. Finally, this will take place in the full open world; the player will have the option to choose *not* to enter the narrow defile, for example, to ask local people (if there are any) for any news of outlaw activity, or, if they are available, to send forward scouts. + +(It's worth noting that [Kenshi](https://lofigames.com/), a game I'm coming to greatly admire, does not allow fast travel at all, but has an equivalent of 'cruise control' — you can set a destination and then accelerate time and simply watch as your characters journey). \ No newline at end of file diff --git a/doc/Settling-a-game-world.md b/doc/Settling-a-game-world.md index 8c374eb..304f178 100644 --- a/doc/Settling-a-game-world.md +++ b/doc/Settling-a-game-world.md @@ -36,7 +36,7 @@ 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. diff --git a/project.clj b/project.clj index 1cc996c..86061a7 100644 --- a/project.clj +++ b/project.clj @@ -23,7 +23,8 @@ [org.clojure/clojure "1.11.2"] [org.clojure/math.numeric-tower "0.1.0"] [org.clojure/tools.namespace "1.5.0"] - [org.clojure/tools.reader "1.4.1"]] + [org.clojure/tools.reader "1.4.1"] + [wherefore-art-thou "0.1.0-SNAPSHOT"]] :description "Prototype code towards the great game I've been writing about for ten years, and know I will never finish." :license {:name "GNU General Public License,version 2.0 or (at your option) any later version" :url "https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html"} diff --git a/src/cc/journeyman/the_great_game/proving/core.clj b/src/cc/journeyman/the_great_game/proving/core.clj new file mode 100644 index 0000000..0c4096c --- /dev/null +++ b/src/cc/journeyman/the_great_game/proving/core.clj @@ -0,0 +1,40 @@ +(ns cc.journeyman.the-great-game.proving.core + "Phase one of '[Baking the World](Bakine-the-world.html#phase-one-proving-the-procedural-world)'" + (require [mw-engine.core :refer []] + [mw-engine.drainage :refer []] + [mw-engine.flow :refer []])) + +(defn get-drainage-map + "Given this `height-map` (a monochrome raster) and optionally this + `rainfall-map` (also a monochrome raster), return a drainage map (exact + format uncertain, probably still a raster)." + ([height-map]) + ([height-map rainfall-map])) + +(defn get-biome-map + "Given this `height-map` (a monochrome raster) and optionally this + `rainfall-map` (also a monochrome raster), return a biome map." + ([height-map]) + ([height-map rainfall-map])) + +(defn populate-world + "Given this `biome-map` (as returned by `get-biome-map`), populate a world + (probably some form of database) and return a structure which allows that + database o be interrogated." + [biome-map drainage-map]) + +(defn get-road-map + [populated-world]) + +(defn prove + "Given this `height-map` (a monochrome raster) and optionally this + `rainfall-map` (also a monochrome raster), return a populated world." + ([height-map rainfall-map] + (let [drainage-map (get-drainage-map height-map) + biome-map (get-biome-map height-map rainfall-map) + populated-world (populate-world biome-map drainage-map)] + {:height-map height-map + :drainage-map drainage-map + :populated-world populated-world + :road-map (get-road-map populated-world)}))) + diff --git a/workspace.code-workspace b/workspace.code-workspace index 782fd7e..2c47947 100644 --- a/workspace.code-workspace +++ b/workspace.code-workspace @@ -20,10 +20,20 @@ }, { "path": "../speechio" + }, + { + "path": "../wherefore-art-thou" + }, + { + "path": "../MicroWorld/mw-parser" + }, + { + "path": "../MicroWorld/mw-ui" } ], "settings": { "java.configuration.updateBuildConfiguration": "automatic", - "java.compile.nullAnalysis.mode": "automatic" + "java.compile.nullAnalysis.mode": "automatic", + "java.jdt.ls.vmargs": "-XX:+UseParallelGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx2G -Xms100m -Xlog:disable" } } \ No newline at end of file