Lua function to set an area of the map to block LoS - Page 2

Lua function to set an area of the map to block LoS

Requests for features in the spring code.

Moderator: Moderators

User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Lua function to set an area of the map to block LoS

Post by Argh »

@Tobi: Exactly my thoughts on this.

SlowUpdate is fast enough, even for planes, because we'll be able to afford to give them longer LOS radii to compensate for their speed (and if they're flying high enough... they won't get many Units in the initial sphere anyhow, so the number of ray tests can be pretty small).

@thesleepless:

If my proposal is successfully implemented, you wouldn't need wargame-style rules. You'd have true LOS.

Can't say I am sanguine about the performance impact of having massive numbers of LOS blockers, however. My whole objective here is to have fewer objects in LOS lookup, but to allow for some (massive) objects to block LOS, so that things like city fighting make more sense.

Doing the same thing for dense jungle terrain would be very, very expensive, with more than a few Units on the battlefield. You could do platoon-level skirmish all right, but past that, you'd clog up people's CPUs, even if it ran only every SlowUpdate. And that's without Tobi's proposal. Not that I will cry, if he implements it and it's an option.

For best speed, you'd probably be best off having "cover zones" that cloak the Units unless they're within a decloak distance. Then people hiding "in the woods" get cover like a wargame's rules, but if they're close to each other they can see each other normally.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Lua function to set an area of the map to block LoS

Post by Tobi »

No guarantees about performance though. (Heck, not even guarantees about whether I'll make it :-))

First I'll be away (holidays) for a long week and then I'll see :-)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Lua function to set an area of the map to block LoS

Post by Argh »

Hey, holidays are good. I am going to (finally) take a vacation soon, myself.
Post Reply

Return to “Feature Requests”