diff --git a/README.md b/README.md index 4caa150..abd1c02 100644 --- a/README.md +++ b/README.md @@ -2,41 +2,9 @@ A game about avoiding climate catastrophe. -## Motivation and concept +## Documentation -The primary concerns I have which are driving this project is we're failing to communicate, even to the young but certainly to the old, just how intractable and serious the climate emergency is; that we lack critical infrastructure for a survivable planet; and that, unless we get the management of strategic materials right, it will be impossible to build the infrastructure for a survivable planet without tipping the climate system over the edge into utter catastrophe. - -To illustrate what I mean here: we presently have some capacity to smelt steel by electric arc. We currently have some renewable electricity generation plant. But the amount of steel we can actually make using only renewable energy is quite limited. If we use that limited 'green' steel to make new renewable electricity generation plant and new electric arc steelworks, then we can increase the amount of 'green' steel we can make, and gradually we can build other 'green' infrastructure. But if we use that 'green' steel to make things which aren't actually on the critical path, like electric cars, we're going to be stuffed. - -So the concept here is something between a sim and a god-game. The player will play as government of one of a number of playable territories, on a recognisable model of planet Earth as it is now. As the government, the player can - -1. Raise taxes on a number of things; -2. Build infrastructure using available materials; -3. Ban certain things; -4. Provide social benefits; -5. Put down revolts by force; -6. Engage in diplomacy with other governments; -7. Engage in war with other governments. - -The government does not control the population directly, but only indirectly. If you tax too much and ban too much, your population will revolt. If you allow the climate to warm too much, then climate consequences will also cause your population to revolt. - -## Major components - -### Climate model - -The core of the game needs to be a reasonably good climate model backed by good science. Obviously, this doesn't need to be (and can't be) as sophisticated as climate models used to do real climate science, since it needs to run on a domestic PC or games console and leave enough processor cycles free for a user interface and an economy model, but it has to produce results which are scientifically defensible. - -I think the climate model needs to run in its own thread, separate from the main game loop. It needs to update maps for temperature, rainfall and windspeed on a regular basis, and also track things like total atmospheric carbon, anthropogenic warming, and sea level rise. - -### Economy model - -The economy model needs to track the production and consumption of strategic materials including energy, timber, metals, food, and record (and report to the climate model) the total amount of carbon released. - -### User Interface - -The user interface needs to be a (possibly stylised, but recognisable) map or the world over which the user can pan and zoom to look at what's going on in different places. Cities, industries, transport corridors and so on need to be visible and inspectable. - -I like the idea of having little people running around getting on with their lives, perhaps one for every million people in the real world, but that's pretty ambitious and perhaps a step too far. +There is documentation [here](https://simon-brooke.github.io/climate-game/) ## Warning @@ -48,10 +16,19 @@ I'm much better at starting projects than finishing them. It would be far better ## Usage -Doesn't work yet. In future it will be something like +At present, you can run from the REPL by invoking - $ java -jar climate-game-0.1.0-standalone.jar [args] +> lein repl +This allows you to play around with the code. Alternatively you can build an executable JAR file by invoking + +> lein uberjar + +This will build a jar file in `target/uberjar/climate-game-0.1.0-SNAPSHOT-standalone.jar`; this file may be run by invoking + +> java -jar target/uberjar/climate-game-0.1.0-SNAPSHOT-standalone.jar + +However, currently all you'll get is a window with a rendering of a planet -- not even the right planet -- in it. Nothing yet works. ## License diff --git a/doc/Strategic_Materials.md b/doc/Strategic_Materials.md index 055d00d..339e866 100644 --- a/doc/Strategic_Materials.md +++ b/doc/Strategic_Materials.md @@ -42,3 +42,4 @@ Additionally, so-called biofuels are produced from crops grown on land which wou ## Concrete/Masonry +As far as I know there is as yet no 'green' method of producing cement, and producing cement will always have a very high energy cost. It's therefore likely to become a very significantly more expensive material. This implies that things currently built with concrete are more likely to be built with traditional masonry (cut stone blocks) or with timber. Whether concrete will be more or less expensive than ceramic bricks I don't know, but both will be significantly more expensive than they are now. \ No newline at end of file diff --git a/doc/intro.md b/doc/intro.md index aadb37c..b0a44e4 100644 --- a/doc/intro.md +++ b/doc/intro.md @@ -4,11 +4,37 @@ The Climate Game is game about avoiding climate catastrophe. -## - -##### - +## Motivation and concept +The primary concerns I have which are driving this project is we're failing to communicate, even to the young but certainly to the old, just how intractable and serious the climate emergency is; that we lack critical infrastructure for a survivable planet; and that, unless we get the management of strategic materials right, it will be impossible to build the infrastructure for a survivable planet without tipping the climate system over the edge into utter catastrophe. + +To illustrate what I mean here: we presently have some capacity to smelt steel by electric arc. We currently have some renewable electricity generation plant. But the amount of steel we can actually make using only renewable energy is quite limited. If we use that limited 'green' steel to make new renewable electricity generation plant and new electric arc steelworks, then we can increase the amount of 'green' steel we can make, and gradually we can build other 'green' infrastructure. But if we use that 'green' steel to make things which aren't actually on the critical path, like electric cars, we're going to be stuffed. + +So the concept here is something between a sim and a god-game. The player will play as government of one of a number of playable territories, on a recognisable model of planet Earth as it is now. As the government, the player can + +1. Raise taxes on a number of things; +2. Build infrastructure using available materials; +3. Ban certain things; +4. Provide social benefits; +5. Put down revolts by force; +6. Engage in diplomacy with other governments; +7. Engage in war with other governments. + +The government does not control the population directly, but only indirectly. If you tax too much and ban too much, your population will revolt. If you allow the climate to warm too much, then climate consequences will also cause your population to revolt. + +## Major components + +### Climate model + +The core of the game needs to be a reasonably good climate model backed by good science. Obviously, this doesn't need to be (and can't be) as sophisticated as climate models used to do real climate science, since it needs to run on a domestic PC or games console and leave enough processor cycles free for a user interface and an economy model, but it has to produce results which are scientifically defensible. + +I think the climate model needs to run in its own thread, separate from the main game loop. It needs to update maps for temperature, rainfall and windspeed on a regular basis, and also track things like total atmospheric carbon, anthropogenic warming, and sea level rise. + +It's likely that the climate model used will be based on Ben Matthews' [Java Climate Model](https://jcm.climatemodel.info/), but I haven't yet had confirmation from Ben that he is happy for me to use it. + +### Economy model + +The economy model needs to track the production and consumption of strategic materials including energy, timber, metals, food, and record (and report to the climate model) the total amount of carbon released. It's likely that the economy model will be entirely custom. diff --git a/docs/codox/cc.journeyman.climate-game.core.html b/docs/codox/cc.journeyman.climate-game.core.html index e471b06..167e5f5 100644 --- a/docs/codox/cc.journeyman.climate-game.core.html +++ b/docs/codox/cc.journeyman.climate-game.core.html @@ -1,5 +1,5 @@ -cc.journeyman.climate-game.core documentation

cc.journeyman.climate-game.core

TODO: write docs

-

init

(init)

TODO: write docs

-
\ No newline at end of file +cc.journeyman.climate-game.core documentation

cc.journeyman.climate-game.core

Launcher.

+

-main

(-main & args)

This should be pretty simple.

+
\ No newline at end of file diff --git a/docs/codox/cc.journeyman.climate-game.planet.geometry.html b/docs/codox/cc.journeyman.climate-game.planet.geometry.html index 9ea63b9..314b1d7 100644 --- a/docs/codox/cc.journeyman.climate-game.planet.geometry.html +++ b/docs/codox/cc.journeyman.climate-game.planet.geometry.html @@ -1,5 +1,5 @@ -cc.journeyman.climate-game.planet.geometry documentation

cc.journeyman.climate-game.planet.geometry

TODO: write docs

-

init-planet

(init-planet)

TODO: write docs

-
\ No newline at end of file +cc.journeyman.climate-game.planet.geometry documentation

cc.journeyman.climate-game.planet.geometry

Intended to replace java/cc/journeyman/cimate_game/ClimateGameApp.java, but not yet working.

+

init-planet

(init-planet)

Initialise an app with a planet in the centre of the screen. Not yet working.

+
\ No newline at end of file diff --git a/docs/codox/index.html b/docs/codox/index.html index 550d989..f108c04 100644 --- a/docs/codox/index.html +++ b/docs/codox/index.html @@ -1,5 +1,5 @@ -Climate-game 0.1.0-SNAPSHOT

Climate-game 0.1.0-SNAPSHOT

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

A game about avoiding climate catastrophe.

Installation

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

[journeyman-cc/climate-game "0.1.0-SNAPSHOT"]

Topics

Namespaces

cc.journeyman.climate-game.core

TODO: write docs

-

Public variables and functions:

cc.journeyman.climate-game.planet.geometry

TODO: write docs

+Climate-game 0.1.0-SNAPSHOT

Climate-game 0.1.0-SNAPSHOT

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

A game about avoiding climate catastrophe.

Installation

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

[journeyman-cc/climate-game "0.1.0-SNAPSHOT"]

Topics

Namespaces

cc.journeyman.climate-game.core

Launcher.

+

Public variables and functions:

cc.journeyman.climate-game.planet.geometry

Intended to replace java/cc/journeyman/cimate_game/ClimateGameApp.java, but not yet working.

Public variables and functions:

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..b897b78 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,15 @@ + + + + The Climate Game: Documentation + + + + + + +

The Climate Game: Documentation

+

Documentation for the Climate Game is here.

+ + + \ No newline at end of file diff --git a/src/clj/cc/journeyman/climate_game/core.clj b/src/clj/cc/journeyman/climate_game/core.clj index 7531cc4..7b7f4af 100644 --- a/src/clj/cc/journeyman/climate_game/core.clj +++ b/src/clj/cc/journeyman/climate_game/core.clj @@ -1,7 +1,7 @@ (ns cc.journeyman.climate-game.core "Launcher." (:require [cc.journeyman.climate-game.planet.geometry :refer [init-planet]] - [jme-clj.core :refer [add-light-to-root add-to-root box defsimpleapp generate geo get* + [jme-clj.core :refer [add-light-to-root add-to-root app-settings box defsimpleapp generate geo get* light load-texture material rotate set* sphere start vec3]]) (:import [cc.journeyman.climate_game ClimateGameApp]) (:gen-class)) @@ -12,7 +12,10 @@ [& args] (let [app (ClimateGameApp.)] (try + (.setSettings app (app-settings true :title "The Climate Game")) (start app) (catch Exception any - (println (.getMessage any)))))) + (println (.getMessage any)) + (println) + (throw any)))))