Before tackling this mystery, here are some observations I have made.
Larvae morphing into an egg:
Note: the moment you morph the larvae into any unit, it will have the attributes of an egg (200 hp, 10 carapace). This applies to hydras immediately morphing into lurker eggs or mutalisks morphing into cocoons as well.
This is why it is very tactical to morph hydras into lurkers when fighting, say, a group of zealots. You can morph a dying hydralisk while the zealot attacks it to absorb damage, a tactic I use very frequently as a zerg player.
Anyway continuing
Notice the egg frame remains the same but the game has progressed one frame already. I had operation cwal enabled so the progress bar of the overlord was very fast. I have looked at this carefully many times in many different circumstances, and all egg animation frames remain for two game frames. That is to say, each unique animation frame remains for two game frames before a new animation frame occurs. This goes for units morphing out of eggs, into units, as well.
As the unit’s progression bar completes, the egg spends another 14 frames expanding. During this state the game still recognizes it as an egg with 200 hp and 10 carapace. Immediately after these 14 frames, the egg undergoes a new animation. Many things occur when the first frame of the new animation is played:
-The sound of the unit being hatched is played.
-Minimap gets pinged to egg hatching location.
-All the attributes of the unit is no longer that of the egg; it is of the new unit being hatched.
-The percentage of health that the egg had before entering these next frames will be converted into the percentage of health for the new unit. (Ex: egg at 75/200 health can hatch into an ultralisk with 150/400 health within these next few frames). This rule applies for any unit morphing into or out of an egg.
Here are some screenshots to demonstrate this feature:
1) The egg is at 149/200 (74.5%) health.
2) The egg undergoes its hatching animation and its unit transformation, and during the unit transformation which lasts 14 game frames, its hit points is also reduced to 74.5%, or 59.6/80. I believe Starcraft rounds to the nearest half of a hit point since the game indeed registers half a damage point, so the hydralisk is now at 59.5 hit points.
3) Once the unit transformation animation has ended, the hydralisk is now at full health.
Here are the animation frames in more detail, for an overlord now:
These 7 unique frames happens over the course of 14 game frames, each unique frame lasting for 2 game frames.
In the very next frame the overlord is recognized as a unit and its action buttons appear, now being able to move, stop, patrol, etc.
Notice the shadow has appeared and the green circle and hp bar have been “raised” above ground.
I have scrutinized this animation for each and every unit that hatches out of an egg. Hatchery eggs, lurker eggs, even guardian and devourer cocoons all have exactly 7 unique frames, from the time the sound of them hatching is played to when their action buttons appear. These 7 frames, once again, happen in the span of 14 game-time frames. Fortunately, after careful observations, all of these hatchlings have the same properties to understand why they seem to “disappear” under damage.
There is actually a very simple answer to why eggs seem to disappear under damage. If the unit’s hit points drops to zero within those 7 unique frames (14 game frames), the unit simply disappears because the game does not have a death animation for the unit hatching in this state.
One more note about the dual hatching units (zerglings and scourges):
The zerglings and scourges are still considered one unit within the 7 unique frames, so if they get killed before the animation finishes, both zerglings/scourges will disappear. The second zergling/scourge appears as soon as the last animation frame finishes.
This is always why when you try to hotkey a freshly made group of zerglings, sometimes you only hotkey 3 out of 6 zerglings. You can also hotkey the 3 larvae before making them into zerglings or even multiple larvae. However, when you press the hotkey right after the zerglings hatch you will still only select 3 out of 6. Only after the 14 frames finish will you be able to select all 6 zerglings, hotkey or manual selecting.
Now one might wonder about the practicality for targeting these eggs. I do not know the exact frame rate the game runs at or how many frames in one game second, but I’m guessing its running at at least 30 frames per second. This means you have about half a second to destroy the unit coming out of the egg before the unit is able to react. It is up to the player to decide in what situation it would be best to target the eggs.
TRIVIA:
All ground units that die while morphing INTO eggs (hatchery and lurker eggs) have the normal larvae egg death animation.
Mutalisks that die while morphing INTO cocoons, either guardians or devourers, have the normal mutalisk death animation.
All ground units that die while morphing OUT of eggs (hatchery and lurkers eggs) have no death animation (disappear).
Mutalisks that die while morphing OUT of guardian cocoons have the normal mutalisk death animation.
Mutalisks that die while morphing OUT of devourers cocoons have no death animation (disappear).
Guardians are special I guess.
extra note:
I should have made this less of an essay and more of a forum post. I didn't know I was going to be posting this until later in the semester so I just wrote it kind of essay format lol.
edit 5/7/09 - added some more detail and polished a bit