Water demo
Miscellaneous Forums/Blitz Showcase/Water demo
Hi,ppl.
Here is demo of water processing userlb.
It has 10x speed comparing native blitz water processing.
Demo you can get from here:
http://tormoz.nm.ru/water_particle_atm.exeScreen:

All questions to Maxus(maxus_rus@...)
wow, that is pretty !
Looks really good.
Funky Frank
That's nice. Very dilligently and skillfully put together.
The real question for me though is, how versatile is this? Can it be applied to other wattery uses or is it really just for ponds and still lakes?
Very nice! Looks really interesting and realisitc. Have you observe your garden or have you translate some code into Basic? :D
2 @rtur:
Yes, Russians take over blitz!
Nice demo!!!
Very nice demo. The FPS conuter lies like a cheap watch, though. :P
nice demo..except I think FLIP mode is false since FPS is pretty high(270 fps) but movement is not smooth at all for given FPS, and water reflection is not acurate at all.....anyway, nice water..
Hi ppl
Thanks for your coments :)
Userlib can be used for any type of water.
Here is FPS counter:
frames=frames+1
If MilliSecs()-render_time=>1000 Then afps=frames : frames=0 : render_time=MilliSecs()
Text 20,10,"FPS "
Text 80,10,afps
Flip 0
This lib written by this two coders:
tormozas@...
maxus_rus@...
They are usually do not read this forum, so if u have any questions feel free to contact them.
Btw, they also developed particle processing userlib. It process particles about 100 times faster than blitz(note: processing, not rendering :) ).
All the best.
"memory access violation"
That FPS counter isn't all that accurate :-(
Try This:
FPSTimer = Timer_Create()
;Start Loop
Timer_StartTime(FPSTimer )
;Do Stuff Here
FPS = Timer_GetTime(FPSTimer )
if FPS = 0 then FPS = 1000 else FPS = 1000/FPS
Text 0,0,"FPS:"+FPS
Timer_EndTime(FPSTimer )
;End Loop
;=============Timer Functions
Const Timer_Max = 50
Type TimerList
Field ID
Field STime
Field ETime
Field Times[Timer_Max]
Field Average
Field Ref
Field Recorded
End Type
;======================================Average Timer Functions
Function Timer_Create(Average=Timer_Max)
Local TI.TimerList
TI.TimerList= New TimerList
TI\ID = Handle(TI.TimerList)
If Average > Timer_Max Then Average = Timer_Max
TI\Ref = Average
Return TI\ID
End Function
Function Timer_StartTime(ID)
Local TI.TimerList
TI = Object.TimerList(ID)
If TI <> Null Then
TI\STime = MilliSecs()
EndIf
End Function
Function Timer_EndTime(ID)
Local TI.TimerList
TI = Object.TimerList(ID)
If TI <> Null Then
TI\ETime = MilliSecs() - TI\STime
TI\Average=0
TI\Recorded = TI\Recorded + 1
For X = 1 To TI\Ref
TI\Times[x-1] = TI\Times[x]
TI\Average = TI\Average + TI\Times[x]
Next
TI\Times[TI\Ref] = TI\ETime
If TI\Recorded < TI\Ref Then
TI\Average = TI\ETime
Else
If TI\Average = 0 Then TI\Average = 0 Else TI\Average = TI\Average/TI\Ref
EndIf
EndIf
End Function
Function Timer_GetTime(ID)
Local TI.TimerList
TI = Object.TimerList(ID)
If TI <> Null Then
Return TI\Average
EndIf
End Function
This is a handy little timer lib I use that averages out 50 scans (so the timer isn't speratic). It's old code, so forgive how in-efficient the code is (coded it about 2 years ago and haven't touched it since, well outside of importing it into projects)
Suppose I should revisit it since I have learned so much about type Lists since then!
It's nice but quite dark on my Radeon 9800XT for some reason. Although I was getting 300fps, the movement didn't appear smooth in 1024x768. When I dropped to 640x480 it seemed smoother but I noticed the water had a funny reflection that was kind of like distorted scanlines or something (hard to describe).
Looks great on mine. Very nice demo!
Looks great! :D
Ne ploho pazan :). A budet skoro wersia dla BlitzMax?
Ya dumaju - chto kogda 3d modul poyavitsya - budet! :-)
Sounds great. I am looking forward to this event :).
Thats pretty dang cool lookin!! I like the fish jumping too! Runs fine on my old computer.
damn.
it had me daydreaming for a while.