The Macubus Fireball
Header { Version = 6 }
SkipIf -nofxmod
# -----------------------------------------------
# - MancFireball - by Dani J
# -----------------------------------------------
#------------------------------------------------------------------
# STATE DEFINITIONS
state {
ID = "FATSHOT1"
Sprite = "MANF"
Frame = 32768
Tics = 4
Next state = "FATSHOT2"
}
State {
ID = "FATSHOT2"
Sprite = "MANF"
Frame = 32769
Tics = 4
Next state = "FATSHOT1"
}
State {
ID = "FATSHOTX1"
Sprite = "MISL"
Frame = 32769
Tics = 8
Next state = "FATSHOTX2"
}
State {
ID = "FATSHOTX2"
Sprite = "MISL"
Frame = 32770
Tics = 6
Next state = "FATSHOTX3"
}
State {
ID = "FATSHOTX3"
Sprite = "MISL"
Frame = 32771
Tics = 4
Next state = "NULL"
}
#------------------------------------------------------------------
# MODEL DEFINITIONS
ModelPath "data\jdoom\Models\Projectiles\MancFireball"
Model {
State = "FATSHOT1"
Scale = 0
Skin tics = 1
Offset XYZ { 0 2 0 }
Flags = fullbright | movpitch
Md2{
File = "MancFireball.dmd"
Frame = "MANFA"
Skin range = 8
}
}
Copy Model {
State = "FATSHOT2"
Md2{
Frame = "MANFB"
}
}
ModelPath "data\jdoom\Models\FX\Explosions"
Model {
State = "FATSHOTX1"
Scale = 0
Offset = 3
Skin tics = 1
Flags = noz | brightshadow2 | fullbright
Md2{
Skin range = 8
File = "explosion_new.dmd"
Frame = "0"
}
}
Copy Model {
State = "FATSHOTX1"
Inter = 0.99
Md2{
Frame = "3"
Skin = 1
}
}
Model {
State = "FATSHOTX2"
Scale = .3
Offset = 3
Flags = noz | brightshadow2 | fullbright
Md2{
File = "explosion_new.dmd"
Frame = "3"
Skin = 8
}
}
Copy Model {
State = "FATSHOTX2"
Inter = 0.16
Md2{
Frame = "4"
Skin = 9
}
}
Copy Model {
State = "FATSHOTX2"
Inter = 0.33
Md2{
Frame = "5"
Skin = 10
}
}
Copy Model {
State = "FATSHOTX2"
Inter = 0.5
Md2{
Frame = "6"
Skin = 11
}
}
Copy Model {
State = "FATSHOTX2"
Inter = 0.66
Md2{
Frame = "7"
Skin = 12
}
}
Copy Model {
State = "FATSHOTX2"
Inter = 0.83
Md2{
Skin = 12
}
}
Copy Model {
State = "FATSHOTX3"
Inter = 0
Md2{
Skin = 13
}
}
Copy Model {
State = "FATSHOTX3"
Inter = 0.25
Md2{
Skin = 14
}
}
Copy Model {
State = "FATSHOTX3"
Inter = 0.5
Md2{
Skin = 15
}
}
#------------------------------------------------------------------
# LIGHT DEFINITIONS
Light{
State = "FATSHOT1"
Flags = nohalo
Size = .65
Red = .8
Green = .05
Blue = .05
}
Light{
State = "FATSHOT2"
Flags = nohalo
Size = .55
Red = .8
Green = .05
Blue = .05
}
Light{
State = "FATSHOTX1"
Flags = nohalo
Size = 1
Red = .8
Green = .05
Blue = .05
}
Light{
State = "FATSHOTX2"
Flags = nohalo
Size = .6
Red = .8
Green = .05
Blue = .05
}
Light{
State = "FATSHOTX3"
Flags = nohalo
Size = .4
Red = .8
Green = .05
Blue = .05
}
#------------------------------------------------------------------
# PARTICLE DEFINITIONS
# Smoke Trail
Generator {
State = "FATSHOT1"
Flags = srcvel | srcdir | blend
Center { -4 0 0 }
Speed = -1
Speed rnd = 0.2
Spawn radius = 5.8
Spawn age = 10
Max age = -1
Particles = 3000
Spawn rate = 20
Vector rnd = 3
Stage {
Type = "pt_point";
Flags = "ptf_bright";
Tics = 3;
Radius = 8;
Resistance = .1;
Color { 1 0.2 0 0.2 };
};
Stage {
Type = "pt_tex01";
Flags = "ptf_bright";
Tics = 5;
Radius = 16;
Resistance = .1;
Color { 0.7 0.1 0.1 0.2 };
};
Stage {
Type = "pt_tex08";
Flags = "ptf_bright";
Tics = 3;
Radius = 4;
Resistance = .1;
Color { 1 0.2 0 0.1 };
};
}
# Explosion
Generator {
State = "FATSHOTX1"
Flags = blend
Speed = 2
Speed rnd = 0.2
Spawn radius = 5
Spawn age = 4
Max age = 50
Particles = 3000
Spawn rate = 10
Vector rnd = 1
Stage {
Type = "pt_point";
Flags = "ptf_bright";
Tics = 15;
Radius = 8;
Bounce = 0;
Resistance = .01;
Color { 0.5 0 0 .3 };
};
Stage {
Type = "pt_point";
Flags = "ptf_bright";
Tics = 15;
Radius = 8;
Bounce = 0;
Resistance = .01;
Color { 0.5 0 0 .3 };
};
Stage {
Type = "pt_tex08";
Flags = "ptf_bright";
Tics = 5;
Radius = 4;
Color { 0.5 0 0 .1 };
};
Stage {
Type = "pt_point";
Flags = "ptf_bright";
Radius = 20;
Tics = 20;
Color { 1 0 0 0};
};
}
Edit: here is the pic i have for it and i changed the last particle trail as it now looks better i think.
Comments
So for each projectile we have at least 2 active generators with over 250 particles as sum each game tick.
Maybe that amount is worth for a very-very detailed fireball as in image below
But we see a plain drop-like shape with a smooth gradient from white to red. For that shape 10 particles is maximum.
I encourage you to put more effort into the design of the effects.
Edit: if this dose achieve what you think is good then i will go back and optimize all the particle affects i did and re-upload them here on the forums.
See my edited def and the screenshot
1. I shrunk down generator spawn age to 7 (remember 8 ticks state cycle), and I forcibly remove used generator after 28 ticks (spawn age + particle life time).
2. Do not use zero scale model, use zero md2 file path instead.
3. Vector rnd 1 is enough, as you don't define a direction vector.
4. Do not use huge amount of particles with almost zero opacity, use small amount and more opaque particles instead.
5. It's better to end up particle life with the zero opacity
Trying to represent a complex particle cloud using only "points", one must exchange discreet particles for performance. However, if you can represent a "layer" of cloud particles using a texture - you increase the effective number of visual particles by orders of magnitude. Combine multiple layers on top of one another, spawning, moving, scaling (and ideally, rotating) at different times and it becomes possible to achieve something that provides a decent approximation of the intended effect, while achieving acceptable performance.
Obviously, though, if you aren't able to produce such textures yourself then you'll need to source them from somewhere. A quick search for "particle cloud texture" yielded dozens of results (ensure to check the usage terms/license, mind you).