|
Hello everyone, ApotheosisX here. I’d like to present some observations regarding the behavior of zerg eggs as they hatch. It had came to my attention that someone had already posted something like this, but I was approved to do this as a final project at the UC Berkeley Starcraft class, so forgive me if this is old news. I have not read the article about Zerg eggs myself and assure you that I am not plagiarizing in any way. With that out of the way, here is my final project for the class.
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
|
Zerg Biology class material.
|
Interesting stuff, thanks for this.
|
interesting... did not know thiss
|
You didn't get anything wrong. Everything you've noticed I have more or less noticed just casually playing over the years.
|
This is so random...yet so intriguing...
|
Katowice25012 Posts
I didn't know thats why that happened, thanks
|
konadora
Singapore66163 Posts
On May 07 2009 14:03 Ozarugold wrote: This is so random...yet so intriguing...
Also, how is this in the Strategy section?
|
|
On May 07 2009 13:39 anch wrote: Zerg Biology class material.
|
Berkeley class final! Good work, I give it an A+! Very interesting to see the mechanics of egg hatching and why they disappear Thank you
|
Cool stuff but imo should be in brood war section.
Unless there's some way to use this to our advantage? I don't think a 14 frame window is enough of a time window to try to time killing a unit.
|
my bad i didnt really know where to post it when browsing the sections. If possible can an admin move this to the appropriate section? Thanks!
|
Wow, good work. This reminds me of all those investigations (SuperJongMan?) posted about how glave worm bounces. I'm glad to see the Berkeley Starcraft class is at least semi-legit.
|
On May 07 2009 14:38 Superiorwolf wrote:Berkeley class final! Good work, I give it an A+! Very interesting to see the mechanics of egg hatching and why they disappear  Thank you  huh?
None of this occured to you while playing ..... ever?
|
|
Same thing happens with lurker eggs too. Almost every TvZ you will see it. Surprised OP didn't mention that.
|
konadora
Singapore66163 Posts
On May 07 2009 15:12 AttackZerg wrote:Show nested quote +On May 07 2009 14:38 Superiorwolf wrote:Berkeley class final! Good work, I give it an A+! Very interesting to see the mechanics of egg hatching and why they disappear  Thank you  huh? None of this occured to you while playing ..... ever? And to think superiorwolf is a Zerg player lol
|
On May 07 2009 14:38 Superiorwolf wrote:Berkeley class final! Good work, I give it an A+! Very interesting to see the mechanics of egg hatching and why they disappear  Thank you 
use this for an essay or doctoral thesis or something
|
I'm not sure if you're aware of this but checking stuff like this is very easy with Starcraft modding tools such as ICE or IceCC (depends on your preference) which are very easy to acquire. You didn't have to go through the trouble of slowing down the game and testing those things like it looks you did, a quick glance at the scripts explains all those supposedly mysterious SC behaviors very quickly.
Also, Starcraft runs at 8 frames per second on Normal game speed, and 50% faster on fastest, which is 12 frames per second. This might feel slow to you because you're used to D3D accelerated graphics that reach numbers like 30-60FPS but for what appears to be a DD engine from 1997 that utilizes 8-bit indexed graphics this is pretty decent.
This also means that SC runs at 4 frames per second on slowest game speed. Try it out, enter singleplayer and spam the -/_ key, then tell a walking unit to move while looking at your clock.
|
If your so smart then how come you aren't in the starcraft class?
.......
......
...
|
On May 07 2009 14:01 AttackZerg wrote: You didn't get anything wrong. Everything you've noticed I have more or less noticed just casually playing over the years.
I think most knows this, but this was still interesting thanks!
|
|
On May 07 2009 19:22 Piste wrote: Is this serious? It obviously is. You probably haven't played Zerg long enough to discover how terribly annoying this is...
|
Germany2896 Posts
Also, Starcraft runs at 8 frames per second on Normal game speed, and 50% faster on fastest, which is 12 frames per second. I'm pretty sure it is about 23.8 gameframes/s on fastest. The rendered framerate can be in the thousands, but as units are not interpolated between gameframes, this does not matter much. The animation framerate might be half that, which would match your framerate with the observation that each animation frame stayed for two frames in the OP.
|
|
when the larvae is morphing into an egg and you get the 5 animation frames, is it still considered a larvae, or is it an egg already?
|
-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. Sorry if I misunderstood this part, of if I'm simply wrong. But: Wounded hydras morphing in to lurkers will give you wounded eggs. But lurkers will come out will full health.
So the rule does not apply for all units.
|
coool ;P
nice reading .. cant w8 for the course on toss and terran units :DD
|
Health is rounded to 1/256. The unit maximum health values in the game files are stored as 256 times the health displayed in game and you can see in game that mutalisks deal 1/9 of their main damage with the last attack bounce with pretty good accuracy, instead of just rounding to the nearest 1/2(after they have attack upgrades, of course, since 1/9 out of 9 is simply 1).
On May 07 2009 20:25 Lord_of_Chaos wrote:Show nested quote +-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. Sorry if I misunderstood this part, of if I'm simply wrong. But: Wounded hydras morphing in to lurkers will give you wounded eggs. But lurkers will come out will full health. So the rule does not apply for all units.
This concerns only the first 14 frames after hatching. On the next frame the unit gets it's health restored regardless of the health the egg had.
|
So damaged eggs =/= damaged units? I didn't know that. Bah, I play terran anyway, but it's good to know, now I won't bother trying to damage eggs anymore wasting time.
|
i wanna ask u something
when a drone is comes out from its egg,it always a bit before listen to my controls.Does it always like that cos its unlike other races where scv/probe appear from cc,i can move it imediately to the palce i want
|
I love this kind of information, thanks for the post!
|
Calgary25980 Posts
Interesting, although I can't really see any applications of it to the game. It's still really interesting to read about though.
|
Ahahha, this is great. SC University papers!
Here's looking forward to more papers from this class. Please post them if you are attending :D
Mutalisks morphing OUT of guardians that die have the normal mutalisk death animation. Mutalisks morphing OUT of devourers that die have no death animation (disappear).
Nothing major, but I think this needs to be reworded (guardians morph out of their cocoons, Mutalisks only morph out of eggs).
|
Yeah, zerg eggs are sexy... Good final topic
|
hahaha, must be a bugg or something
|
in ZvZ this knowledge is very usefull, if you attack an egg with 6 lings when the lings pop out, you have a good chance to kill 2 lings instead of 1.
you need to bring the egg down to 170/200 then the popping ling(s) have 30 health and each ling just needs to make 1 hit (6*5) to kill 2 lings.
|
On May 08 2009 06:06 WhuazGoodNjaggah wrote: in ZvZ this knowledge is very usefull, if you attack an egg with 6 lings when the lings pop out, you have a good chance to kill 2 lings instead of 1.
you need to bring the egg down to 170/200 then the popping ling(s) have 30 health and each ling just needs to make 1 hit (6*5) to kill 2 lings.
Oooh cool application of this
|
United States12607 Posts
Interesting article/essay, I always enjoy reading about minutia like this. Good SC trivia material!
|
Wow i'm so surprised at all the positive feedback. Thanks so much you guys! I'll try to answer all your questions and tweak or correct my post from your feedback.
On May 07 2009 20:04 pangshai wrote: when the larvae is morphing into an egg and you get the 5 animation frames, is it still considered a larvae, or is it an egg already?
Any unit morphing into an egg is immediately considered an egg. In other words, the larvae turns into an egg right after you click what unit to create, right when you morph a hydra into a lurker, or right when you morph mutalisks into guardians/devourers. thanks for pointing this out i will add it in.
On May 07 2009 21:26 justiceknight wrote: i wanna ask u something
when a drone is comes out from its egg,it always a bit before listen to my controls.Does it always like that cos its unlike other races where scv/probe appear from cc,i can move it imediately to the palce i want
During the 14 frames after the selected egg has become the unit you morphed it into (when it has the same percentage of health as the egg, hatching sound plays, minimap pings, etc), it does not have any action buttons. (no move, attack, patrol, stop, etc). This is why you cannot control the unit in this short time.
On May 08 2009 02:19 Chef wrote:Ahahha, this is great. SC University papers! Here's looking forward to more papers from this class. Please post them if you are attending :D Show nested quote + Mutalisks morphing OUT of guardians that die have the normal mutalisk death animation. Mutalisks morphing OUT of devourers that die have no death animation (disappear).
Nothing major, but I think this needs to be reworded (guardians morph out of their cocoons, Mutalisks only morph out of eggs).
aha yea whoops, i should have proofread this one more time. Thanks for pointing this out.
|
And people say that Starcraft has crappy animation.
|
This was very interesting. Thanks for taking the time to write it up!
|
Wow, haha, this was actually VERY interesting, especially the animation breakdowns. Good stuff!
|
On May 07 2009 18:02 Aqo[il] wrote: I'm not sure if you're aware of this but checking stuff like this is very easy with Starcraft modding tools such as ICE or IceCC (depends on your preference) which are very easy to acquire. You didn't have to go through the trouble of slowing down the game and testing those things like it looks you did, a quick glance at the scripts explains all those supposedly mysterious SC behaviors very quickly.
Also, Starcraft runs at 8 frames per second on Normal game speed, and 50% faster on fastest, which is 12 frames per second. This might feel slow to you because you're used to D3D accelerated graphics that reach numbers like 30-60FPS but for what appears to be a DD engine from 1997 that utilizes 8-bit indexed graphics this is pretty decent.
This also means that SC runs at 4 frames per second on slowest game speed. Try it out, enter singleplayer and spam the -/_ key, then tell a walking unit to move while looking at your clock. I don't think you're correct on 12 frames per second for fastest. Each frame on fastest is 42ms, so if you divide 1000ms/42ms, you get 23.8fps. Normal speed is 67ms per frame, which is 14.9fps. Slowest is 167per frame, which is 5.98fps. (All of those frame delay values are taken from SC memory, so they're 100% correct)
|
On May 07 2009 13:39 anch wrote: Zerg Biology class material. lol i laughed, it actually makes sense
|
Where did you get 42ms from? Maybe 42 is just a rounded version of 41.667, and the 23.8fps number you came up with is 24fps, which makes a lot more sense from the programmer's perspective. Also what MasterOfChaos said earlier was correct, I earlier disregarded the fact that most SC sprites use a delay of 2 ticks and not 1 so the 12 number really is actually supposed to be 24 -.-. Now that I think of it, it also matches the fact that in Starcraft's weapons.dat file which stores cooldowns for weapon attacks, a cooldown of 24 equals one second on fastest.
|
BWRepLib from JCA //---------------------------------------------------------------------------------------------------- // Replay Actions - jca (May 2003) //---------------------------------------------------------------------------------------------------- //------------------------------------------------------------------------------------------------------------
// to convert ticks to seconds const float BWrepAction::m_timeRatio = 23.8f;
this is from the BWRepLib of JCA. If you check the time after a game and compare it to the time in a replay its different. If you open a replay and check the time at the end and compare it with the one from bwchart its pretty accurate. I used a constant <24 too when i made APM calculations for a APM display ingame. Im pretty sure its not exactly 24. it also makes more sense from a programmers point of view to have an integer as delay (42ms) and not the fps rate which is rather unimportant to be accurate.
|
Great post. Look forward to reading more from your class.
|
On May 07 2009 23:53 Chill wrote: Interesting, although I can't really see any applications of it to the game. It's still really interesting to read about though.
Exactly what I thought
|
The next step would be, how does this relate to the Art of War?
Kinda easy actually.
|
On May 07 2009 15:12 AttackZerg wrote:Show nested quote +On May 07 2009 14:38 Superiorwolf wrote:Berkeley class final! Good work, I give it an A+! Very interesting to see the mechanics of egg hatching and why they disappear  Thank you  huh? None of this occured to you while playing ..... ever? It's a fucking class final and the guy put some nice effort into it, I was interested when I was reading it to understand why the eggs actually disappear. And no, this didn't occur to me when I played because I didn't know there were a few frames where the units health was different, all I knew was that if you attack the egg sometimes it doesn't spawn. Be supportive of someone's final, faggot.
|
Cool topic . Good thing it was linked on the front page, I probably would have missed it otherwise. I always assumed that the dissapearing thing had to do with cancelling an egg just as the hatching animation started (yeah, I don't actually play very much).
|
you can always look at the source when you want info about scbw animation data (iscribt.bin in your *.mpqs, need winmpq f.e. to extract files from mpqs(similar to zips), then 'decompile' the binary animation script file(/rez/iscript.bin iirc) with IceCC to plaintext animation script, where you will find ALL the scbw in-game animation data(pointers to various grps(scbw's multiframe graphics file format) and to the wavesounds (sometimes indirectly via linking through a dat file (the games static data storage file format))
hf
|
it also makes more sense from a programmers point of view to have an integer as delay (42ms) and not the fps rate which is rather unimportant to be accurate. Why would you choose an integer as arbitrary as 42 (douglas adams comes to mind)? In my programs I use a division mechanism, i.e., you tell it the FPS with a function call during initialization and it adjusts the delay accordingly. For example, if I tell it I want 60 FPS it'll set the delay to 1000/60 which is 16.667. I don't think some programmer was sitting down and thinking "oh 42 millisecond of delay sounds like a good amount".
|
Boring essay really. Its interesting to note but its not a significant discovery of any sort. I don't think it will affect the game too much to be honest.
|
On May 10 2009 22:40 XATMO8G wrote: Boring essay really. Its interesting to note but its not a significant discovery of any sort. I don't think it will affect the game too much to be honest.
Okay.
|
United States4126 Posts
The funny thing is, this happened in Effort v Flash which I saw right after I read this topic. What a coincidence
|
i was ready to flame after seeing the first 3 pictures - as I was not aware of how long and specific the post was. Good job, and good research.. very useful
|
|
On May 10 2009 04:21 Superiorwolf wrote:Show nested quote +On May 07 2009 15:12 AttackZerg wrote:On May 07 2009 14:38 Superiorwolf wrote:Berkeley class final! Good work, I give it an A+! Very interesting to see the mechanics of egg hatching and why they disappear  Thank you  huh? None of this occured to you while playing ..... ever? It's a fucking class final and the guy put some nice effort into it, I was interested when I was reading it to understand why the eggs actually disappear. And no, this didn't occur to me when I played because I didn't know there were a few frames where the units health was different, all I knew was that if you attack the egg sometimes it doesn't spawn. Be supportive of someone's final, faggot.
Cool your jets wolfie, no need to get too uppity.
|
great job simon, very well done. now improve your zvz!
|
After 11 years of StarCraft this is definitely something new to me. Thanks!
|
On May 10 2009 19:12 Aqo[il] wrote:Show nested quote +it also makes more sense from a programmers point of view to have an integer as delay (42ms) and not the fps rate which is rather unimportant to be accurate. Why would you choose an integer as arbitrary as 42 (douglas adams comes to mind)? In my programs I use a division mechanism, i.e., you tell it the FPS with a function call during initialization and it adjusts the delay accordingly. For example, if I tell it I want 60 FPS it'll set the delay to 1000/60 which is 16.667. I don't think some programmer was sitting down and thinking "oh 42 millisecond of delay sounds like a good amount".
and how do you create this delay? it heavly depends on the accuracy of your time measuring mechanism. If you take the windows API function GetTickCount() as base for your timings the most accurate you can get is 1ms, and it still sucks. so why should you check a float towards an int when it never will reach the floats accuracy?
|
This is even more disgusting than watching an egg hatch at regular speed, lol
|
|
|
|