Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Refactor Fog of War round 2

Open ayylmaoRotE opened this issue 3 months ago • 8 comments

Picking up the closed PR #530 .

Forward ported the old PR and fixed the following from showing under fog:

  • [x] Ebolt
  • [x] Shrapnel related Ebolts (ownerless?)
  • [x] NaturalParticleSystem
  • [x] RefinerySmokeParticleSystem (from UnitTypes)
  • [x] DamageParticleSystems
  • [x] SparkParticleSystem
  • [x] LaserTrailClass (all 3 types)
  • [x] LaserDrawClass (includes DiskLaserClass)
  • [x] RadBeam
  • [x] CaptureManager (MindControl unit link)
  • [x] Phobos FlyingStrings
  • [x] SpySat=yes support

Other improvements:

  • Can be enabled via CnCNet Client, e.g.
  • Implemented RemoveShroudGlobally to combat the Shroud=no issue below
  • Reworked fog proxy drawing to stop BuildingType, OverlayType and TerrainType flickering/vanishing under fog

RemoveShroudGlobally I added this as a way to bypass the Shroud=no issue, it works by removing Shroud at the beginning of the game, while keeping Fog intact. How to use:

[General]
RemoveShroudGlobally=yes

Note: this can also be enabled via CnCNet Client configuration

CnCNet Client In your game/skirmish/multiplayerlobby config, add a GameLobbyCheckBox with:

SpawnIniOption=FogOfWar
Checked=True

Still to do:

General

  • [ ] Buildings fog proxy silhouette will disappear if they are destroyed, correct behaviour is to remain until revealed
  • [ ] Sometimes XParticleSystem becomes visible
  • [ ] Voxel turrets on BuildingTypes do not show currently
  • [ ] Add coauth @secsome
  • [ ] Remove debug messages and comments in debug.log and code.

Ares

  • [ ] IonBlastClass::Draw / applyRipples / Ripple.Radius
  • [ ] ProduceCashDisplay
  • [ ] Flying strings such as Bounty

Vanilla

  • [ ] Sparky=yes on WH
  • [ ] RevealToAll=yes - does reveal the building but it gets fogged soon after
  • [ ] RadSite
  • [ ] RefinerySmokeParticleSystem created by Slaved InfantryTypes still shows under fog

Severe issues:

  • [ ] Save/Load is not working, crash on load, not sure how far back I need to troubleshoot
  • [ ] Shroud=no completely breaks everything (offset by RemoveShroudGlobally)
  • [ ] Performance, lots of objects under fog after some time = big impact on FPS, not sure why or how to tackle it.

Future QOL:

  • [ ] LaserTrail drawing should respect height vs fog, e.g. 3D vs Cell drawn at ground level/Z.
  • [ ] If we want Shroud=no instead of RemoveShroudGlobally=yes, a pro will need to look into it.

https://github.com/user-attachments/assets/fe707706-def8-4710-9441-4206b2dca752

image image

ayylmaoRotE avatar Sep 24 '25 14:09 ayylmaoRotE

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

github-actions[bot] avatar Sep 24 '25 14:09 github-actions[bot]

-Terrain Objects with custom palettes are using theater palette under fog -Smudges drawn over buildings cause crazy performance issues

image

SCIPCION avatar Sep 25 '25 04:09 SCIPCION

If it really doesn't work, then forget it. Using a smoke shell combined with passive super weapon effects is also quite good.

zhnjsacdjkn avatar Sep 26 '25 05:09 zhnjsacdjkn

Tested was in 20XX and MO, error occurred in both mod so all of them are here

-Random Mid-Game Crash: The game crashes unexpectedly after 5-10 minutes of gameplay. The error message is Exception code: C0000005 at 0074056E. (Crash dump and related files have been sent via Discord DM) and this problem occurred not only with me but other testers.

-Multiplayer Crash: Multiplayer games crash with a breakpoint error approximately 3-5 seconds after the match begins (ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.).

-Friendly Player MCV Animation: The Allied Player MCV is missing its static (None updating) animation frames; only the dynamic (Moving parts) animation is visible.

Untitled2

-Pre-Captured Tech Buildings: Tech buildings when captured by enemy appear as captured on the map before any player has scouted them.

image2

-Map Reveal on Large Maps: On large maps, parts of the map remain covered by the Fog of War and part is unexplored/unknown, or the center point of the revealed area seems to be posed (moving in x but not y direction) incorrect.

Untitled

-Ore Miner Attack Command: The "attack" cursor indicator disappears when hovering over ore fields with the Ore Miner selected.

-Destroyed Bridges in Fog of War: Bridges that are pre-destroyed in the map editor appear as intact when covered by the Fog of War.

image5 image6

-Engineers and Tech Buildings in Fog of War: Engineers can be ordered to enter a tech building that is under the Fog of War. However, upon reaching the building, the engineer does not enter it.

-Inconsistent Selection of Revealed Enemy Buildings: Some enemy buildings remain selectable under the Fog of War after being revealed, while others do not.

image4

-Crater and Shadow Visual Glitches: Explosion craters are incorrectly rendered on top of buildings. A similar layering issue sometimes occurs with shadows.

image3

-Incorrect Fence Color After Destruction: When a fence is destroyed, the remaining fence posts change to the player's color.

image

-Damaged Buildings Under Fog of War: Occasionally, if a building takes damage while it is under the Fog of War, its visual state in the fog will update to show it as damaged.

Erjet avatar Oct 07 '25 12:10 Erjet

@Erjet You might also want to download here a snapshot from the debug folder. It will contain a dmp, debug information, and other information.

DmitryVolkov666 avatar Oct 07 '25 13:10 DmitryVolkov666

Doesn't just "might want", Phobos crash report is useless without dmp.

Metadorius avatar Oct 07 '25 13:10 Metadorius

i have and drop it in DM of ayylmao some hours ago

Erjet avatar Oct 07 '25 13:10 Erjet

And last one, some animation are broken (its MO)

image

Erjet avatar Oct 08 '25 11:10 Erjet