File: stdterr.g

package info (click to toggle)
xconq 7.1.0-7
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 7,056 kB
  • ctags: 7,960
  • sloc: ansic: 88,493; perl: 2,057; sh: 1,766; makefile: 1,110; csh: 81; awk: 47; lisp: 39
file content (97 lines) | stat: -rw-r--r-- 2,657 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
(game-module "stdterr"
;;; A standard set of terrain types shared by many game designs.
)

(terrain-type sea
  (color "sky blue") (image-name "sea") (char ".")
  (help "deep ocean"))
(terrain-type shallows
  (color "cyan") (image-name "shallows") (char ",")
  (help "coastal waters and lakes"))
(terrain-type swamp
  (color "yellow green") (image-name "swamp") (char "=")
  )
(terrain-type desert
  (color "yellow") (image-name "desert") (char "~")
  )
(terrain-type plains
  (color "green") (image-name "plains") (char "+")
  )
(terrain-type forest
  (color "forest green") (image-name "forest") (char "%")
  )
(terrain-type mountains
  (color "sienna") (image-name "mountains") (char "^")
  )
(terrain-type ice
  (color "white") (image-name "ice") (char "_")
  (help "permanent ice fields"))

(define land-t* (desert plains forest mountains))

(define cell-t* (sea shallows swamp desert plains forest mountains ice))

(terrain-type road
  (color "gray") (char ">")
  (subtype connection) (subtype-x road-x))

(terrain-type river
  (color "blue") (char "<")
  (subtype border) (subtype-x river-x))

(add t* elevation-min -100)
(add t* elevation-max 2000)
(add (sea shallows swamp) elevation-min 0)
(add (sea shallows swamp) elevation-max (0 0 10))
(add mountains elevation-min 2001)
(add mountains elevation-max 6000)
(add ice elevation-min 6001)
(add ice elevation-max 9000)

;; The elevations above are consistent with 100-km-across cells. */

(area (cell-width 100000))

(add (sea shallows) liquid true)

;;; Some defns for the fractal percentile generator.

(set alt-blob-density 10000)
(set alt-blob-height 500)
(set alt-blob-size 200)
(set alt-smoothing 4)
(set wet-blob-density 2000)
(set wet-blob-size 100)

(add cell-t* alt-percentile-min (  0  68  69  70  70  70  93  99))
(add cell-t* alt-percentile-max ( 68  69  71  93  93  93  99 100))
(add cell-t* wet-percentile-min (  0   0  50   0  20  80   0   0))
(add cell-t* wet-percentile-max (100 100 100  20  80 100 100 100))

;;; River generation.

;; Rivers are most likely to start in the mountains or forests.

(add (plains forest mountains) river-chance (5.00 8.00 12.00))

;; Rivers empty into lakes if they don't reach the sea.

(set river-sink-terrain shallows)

;;; Road generation.

(table road-into-chance
  (land-t* land-t* 100)
  ;; No roads across ice fields.
  (land-t* ice 0)
  ;; Try to get a road back out into the plains.
  (cell-t* plains 100)
  ;; Be reluctant to run through hostile terrain.
  (plains (desert forest mountains) (40 30 20))
  )

(set edge-terrain ice)

;;; Any attempts to use t* in other games should be aware of
;;; how many types are defined in this file.