-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreadme.txt
More file actions
163 lines (127 loc) · 7.08 KB
/
Copy pathreadme.txt
File metadata and controls
163 lines (127 loc) · 7.08 KB
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
home.turf design doc
last major revision 7/14/14 by dylan
==FINAL NAME OPTIONS==
*digiturf
*home.turf
==TILES==
*make the final game tiles black and white to that only the players' colors matter.
*make them nice and pixelly
==REBELLION==
When a territory is rebel-flagged, its rebel value increases by one. When it gets high enough, REBELLION.
When a territory "rebels" and declares independence, it shows up as a spreading
wave of random coloration within a territory, followed by a white flash, an
exploding sound, and the creation of new borders.
The rebelling territories should be marked by "rebel flags" in green, yellow and red
==MERGING==
If two players gain enough territory by merging without sacrificing a lot of stability ranking,
they merge.
==TRENCHES AND EMBASSIES
Any player may sacrifice a piece of territory to make a Trench. A Trench is a non-owned territory that is very
hard to capture and prevents color-mixing.
Any player may also create an Embassy at a territory adjacent to another territory. Embassies provide color-mixing for both
ENTIRE territories, so that both become more similar in color.
==MISC.==
*An "action point booster" item.
* possible alternative win conditions?
==GAME MODES==
Castle: Once a player's stronghold is captured, that's the end of them.
Breeder: Engineer an NPC for maximum success! Earn gene points that let you tweak it.
Multiplayer: If enough folks like the game.
Capture the Flag: Capture enemy "flag" territories!
Strongholds: Basically Domination from Unreal Tournament.
Alliances: Different countries have the ability to form and break partnerships.
Serpent: You capture territory fast but you continually depopulate.
==HAZARDS==
Give these hazards an NES-like tileset and figure out how to use tilesets.
Types of hazard tiles: There are both "earth" tiles and "other" tiles. (* means implemented, # means implementable with script)
EARTH TILES
*Grassland: Easy to claim or steal, fairly color-stable
*Water: Impassable.
*Forest: Moderate difficulty to claim or steal. Fairly color-stable.
*Mountain: Difficult to claim or steal. Moderate color stability.
*Desert: Difficult to claim or steal. High color instability. Depopulates moderately.
*Tundra: Difficult to claim or steal. Moderate color stability. Depopulates slightly.
* Ruins: Slightly increase your action point gain.
* Tall Mountain: A solid decorative block.
Oasis: Harder to steal and more stable than a normal desert. Maybe aids global stability/gives action points.
SPACE TILES
*Lava: Impassable. Chance of depopulation nearby.
*Cave: Chance of depopulate. Chance of spawning a new player.
*Metal Plate - Incredibly easy to grab. Normal otherwise.
OTHER TILES
*Chaos Tiles: Impassable. Greatly increase stability.
#Vanishing Land: Land that vanishes after a set period of time.
#Vanishing Water: The opposite of vanishing land.
Nuke Tiles: At either a fixed or random interval, they will explode and clear ownership of nearby tiles
*Radioactive Tiles: Rapidly depopulate.
*Stronghold Tiles: Very hard to steal!
*Stone Heads: Depopulate so rapidly that they effectively create no-man's lands!
Flags and Gates: Capture a flag and open the corresponding colored gate.
*Darkness Tiles: The dark version of Light Tiles.
*Light Tiles: Tend to make all nearby territory black/white.
Spawner: A player starts here.
Random Spawner: This will start a player anywhere.
==FITNESS FUNCTION==
The way the AI works is that each NPC has a fitness function that computes
total fitness of the player based on a series of factors:
1.) Ratio of total surface area to volume of the player's territory
2.) Color variation in the player's territory
3.) Total number of squares the player controls
4.) Total number of squares the opponents control
5.) The relative time costs of stealing territory versus grabbing empty territory
6.) The proximity to other players's territory.
Some players are "fleeing" (proximity is costly) and others are "seeking" (proximity is valuable)
7.) Proximity to natural hazards, like chaos tiles. Some factor like "curiosity" should determine seeking/avoiding behavior
8.) Dealing with the player's non-contiguous territories. I'll have to think about this problem.
The player does a survey of the entire board, flags all spaces that, if claimed,
would increase the fitness of the player, picks one, and does it.
As players spawn other players, the new players inherit their fitness functions
from the old ones. Small tweaks are made to the coefficients in front of each
of the factors in the fitness function. The "intelligence" is also tweaked
up or down.
If intelligence is at 100%, that player will always choose the move that
maximizes its fitness function. If it's at 0%, that player will choose
a random legal move. If it's at X%, the player will from chose from a list of
all moves that have an effect on the fitness function that is more that X% of the way between
the worst move and the best move.
==LEVEL EDITOR==
The game has an in-game level editor that allows you to create maps quite easily.
The format used to save created levels is the same format used to save and load games.
The format consists of
* a title line
* a description line
* a tile value field that basically uses a specific ASCII character for each tile type.
Each tile value is a string with one tile ID character, one player ID number, and a 9-digit number identifying color.
* A list of players and the "player ID" number for each one
* It may be possible to encrypt the levels as well.
==LEVEL SCRIPTING==
If possible, maybe invent some kind of basic scripting language for the game
that allows the player to create more event-based maps. Try to implement all
of your game modes in the scripting language.
Going along with this, you have "event tiles" that use custom player-made images.
You can program what they do.
==FLAGS==
Every player flies a flag that they are assigned, made out of a handful of common attributes. It takes up one
of their territory's squares and becomes transparent if the mouse hovers over it. A child territory that breaks
off of a mother territory will generally adopt the mother territory's flag, but with a couple of changes.
A merged territory will randomly combine attributes of the flags of the parent territories to make its flag.
==CREDITS==
Design and programming by Dylan Rees. I'll be licensing this formally under an open-source license when it's done.
For now, just consider it the code free to use for non-commerical purposes. If you do use any aspect of it
for your own projects, it'd be nice if you would shoot me an email at dylan.rees@gmail.com.
Sound effects created using as3sfxr
http://www.superflashbros.net/as3sfxr/
Coding done in Geany
http://www.geany.org/
Fonts taken from
http://openfontlibrary.org
Special thanks to the Lua and Love2D teams!
http://www.lua.org/
https://love2d.org/
Special thanks to:
http://www.opengameart.org
http://www.vgmuseum.com
http://www.spriters-resource.com/
http://spritedatabase.net/
Also special thanks to GameJolt!
http://www.gamejolt.com