Posted: 8th Oct 2002 22:29
Here is a simple SIN snippet written in a few minutes. Written in DBP, should work in 1.x.

Basically, Sin & Cos will return a value that smoothly goes up & down when you feed it an increasing number.

Looks great.

+ Code Snippet
rem 2d text scroller using SIN by David Tattersall (David89)

rem define some variables
string$ = "DarkBASIC Professional! SIN wonders!"
chars = len(string$)

do

rem clear the screen
   cls

rem increment root variable
   inc i#,0.5

rem set our counter variable
   char = chars+1
rem the loop is set like this to allow spacing between the letters
   for d = 1 to (chars*10) step 10

rem find the next char in string
   dec char

rem grab this from the string
   char$ = mid$(string$,char)

rem set text colour
      ink rgb(char*10,i#,sin(i#)*100),0

rem write the text - heavy SIN & COS usage!
      text mousex()+(sin(i#+d)*(sin(i#)*300)),mousey()+(cos(i#+d)*(sin(i#)*300)),char$
   next d

rem sync
   sync

loop
Posted: 8th Nov 2002 1:09
thats really nice