Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Picket Pushing: Line of Sight derpiness #19

Open
esainane opened this issue Dec 19, 2019 · 5 comments
Open

Picket Pushing: Line of Sight derpiness #19

esainane opened this issue Dec 19, 2019 · 5 comments

Comments

@esainane
Copy link

KGB seems to try Picket pushing where the Pickets can't actually fire at their targets:
screen00018
It also really, really wants to finish Pickets, even if this costs it their commander:
screen00019

KGB apparently calculates line of sight shadows for other attacks. I'm not sure how to add this here, though.

@aeonios
Copy link
Collaborator

aeonios commented Dec 19, 2019

What version are you using?

@esainane
Copy link
Author

This was built from d5bca36, the current master.

@aeonios
Copy link
Collaborator

aeonios commented Dec 19, 2019

Hm. The line-of-sight thing is more or less untractable. It has no way of predicting whether the porc will actually have a clear shot at anything or not. The suicide thing is problematic because it prefers not to run workers away when building/repairing porc unless it deems the situation hopeless (based on the threat of things it knows are there).

It'll abandon porc if that porc gets killed by enemy porc, but if enemy porc is targeting the worker, and especially if it can't see the porc, then it doesn't know that it needs to run away. Given that it built the defender inside the range of the stardust it obviously didn't know it was there, and unlike a human it can't infer it either, mainly because it has no unit ID to associate with it. Without a unit ID it would end up creating a new dummy porc literally every time a bullet hit a unit if it was out of los. Porc would end up getting counted infinite times for threat not to mention it'd have ridiculously bad performance.

Unfortunately spring is excessively strict about not sharing any information about things that are out of los and radar, which is bad for the reasons above but there's pretty much nothing I can do about it. It's already got workarounds wherever they're possible, but this is a pathological case where it isn't.

@DeinFreund
Copy link
Contributor

CSI handled this by adding a dummy unit if it received damage. If there was an existing dummy unit of the same unitdef nearby, it simply wouldn't add another.

@Anarchid
Copy link
Owner

Hm. The line-of-sight thing is more or less untractable. It has no way of predicting whether the porc will actually have a clear shot at anything or not. The suicide thing is problematic because it prefers not to run workers away when building/repairing porc unless it deems the situation hopeless (based on the threat of things it knows are there).

It's actually somewhat cheaply computable using the same raycast algorithm that the engine uses to actually calculate LoS in real time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants