Knuckle Cracker

Creeper World 3 => The Coder's Corner => Topic started by: warren on March 06, 2015, 12:00:16 AM

Title: Fake spores and shields
Post by: warren on March 06, 2015, 12:00:16 AM
Is there a best way to handle fake spores hitting shields? Currently, on destruction I have my fake spores turn into real spores if there is a shield nearby.

Also, if anyone knows the exact range of shields for spore defence and pz shields for spore defence that would be useful.
Title: Re: Fake spores and shields
Post by: Karsten75 on March 06, 2015, 12:14:20 AM
Quote from: warren on March 06, 2015, 12:00:16 AM
Is there a best way to handle fake spores hitting shields? Currently, on destruction I have my fake spores turn into real spores if there is a shield nearby.

Also, if anyone knows the exact range of shields for spore defence and pz shields for spore defence that would be useful.

http://knucklecracker.com/wiki/doku.php?id=cw3:unit_data_overview
Title: Re: Fake spores and shields
Post by: pawel345 on March 15, 2015, 06:11:54 AM
Shields create a field in their area of effect. In the campaign map this was used to detect if there is a shield present(the map where you get shields and the creeper spawns in random places) So when checking the place of impact check for 2 things. 1 is there a field in that cell, 2 if the cell is the one with the shield as exactly in the centre there is no field.
Title: Re: Fake spores and shields
Post by: warren on March 15, 2015, 10:29:31 AM
I remember that discussion. Wasn't there a problem with two shields lined up perfectly?
Title: Re: Fake spores and shields
Post by: planetfall on March 15, 2015, 10:37:12 AM
Yes, there is. There is also the problem of the singularity weapon and possibly custom units producing fields.
Title: Re: Fake spores and shields
Post by: warren on March 15, 2015, 11:02:01 AM
Well detecting the shields is not the real problem here. Detecting if they are on, and doing that stuff to the shields that real spores do, like make the field graphic turn red, that is the question.
Title: Re: Fake spores and shields
Post by: planetfall on March 15, 2015, 11:37:08 AM
There is no way to make the shield turn red via CRPL, so your solution to spawn a real spore when the fake spore lands seems to be best. However, this would create a bunch of extra noise, so if you want to avoid that the best way to do this is probably to create an off-map core that tracks shields and PZs, and then compiles a list of what shields are active on what cells, and have the spores only cause the damage/ammo drain and skip the graphic.
Title: Re: Fake spores and shields
Post by: pawel345 on March 15, 2015, 01:33:29 PM
Well you can overlay a red, semi-transparent circle on the shield to have a similar effect.
Title: Re: Fake spores and shields
Post by: warren on March 15, 2015, 09:41:11 PM
I think the annoying part of cores that create lots of spores is the noise under normal circumstances. Putting shields in the way of spores is not normal. Also, having deactivated shields on the front line is not normal. Ideally, the crashes into shield sound effect is good if the shield is activated. The crashes into ground sound effect is bad if the shield is not activated, but tolerable because of the unlikeliness. The spore creation sound effect is relatively quiet and may go unnoticed by the player as it overlaps the others but is also bad.