LOS reversal

LOS reversal

Requests for features in the spring code.

Moderator: Moderators

Post Reply
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

LOS reversal

Post by SpikedHelmet »

Simple, really. Well, simple to explain.

A reversal of the way LOS works. Rather than units having a distance they can see, set how far a unit can be seen by others.

So for instance, a generic tank would be able to be seen 1000 "distance units" from any enemy unit; however, a small kbot would only be able to be seen when within 500 "distance units".

This would generally be a major conversion for use by unconventional mods rather than anything that would immediately benefit most players' games; however, a possible go-between is to keep the standard LOS system and add some way to apply unit-side modifiers to it -- so that an especially large unit would be visible at 150% of others units' normal LOS range (example).
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: LOS reversal

Post by Pxtl »

While it can be faked with cloaks, I think this would be good.

I had an idea before on how to do this - a "detectability" - that is, each unit has a multiplier of how detectable it is. Default is 1. A multiplier of 2 would mean could be spotted at twice normal detection range.

Thus, if you want to get pure "detect-at-this-range" behavior, you could set all the sight-ranges to 1, and set the view distances using the detectability.

This would be nice if you wanted to mix models - have tanks with a detectiability of 2, infantry at 1, aircraft at 4, for example, but still vary detection ranges so you can still have "spotter" or "blind" units.

However, this would likely be hard to implement - harder than simply flipping over the detection model like Spiked requests.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: LOS reversal

Post by Argh »

It'd be a lot more expensive to do tests in reverse, because you'd be checking a lot more squares, with the current system. And with the ray-tested speedup I proposed, it'd be even worse.

However... how's about a rule in the raytest solution, whereby if distance > X, and some variable > Y, then fail detection, just like a failure due to a raytest collision?

That would be pretty simple, and a lot less costly.
User avatar
Evil4Zerggin
Posts: 557
Joined: 16 May 2007, 06:34

Re: LOS reversal

Post by Evil4Zerggin »

Maybe a simpler request to begin with: let all units use airlos for being detected.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: LOS reversal

Post by Argh »

That's no different than just changing the mipmap level, insofar as Units are concerned, IIRC.
SpikedHelmet
MC: Legacy & Spring 1944 Developer
Posts: 1948
Joined: 21 Sep 2004, 08:25

Re: LOS reversal

Post by SpikedHelmet »

I don't even understand what you mean by that; isnt AirLOS just another type of LOS?

Pxtl brought up a good point that the effects of this could be duplicated by clever use of cloakability. My only problem with that is having my entire army half-invisible for the entire game. I'd only consider if it there were a way to turn indications of stealth off completely, both so you see your units "normally" and players aren't tipped off that someone is spying on their units.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: LOS reversal

Post by Tobi »

We had some nice discussion about this in #s44, something with detection categories (a bit similar to movetypes) may allow this. Each category would have a separate LOS map and each unit could have a separate LOS range in each category.

The requested feature would also be easy if unit<->unit rays are used instead of using an intermediate LOS map, but that solution in general is more work.

An option to disable the visible effect when a unit is cloaked sounds good to have too.
User avatar
Pxtl
Posts: 6112
Joined: 23 Oct 2004, 01:43

Re: LOS reversal

Post by Pxtl »

Thinking it over, implementation-wise wouldn't the original request - a pure-reversal of LOS - be the cheapest? It would simply be reversing the messaging. Instead of "if I in range/LOS of unit X, add it to Stuff I Can See" it becomes "if I'm in range/LOS of unit X, add it to the stuff unit X can see".
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: LOS reversal

Post by Tobi »

That's not how the current implementation works.
User avatar
Nemo
Spring 1944 Developer
Posts: 1376
Joined: 30 Jan 2005, 19:44

Re: LOS reversal

Post by Nemo »

I'll have a (lua'd) mockup of this pretty soon, caveat being that it won't take terrain into account, and won't work for FFA.

Edit: can work for FFA, but requires rather more looptastic method:

Since I already have 7 loops every second (its los, needs to update pretty often) updating the visible status of my 7 detection classes, adding the additional GetUnitsInCylinder and looping through those results to figure out teams and then applying appropriate LoS masks strikes me as a good way to seriously bog down the game once we start talking about larger unit counts.

And now I think I could handle terrain, but again...wouldn't be all that cheap.


anyways. I'm taking the easy way for now, stick around #s44 for a build with a modoption using this sometime in the not too distant future.
Post Reply

Return to “Feature Requests”