From 98f356e68b759bf84300290315d4ada09c41f79b Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Fri, 14 Jan 2022 17:27:24 +0100 Subject: more docs --- docs/editor/editor.md | 44 ++++++++++++++ docs/enemy/enemy.md | 114 ++++++++++++++++++++++++++++++++++++ docs/main.md | 65 +++++++++++++++------ docs/resources/resources.md | 37 ++++++++++++ docs/turret/turret.md | 137 ++++++++++++++++++++++++++++++++++++++++++++ docs/wave/wave.md | 52 +++++++++++++++++ 6 files changed, 430 insertions(+), 19 deletions(-) create mode 100644 docs/editor/editor.md create mode 100644 docs/enemy/enemy.md create mode 100644 docs/resources/resources.md create mode 100644 docs/turret/turret.md create mode 100644 docs/wave/wave.md (limited to 'docs') diff --git a/docs/editor/editor.md b/docs/editor/editor.md new file mode 100644 index 0000000..606ba10 --- /dev/null +++ b/docs/editor/editor.md @@ -0,0 +1,44 @@ +## editor + +The centerpiece and reason of snub. + +### design +Requirements: +- Easy to use, help on screen +- Minimal +- Can be accessed at any time + +--- + +### turret +- **place** +- remove +- edit + +### attach +- **place** +- **remove** + +### path +- **place** +- **remove** +- _models_ + +### voxel +- **place cubes** +- **remove cubes** +- edit palette + - new cubes + - remove cube + - edit cube + - color + - texture + +### gui +- _picker_ +- help +- path + - check if valid +- loadsave + - load + - save diff --git a/docs/enemy/enemy.md b/docs/enemy/enemy.md new file mode 100644 index 0000000..114fb49 --- /dev/null +++ b/docs/enemy/enemy.md @@ -0,0 +1,114 @@ +## enemy system + +### design +The enemies are spawned by the wave system, their 3d model is a mathematical shape. These shapes are the 5 [Platonic solids](https://en.wikipedia.org/wiki/Platonic_solid), the 13 [Archimedean solids](https://en.wikipedia.org/wiki/Archimedean_solid) and their dual the 13 [Catalan solids](https://en.wikipedia.org/wiki/Catalan_solid), which amount to 31 shapes.
+ +The enemies are arranged in a tree based on their topology using [Conway polyhedron notation](https://en.wikipedia.org/wiki/Conway_polyhedron_notation). Four operators are used: kis, ambo, dual, snub (k, a, d, s). From these operators all the shapes in the game can be obtained if the staring shape is a Tetrahedron (T). For example, an Octahedron (O) is an ambo Tetrahedron (aT): ) = aT. saT is the snub cube, from which the game is named. Each node of the tree is a shape and each edge represent an operation. The root is T and each operation is appended to the left of T, so the snub cube saT is connected to the Octahedron aT and aT is connected to T.
+ +The other operators can be obtained by the four operator used: +- truncation: t = dkd +- expansion: e = aa +- bevel: b = dkda = td +- join: j = da +- meta: m = kda +- ortho: o = daa +- gyro: g = dsd + +**topology graph** +- T = [Tetrahedron](https://en.wikipedia.org/wiki/Tetrahedron) + - k, kT = [Triakis Tetrahedron](https://en.wikipedia.org/wiki/Triakis_tetrahedron) + - d, dkdT = dkT = [Truncated Tetrahedron](https://en.wikipedia.org/wiki/Truncated_tetrahedron) + - a, aT = O = [Octahedron](https://en.wikipedia.org/wiki/Octahedron) + - k, kaT = [Triakis Octahedron](https://en.wikipedia.org/wiki/Triakis_octahedron) + - d, dkaT = tC = [Truncated Cube](https://en.wikipedia.org/wiki/Truncated_cube) + - a, aaT = [Cuboctahedron](https://en.wikipedia.org/wiki/Cuboctahedron) + - d, daaT = jC = [Rhombic Dodecahedron](https://en.wikipedia.org/wiki/Rhombic_dodecahedron) + - k, kdaaT = mC = [Disdyakis Dodecahedron](https://en.wikipedia.org/wiki/Disdyakis_dodecahedron) + - d, dkdaaT = bC = taaT = [Truncated Cuboctahedron](https://en.wikipedia.org/wiki/Truncated_cuboctahedron) + - a, aaaT = eC = [Rhombicuboctahedron](https://en.wikipedia.org/wiki/Rhombicuboctahedron) + - d, daaaT = oC = [Deltoidal Icositetrahedron](https://en.wikipedia.org/wiki/Deltoidal_icositetrahedron) + - d, daT = C = [Cube](https://en.wikipedia.org/wiki/Cube) + - k, kdaT = [Tetrakis Hexahedron](https://en.wikipedia.org/wiki/Tetrakis_hexahedron) + - d, dkdaT = tO = [Truncated Octahedron](https://en.wikipedia.org/wiki/Truncated_octahedron) + - s, saT = [Snub Cube](https://en.wikipedia.org/wiki/Snub_cube) + - d, dsaT = g = [Pentagonal Icositetrahedron](https://en.wikipedia.org/wiki/Pentagonal_icositetrahedron) + - s, sT = [Icosahedron](https://en.wikipedia.org/wiki/Icosahedron) + - k, ksT = [Triakis icosahedron](https://en.wikipedia.org/wiki/Triakis_icosahedron) + - d, dksT = [Truncated Dodecahedron](https://en.wikipedia.org/wiki/Truncated_dodecahedron) + - a, asT = [Icosidodecahedron](https://en.wikipedia.org/wiki/Icosidodecahedron) + - d, dasT = jD = [Rhombic Triacontahedron](https://en.wikipedia.org/wiki/Rhombic_triacontahedron) + - k, kdaaT = mD = [Disdyakis Triacontahedron](https://en.wikipedia.org/wiki/Disdyakis_triacontahedron) + - d, dkdaaT = bD = [Truncated Icosidodecahedron](https://en.wikipedia.org/wiki/Truncated_icosidodecahedron) + - a, aasT = eD = [Rhombicosidodecahedron](https://en.wikipedia.org/wiki/Rhombicosidodecahedron) + - d, daasT = oD = [Deltoidal Hexecontahedron](https://en.wikipedia.org/wiki/Deltoidal_hexecontahedron) + - d, dsT = D [Dodecahedron](https://en.wikipedia.org/wiki/Dodecahedron) + - k, kdsT = [Pentakis Dodecahedron](https://en.wikipedia.org/wiki/Pentakis_dodecahedron) + - d, dkdsT = tI = [Truncated Icosahedron](https://en.wikipedia.org/wiki/Truncated_icosahedron) + - s, ssT = [Snub Dodecahedron](https://en.wikipedia.org/wiki/Snub_dodecahedron) + - d, dssT = gD = [Pentagonal Hexecontahedron](https://en.wikipedia.org/wiki/Pentagonal_hexecontahedron) + +**effects** + +Enemies start with 10 lives. When a life is lost and the shape is T, the shape dies. Otherwise, an operator is lost and lives are set back to 10. + +The enemies gain effects based on their topology: +- T: no effect +- k: speed, 20% +- a: damage, 2x +- d: duplicates on death (only when losing the d) +- s: armored (multiplies life by 3), speed -20% + +Effect stack exponentially, so aaaT does 2^2^2=8x more damage, ssT is very slow and very armored (3^3=9 shots). + +``` +Example for ssT: +1. after 90 damage, s is removed +5. after 30 damage, s is removed +6. after 10 damage, T dies. +``` + +``` +Example for dkdasT: +1. after 30 damage, d is removed and 4 kdasT are spawned +2. after 30 damage, k is removed +3. after 30 damage, d is removed and 2 asT are spawned +4. after 30 damage, a is removed +5. after 30 damage, s is removed +6. after 10 damage, T dies. +``` + +``` +Values of life(shape) +life(daaT) = 10 * 2*(10 * 3) = 70 +life(ssT) = 90 + 30 + 10 = 130 +life(dssT) = 90 + 2*(90 + 30 + 10) = 350 +life(dkdasT) = 30 + 4*(30 + 30 + 2*(30 + 30 + 10)) = 830 +``` + +--- + +### models +- **all 31 shapes** + +### path subsystem +- **hide/show** +- **instantiate** +- **follow** +- **destroy on end** + +### hierarchy +- **design topological hierarchy** + +### stats +- _name_ +- effects +- type/description + +### color change +- _change based on resource color_ + +### hit effect +- **dissolve** + +### gui +- info detail diff --git a/docs/main.md b/docs/main.md index 8b6ff1c..b55fa80 100644 --- a/docs/main.md +++ b/docs/main.md @@ -1,23 +1,38 @@ +# design, documentation and notes + +### design: +snub is inspired by [Terrorhedron](https://store.steampowered.com/app/299720/Terrorhedron_Tower_Defense/).
+The goal of this project is to expand the Terrorhedron ideas. The main addition are a map editor (even the terrain), a more complex enemy system (topological hierarchy) and more turret upgrades and customization (modules for small bonuses). Mod support and multiplayer are planned. + +--- + ### credits: - voxel-core: https://github.com/ClarkThyLord/Voxel-Core - hdr skies: https://pixeledasteroid.gumroad.com - godot dark theme: https://mounirtohami.itch.io/godot-dark-theme +### legend: +**bold** is done (release quality)
+_underline_ is done (debug quality)
+regular is planned + ### roadmap: - 0.1 alpha: - turret system - enemy system - - resource system + - resources system - wave system - editor - 0.2 beta: + - unit tests & refactoring - mod api support ### systems: -- turret +- [turret](./turret/turret.md) - _models_ - - *placement* + - _stats_ + - **placement** - _targeting_ - _shooting_ - _economy_ @@ -25,33 +40,45 @@ - modules - range indicator - selection indicator - - _gui info details_ - - *gui shop thumbnail* + - gui + - _info details_ + - **shop thumbnail** + - on select -- enemy: - - *models* - - *path follow* - - *hierarchy* +- [enemy](./enemy/enemy.md): + - **models** + - **path subsystem** + - **hierarchy** - _stats_ - - gui info details - _color change_ - - *hit effect* + - **hit effect** + - gui + - info detail -- resource: - - *Tkads* +- [resources](./resources/resources.md): + - **Tkads** - lives - _economy_ -- wave: +- [wave](./wave/wave.md): - spawns + - randomizer - balance - - gui details - win/lose condition + - gui + - details + - win/lose + - endwave report -- editor: +- [editor](./editor/editor.md): - turret - _attach_ - _path_ - - _voxel cubes_ - - voxel palette - - gui pickers + - voxel + - _cubes_ + - palette + - gui + - picker + - help + - path + - loadsave diff --git a/docs/resources/resources.md b/docs/resources/resources.md new file mode 100644 index 0000000..2b32a5a --- /dev/null +++ b/docs/resources/resources.md @@ -0,0 +1,37 @@ +## resources + +### design +Player resources are +- T (Tetrahedrons) - white +- k (kis) - green +- a (ambo) - red +- d (dual) - blue +- s (snub) - yellow +- lives - purple + +Each time an enemy is damaged, it gives the resource equal to its last operator. So if daT is damaged, d is gained, if T is damaged, T is gained and if sT is damaged, s is gained. + +- T is used to buy turrets and upgrades. +- k, a, d, s are used to buy modules. + +Another way to generate resources is to buy finance generators and modules for them. + +At the end of each wave, generator produce and 1 life is gained. +TODO: There may be a generator module to increase the life gain. + +When an enemy reaches the end of the path, it removes lives equal to its current life total. + +--- + +### Tkads +- **gui** +- **logic** + +### lives +- gui +- logic + +### economy +- **cash on hit** +- generators +- modules for life diff --git a/docs/turret/turret.md b/docs/turret/turret.md new file mode 100644 index 0000000..9d52995 --- /dev/null +++ b/docs/turret/turret.md @@ -0,0 +1,137 @@ +## turret system + +### design +**upgrade graph:**
+laser -> (heavy laser -> minigun) or (sniper -> railgun)
+shotgun -> cannon -> tesla
+plastic -> heavy plastic -> plasma plastic
+slower -> (heavy slower -> final slower) or (stopper -> heavy stopper)
+T generator -> kad generator -> s generator
+ +--- + +### models +- _laser_ +- heavy laser +- minigun +- _sniper_ +- railgun +- _shotgun_ +- cannon +- tesla +- _plastic_ +- heavy plastic +- plasma plastic +- _slower_ +- heavy slower +- final slower +- stopper +- heavy stopper +- _struct I_ +- _struct T_ +- _struct X_ +- _T generator_ +- kad generator +- s generator +- attach point + +### stats +- _laser_ +- heavy laser +- minigun +- _sniper_ +- railgun +- _shotgun_ +- cannon +- tesla +- _plastic_ +- heavy plastic +- plasma plastic +- _slower_ +- heavy slower +- final slower +- stopper +- heavy stopper +- _struct I_ +- _struct T_ +- _struct X_ +- _T generator_ +- kad generator +- s generator +- attach point + +### placement +- **only place when not ovelapping** +- **ghost cursor** +- **buy spending resources** +- shader to ghost cursor + +### targeting +- **check visible** +- **check range** +- target selection + - **first** + - last + - strongest + - weakest + - closest + - further away + - least turning + - densest +- precalculate valid path nodes + +### shooting +- **spread** +- _projectiles per shot_ +- projectile logic + - **bullet** + - _ray_ + - **plastic** +- projectile stats +- projectile models + - bullet + - ray + - plastic + - bullet bounce + - plastic bounce +- projectile fx + - trails + - explosions + - shooting particles + +### economy +- **resources on enemy hit** +- generators make resources at end of wave + +### upgrades +- _turrets can be upgraded_ +- _only if can afford T_ + +### modules +- stats +- logic +- gui + - buy menu + - details + +### range indicator +- model + +### selection indicator +- model +- fx + +### gui +- stats details + - _panel with stats_ + - upgrade bonus preview + - module bonus preview + - resize based on stats +- **shop thumbnail** +- on select + - picker options + - sell + - upgrade (multiple) + - target + - buy module + - manual control diff --git a/docs/wave/wave.md b/docs/wave/wave.md new file mode 100644 index 0000000..156beaf --- /dev/null +++ b/docs/wave/wave.md @@ -0,0 +1,52 @@ +## wave system +Timing and composition of enemy waves. + +### design +A wave is a list of timed spawns. The spawns contain a list of enemies, which defines how many enemies of one type to spawn and how much time to wait after spawning the next. Spawns can be randomized, which will make the system pick from the list of enemies a random one instead of sequentially selecting them. + +For example: +``` +[ +{ + "time": 0, + "random": false, + "enemies": [ + { "enemy": "aaT", "amount": 10, "cooldown": 0.1 }, + { "enemy": "kT", "amount": 20, "cooldown": 0.02 } + ] +}, +{ + "time": 1, + "random": true, + "enemies": [ + { "enemy": "dssT", "amount": 4, "cooldown": 0.05 }, + { "enemy": "dsaT", "amount": 4, "cooldown": 0.05 }, + { "enemy": "aaaT", "amount": 4, "cooldown": 0.05 } + ] +} +] +``` + +This wave can be generated randomly given a total life, which is necessary to do unless people don't want to script the waves of every map they create or use old waves. + +--- + +### spawns +- timers +- cooldowns + +### randomizer +- generate from difficulty +- patterns + +### balance +- figure out how the difficulty + +### win/lose condition +- win +- lose + +### gui +- details +- win/lose +- endwave report -- cgit v1.2.3-54-g00ecf