Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2025 Christmas Tree and Snow
#1
Merry Christmas everyone!

Code: (Select All)

'Merry Christmas - Christmas Tree and Snow by SierraKen
'Updated on Dec. 21, 2025

Dim x(501)
Dim y(501)
Dim size(501)
Cls
Screen _NewImage(800, 600, 32)
Randomize Timer
_Title "Merry Christmas! By SierraKen - Press Space Bar for different ground. Esc to quit."
start:
GoSub snow
GoSub ground

dir = 1
Do
    _Limit 1000
    If dir = 1 Then sun = sun + .25
    If sun > 127 Then dir = 2
    If dir = 2 Then sun = sun - .25
    If sun < 2 Then dir = 1
    Paint (1, 1), _RGB32(sun, sun * 2, sun * 2)

    For cc = 300 To 600
        cc2 = cc2 + 1
        Line (0, cc)-(800, cc), _RGB32(cc21, cc22, cc23)
    Next cc
    cc2 = 0

    For t = 1 To 500
        y(t) = y(t) + (Rnd * 5) + 2
        For sz = 1 To size(t) Step .1
            Circle (x(t), y(t)), sz, _RGB32(255, 255, 255)
        Next sz
    Next t

    For t = 1 To 500
        If y(t) > 600 Then y(t) = 0
    Next t

    tree:
    t = 0
    tt = 0

    y = 300
    Randomize Timer
    c1 = Int(Rnd * 100) + 20
    c2 = Int(Rnd * 150) + 60
    c4 = c2
    c3 = Int(Rnd * 100) + 20
    'Christmas Tree
    Line (380, 520)-(420, 200), _RGB32(127, 255, 127), BF
    'Right Side
    Line (400, 180)-(475, 255), _RGB32(127, 255, 127)
    Line (475, 255)-(420, 255), _RGB32(127, 255, 127)
    Paint (430, 240), _RGB32(127, 255, 127)
    Line (420, 255)-(495, 330), _RGB32(127, 255, 127)
    Line (495, 330)-(420, 330), _RGB32(127, 255, 127)
    Paint (430, 300), _RGB32(127, 255, 127)
    Line (420, 330)-(515, 405), _RGB32(127, 255, 127)
    Line (515, 405)-(420, 405), _RGB32(127, 255, 127)
    Paint (500, 400), _RGB32(127, 255, 127)
    Line (420, 405)-(535, 480), _RGB32(127, 255, 127)
    Line (535, 480)-(420, 480), _RGB32(127, 255, 127)
    Paint (430, 470), _RGB32(127, 255, 127)
    'Left Side
    Line (400, 180)-(325, 255), _RGB32(127, 255, 127)
    Line (325, 255)-(380, 255), _RGB32(127, 255, 127)
    Paint (350, 240), _RGB32(127, 255, 127)
    Line (380, 255)-(305, 330), _RGB32(127, 255, 127)
    Line (305, 330)-(380, 330), _RGB32(127, 255, 127)
    Paint (350, 300), _RGB32(127, 255, 127)
    Line (380, 330)-(285, 405), _RGB32(127, 255, 127)
    Line (285, 405)-(380, 405), _RGB32(127, 255, 127)
    Paint (300, 400), _RGB32(127, 255, 127)
    Line (380, 405)-(265, 480), _RGB32(127, 255, 127)
    Line (265, 480)-(380, 480), _RGB32(127, 255, 127)
    Paint (300, 460), _RGB32(127, 255, 127)
    'Tip
    Paint (400, 195), _RGB32(127, 255, 127)
    'Star
    Line (390, 185)-(400, 160), _RGB32(255, 255, 255)
    Line (400, 160)-(410, 185), _RGB32(255, 255, 255)
    Line (410, 185)-(390, 170), _RGB32(255, 255, 255)
    Line (390, 170)-(410, 170), _RGB32(255, 255, 255)
    Line (410, 170)-(390, 185), _RGB32(255, 255, 255)
    'tinsel

    For am = 1 To 250
        tx = Int(Rnd * 800)
        ty = Int(Rnd * 595) + 205
        If Point(tx, ty) = _RGB32(127, 255, 127) Then
            tc1 = 244
            tc2 = 244
            tc3 = 244
            sz2 = Int(Rnd * 8) + 3
            For sz = .25 To sz2 Step .25
                tc1 = tc1 + 1
                tc2 = tc2 + 1
                tc3 = tc3 + 1
                Line (tx, ty)-(tx, ty + sz), _RGB32(tc1, tc2, tc3)
            Next sz
        End If
    Next am

    _Display
    Cls
    a$ = InKey$
    If a$ = Chr$(27) Then End
    If a$ = " " Then GoTo start
Loop

ground:
'Draw ground.
Randomize Timer
cc21 = Int(Rnd * 255)
cc22 = Int(Rnd * 200)
cc23 = Int(Rnd * 255)
Return

snow:
For t = 1 To 500
    x(t) = Rnd * 800
    y(t) = Rnd * 600
    size(t) = Rnd * 5
Next t
Return

Reply
#2
You are too modest. You only gave the tree 1-star. It deserves better! +1

MAGA Christmas,

Pete
Reply
#3
LOLOLOLOL
Reply
#4
Cute.  Thanks for sharing, and Merry Christmas to you also!

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#5
Fun! Merry Christmas Ken. Smile
  724  855  599  923  575  468  400  206  147  564  878  823  652  556 bxor cross forever
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  2025 and ANOTHER Tree! :) bplus 9 782 12-26-2025, 11:19 PM
Last Post: Pete
  2025 Count "Santa"s and "elf"s One Word Search bplus 2 304 12-24-2025, 08:18 PM
Last Post: SierraKen
  Another Christmas Tree and Snow - With Music SierraKen 4 423 12-24-2025, 07:08 PM
Last Post: SierraKen
  2025 Musical Christmas card to everyone Dav 5 566 12-21-2025, 10:40 PM
Last Post: SierraKen
  Dav's Christmas 2025 Demo Dav 13 1,148 12-06-2025, 01:21 AM
Last Post: Dav

Forum Jump:


Users browsing this thread: 1 Guest(s)