Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
New Years Eve Fireworks!
#1
I experimented a lot this afternoon and came up with this. 
Happy New Years!

Edit: This version doesn't have the fireworks sound and isn't as good as one in a zip file a couple replies down. 

Code: (Select All)

Screen _NewImage(800, 600, 32)

oldstart = 0
pi = _Pi
oldx = 0
oldy = 0
ch = 15
_Title "SierraKen's Fireworks Show!"
Randomize Timer
Do
    For changes = 1 To ch
        r = Rnd * 255
        g = Rnd * 255
        b = Rnd * 255
        For d = 200 To Rnd * 200 Step -.02
            s = s + (Rnd + 10)
            x = Cos(s * pi / 180) * d
            y = Sin(s * pi / 180) * d
            For sz = .1 To 1 Step .1
                Circle (x + oldx + 400, y + oldy + 300), sz, _RGB32(r, g, b)
            Next sz
        Next d
        oldx = x
        oldy = y
        Sound 1000, .2
        _Delay .1
        Line (0, 0)-(800, 600), _RGB32(0, 0, 0, 15), BF
    Next changes
    For t = 1 To 8
        Line (0, 0)-(800, 600), _RGB32(0, 0, 0, 50), BF
        _Delay .2
    Next t
    _Delay Rnd * 1.2
    a = a + 1
    If a = 30 Then
        ch = 200
        s = 2
    End If
    If a = 31 Then End
    Cls
Loop Until InKey$ <> ""
Reply
#2
Here's my review:
https://qb64phoenix.com/forum/showthread...=fireworks
b = b + ...
Reply
#3
Nice display!

Could add a Explosion.wav file to make firework sounds?

Erik.
Reply
#4
Thanks for the idea Eoredson! I just found a fireworks mp3 and edited it a bit to fit my fireworks show. Here is the zip file with the .bas program and .mp3 file, put both in the same folder.

The zip file is: Ken's Firework Show 2024.zip

Edit: Adding trails, the zip will be on the next reply.
Reply
#5
Here is the new and improved fireworks show. It has trails and they mostly go toward the direction of most of the explosions. I also changed the graphics a little bit to look a little better. 

Here is the zip file, named Ken's Firework Show 2024.zip


Attached Files
.zip   Ken's Firework Show 2024.zip (Size: 2.41 MB / Downloads: 6)
Reply
#6
Experiment: your program inside topic


.bas   feuer.bas (Size: 739 bytes / Downloads: 44)

Code: (Select All)
[qbjs]https://qbjs.org/?mode=auto&src=https://qb64phoenix.com/forum/attachment.php?aid=ABCD[/qbjs]



.bas   2025.bas (Size: 3.14 KB / Downloads: 44)



Code: (Select All)
[qbjs]https://qbjs.org/?mode=auto&src=https://qb64phoenix.com/forum/attachment.php?aid=ABCD[/qbjs]
Include your program into collection

https://qb64phoenix.com/forum/showthread...8#pid30588
Write name of program in 1st line to copy & paste & save filename.bas
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic

Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself
Reply
#7
Awesome concept. I'm guessing it can't use mp3's so you used my first version.
Reply
#8
I found some more! see here:
https://qb64phoenix.com/forum/showthread...5#pid30875

reply #6
b = b + ...
Reply




Users browsing this thread: 1 Guest(s)