Page 1 of 2

Advanced/Customiseable Radar System

Posted: 19 Jul 2006, 12:11
by Warlord Zsinj
I think it is important that Spring's radar system be abstracted to the level which weapons, and shields, and other things are. I think this would be simple to do and would allow a lot of versatility. Currently I feel it is quite limited, and doesn't allow players any leighweigh to have radar systems that vary from the standard OTA one.

Basically, what I am suggesting is an armor.txt style parser, for radars.

So, you would have a sensors.tdf file containing sensor[1], sensor[2], etc. You would then specify either the individual units (ie: unit1=corcom; unit2=armcom;), or designate entire unit classes (ie, for SWS: class1=infantry;). It is important to have both, so that you can have the ease of designating an entire class, and the precision to specify exact units.

For example (framework done by Gnome):

Code: Select all

[sensors]
{
	[sensor0] //by default, radar. if a mod doesn't define this, have it behave as normal
	{
		[classes] //as defined by armor.txt
		{
			infantry=99; //number is irrelevant, like armor.txt
			droids=99;
		}
		[units] //specific unitnames
		{
			impatst=99;
			rebxwing=99;
		}
		[ignore]
		{
			imptief=99;
			rebywing=99;
		}
		[deftags]
		{
			distance=Radardistance;
			jam=Radardistancejam;
			stealth=stealth;
		}
	}
	[sensor1] //by default, sonar. Again, if mod lacks it, treat it as normal
	{
		[units]
		{
			armsubk=99;
		}
		[ignore]
		{
			armfib=99;
		}
		[deftags]
		{
			distance=Sonardistance;
			jam=Sonardistancejam;
			stealth=stealth;
		}
	}
	[sensor2] //my own arbitrary sensor system. let's call it thermal detection, it doesn't matter
	{
		[classes]
		{
			droids=99;
		}
		[ignore]
		{
			infantry=99;
		}
		[deftags]
		{
			distance=Thermaldistance; //tags arbitrarily defined by this. The tags would be skipped if they aren't defined here
			jam=Thermaldistancejam;
			stealth=Thermalstealth;
		}
	}
}

(ignore would override any armourclass stuff, so that you could include "infantry" but ignore "stormtrooper". This would allow players to even allow everything, and remove certain units, etc)

(It might also be nice to tie this in with the new custom radar dots, so that you can specify which radars can detect only generic dots, and require LOS before the custom dot is presented, and you can have advanced radars which give you specific readings, that is, showing the custom dot without direct LOS. Useful for the 'representative LOS' system I talk about later)

Thus, we have the ability to set far more advanced radars, which can only detect certain types of units, etc. You can have large-air only radars, which don't detect ground units, and thus don't imbalance ground radars, etc

- This would be particularly helpful for Spring 1944, where they have had to make every unit stealth except aircraft, because they wanted to have aircraft specific radar. They can't have any other form of radar at all, because their long range radar would detect it, which would be extremely unbalanced, given the long ranges of artillery etc.
- It was also considered that small radars could be given to individual units to represent the distance at which they can "see" a unit (a radar dot appears), but can't quite make out what that unit is. Which means they know a unit is there, but can't quite make it out, can't fire on it accurately and can't accurately identify it. You couldn't do this with the current system, for example in 1944, because the air-radar would detect all the units at a long distance, which it isn't intended for. (this is the 'representative LOS system I mentioned earlier')
- For a mod Secure and a few of us are dabbling on privately, we considered having a 'predator' type side with an LOS system for units using the previous point's line of thought, where they have little to no actual LOS, but all have individual radars. This would only really be feasible with the more advanced radar systems, because of the limitations of the current system.

Thoughts?

Posted: 19 Jul 2006, 12:45
by Crampman
Let's do more : we could add some tags :
-autotargetable : units detected can be targeted or not
-autotargetfacility : to add the possibility to use a 'targetting facility'
-accuracy : how the unit detection is accurate
-dottexture : to use custom 'pictures' dots

Posted: 19 Jul 2006, 23:03
by Gnomre
Yeah, naturally. He asked me to write that prototype up at like 6 in the morning, so some tags slipped my mind :P

Posted: 21 Jul 2006, 09:24
by Warlord Zsinj
No further interest in this system? It would be quite helpful, and I shouldn't expect too difficult to implement...

Posted: 21 Jul 2006, 11:36
by jcnossen
Sounds like a good idea indeed. I could say I put it on my todo, but I have way too much other stuff to do. I'll bring it up as soon as somebody is wondering what to do though ;)

Posted: 21 Jul 2006, 14:45
by Warlord Zsinj
I suppose that's about as close as you'll get to an affirmative answer 'round here these days... ;)

Posted: 24 Aug 2006, 01:54
by Caydr
Well, the latest build crashes if there's no sensors.tdf file, so I guess you got your wish?

Posted: 24 Aug 2006, 02:27
by Argh
Actually, I'm not sure, but I thought that sensors.tdf was read by the new seismic thingie... or something...

Posted: 24 Aug 2006, 02:30
by Gnomre
https://spring.clan-sy.com/wsvn/filedet ... rev=0&sc=0

Doesn't look like what we suggested, so I'm guessing Argh's assumption is reasonable. Not finding any documentation on it yet, though...

Posted: 24 Aug 2006, 02:44
by Warlord Zsinj
Damn, got our hopes up ;)

Actually....

Posted: 24 Aug 2006, 04:03
by Pxtl
It looks even more uninteresting than that - just configuring the resolution of the LOS calculations. Probably necessary for support of larger maps, since calculating LOS on a large space is probably a herculean effort with a high LOS-map-resolution. Perhaps at a later date this file will be used for radars, but in that sample one it looks like it's just taking some constants out of the engine into config files.

Posted: 24 Aug 2006, 09:30
by KDR_11k
It's not in the devrelease you can download, only the SVN.

Posted: 24 Aug 2006, 09:35
by Argh
ZOMG!

I've just gone through the implications of this!

With the proper scaling and constraints, it will almost certainly possible to make mods with much faster LOS calculation... or LOS that isn't impinged by terrain at all.

Posted: 24 Aug 2006, 09:41
by BvDorp
Argh wrote:ZOMG!

I've just gone through the implications of this!

With the proper scaling and constraints, it will almost certainly possible to make mods with much faster LOS calculation... or LOS that isn't impinged by terrain at all.
That would rock! :o

Re: Advanced/Customiseable Radar System

Posted: 21 Dec 2009, 20:04
by Gota
Epic Rez.
Has there been any progress on this front at all?Is anyone working on it ATM?

Re: Advanced/Customiseable Radar System

Posted: 22 Dec 2009, 01:17
by Google_Frog
Wow. Epic rez. If it has been implemented it must be very obscure as I've never seen it.

A better way of implementing this may be to give each unit a detectability bitfield which can be changed on the fly by scripts and gadgets for cloaking/stealth. Each sensor type would be defined in gamedata with options like ignore terrain, unit auto firing, what is drawn (generic dot, specific dot or unit model). The system could even replace LOS.

Re: Advanced/Customiseable Radar System

Posted: 22 Dec 2009, 01:35
by Umbra
Google_Frog wrote:The system could even replace LOS.
No.

Re: Advanced/Customiseable Radar System

Posted: 22 Dec 2009, 01:38
by aegis
a visual sensor type really could replace LOS :/

Re: Advanced/Customiseable Radar System

Posted: 22 Dec 2009, 01:56
by Argh
I wrote at least one Gadget that more-or-less implemented this at a rudimentary level, and released the source, IIRC. Problem was speed, in the end, due to the strategy I used at the time.

I certainly think it's entirely possible to write a fast LOS system using Lua atm. I use one that's fast for P.O.P.S., for example, although it's very crude. I've been thinking about extending it to LUPS and to the other shader systems, though, to provide one-stop-shopping for whether things get drawn, since other than CEG and the maps, I'm not using native Spring to draw any more.

Spring supports a bitmask for visibility per Team already, so it's quite possible to play with classical LOS- non-classical systems, where each Unit might have a different LOS treatment... that would be another thing entirely.

Re: Advanced/Customiseable Radar System

Posted: 19 Apr 2010, 15:32
by skzedd
Hello I am working on the System. But I have a problem I can't understand the tdf reader. How does it work? I mean where do we declare read the tdf (e.g. sound.tdf, mod info)files and how to get the info from them. Please help. I have done the sructure to keep the information.