Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / Fluid Wave simualtor

Author
Message
Nicholas Thompson
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 1st Apr 2006 05:18
First off - the code...



It'll compress down more than that - but thats just trying to keep it semi-readable.

Once loaded, hti F5. It will simulate a wave as if something got dropped into the water.

Problem - Not sure why its drawing every OTHER line... It looks like its running two simulations over the top of each other (due to the buffering required). Any idea's?

I also would like to make it frame rate independant - the locking it to 60fps makes me shudder inside, especialy when I know my machine is capable of about more than 200fps with the above code when uncapped...

Important: Make sure your screen can handle the res set in the code (1280x1024x32). If not - drop it, it SHOULD still work fine.

Comments appreciated

Nicholas Thompson
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 1st Apr 2006 06:36
UPDATE:


Its fixed now - I needed to smooth out the plop to stop it interlacing the waves...

Jess T
Retired Moderator
20
Years of Service
User Offline
Joined: 20th Sep 2003
Location: Over There... Kablam!
Posted: 1st Apr 2006 10:37
V. Nice!

Looks sexily smooth - Maybe make a screen saver or somesuch out of it and you could have a winner here

Team EOD :: All-Round Nice Guy
Want Better dbHelp Files?
dj blackdragon3710
19
Years of Service
User Offline
Joined: 5th Nov 2004
Location: In LaLa land
Posted: 6th Apr 2006 03:47
I see nothing and when I hit F5 nothing happens....

<<<<<Used to be "djblackdragon" with being registered in January, 2003, no matter what it says on the left<<<<<
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 6th Apr 2006 14:45
maybe let rain fall in the water for the screensaver. I bet it looks cool!

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Nicholas Thompson
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 7th Apr 2006 15:34 Edited at: 7th Apr 2006 15:40
I have some better code at home... With Jess's help, its much better now, althought its no longer 20 lines

EDIT: Here it is - but its more than 2- lines. I'll see how much I can compress it...


Teh Go0rfmeister
20
Years of Service
User Offline
Joined: 17th Aug 2003
Location:
Posted: 8th Apr 2006 13:44
you may want to turn the sync rate down...

Login to post a reply

Server time is: 2024-04-20 00:55:41
Your offset time is: 2024-04-20 00:55:41