[WIP][SBDL] SkyBerron Plasma & Fire

Just another crazy stress test on SBDL new features: plasma effect, fire effect, doom fire effect, alpha blended sprites, scrolling text. Added FSM to the mix because it looks cool. To do: replace default random number generator, it’s very slow for realtime per-pixel updates.

Edit (1): changed fire update to xorshift32, doom fire is a bit faster now, but overall still a bit slow… Arrrgh!

Edit (2): optimized a bit the x2 bilinear interpolator and added some pointers here and there for fast array access during fire updates. Now it should run smoother, but still slow in the emulator. Arrrgh!

Edit (3): added no interpolation as an option. Faster interpolation. Interpolation is just a bit slower than no interpolation (pixel doubling).

SkyBerron FSM.bin.1

SkyBerron FSM.bin.1_fast

SkyBerron FSM.bin.11_fast

SkyBerron FSM.bin.14_fast

SkyBerron FSM.bin (128.8 KB) (default random number generator)

SkyBerron FSM_2.bin (129.5 KB) (using xorshift32 rng)

SkyBerron FSM_3.bin (128.6 KB) (minor speed optimizations)

SkyBerron FSM_4.bin (128.7 KB) (optimized interpolation)

SkyBerron FSM_5.bin (175.3 KB) (more background effects!)

Although palettes and effects are changed automatically every few seconds, these keys can be used:

  • Up/Down: when there isn’t a palette transition in progress, switches between plasma, classic fire and doom fire
  • Left/Right: when there isn’t a palette transition in progress, switches to a different palette
  • A: toggle FSM vanishing
  • B: toggle FSM being a source for fire effect
  • C: toggle between interpolation and pixel doubling
8 Likes

Really cool to see alpha blending in Pokitto :slightly_smiling_face:

All hail the FSM!

4 Likes

The world needs more FSM themed games and demos! Pirates included, of course.

2 Likes

Arrrrrrrr!!!.:grin:

1 Like

An LCG should be faster on the Pokitto than xorshift. An add+mul is just two cycles.

Maybe. Anyway, I guess most the CPU time is burned in the 2x full screen interpolation. And there are many other things that can be optimized: pixels not visible being updated, multiple read/write to image buffers through class members, … It’s a pity, in CodeBlocks, the SDL binary looked stunning even running at stable 30 fps.

Ok, I found a few things that could be optimized for speed and posted a new bin in the first post. I’m not sure if running in real hw may have better framerate than emulator because of MinLib coming out of the box with overclocking settings on.

On the other hand, I’d love to see FSM in action on real hardware (supposing it does work), but unfortunately I haven’t got the required device.

Anyone making a YouTube video on real hw? :wink:

Remember you will need to apply a special procedure to get back to launcher, iirc.

1 Like

I noticed the binary was not big enough… Arrrgh! … so I added some more background effects and uploaded latest bin to first post:

  • Metaballs
    SkyBerron FSM_5.bin.1_fast

  • Oscillating circles
    SkyBerron FSM_5.bin.3_fast

  • Simple tunnel
    SkyBerron FSM_5.bin.4_fast

  • Smooth star shape
    SkyBerron FSM_5.bin.5_fast

  • Distorted spiral
    SkyBerron FSM_5.bin.6_fast

  • Simple spiral
    SkyBerron FSM_5.bin.7_fast

Now the stress test is finished.

5 Likes