/timer -m acceleration - 06/08/05 04:17 AM
This is strage ...
i made this matrix like animation and i wanted it to be with a -m timer as fast as it can be ... so normaly i get 19 FPS on my pc but strangely ... it seems to accelerate and become hi-res timer when i move my mouse over it or on over any window other than mIRC, and i get huge FPS... now this may seem to be a nice thing but may be a problem.
in theory it should remain at the same fps .. unless 1 millisecond useing -m is longer than a millisecond useing -h !??
or ... ??? anyone care to explain ?
useage: to start /matrix <density> (0 is max fps)
to stop : /stop
look at status window for FPS
i made this matrix like animation and i wanted it to be with a -m timer as fast as it can be ... so normaly i get 19 FPS on my pc but strangely ... it seems to accelerate and become hi-res timer when i move my mouse over it or on over any window other than mIRC, and i get huge FPS... now this may seem to be a nice thing but may be a problem.
in theory it should remain at the same fps .. unless 1 millisecond useing -m is longer than a millisecond useing -h !??
or ... ??? anyone care to explain ?
Code:
matrix flow dots alias matrix { mtrwin fps on startani $1 40 } alias mtrwin { window -pdohB +dL @matrix 100 100 50 50 drawfill @matrix 1 99 10 10 } alias startani { .timermfd -om 0 1 matrixflowdots %maxdots = $1 %lft = $2 %maxy = 47 %maxx = 47 } alias matrixflowdots { if (%fps != $null) inc %fps var %i = 0 :num inc %i if ($gettok(%dot. [ $+ [ %i ] ],1,32) == $null) { if ($int($rand(1,100)) > 50) { ;format x y life speed size %dot. [ $+ [ %i ] ] = $int($rand(0,%maxx)) 0 %lft $int($rand(1,4)) $rand(1,10) } } var %x = $gettok(%dot. [ $+ [ %i ] ],1,32), %y = $gettok(%dot. [ $+ [ %i ] ],2,32), %life = $gettok(%dot. [ $+ [ %i ] ],3,32), %speed = $gettok(%dot. [ $+ [ %i ] ],4,32), %size = $gettok(%dot. [ $+ [ %i ] ],5,32) if %x != $null drawline @matrix 1 1 %x %y %x $calc(%y + %size) if (%life > 0) { inc %y %speed dec %life if (%y <= %maxy) { drawline @matrix 9 1 %x %y %x $calc(%y + %size) | %dot. [ $+ [ %i ] ] = %x %y %life %speed %size } else { unset %dot. [ $+ [ %i ] ] } } else { unset %dot. [ $+ [ %i ] ] } if (%i < %maxdots) goto num } alias stop { .timermfd off close -@ @matrix unset %dot* if %fps != $null fps off } alias fps { if ($1 = on) timerfps 0 1 show if ($1 = off) { timerfps off | %fps = $null } } alias show { if (%fps = $null) %fps = 0 echo -s FPS= %fps | %fps = 0 } menu @matrix { sclick:{ .timermove -m 0 0 move_win $calc($mouse.dx - $window($active).dx) $calc($mouse.dy - $window($active).dy) } } alias move_win { if ($mouse.key !& 1) .timermove off | else window $active $calc($mouse.dx - $1) $calc($mouse.dy - $2) }
useage: to start /matrix <density> (0 is max fps)
to stop : /stop
look at status window for FPS