Active Forums > Programs

ascII almost smooth pixel scroll

(1/2) > >>

PMACKAY:
just messing around with smooth scrolling ascii text mode..

screendata$(holds then entire screen map) no need to print to screen. use mid$ to store x,y data instead to screendata$

adjust the timer to adjust speed of frame being drawn

in screen draw routine take out dr%=0 in line 65 to have continued scroll
to disable wrap around change line 43 to b$=" " and line 57 to a$=" "

Screen _NewImage(32 * 8, 24 * 16, 256)

Timer On
On Timer(0.0066) GoSub MVE:
Randomize Timer
Dim screendata$(24)

For i = 1 To 24
    For j = 1 To 32
        screendata$(i) = screendata$(i) + Chr$(Int(Rnd(1) * 26) + 65)
    Next j
    Print screendata$(i)
Next i
Cls
dr% = 0
ZX% = 8
Do:
    If Int(Rnd(1) * 75500) = 100 Then GoSub RAND
    I$ = InKey$
    If I$ = "Q" Then dr% = 1: I$ = ""
    If I$ = "E" Then dr% = 2: I$ = ""
    If I$ = "W" Then dr% = 0: I$ = ""
Loop While I$ = ""
Timer Off
End

MVE:
If dr% = 0 Then
    For i = 1 To 24
        Color 1: _PrintString (ZX%, i * 16 - 15), screendata$(i)
        Color 2: Locate i, 1: Print "Û";: Locate i, 32: Print "Û";
    Next i
End If
If dr% = 1 Then
    For i = 1 To 24
        Color 1: _PrintString (ZX%, i * 16 - 15), screendata$(i)
        Color 2: Locate i, 1: Print "Û";: Locate i, 32: Print "Û";
    Next i
    ZX% = ZX% - 1
    If ZX% < 0 Then
        For i = 1 To 24
            A$ = Right$(screendata$(i), 31)
            B$ = Left$(screendata$(i), 1)
            screendata$(i) = A$ + B$
        Next i
        ZX% = 7
    End If
End If
If dr% = 2 Then
    For i = 1 To 24
        Color 1: _PrintString (ZX%, i * 16 - 15), screendata$(i)
        Color 2: Locate i, 1: Print "Û";: Locate i, 32: Print "Û";
    Next i
    ZX% = ZX% + 1
    If ZX% > 8 Then
        For i = 1 To 24
            A$ = Right$(screendata$(i), 1)
            B$ = Left$(screendata$(i), 31)
            screendata$(i) = A$ + B$
        Next i
        ZX% = 1
    End If
End If
_Display
dr% = 0
Return
RAND:
X = Int(Rnd(1) * 24 + 1)
Y = Int(Rnd(1) * 31 + 1)
Mid$(screendata$(X), Y, 1) = "\"
Return

bplus:
@PMACKAY  been awhile, welcome back!

Pete:
I tried conjuring up Terry Richie, but I must have got my wires crossed. Oh well. It's a win either way.

Pete

johnno56:
I tried the program, but the printing of the 'strange' characters on lines 31 and 37, do not have a Linux equivalent... Can you describe what it is meant to look like? - Just a screen shot will be ok...

bplus:
Just random junk (SCROLLS IF CAPS LOCK IS ON, Q OR E)
 

Navigation

[0] Message Index

[#] Next page

Go to full version