joi, 4 octombrie 2012

10k barrier and the medical beast.

Okay, so my project just got past 10.000 lines of code. This means that it is officially a big project (for me at least).
Currently I am working on the medical/physical aspect of the game. I have been working on this for the last week or so. Each npc has a random weight and height (between limits of course and certain npc's have a lower limit). Each npc has exterior components (arms, legs, torso, head) and interior components (internal organs). Hitting torso with a weapon will probably (just for certain types of wounds) hit an internal organ too.
 Each component has, amoung other stats, a number of blood vessels (minor, medium or major). These components have an area in square inch based on the weight and height of the npc. The area affects the probability of the components beeing hit by weapons.
 These components can sustain (different type of) wounds, which affect their health and cause bleeding (internal and external).Untreated wounds cause infection. Infection causes gangrene (only in certain components). Infection is affected by (among other factors) by hygiene and nutrition. Npc's have a self healing capability which is also affected by various factors.
So as you can see all this medical/physical thing has become quite a beast and as you can imagine is becoming increasingly difficult to keep in mind all the aspects. I don't know if I am overdoing it, but I can just slap a health variable and be done with it. And the good thing is that is the kind of thing that can be reused for other projects.
I will post again when I am done with the medical aspect and will start implementing the mental aspect (mental diseases and their treatments).
As a bonus, here's one of the  debugging screens for monitoring all the components and stuff.

Niciun comentariu:

Trimiteți un comentariu