QBJS Swimming fish with Kelp
#18
(08-17-2023, 12:14 AM)bplus Wrote: parallax? are you referring to the underwater effect made by changing the letters in the kelp? 

Quote:@bplus my goodness you are so talented. 134 lines, and it's endlessly entertaining.

how the hell do you consistently keep making amazing stuff so small?

@grymmjack you might like this if you haven't seen it yet. (We were discussing at another forum dbox has really nice fix with pset for QBJS but here is QB64 version:

Particle Fountain (42 LOC):
Code: (Select All)
_Title "Particle Fountain" 'b+ 2020-08-27
Const nP = 50000
Type particle
    x As Single
    y As Single
    dx As Single
    dy As Single
    r As Single
    c As _Unsigned Long
End Type
Dim Shared p(1 To nP) As particle
Screen _NewImage(800, 600, 32)
_Delay .25
_ScreenMove _Middle
For i = 1 To nP
    new i
Next
Color , &HFF002200
Do
    Cls
    If lp < nP Then lp = lp + 100
    For i = 1 To lp
        p(i).dy = p(i).dy + .1
        p(i).x = p(i).x + p(i).dx
        p(i).y = p(i).y + p(i).dy
        If p(i).x < 0 Or p(i).x > _Width Then new i
        If p(i).y > _Height And p(i).dy > 0 Then
            p(i).dy = -.75 * p(i).dy: p(i).y = _Height - 5
        End If
        Circle (p(i).x, p(i).y), p(i).r, p(i).c
    Next
    _Display
    _Limit 60
Loop Until _KeyDown(27)
Sub new (i)
    p(i).x = _Width / 2 + Rnd * 20 - 10
    p(i).y = _Height + Rnd * 5
    p(i).dx = Rnd * 1 - .5
    p(i).dy = -10
    p(i).r = Rnd * 3
    p(i).c = _RGB32(50 * Rnd + 165, 50 * Rnd + 165, 255)
End Sub
  i never knew about _title, crap!
Reply


Messages In This Thread
QBJS Swimming fish with Kelp - by bplus - 08-15-2023, 02:37 AM
RE: QBJS Swimming fish with Kelp - by dbox - 08-15-2023, 12:06 PM
RE: QBJS Swimming fish with Kelp - by bplus - 08-15-2023, 12:19 PM
RE: QBJS Swimming fish with Kelp - by dbox - 08-15-2023, 12:53 PM
RE: QBJS Swimming fish with Kelp - by bplus - 08-15-2023, 01:07 PM
RE: QBJS Swimming fish with Kelp - by dbox - 08-15-2023, 01:23 PM
RE: QBJS Swimming fish with Kelp - by bplus - 08-15-2023, 02:41 PM
RE: QBJS Swimming fish with Kelp - by dbox - 08-15-2023, 04:27 PM
RE: QBJS Swimming fish with Kelp - by CharlieJV - 08-15-2023, 05:01 PM
RE: QBJS Swimming fish with Kelp - by dbox - 08-15-2023, 06:38 PM
RE: QBJS Swimming fish with Kelp - by dbox - 08-17-2023, 04:54 PM
RE: QBJS Swimming fish with Kelp - by grymmjack - 08-17-2023, 12:00 AM
RE: QBJS Swimming fish with Kelp - by CharlieJV - 08-18-2023, 11:24 PM
RE: QBJS Swimming fish with Kelp - by grymmjack - 08-17-2023, 12:06 AM
RE: QBJS Swimming fish with Kelp - by bplus - 08-17-2023, 12:14 AM
RE: QBJS Swimming fish with Kelp - by grymmjack - 08-17-2023, 01:20 AM
RE: QBJS Swimming fish with Kelp - by animegame - 08-18-2023, 06:51 PM
RE: QBJS Swimming fish with Kelp - by grymmjack - 08-17-2023, 01:21 AM
RE: QBJS Swimming fish with Kelp - by bplus - 08-17-2023, 07:52 AM
RE: QBJS Swimming fish with Kelp - by bplus - 08-18-2023, 07:50 PM
RE: QBJS Swimming fish with Kelp - by vince - 08-28-2023, 12:43 PM



Users browsing this thread: 7 Guest(s)