project-navigation
Personal tools

Author Topic: Variable Smoke Persistence  (Read 6666 times)

Offline Ufozook

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Variable Smoke Persistence
« on: February 13, 2018, 11:09:03 am »
First, congrats on bringing one of the best games ever back to life. Especially the maps are stunning.

Secondly, I've read a few ideas concerning smoke, and why they're all requiring a large time investment (i.e. are not likely to happen). At the same time, smoke is such a powerful tool that it's probably the most important factor in a fight. I think there's one idea that should be not too complicated to implement and make the game slightly harder, but more realistic and interesting because of less predictability:

Currently the entire smoke cloud is treated as a single entity. All affected tiles are covered for three turns. Why not randomize smoke dissipation per tile?
- On the first turn you'd get the full benefit, just as now.
- On the second turn, each tile would have a small chance (perhaps 15%) of dissipation.
- On the third turn, each remaining smoke tile would have a large chance, say 70%.
- Those few tiles not dissipating after three turns would be covered for a forth turn.

One of the most useful tactics in UFOAI is stepping out of the smoke cloud to spot aliens, then have the rest of the gang, safely hidden in the cloud, open up with all guns. At enemies they can't even see themselves. Variable Smoke Persistence would make that tactic still possible, but suddenly very dangerous.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: Variable Smoke Persistence
« Reply #1 on: February 14, 2018, 12:23:06 am »
Easy in bulletpoints is not necessarily easy to code. Have you considered the performance cost of that operation? On the other hand - we are pretty low on developers atm, so I cannot promise anything.
The old GNU saying applies here though: "Patches are welcome!" :)

-geever

Offline Ufozook

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Re: Variable Smoke Persistence
« Reply #2 on: February 14, 2018, 02:02:14 am »
Easy in bulletpoints is not necessarily easy to code. Have you considered the performance cost of that operation?

Just out of curiosity - where's the performance hit?

Offline Sandro

  • Squad Leader
  • ****
  • Posts: 240
  • Maintenance guy for UFO:AI 3D engine
    • View Profile
Re: Variable Smoke Persistence
« Reply #3 on: February 15, 2018, 06:41:28 am »
The problem is, UFO:AI is not the tile-based game, it just pretends to be one. Underlying engine, the idtech2, is freestyle 3d, so there are no "smoke tiles", but the smoke volume.
Therefore changes you propose will require major modifications of true visibility system. Of course, there could be some simpler way, like shrinking the smoke cloud each halfturn by some randomized value.

Offline Ufozook

  • Cannon Fodder
  • **
  • Posts: 6
    • View Profile
Re: Variable Smoke Persistence
« Reply #4 on: February 15, 2018, 09:48:56 am »
Thanks, I understand now.

Hmmm, what about shrinking it then?

Offline DarkRain

  • Project Coder
  • Captain
  • ***
  • Posts: 746
    • View Profile
Re: Variable Smoke Persistence
« Reply #5 on: March 06, 2018, 02:37:16 am »
Actually this would be just as easy as proposed if anyone really wanted to implement it: We don't spawn a single "smoke volume" but several smoke particles -one on each map 'tile'- each particle already has its own timer for despawning, so it would be pretty simple to just randomize said timer for each particle when the smoke field is spawned.

BUT do note that -due to the way the partilces overlap the adjacent 'tiles'- it will be very difficult to see which smoke 'tiles' have despawned when they despawn in the middle of the smoke field. Potentially leaving the palyer's units without cover in the middle of the smoke, when they visually appear to be covered by said smoke, would be BAD IMO.

Edit to clarify: The visibility system is aware of the smoke particle edicts, so one of them despawning will indeed make that tile visible, but other smoke particles in-between might still block visibility from/to that tile anyway.
« Last Edit: March 06, 2018, 02:44:39 am by DarkRain »