Does anyone here know exactly how Dracula X gets that awesome fire effect on the first stage? Badly upscaled image:
It seems to be applying raster animation to a static "fire image" (basically, selectively repeating or omitting vertical strips), in addition to additive blending. But how, exactly?
I'm trying to replicate the effect for a level in my game (on PC, but sprite-based at 240p). This is the closest I've got so far (background of the stage removed):
Not nearly as smooth or cool-looking!
And the code for how I'm producing the above:
...where the counter increments every frame.
I could step through an emulator and figure out the effect myself, but it's been years (going on half a decade??) since I've looked at any assembly, and I have zero experience with the SNES hardware. So I was wondering if anyone here knew about this.
Thanks for your time!
It seems to be applying raster animation to a static "fire image" (basically, selectively repeating or omitting vertical strips), in addition to additive blending. But how, exactly?
I'm trying to replicate the effect for a level in my game (on PC, but sprite-based at 240p). This is the closest I've got so far (background of the stage removed):
Not nearly as smooth or cool-looking!
And the code for how I'm producing the above:
Code:
double stripY = 0;
for (int i = 0; i < flameHeight; i++) {
double pct = i / (double)flameHeight;
double time = counter / 8.0;
double inc = Math.Cos(pct * 3.14159 * 8 + time * 0.5);
inc = (1.0 + inc);
stripY += inc;
// render horizontal strip at stripY, advance one line down
}
for (int i = 0; i < flameHeight; i++) {
double pct = i / (double)flameHeight;
double time = counter / 8.0;
double inc = Math.Cos(pct * 3.14159 * 8 + time * 0.5);
inc = (1.0 + inc);
stripY += inc;
// render horizontal strip at stripY, advance one line down
}
...where the counter increments every frame.
I could step through an emulator and figure out the effect myself, but it's been years (going on half a decade??) since I've looked at any assembly, and I have zero experience with the SNES hardware. So I was wondering if anyone here knew about this.
Thanks for your time!