Author Topic: [Suggestion] A small expansion of the vapor cloud functionality  (Read 2439 times)

Offline EttyKitty

  • Sergeant
  • **
  • Posts: 14
    • View Profile
[Suggestion] A small expansion of the vapor cloud functionality
« on: December 23, 2021, 09:06:44 pm »
This maybe a not very necessary addition, but it's better to try than to not:
I want to suggest a small(?) expansion of the vapor cloud functionality.

A good example and namely the reason why I'm proposing this: a beam type weapon.
Right now you can either use a "beam" like bullet sprite (which looks okay) or a vapor cloud (which looks nothing like a beam because of the slow vaporizing animation).
Your options of modifying the vapor, on the other hand, are limited to two "size" values and one color value.

What I want to propose is the addition of the dissipation delay and dissipation speed values.
The first value will govern the time delay after which particles start becoming more and more transparent.
The second value will govern the speed of a particle going from 255 to 0 opacity.
The third possible value, about which I thought only when I was writing this, is the vapor movement speed, i.e. how fast the vapor moves upwards/sideways(?).

With this addition (I assume) you will be able to create a trail of particles which will appear for a split second after a shot and vanish without visually appearing as vapor animation, efficiently creating a beam. (no dissipation delay or a couple of ms; maximum dissipation speed).

But maybe I'm wrong in my vision of how this will look/work and there is a better way to create a nice "beam" effect or improve the vapor cloud system.

Nonetheless, thanks in advance.
« Last Edit: December 23, 2021, 10:20:47 pm by Meridian »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9105
    • View Profile
Re: [Suggestion] A small expansion of the vapor cloud functionality
« Reply #1 on: December 23, 2021, 10:20:36 pm »
There is no transparency or opacity gradient in OpenXcom.

Also, why on earth would I simulate a beam by a non-moving vapor cloud? That's like flying from London to Paris via Tokyo.

Clear no.

PS: there is already a request for beams: https://openxcom.org/forum/index.php/topic,9968.0.html

Offline The Martian

  • Commander
  • *****
  • Posts: 754
  • "It implores you to listen to its arguments..."
    • View Profile
Re: [Suggestion] A small expansion of the vapor cloud functionality
« Reply #2 on: December 24, 2021, 09:55:17 am »
I was curious about how an instantly disappearing 'vapor beam' would look so I created a small mock-up:
Spoiler:

Offline EttyKitty

  • Sergeant
  • **
  • Posts: 14
    • View Profile
Re: [Suggestion] A small expansion of the vapor cloud functionality
« Reply #3 on: December 24, 2021, 07:30:06 pm »
I was curious about how an instantly disappearing 'vapor beam' would look so I created a small mock-up:
I've done it too. But wanted to wait for some time before posting it, so to not bother the Meridian in a quick succession of time.

Just a note to your example: if you set the "vaporProbabilitySurface" to 100 and "vaporDensitySurface" to 4-6 - it will look more concentrated, i.e. "beam like". I forgot to do it myself when I was doing mine example.

Here is how it will look like with the "vaporProbabilitySurface: 100" and "vaporDensitySurface: 4".
Spoiler:
And here is my example (in which I also forgot to change those two values):
Spoiler:

Out of my proposed values: there is a very small dissipation delay (so you can see the trail stays on full opacity for some time before starting to fade out), medium dissipation (fade out) speed (faster than the regular vapor) and no vapor movement speed (so the cloud stays stationary until the end).


Also I'm not sure if I was able to convey my thoughts properly, because of the language barrier, the usage of the wrong terms and my complete lack of knowledge on how the vapor animation works, so I will try to do it again and I hope better this time. Not for the sake of persuading you, just to better explain myself.
I'm sorry if you understood everything the first time and now I'm just wasting your time.
Quote
There is no transparency or opacity gradient in OpenXcom.
Right now in the game the vapor cloud fades out, it is not permanent, right? And it does this not by instantly going from "particle exists" to "particle doesn't exist", but by slowly losing "opacity" (I don't know how exactly this is called and works, so excuse my choice of words) in a span of couple of seconds. This is the "dissipation" or "fade out" which I mean. And I mean editing the delay and speed of this fade out animation, as well as movement speed of the particles in it.
Quote
Also, why on earth would I simulate a beam by a non-moving vapor cloud? That's like flying from London to Paris via Tokyo.
PS: there is already a request for beams: https://openxcom.org/forum/index.php/topic,9968.0.html
The first reason, is that I thought that it will require less work and time to modify an existing system, than to create a new one (a beam animation system, in this case).
The second reason, is that I thought that those additions will be beneficial for tweaking the vapor clouds overall (can't think of an example tho, sorry), even if we are not talking about the simulation of beams, but you will also receive an option (maybe not an ideal one) to simulate beams, to some extent at least, until the creation of their own animation system, if it happens.

Well yeah, it will be not an ideal "beam", but it's at least something. But I absolutely wouldn't argue if you say that it requires more than enough work for a very questionable benefit - I just don't know how much work it requires.

And again, thanks for your attention and sorry for taking even more of your time.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: [Suggestion] A small expansion of the vapor cloud functionality
« Reply #4 on: December 25, 2021, 03:52:46 am »
As I recently mess with code responsible for vapor, I think some elements of this suggestion could be implemented without a lot fo messing with current code.
I already long backlog of different requests and I do not know when (if ever) it will be done.