Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Health system ❤️ (Health component) #39

Open
Insineer opened this issue Sep 10, 2019 · 0 comments
Open

Health system ❤️ (Health component) #39

Insineer opened this issue Sep 10, 2019 · 0 comments
Labels
enhancement✨ New feature or request python🐍 Only scripts changes
Milestone

Comments

@Insineer
Copy link
Member

Insineer commented Sep 10, 2019

Add special Health Component for Creatures (maybe it will be used for cyborgs and robots too, so it should be abstract enough).

Health Component should work with so-called Health Agents (you can rename it) and Resources. Health Agent is any Creature's organ or part, which is influence to overall creature's health. Resources are blood, oxygen, nutrients, adrenalin, toxins, biological energy, electrical energy (for human with active prostheses) and e.t.c.

On Update, creature's Health Agents update Health Component with some logic. Each agent can consume and produce any resources, cause different effects and provide skills like talking or walking.

For example, let's see base Human organs protype:

Human contains:
Head, torso, Blood and Nervous systems, 2 legs and 2 hands.

Head contains:
1 bone, brain, 2 eyes, tongue, nose, 2 ears.

Torso contains:
Some bones, lungs, hearth, stomach, kidneys and go on.

Leg/Hand contains:
2-3 bones, active part (for example, wrist).

Each part is organ and Health Agent and these parts can be organised as tree with nested nodes.

Bones are inactive and do nothing with resources, but if one of organ's bones is broken, some other organs can be disactivated or be damaged too. For example, if head's bone is broken, brain gets damage, but if one bone of hand is broken, this hand is fully inactive and cant take items with wrist.

Brain and Nervous system consume biological energy and defines character conscious. Nervous system also handles pain.

Lungs consume energy and oxygen. If it receives bad gases mix then it takes damage and consumes more energy.

Stomach is biological energy producer. It takes food, when character eats or drinks.

Eyes and ears consume energy. While they are active, character can see and hear.

Wrist consumes energy too. Character can hold objects with hand if it's wrist is active.

Leg has only bones, but while it's unbroken, character can walk. With unbroken hand character can crawl.

Blood system consumes energy and responsible for metabolism. If it's working bad, resources can be freezed before being placed to shared resources pool.

All these organs are human-specific, but they are should be inherited from general Health Agent.

Human implementation doesn't know anything about how it's organs work. Human implementation knows only about skills which Health Component provides (walk, see, speak, hold items and so on). And these availabilities Health Component gives based on organs composition and state.

@Insineer Insineer added enhancement✨ New feature or request python🐍 Only scripts changes labels Sep 10, 2019
@Insineer Insineer changed the title ❤️ Health system (Health component) Health system ❤️ (Health component) Sep 10, 2019
@Insineer Insineer added this to the Pre-Alpha Release milestone Sep 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement✨ New feature or request python🐍 Only scripts changes
Projects
None yet
Development

No branches or pull requests

1 participant