# Engine

## EntityInteraction

i want to make the system to allow for in depth interraction and event propagation for a world that feel alive. chaos of the system come from the player action. also each entity have it's historical, cultural and societal bias for each event. but for an interaction to propagate, it need to have vector of said propagation, like two entity talking, a writing of an event etc

## CVAR

`sim_` :
	Server-side, authoritative.

`rend_` :
	Render, client-side only.

`cliin_` :
	Client-side input and intent.

`cliout_` :
	Client-side output

Base Builder, Dungeon Crawler, Action Rpg.
| BASE BUILD | BASE DEFENCE | DUNGEON CRAWLING | SURVIVAL | SIM | COMBAT | MULTIPLAYER DUNGEON | MULTIPLAYER CITY | RESSOURCES HARVESTING | FARMING 
| NPC INTERACTION (BASE AND CITY) | NPC USE IN BASE (FARMER, MINER, GUARD, MERCHANT etc).

MODDING API

EVENT ENTITY ITEM WORLD

Map movement are tour par tour.

TODO:

CORE:
	- Memory
	- Thread, Task, Worker
	- Logging and File IO
	- Serialization

Inventory.
Entity.
Event.
Player.
World.
Physic.
Render.
UI.

FOCUS ON SETTING AND WORLD NARRATIVE

2D may be the way to go
Create feeling of non power in the player.
Player should focus on survival and strategie. with an enphasis on retry.
After main story is lost unlock the infinite siege waves, (bad ending), that allow you to test your limits

Was thinking, maybe for combat have the player create his own style of combat, or even have no combat style and just based on stealth or speed and evasion ?>?
Like having the player be able to have a wide swing action, a piercing one, another allowing to be a fast guard etc allowing for very immersive combat even in 2D

Skill based xp, if player train against a dummy or using a simple method, he while unlock bad or flawed Style and be very clumsy. and allow to correct them through real experience when failing ? or having critical success ?
Xp and other currency should be a way to tell the player that i want him to do something to make it meaningfull

## Things that need to be in a database:
 - Item Name and Description
 - Dialogue and Static Text
 - Experience, Skills, Level, Scaling, Database


| Data Category | Suggested Format | Access Method |
| ----------- | ----------- | ----------- |
| Item Metadata | TOML / Dictionary | GetItemByID(string id) |
| Dialogue Trees | Directed Acyclic Graph (DAG) | Node-based traversal |
| Inventory | Array or Linked List | Index-based (slots) |
| Quest Progress | Bitmask or Boolean Map | CheckFlag(flag_name) |
| World Persistence | SQL (SQLite) or Save File | Serialized Object Binary |


"I finally realized: I'm not sick, I was never sick. I just live in a sick society, where someone's individual worth is measured only by the raw productive output they can spit out before getting chewed up by the gears"

The Player Should'nt be special (Chosen one) but should become by is action. either become a hero or becoming a demon king

The Time Should Flow to make the world feel alive when the player isn't in a place (make things happen)

A lot of things should be hidden to the player, the player shouldn't know everything.

# Good Idea and ressources:
 - [RPG Myths by Timothy Cain](https://www.youtube.com/watch?v=x-438XTmFBE)
 - [paper by Eric Chan Mit](https://people.csail.mit.edu/ericchan/papers/)
 - [Motivational Talk About Art and IA](https://www.youtube.com/watch?v=mb3uK-_QkOo)

# Quote i like or find fun:

```
“The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry.”
-Henry Petroski
```

## Threading :

Each step should have if possible an array of data, that can then be sliced and dispatched to multiple thread that do the same action (ex physique that have a thread for each local coordinate or for each entity and resolve collision later or before). maybe i could also make this work for spliting for each AI it's pathfinding into 2 but maybe not usefull??

TOOL THAT FUZZY FIND CURRENT TOKEN HOVERING OR AUTOCOMPLETION TO SHOW IN HEADER OR A FILE THE ENTRY IN A SIDE WINDOW AND MAYBE DOCUMENTATION (show definition of it).

will playing my week of terrarria, i had 2 issue, first a lot of systems are just not really enjoyable like the fishing quest, not really fun.
and the other things, playing without the wiki is impossible in master mod, and some fight and weapon just feel bad.
bad the building, exploration and visiual of the game are wonderfull.
some of the npc are useless and it's sad, and their are not really that much variety in "viable" stuff, but again i might be missing some of the stuff as i didn't read all the wiki, but a good things to do is have all classes stuff and farm and have fun, but this game is a huge time sink
