Codesnippets > 3D-snippets
Simple ocean / water surface / waves
FutureCow:
Hemlos, I've updated my code to reflect your changes and fix a small bug yours had. You were updating the animation frame once every game loop, but only drawing whatever frame was current after the timer delay (which meant frames were getting missed). I've fixed it so AnimationFrame only advances when the timer delay has passed (ie. when timer=0 from your code)
Hemlos:
Ahh cool, glad you caught that, it is your baby afterall :)
A shot in the dark here.....the twitching error i noticed was due to this which i missed.
Great work man, it works really good.
I assume we can remove SLEEP 1.....which is good because it will go from 60 fps up to 4000 fps.
When i said sleep 1 makes it run full speed, i was wrong, i noticed an error with glbasic and this.
So lets try to see what happens without it....
Hemlos:
Success, i got it to run full speed now....3300 FPS woo!
REMOVE from your main code SLEEP 1.
Also dont forget to move your globals and local global from the main code, into the function as locals instead.
GLOBAL AnimationFrameMax%=20
LOCAL AnimationFrame% = -1
These should be added to the function STATIC
STATIC AnimationFrameMax,AnimationFrame
Qedo:
I am trying the Ocean Surface and am getting only 4 FPS (in the best condition).
I read in the topic of 3300 FPS!!!!
Is there something wrong on my computer or 3300 is exhausted?
I miss something?
Someone can try?
Thank you
Navigation
[0] Message Index
[*] Previous page
Go to full version