Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
request for printing patterns with for loops tutorial
#19
@fistfullofnails

You want animation with that?

Code: (Select All)
Width 60, 24
_Font 16
_ScreenMove _Middle
_Title "'Tis The Season"
train$ = Space$(_Width) + "[oo]-[oo]-[Oo>"
Palette 7, 63
Color 2, 7: Cls
msg$ = "Merry Christmas"
Locate 4, _Width \ 2 - Len(msg$) \ 2 + 1
Color 4, 7: Print msg$: Color 2
Locate 7
a$ = "*"
For i = 1 To 14
    If i > 10 Then a$ = "*": Color 0
    Locate , _Width \ 2 - Len(a$) \ 2 + 1
    Print a$
    a$ = a$ + "**"
Next
y = CsrLin - 1
Color 2: Locate y, 1: Print String$(_Width, 177);
_Delay 2: x = 5: z = Timer
Do
    Locate 7: a$ = "*"
    For i = 1 To 10
        Locate , _Width \ 2 - Len(a$) \ 2 + 1
        Color 2: Print a$;
        For j = 1 To Len(a$)
            If Rnd * 20 > 17 Then
                Locate , _Width \ 2 - Len(a$) \ 2 + j
                Color 12 + 16: Print "*";
            End If
        Next
        Print
        a$ = a$ + "**"
    Next
    If Abs(z - Timer) > x Then
        z = Timer
        If t = Len(train$) + 1 Then
            t = 1: x = 3
        Else
Sound 300, .05
            t = t + 1: x = .05
            Locate y - 1, 1: Color 0: Print Mid$(train$, Len(train$) - t, _Width);
            If t >= _Width / 2 + Len(_Trim$(train$)) Then Color 0: Locate , _Width \ 2 + 1: Print "*";
        End If
    End If
Loop Until InKey$ = Chr$(27)
System


Pete
Shoot first and shoot people who ask questions, later.
Reply


Messages In This Thread
RE: request for printing patterns with for loops tutorial - by Pete - 12-27-2024, 02:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  _Clearcolor and _setalpha day request TempodiBasic 0 464 04-29-2025, 09:27 AM
Last Post: TempodiBasic
  a little tutorial demo for Windows in SCREEN 0 TempodiBasic 0 598 12-10-2024, 01:00 AM
Last Post: TempodiBasic
  Portable Version of Terry Ritchie's Tutorial Updated mpgcan 6 5,854 09-22-2024, 09:13 PM
Last Post: TerryRitchie
  Steve's basic SIN/COS Tutorial SMcNeill 5 1,848 07-12-2024, 06:53 PM
Last Post: vince
  BIG QB64 Tutorial update TerryRitchie 4 1,543 05-22-2024, 06:20 PM
Last Post: TerryRitchie

Forum Jump:


Users browsing this thread: 1 Guest(s)