Heatcloud: Difference between revisions

From Spring
Jump to navigationJump to search
New page: Source: https://spring.clan-sy.com/svn/spring/trunk/rts/Sim/Projectiles/Unsynced/HeatCloudProjectile.cpp
 
No edit summary
Line 1: Line 1:
Source: https://spring.clan-sy.com/svn/spring/trunk/rts/Sim/Projectiles/Unsynced/HeatCloudProjectile.cpp
==Introduction==
 
heatcloud is one of the simplest and most common explosion types. Ironically, it is also one of the least intuitive. First of all, ignore the name--it basically makes an expanding image at the point at which it is spawned.
 
==Source==
 
https://spring.clan-sy.com/svn/spring/trunk/rts/Sim/Projectiles/Unsynced/HeatCloudProjectile.cpp
 
==Parameters==
 
=== heat, maxheat, heatFalloff ===
 
Most explosions have alpha and ttl. I don't know why heatcloud uses these instead. Basically:
 
Starting alpha = heat / maxheat
ttl = heat / heatFalloff
 
The alpha decreases linearly across the heatcloud's lifetime.
 
=== size, sizeGrowth ===
 
The heatcloud starts at size size and grows sizeGrowth each frame.
 
=== sizemod, sizemodmod ===
 
It seems that the heatcloud expands by a factor of (1 - sizemod) each frame. The sizemod itself is multiplied by sizemodmod every frame. Most of the time it's probably best just not to contemplate these.

Revision as of 05:14, 23 March 2008

Introduction

heatcloud is one of the simplest and most common explosion types. Ironically, it is also one of the least intuitive. First of all, ignore the name--it basically makes an expanding image at the point at which it is spawned.

Source

https://spring.clan-sy.com/svn/spring/trunk/rts/Sim/Projectiles/Unsynced/HeatCloudProjectile.cpp

Parameters

heat, maxheat, heatFalloff

Most explosions have alpha and ttl. I don't know why heatcloud uses these instead. Basically:

Starting alpha = heat / maxheat ttl = heat / heatFalloff

The alpha decreases linearly across the heatcloud's lifetime.

size, sizeGrowth

The heatcloud starts at size size and grows sizeGrowth each frame.

sizemod, sizemodmod

It seems that the heatcloud expands by a factor of (1 - sizemod) each frame. The sizemod itself is multiplied by sizemodmod every frame. Most of the time it's probably best just not to contemplate these.