DaemonEngine / Daemon

The Dæmon game engine. With some bits of ioq3 and XreaL.
https://unvanquished.net
BSD 3-Clause "New" or "Revised" License
293 stars 60 forks source link

`trap_R_inPVVS` is not used #855

Open illwieckz opened 1 year ago

illwieckz commented 1 year ago

Thetrap_R_inPVVS function is not used, I don't know if we want to keep it for potential modes being ported to Dæmon, but actually this is just something not used by Unvanquished.

illwieckz commented 1 year ago

I've just checked ioq3, Smokin'Guns, RTCW, ET:Legacy, q3rally, OpenJK and WorldOfPadman and while all have a trap_R_inPVS function like us, none of them actually define trap_R_inPVVS and then don't make use of it. UrbanTerror used ioq3 or proprietary q3 one so we are safe to say they didn't used trap_R_inPVVS, and mods like True Combat or ET:Fortress could not use it if the engine didn't have it. I seen that Spearmint don't have it either, which excludes Turtle Arena at the same time.

illwieckz commented 1 year ago

And none of XreaL, ET-XreaL, and RBQUAKE-3 have trap_R_inPVVS. Same for Qio and various OpenWolf trees I grepped.

illwieckz commented 1 year ago

commit c761047f9d764640cd3f1924bbe88b1b24658b2c Author: Matthias Bentrup \*\*\*@\*\*\* Date: Sun Nov 4 16:25:58 2012 +0100

Add visvis calculation and cgame trap.

Visvis is similar to vis, but while vis indicates if there is a direct line of sight between two clusters, visvis indicates that there is an indirect line of sight (i.e. there is a common point from where there are lines of sight to both clusters).

The computation of visvis used here is not geometrically exact, but if it differs from the definition given above, it's always the case that it may indicate an indirect invisibility where none exists, so it is still safe to use it for culling. In practise the differences are not important.

I wonder what's for. Maybe we can make use of this feature for some interesting trick, but for now it's not used.

slipher commented 1 year ago

According to Git history, alien sense blips and old human radar could only detect entities in the PVVS.

illwieckz commented 1 year ago

Ah, that's an useful feature then. I would like to have blips, at least as an option.

DolceTriade commented 1 year ago

PVVS would also be useful for bot calculations to rank targets

Viech commented 1 year ago

If I remember correctly, PVVS in practice felt just random. PVS is already a crude outer approximation for the visible set: it's normal that it allows you to "see" through heavy walls. PVVS would be even larger and could extend to parts of a map that are hardly connected. I wouldn't be surprised if it incorporates most of a map, or an arbitrarily large portion of it. I see no good use for it, and it could be demanding computationally.

DolceTriade commented 1 year ago

Note that PVVS is a one time computation just like PVS (at least that's how I understand it...)

slipher commented 1 year ago

I'd say delete it since if we want to do it again we should do it in the gamelogic without a trap call. There's already e.g. G_CM_inPVS

Viech commented 1 year ago

Note that PVVS is a one time computation just like PVS (at least that's how I understand it...)

It still produces a dense graph, possibly the initial computation (on every map load?) could produce a lag and the queries could be slower than for PVS.