On to the next account of progress.

I've implemented a working prototype of sentience system.
A sentient entity is that which may receive damage from a hostile force;
if its health value drops to zero or less, it dies necessarily.

I also thought that, at this point, it'd be nice to draw the current health value of each sentient being, close to where it is currently on the screen.
Great - how am I going to position a rectangular bar sprite along a possibly rotating object,
while still being able to tell which one belongs to whom (especially in a crowded area)?
The answer: circular HUD to the rescue!



Since its center is glued to the head and it rotates along with the described object,
there is not a chance for two of them to overlap in 100% (it is though possible with axis-aligned rectangular bars).
Unless, of course, the characters' bodies get stuck in each other, which would count as a glitch already.

Let me now summarize most of the changes via the two following clips.
Shooting characters in slow motion:



Killing them (the last murder in slow motion, too):



All new features in detail:

1. The circular HUD:
1.1. Informs you about: current health value, current ammo values (only the controlled entity), nickname (currently, just placeholders) of a sentient object.
1.2. For the entity that I control, rotations of relevant bars follow the angle of my head; for each remaining object, HUD's rotation is dependent upon my relative position thereto.
These two rules ensure that the line-of-sight between the player and a possible target remains unobstructed by the bars.
1.3. Saturation of each bar smoothly transitions to red or violet, in accordance with the ratio of the current to maximum value thereof.
1.4. When the entity is rather low on health, the whole HUD noticeably pulsates, also a subtle red border becomes visible.
2. Improvement of damage response:
2.1. HUD temporarily highlights the damaged entity in pure red; pure green if it is being healed.
2.2. In the point of impact, spawned is a number that indicates change to the health value; it flies vertically towards its disappearance.
3. Test green charges are used to heal sentient beings.



4. Death prototype: when the health value drops to zero, the affected sentient entity loses its physical aspect and a corpse (a mere dynamic body) is spawned in its place. RIP.
5. Crosshair displacement:
5.1. Recoil now imposes angular displacement instead of a linear one.
This fixes the inconsistency between spray patterns when the crosshair is near the barrel (the gun goes crazy - "panika celownika") and when it is very far away (hardly any change in gunshots' direction).
5.2. Sentient beings get aimpunched upon receiving damage or when an item they're holding is hit by a bullet.

Notes on the circular bars of HUD:

They are generated procedurally (using midpoint circle algorithm).
As such, I'm able to instantly resize them and add borders/colors however I please without touching the graphics editor.
They'll probably be smaller for things like vehicle parts' healths.

They are rendered with a special-purpose angle-cutoff shader, instead of rotated.
This avoids artifacts of nearest-neighbor filtering and therefore improves quality of the bars. This is important because they are meant to accompany pixel-artish figures.


That's it for today.
I will soon revisit the world of AI to have some worthy enemies already!