Plasma/Wave algorithms

BlitzMax Forums/BlitzMax Programming/Plasma/Wave algorithms

Dubious Drewski(Posted 2005) [#1]
Here are two little time-wasters I've made. What do you
all think?

Source + Exe:

http://soldiers.250free.com/BlitZMax/Beaker.zip
Wait until the screen clears and right-click in the
bottom-center of the screen to see some fantastic atomic
blast-like shockwaves.

[edit] Here is a more advanced variation of the above program with background distortion:
http://soldiers.250free.com/BlitZMax/Distort.zip

And, not as neat, but still fun.
Source + Exe.
http://soldiers.250free.com/BlitZMax/blur02.zip

No screens, you've got to see them in motion.


Ferminho(Posted 2005) [#2]
wow! nice fx :)


Warpy(Posted 2005) [#3]
Looks like you're using Hugo Elias' routines. I love that site :D

(Very nice effects, anyway)


Ziltch(Posted 2005) [#4]
Nice water look with your Distort prog!


ftbass(Posted 2005) [#5]
Great FX ^^
I'll take a look at your code to how you did it.

thanks :)


Dubious Drewski(Posted 2005) [#6]
Who's this Hugo Elias fellow? And why haven't I heard of
him before? His stuff is amazing! Thanks, warpy.

On that note, for the wave program, this line of code:
		buffer2[x,y]=(buffer1[x-1,y] + buffer1[x+1,y] + buffer1[x,y-1] + buffer1[x,y+1])/2 - buffer2[x,y]



was not conceived in my head. That's a well-known
algorithm and it's the key to making the waves.

Everything else is completey mine though. : )


Tibit(Posted 2005) [#7]
I have never seen anyone simulating water waves this realistic, nice! By the way, how demanding is this?


ImaginaryHuman(Posted 2005) [#8]
They're cool but they do run kinda slow.


Dubious Drewski(Posted 2005) [#9]
Yeah they run pretty slow at 30 - 35 fps on my rig, and mine's a monster rig. Yeah I'm braggin ;)

And Wave, if you're wondering if it would be practical in a
game environment, I haven't yet found a way to use it well.

But I have tried in the past. This is a very old demo I
made in highschool. It's a motorboat battle, naturally.
http://soldiers.250free.com/BlitZMax/Water18.exe
Run at your own risk.

Sorry, I don't have the qBasic source anymore (Like you'd want it)


Warpy(Posted 2005) [#10]
I made a game using a 1-d version of this algo a few days ago - water drops. Obviously, the 2d version takes N^2 time to run, so it gets slow very quickly, but 1d is just fine.


Dubious Drewski(Posted 2005) [#11]
That's a neat little game. Very futile though. Can it be 'passed'?


Warpy(Posted 2005) [#12]
nope :)