Rotating Starfield

By knoeki on Jul 15, 2009

Pretty much the same as the last one, except this looks a bit more trippy...

standard res is lower on this one, due to /drawrot being quite intensive.

(uncomment line 10 if you have whilefix.dll)

alias rotstarfield {
   var %total.w $iif($1 != $null, $1, 320)
   var %total.h $iif($2 != $null, $2, 200)
   window -k0pdf @starfield -1 -1 %total.w %total.h
   var %plane.x $calc(%total.w - 20)
   var %plane.y $calc(%total.h - 20)
   var %halfplane.x $calc(%plane.x * 0.75)
   var %count 0
   while (%count <= 4096) {
;      whilefix
      drawdot -r @starfield $iif($rand(0,3) == 1, $rgb($rand(10, 255),$rand(10, 255),$rand(10, 255)), 16777215) 1 $rand(%halfplane.x, %plane.x) $rand(20, %plane.y)
      var %rotsize.x $rand(10, %plane.x)
      var %rotsize.y $rand(10, %plane.y)
      var %rotsize.w $calc(%plane.x - %rotsize.x)
      var %rotsize.h $calc(%plane.y - %rotsize.y)
      drawrot -b @starfield 0 -1 %rotsize.x %rotsize.y %rotsize.w %rotsize.h
      drawscroll @starfield -2 0 0 0 %total.w %total.h
      inc %count
   }
}

alias -l whilefix {
   dll WhileFix.dll WhileFix .
}

Comments

Sign in to comment.
knoeki   -  Oct 11, 2009

khaled was able to reproduce the drawrot crash with this script... it'll likely be fixed in some next version ;_)

 Respond  
knoeki   -  Jul 16, 2009

Colorful. It works, but is there a way you could slow down the movements a bit?

it's possible, yes. it'll run slower anyway when trying it on a higher resolution... try doing /rotstarfield 800 600.

Lol..every time i try 2 maximize it, it make me stuck and quit from IRC..but i like the movement.

yes, for some reason I experience crashes as well with /drawrot, I have no idea why this is, exactly. :|

 Respond  
blitzz   -  Jul 16, 2009

Lol..every time i try 2 maximize it, it make me stuck and quit from IRC..but i like the movement..

 Respond  
Solitude   -  Jul 15, 2009

Colorful. It works, but is there a way you could slow down the movements a bit?

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.