Staredit Network > Forums > General StarCraft > Topic: Larva spawn time
Larva spawn time
Jul 20 2015, 8:36 pm
By: Xiphias  

Jul 20 2015, 8:36 pm Xiphias Post #1

Sorry if this topic is too hard on tiny details, but it's important to me.

According to liquipedia both worker build time and larva spawn time is the same at 20 seconds on normal game speed.

BWAPI website confirms this with Drones at 300 frames with equals 20 sec on normal speed:

There is sadly no info on larva spawn time from hatcheries there.

I have done some Starbow vs Brood War test with larva spawn time and there seems to be a tiny bit more time for larva to spawn than for drones to be built. I cannot confirm this anywhere, and it might just be some animation differences.

Could someone with a decent mpq reader and some programming skills find the exact amount of frames it takes for larva to spawn from a hatchery?


Jul 21 2015, 8:27 am Wormer Post #2

I don't remember where there was such an info, but you can test it yourself: count number of trigger cycles needed to spawn larva and you get the desired value accurate up to 1 frame.


Jul 21 2015, 12:28 pm jjf28 Post #3

Cartography Artisan

There is a timer set to 37 (UnitAddress+0xCA, 1 byte) that is decremented every 9 frames; when it reaches 0 a larva spawns and it gets set to 37.

So a larva should spawn every 333 frames/13.986 seconds on fastest.

Edit: from a shoutbox discussion this may vary slightly.

Post has been edited 2 time(s), last time on Jul 21 2015, 10:25 pm by jjf28.

Rs_yes-im4real - Clan Aura -

Reached the top of StarCraft theory crafting 2:12 AM CST, August 2nd, 2014.

Jul 22 2015, 7:59 am Xiphias Post #4

Great! That's very interesting. According to BWAPI website the build time for drone is 300 frames, but this: says it's 318. Could you check the frames for drone build time as well with the same method you found 333 frames for larva spawn time so it can be correctly comparable with worker build time?


Jul 22 2015, 10:06 am Neiv Post #5

On larva spawn time:

-As jjf said, there are 2 counters, the first one counts from 8 to 0, and second from 37 to 0. (So they have 9 and 38 different states)
-The first counter is decremented every frame, second only when the first counter is zero.
-Therefore the average spawn time is 38 * 9 = 342 frames.
-However, every 150th frame the "first counter" is randomly reassigned another value, which could increase or decrease the spawn time at most by 8 frames.
-As larva spawning takes more than 2 * 150 but less than 3 * 150 frames, the first counter gets reset either 2 or 3 times.
-Thus there is at most 24 frames of variance from the average spawn time of 342 frames.
(Though if you want to get really theoretical, the variance cannot be more than 20 frames on a new hatchery and 18 on one that has been through one spawn cycle)
-A poster on the TL topic linked said that he got rarely over 400 frame times - there may be something else I don't run into when testing.

tl;dr: Average larva spawn time 342 frames, best ~318, worst ~366.

Didn't do any extensive research on drones, but the 300 frames are the build time set on the data files, and I would assume the 318 frames include some of the animations of either larva transforming to an egg or egg hatching.


Jul 22 2015, 2:15 pm Xiphias Post #6

Thanks for a great answer Neiv :)


  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[11:02 am]
Pr0nogo -- woah, you can't call me an h for being g
[10:06 am]
Suicidal Insanity -- If you are going there .... and kids :P
[06:55 am]
IlyaSnopchenko -- And chicks
[04:15 am]
Oh_Man -- And horses
[04:15 am]
Oh_Man -- And planes
[2019-8-20. : 10:00 pm]
Suicidal Insanity -- I think that kinda matches a car :D
[2019-8-20. : 10:00 pm]
Suicidal Insanity -- But did mention fast cars
[2019-8-20. : 9:59 pm]
Suicidal Insanity -- Note I didn't mention gaming :P
[2019-8-20. : 9:50 pm]
zsnakezz -- but costs the same as a car
[2019-8-20. : 9:50 pm]
zsnakezz -- kind of like
Please log in to shout.

Members Online: Roy, lenka101703, Parduees1v, jjf28, ocunyt