Improving the information game (map cloak areas)

So I was chatting with Neddie, and I think that we could improve the game pretty significantly by moving towards a map-based approach to ‘sneak’/‘cloak’ as opposed to a unit-based one. Basically I want to write a gadget that takes a config for each map where the maps ‘cover’ features are defined, along with the radius to which they provide visible cover for infantry, which is then applied to the map on game start (much like flags), and updated as features are destroyed (easy enough using featureDestroyed).

I think the information aspect of S44 could be substantially improved in this way - right now there’s not much depth to the acquisition of LoS - it mostly consists of ordering recon planes or sending infantry forward to die/the occasional scout.

Neddie: On the subject of forests... couldn't we have the gadget collect the trees on the periphery as datapoints, then ignore the ones between and just fill with the cloaking? It would update only when trees in the periphery are destroyed, and instead of having four hundred cloaking fields we'd have one cloaking field produced between sixty points? Neddie: Or is that non-trivial/non-beneficial? Neddie: (Well, I know it isn't trivial) Neddie: This would also let us have clearings in the forest where units were still invisible. shiftyphish: shape detection like that is well beyond my coding ability shiftyphish: using each one as the center of a radius is easier, but yes, less efficient shiftyphish: the alternative is to sacrifice the ability to destroy features to remove the fields, and just set fixed coordinates in the config

Neddie: What if we had shape-state detection of some sort? What I mean is... Neddie: Alright, we define the area. Neddie: And we define the number of features in the area at start. Neddie: And we run a slow update. shiftyphish: abstractly set the quality by the number of features left? Neddie: As the number of features declines, the size and effectiveness of the area's cloaking drops. Neddie: Yes. shiftyphish: that's a good idea shiftyphish: don't even need shape detection then shiftyphish: just hardcode the areas Neddie: It might not always reflect play accurately, but it would be workable. shiftyphish: count the features inside them at game start shiftyphish: set that original count as "100% efficiency" Neddie: *reflect on play shiftyphish: and then degrade as they're destroyed (maybe randomly decloak guys using efficiency value) Neddie: We could also, perhaps, allow people to add features to the region to reconstruct the area, in some missions/variants. shiftyphish: that said, it would be really confusing to have your guys next to once house randomly show up because another house somewhere else got blown up Neddie: Heh. Neddie: True. shiftyphish: I guess we'd just have to make sure that the hardcoded regions made sense shiftyphish: instead of taking the entire forest, break it down Neddie: We couldn't do a whole forest. shiftyphish: into smaller chunks Neddie: Yes, sectors. shiftyphish: sweet, that sounds like a great approach shiftyphish: lets doo it

Notes from a conversation with tobi:

zones should be larger than quadfields (chunks of 256x256 elmos), and of fixed shape (since the spatial queries in spring are well-optimized, so using GetUnitsInCircle or some such isn’t horrendously expensive)

potentially use tobi’s waypoint widget to set up configs (add button for size of zone)

wooo first draft! get it here: spring1944.net/files/Build/S44CloakZone_v1.sdz

This only works on Caucasus skirmish, so only play there with this >_>

a.imagehost.org/view/0294/screen020 there are the zones that cloak.

the rules are: any fear-targeted unit (guns, infantry) which are in those zones will be hidden with a decloak radius of 200. any infantry which cloaks already will get a much smaller decloak radius (normal one / 2.5) until they leave the area.

that’s all for now. the current todo looks like this:
TODO
create config format, load from that - done!
set a limit for number of units each section can hold - done, just need good settings for it
reduce efficiency as features are destroyed in the area (fewer guys hidden)
dynamically create zones as features are created (vehicle corpses) based on some required density param (# of features in whatever radius)
modify tobi’s waypoint widget so it can generate config files for maps

note: if you use SVN, you don’t need that build mentioned at the start of this post: the config will load automatically if you’re playing a supported map. of which there is currently only one (caucasus)

Hotness. Much hotness.

Would it be possible to have ~two~ kinds of cloak areas? The second, representing much more dense cover, would be able to cloak vehicles…

I can put it as a param in the config, sure.

I don’t know where Nemo is planning to go from here, but I believe multiple levels of cover are possible for different zones, though presently the quality of cover is dependent on the size of the zone, and I suggested that it might be otherwise defined, so we can have large areas of sparse forest that can still hide some infantry, just fewer and less effectively, etcetera.

I don’t like the seperate config.

Zones table should just be another attribute of the single lua config file in /maps/. Also IW uses the same format for flag positions so it makes sense to read from the same directory.

(As a minor aside, in case I forget, Ralith obviously didn’t test the healthbars a great deal; they suffer from the bug with ammo bar when out of ammo again)

fine floz fine :stuck_out_tongue:

wouldn’t that make it harder for non dev-types to work with? dunno. i’ll see about doing that if I find some time this week. and minimum range…before PR 0.9 is out ON FRIDAY AT 9:09!

Back when I was still working for CA I put in a minimum length of zero for the reload bar. jK was all O NOES PERFORMANCE

Which is incredibly sad. I mean, have you ever tried to use… LUPS or Chili? Where did my FPS go?

This zones thing will be only getting arousals from old timers. Noobs will be very confused by it. I don’t like it either, thus I am a noob as per my own words.
The initial basic angle of difficulty that one has to comprehend with S:44 is steep already. This Zone thing will only make it more unpredictable for the unseasoned players. “OHWTF MY STUFS ARE ALL DIE OVAR THER” (?!)

This would also obsolete all kinds of recon units. Also, there would have to be a way to see things inside the hidden area, it is a very old fundamental TA design rule that for every unit or method there is a counter unit or method (except for the rocket launcher vehicles or kbots, but those are very heavily movement constrained, slow). Also very many maps have massively unequal feature distribution. And many maps would logically have the majority of the available space ‘zoned’ because there are a lot of forests, hills, stones, etc.

Bad performance sucks, too. I’ve noticed, it gets slower and slower with every new spring release and every new S:44 release, as well. This brings me yet again to the matter that I have cross-reposted to different topics, is there or is there not a way to profile the scripts?

Thanks for reading this far,
zc

I probably qualify as a noob and I like it; it allows a map to have areas where assault infantry can dominate or AT infantry can make vehicle assaults a complete nightmare. Which is realistic; a guy with a bazooka is not going to ninja-kill a tank out on open ground - they’re best at hiding and waiting for a vehicle to roll right up to them.

I agree 100% with zCram on the cloaking areas idea.

I think it’s good, just perhaps let’s not go overboard with it. For instance, perhaps put small cloaking areas over dense concentrations of trees or buildings - an example would be the wooded areas on Prokhorova. Dense forests and urban areas are supposed to be a damned nuisance to recon and clear; there’s a reason why generals like nice gentlemanly fights over deserts or open plains. Hills I wouldn’t consider to be a major vision obstacle - unless units can see through terrain blocking their LOS, that should already be taken care of. I’d only use cloaking areas for places with a dense concentration of “ornamental” features like trees or buildings.

If you want to keep the enemy out of those areas, you can either occupy them with assault squads or simply arty the bejeebers out of them. Invisibility is not much help if your opponent has a good hunch where you are and decides to drop a salvo of shells or rockets on your head.

Cloaking areas are few and far between as designed, and entirely optional.