# Snakeskin Tanktread - Design Doc
- [Introduction](#Introduction)
- [Gameplay](#Gameplay)
- [Lore](#Lore)
- [Tone](#Tone)
- [Features](#Features)
- [Developer Guide](#Developer-Guide)
- [Artist Guide](#Artist-Guide)
## Introduction
Read the [original pitch slideshow](https://docs.google.com/presentation/d/1AdLwyIf48u3-LVbI9PMXVHb-IdoQFDcuJ4IUr2vlBYY/edit?usp=sharing) if you want a briefer overview than this large tome.
For questions / comments, contact May (the team lead) or Lilly (the second in command) in the development Discord.
## Gameplay
### Basic Game Loop
The basic game loop consists of the following:
1. Travel to locations in the game world.
2. Engage in combat with monsters, collecting the resources they drop.
3. Sell the resources at towns, where you purchase new equipment.
4. Repeat.
### Travel
Traveling to different locations in the game takes place on a fast-travel map screen. The town and various wilderness locations can be traveled to by clicking on their icons on the map.
#### Locations
- [various towns]
- [various wilderness locations]
- [the snake?]
### Combat
Combat is initiated when the player finds creatures in the overworld. These could be random encounters while fast-traveling or within predefined map locations. When a fight begins, the only unit under the player's control is the tank. The player can then build drones using collected resources.
#### Units
Units have the following attributes:
- **Health:** Standard HP system. Units can't be healed above their maximum health and are removed from combat when health reaches zero.
- **Actions:** Number of times this unit can act each turn. Should be somewhere from 1 to 4.
- **Skills:** Actions this unit can perform, such as moving, attacking, healing, etc.
- **Status Effects:** Modifiers to a unit such as being on fire or having armor.
- **Drops:** What resources the unit drops when killed. Units built by the player should drop some portion of the resources used to build them.
Friendly units can be deconstructed into the resources used to build them.
#### The Battlefield
The battlefield is divided into a number of regions. (This is as granular as positioning should get.) Regions can be modified in certain ways like being lit on fire, and may have other modifiers such as being swampy terrain.
Skills can have different ranges; for example, some skills may only be able to target units in the same region.
#### Combat System Dos and Don'ts
DO:
- Keep combat deterministic! The only random thing should be resource drops.
- Keep the Tank immortal! Dealing with game overs is tough, so we're sidestepping that issue by not letting the player die.
DON'T:
- Give the Tank combat skills! Since it's immortal, letting the Tank damage things incentivizes boring grinding.
#### Ending Combat
Combat ends in one of two ways:
1. All hostile creatures have been defeated.
2. The player retreats. (This can only be done if the Tank is in the leftmost region.)
If all hostile creatures are defeated, the player collects all resources on the battlefield and deconstructs all units.
If the player retreats, resources on the battlefield are left behind. Only units in the same region as the player get deconstructed.
## Lore
### The Snake
A couple decades before the game, a giant robot snake fell to Earth. It released large quantities of mutagenic fungus that transformed various animals and rendered the outside unfit for human habitation.
Its ruins lay dormant.
The endgame reveal is that the snake was an alien generation ship coming to Earth with resource-harvesting intentions, but its crashlanding killed all its inhabitants and released their harvesting fungus. (This is why all the creatures produce useful resources.)
### The Player Character
The protagonist shouldn't be definitively characterized; they won't have much opportunity to speak, so this should be easy to avoid. The only concrete information we should give is that the protagonist is selling resources in order to pay off their debt.
### The Tank
The player character pilots a tank through the wasteland. They're basically welded in there.
The tank is too cumbersome for fine actions such as combat. It constructs and deconstructs various specialized drones in order to perform said actions.
### Towns
The last vestiges of humanity live in various domed cities. These are the towns the player sells goods at. Each town has its own societal structure. You cannot enter the towns; you may only interact through their boundary with the outside.
### The Wastes
The ground is blanketed in fungus and spores float through the air. (This fungal coating is why even swamps and lakes can burn; the fungus is highly flammable.) An unprotected human would suffocate within minutes if they managed to leave one of the towns.
## Tone
### Resource Names and Descriptions
Resource names should be vaguely scientific sounding. Descriptions should be dry: physical attributes of the resource, then its common uses.
Examples:
- **Aluminite**: Ambiguous metallic alloy. Cheap and ubiquitous.
- **Silicate**: Clarified sand. Common computational substrate.
## Features
| Priority | Feature | What? | Why? | How? |
|-|-|-|-|-|
| `***` | Important feature | Makes the game do something. | It's important. | idk |
| `**` | Fleshy feature | Really important but not essential feature. | Makes feel fleshed-out. | idk |
| `*` | Nice feature | Nice to have feature. | It'd be nice to have, but OK if we don't have the time for it. | idk |
## Developer Guide
### Prerequisites
This package requires the following prerequisites to develop for:
- npm
- Angular CLI
#### Installing prerequisites
* [Download & install node.js](https://nodejs.org/en/download/).
* Type `node -v` in your terminal and hit Enter to make sure node is installed correctly.
* Do the same for `npm -v` to make sure npm is installed correctly.
* If either are not present, make sure that the `node` and `npm` executable path is in your system's PATH variable. [Here is a guide on how to add a folder to system PATH on Windows](https://stackoverflow.com/questions/44272416/how-to-add-a-folder-to-path-environment-variable-in-windows-10-with-screensho).
* Install Angular CLI with `npm install -g @angular/cli`. You may need to preface this command with `sudo ` on linux.
### Getting Started
* Clone this git repository.
* `cd` into the cloned repository.
* Run `ng serve` to start a web server running the game. Navigate to `http://localhost:4200/` to view the running game in your browser.
* The server will automatically reload the game when source code files are being edited.
### Building
To build the game for use outside of Angular CLI, run `ng build` and the built web game will be located in the `dist/` directory. Alternatively, run `ng build --prod` for a release build instead of a debug build.
### Programming Language & Editor
This game is written in Typescript. Make sure to install Typescript support in your code editor of choice.
## Artist Guide
TODO