Two relatively easy things, one not so much.
I'd like to have weapon tags, defaulting to TRUE, that avoidNeutral and collideNeutral, for dealing with Neutral Units.
Secondly... I'd like to see multiple hitspheres, hitboxes, what-have-you. I don't personally care if it's multiple hitspheres, which is probably the easiest solution in terms of code. I'll try to figure out a relatively simple proxy solution for the immediate future.
The cities I'm doing for World Builder have shown me very clearly that these two things are probably necessary for Spring to handle these issues in a way that looks professional. I know that the hitbox / sphere stuff must be a royal pain, or Kloot would've committed what he worked on months ago, but I think we're going to want it, and fairly soon.
AvoidNeutral, CollideNeutral, Hitspheres / Boxes
Moderator: Moderators
Re: AvoidNeutral, CollideNeutral, Hitspheres / Boxes
Honestly, when you think about the nightmare complexity of getting the melee weapons to work with hitspheres, Kloot's patch sounds like it will just make things worse for bizarro Spring-bugs.
Multiple hitspheres sound like the way to go, but it also creates some complexities.
When attacking, which hitsphere is targetted? The closest? The largest? The largest that is within range? Attack command would become bizarre, because the unit would probably use the closest hitsphere for "how close do I need to get to my target" so that melee weapons would behave well... but once the unit moves closer, it would target the largest one (so that inaccurate weapons wouldn't be stuck shooting a small-but-close hitsphere).
How do you do aircraft-avoidance for multiple hitspheres? Unit considers itself to be a single aggregate sphere, but avoids all the hitspheres? That would allow fighters to fly through sphere-gaps in multisphere capships, but capships would maintain a full hitsphere-radius apart from each other.
Messy, any way you slice it.
Multiple hitspheres sound like the way to go, but it also creates some complexities.
When attacking, which hitsphere is targetted? The closest? The largest? The largest that is within range? Attack command would become bizarre, because the unit would probably use the closest hitsphere for "how close do I need to get to my target" so that melee weapons would behave well... but once the unit moves closer, it would target the largest one (so that inaccurate weapons wouldn't be stuck shooting a small-but-close hitsphere).
How do you do aircraft-avoidance for multiple hitspheres? Unit considers itself to be a single aggregate sphere, but avoids all the hitspheres? That would allow fighters to fly through sphere-gaps in multisphere capships, but capships would maintain a full hitsphere-radius apart from each other.
Messy, any way you slice it.
Re: AvoidNeutral, CollideNeutral, Hitspheres / Boxes
Units should just aim at the centroid of targets with multiple hitspheres- wherever XYZ the centroid is. Solves a lot of that mess. The hitspheres should just evaluate whether a hit has occurred.When attacking, which hitsphere is targetted? The closest? The largest? The largest that is within range? Attack command would become bizarre, because the unit would probably use the closest hitsphere for "how close do I need to get to my target" so that melee weapons would behave well... but once the unit moves closer, it would target the largest one (so that inaccurate weapons wouldn't be stuck shooting a small-but-close hitsphere).
There probably needs to be a special sphere that is just for this purpose- that's how Freelancer did it, anyhow. It was generally bigger than the object's hitspheres by quite a bit, to make avoidance / collision occur in a natural fashion. Of course, too big, and aircraft can't fly over your fleet of battleships, but it's the cheapest way to do this, I think.How do you do aircraft-avoidance for multiple hitspheres? Unit considers itself to be a single aggregate sphere, but avoids all the hitspheres? That would allow fighters to fly through sphere-gaps in multisphere capships, but capships would maintain a full hitsphere-radius apart from each other.
Re: AvoidNeutral, CollideNeutral, Hitspheres / Boxes
Heheh, do you remember Smoth's screenshot of fighters flying around a Whitebase in a perfect spherical avoidance pattern? That's why I suggested taking the spheres into account with avoidance.
Centroid might be nice, but it means no units where the centroid is open space. Perhaps the "Sweet Spot" should be revived? A "shoot me here" tag? And either way, I worry about multiple hitspheres with melee (or otherwise very-short-ranged) weapons.
Centroid might be nice, but it means no units where the centroid is open space. Perhaps the "Sweet Spot" should be revived? A "shoot me here" tag? And either way, I worry about multiple hitspheres with melee (or otherwise very-short-ranged) weapons.
Re: AvoidNeutral, CollideNeutral, Hitspheres / Boxes
The HTH issue's a tough one. However, this is not something you'd want to do with anything that isn't really, really huge, anyhow. Most things work just fine with a single sphere- it's stuff on the Gaw's scale, or my to-scale 16-floor buildings, that are a problem.
Re: AvoidNeutral, CollideNeutral, Hitspheres / Boxes
Melee is simple, a melee weapon is just a weapon with all the fancy shooting, collision, etc stuff cut out. It fires and BAM the target takes damage.
Re: AvoidNeutral, CollideNeutral, Hitspheres / Boxes
AvoidNeutral / CollideNeutral have been added to SVN, by Kloot. Yay! I'll finally see street-fighting that looks right, among other things
Testing now...

Testing now...