Rem ASCII Frogger By TDK_Man Oct 2005
 
Gosub SetUp
Do
  Gosub UpdateAll
  Sync
Loop
End
 
Setup:
  Set Display Mode 640,480,16
  Sync On: CLS 0
  Sync Rate 60
  Input "Please Enter Your Name: ";Name$
  Name$=Upper$(Name$)
  CLS
  Set Text Font "Courier New",255
  Set Text Size 24
  Hide Mouse
 
  Dim ScreenLines$(30)
  Dim LineScrollDir(30)
  Dim FLineColour(30)
  Dim BLineColour(30)
  Dim LnScrollSpd(30)
  Level = 1
  Lives = 5
  TimeLeft=30
 
  Rem Scroll Direction 0=Left  1=right
  LineScrollDir(5)=1
  LineScrollDir(6)=0
  LineScrollDir(7)=1
  LineScrollDir(8)=0
  LineScrollDir(9)=0
  LineScrollDir(12)=0
  LineScrollDir(13)=1
  LineScrollDir(14)=0
  LineScrollDir(15)=1
 
  LnScrollSpd(5)=1
  LnScrollSpd(6)=2
  LnScrollSpd(7)=1
  LnScrollSpd(8)=2
  LnScrollSpd(9)=1
 
  For N=0 To 17
    Read ColourNum
    BLineColour(N)=ColourNum
  Next N
  For N=0 To 17
    Read ColourNum
    FLineColour(N)=ColourNum
  Next N
 
  Full$=Chr$(219)
  Bottom$=Chr$(220)
  Top$=Chr$(223)
  Fuzz$=Chr$(176)
  Blank$=Chr$(255)
 
  Car$="][--]["
  Van$="[]"+Full$+Full$+Full$+Full$+Full$
 
  ScreenLines$(0)=MakeStr(Full$,50): Rem Title
  ScreenLines$(1)=MakeStr(Full$,50): Rem Title
  ScreenLines$(2)=MakeStr(Full$,50): Rem Title
  ScreenLines$(3)=MakeStr(Full$,50): Rem Burrows
  Hole$=Full$+Full$+Blank$+Blank$+Blank$+Blank$+Blank$+Full$+Full$+Full$
  ScreenLines$(4)=Hole$+Hole$+Hole$+Hole$+Hole$: Rem Burrows
 
  Log1$=Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178): Rem Short Log
  Log2$=Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178): Rem Long Log
  Turtles1$=Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178): Rem Three Turtles
  Turtles2$=Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178)+Chr$(178): Rem Four Turtles
  Croca$=Chr$(243)+Chr$(179)+Chr$(179)+Chr$(179)+Chr$(179): Rem Croc Mouth Closed
  Crocb$=Chr$(242)+Chr$(179)+Chr$(179)+Chr$(179)+Chr$(179): Rem Croc Mouth Open
 
  ScreenLines$(5)=MakeStr(Log1$+"          ",3)+"  ": Rem Water
  ScreenLines$(6)=MakeStr("    TTTTTTTT    ",3)+"  ": Rem Water
  ScreenLines$(7)=MakeStr(Log2$+"             ",2)+"  ": Rem Water
  ScreenLines$(8)=MakeStr(Log1$+"          ",3)+"  ": Rem Water
  ScreenLines$(9)=MakeStr("    TTTTTT      ",3)+"  ": Rem Water
  ScreenLines$(10)=MakeStr(Full$,50): Rem Bank
  ScreenLines$(11)=MakeStr(Full$,50): Rem Bank
  ScreenLines$(12)=MakeStr("    VVVVVV      ",3)+"  ": Rem Road
  ScreenLines$(13)=MakeStr("         FFFF   ",3)+"  ": Rem Road
  ScreenLines$(14)=MakeStr(" CCCC           ",3)+"  ": Rem Road
  ScreenLines$(15)=MakeStr("    XXX      XXX",3)+"  ": Rem Road
  ScreenLines$(16)=MakeStr(Full$,50): Rem Time
  ScreenLines$(17)=MakeStr(Full$,50): Rem Hiscore
  Gosub ClearLines
Return
 
ClearLines:
  Set Text Opaque
  For N=0 To 17
    Ink BLineColour(N),0
    Text 0,N*24,MakeStr(Full$,50)
  Next N
  Ink BLineColour(3),0
  Text 0,3*24,ScreenLines$(3)
  Ink BLineColour(4),0
  Text 0,4*24,ScreenLines$(4)
Return
 
UpdateAll:
  Set Text Transparent
  SET TEXT TO BOLD
  Ink RGB(0,0,0),65280
  Text 10,0,"PLAYER: "+Name$
  Text 500,0,"LEVEL: "+Str$(Level)
  PScore$=Str$(Score)
  Repeat
    PScore$="0"+PScore$
  Until Len(PScore$)=6
  Text 10,48,"SCORE: "+PScore$
  Text 460,48,"LIVES: "+MakeStr(Chr$(234),Lives)
 
  PHScore$=Str$(HiScore)
  Repeat
    PHScore$="0"+PHScore$
  Until Len(PHScore$)=6
  Center Text 320,17*24,"HISCORE: "+PHScore$
 
  Ink RGB(255,255,0),0
  Text 80,16*24,"TIME "+MakeStr(Full$,TimeLeft)
 
  SET TEXT TO NORMAL
  Set Text Opaque
 
  Inc ScrollCounter: If ScrollCounter=10 Then ScrollCounter=0
 
  Rem Scroll Section 0 left 1 right
  For N=5 To 9
    If ScrollCounter<LnScrollSpd(N)
      ScreenLines$(0)=""
      If LineScrollDir(N)=0: Rem Left OK
        For L=2 To 50
          ScreenLines$(0)=ScreenLines$(0)+Mid$(ScreenLines$(N),L)
        Next N
        ScreenLines$(0)=ScreenLines$(0)+Mid$(ScreenLines$(N),1)
        ScreenLines$(N)=ScreenLines$(0)
      Else: Rem Right
        ScreenLines$(0)=Mid$(ScreenLines$(N),50)
        For L=1 To 49
          ScreenLines$(0)=ScreenLines$(0)+Mid$(ScreenLines$(N),L)
        Next N
        ScreenLines$(N)=ScreenLines$(0)
      Endif
      Ink FLineColour(N),BLineColour(N)
      Text 0,N*24,ScreenLines$(N)
    Endif
  Next N
 
 
  For N=12 To 15
    ScreenLines$(0)=""
    If LineScrollDir(N)=0: Rem Left OK
      For L=2 To 50
        ScreenLines$(0)=ScreenLines$(0)+Mid$(ScreenLines$(N),L)
      Next N
      ScreenLines$(0)=ScreenLines$(0)+Mid$(ScreenLines$(N),1)
      ScreenLines$(N)=ScreenLines$(0)
    Else: Rem Right
      ScreenLines$(0)=Mid$(ScreenLines$(N),50)
      For L=1 To 49
        ScreenLines$(0)=ScreenLines$(0)+Mid$(ScreenLines$(N),L)
      Next N
      ScreenLines$(N)=ScreenLines$(0)
    Endif
    Ink FLineColour(N),BLineColour(N)
    Text 0,N*24,ScreenLines$(N)
  Next N
 
Return
 
Rem ******** FUNCTIONS ********
 
Function MakeStr(String$,NumCount)
  Rem MakeStr Function By TDK_Man
  Rem Usage Examples:
  Rem   StringVar=MakeStr(String$,NumCount)
  Rem   Print MakeStr("X",32)
  Build$=""
  For N=1 To NumCount
    Build$=Build$+String$
  Next N
EndFunction Build$
 
Data 65280,65280,65280,13058560,13058560,10461179,10461179,10461179,10461179,10461179
Data 13058560,13058560,0,0,0,0,0,65280
Data 0,0,0,0,0,13058560,65280,13058560,13058560,65280,0,0,16711680,16776960,255,16753057,16776960,0