Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Screen Savers
#1
Screen Savers - you are welcome to post your own favorites in this thread!
________________________________________________________________________________________________

Pete's post of The Bob's Mystic version of a Screen Saver brought back memories of my own version and even today I continue to Modify. I didn't want to go Full Screen on this one because the Title bar has help for keys you can press to play with screen saver a bit add or subtract triangles, draw a mirror image and not toggle, change color scheme (Plasma of Course!)

Code: (Select All)
_Title "Mystic Memories by bplus, d toggles duplicate on/off, spacebar resets color, m = more, l = less triangles"
'posted 2017-09-29 for QB64, Mystic screen saver as I remember it plus...
' 2022-04-26 fix up a few things for post
Randomize Timer
Const xmax = 1280
Const ymax = 720

Type point
    x As Integer
    y As Integer
    dx As Single
    dy As Single
End Type
Common Shared pR, pG, pB, cN
Randomize Timer
Screen _NewImage(xmax, ymax, 32)
_ScreenMove 60, 0

Dim tri(2) As point
For i = 0 To 2
    newPoint tri(i)
Next
Dim saveP1 As point
Dim saveP2 As point
Dim saveP3 As point
saveP1 = tri(0): saveP2 = tri(1): saveP3 = tri(2)
dmode = 0: nT = 50
resetPlasma
While _KeyDown(27) = 0
    Cls , 0
    cN = cN - nT
    tri(0) = saveP1: tri(1) = saveP2: tri(2) = saveP3
    For i = 0 To 2
        updatePoint tri(i)
    Next
    saveP1 = tri(0): saveP2 = tri(1): saveP3 = tri(2)
    For j = 1 To nT
        For i = 0 To 2
            updatePoint tri(i)
        Next
        changePlasma
        For i = 0 To 2
            Line (tri(i).x, tri(i).y)-(tri((i + 1) Mod 3).x, tri((i + 1) Mod 3).y)
        Next
        If dmode Then
            For i = 0 To 2
                Line (xmax - tri(i).x, ymax - tri(i).y)-(xmax - tri((i + 1) Mod 3).x, ymax - tri((i + 1) Mod 3).y)
            Next
        End If
    Next
    _Display

    'The following commented code worked (works) like a charm
    k$ = InKey$
    If k$ = " " Then
        resetPlasma
    ElseIf k$ = "d" Then
        dmode = Not dmode
    ElseIf k$ = "m" Then
        nT = nT + 1: If nT > 500 Then nT = 500
    ElseIf k$ = "l" Then
        nT = nT - 1: If nT < 1 Then nT = 1
    End If

    _Limit 10
Wend

Sub newPoint (p As point)
    p.x = Rnd * xmax
    p.y = Rnd * ymax
    p.dx = (Rnd * 10 + 1) * rdir
    p.dy = (Rnd * 6 + 1) * rdir
End Sub

Sub updatePoint (p As point)
    If p.x + p.dx < 0 Then p.dx = p.dx * -1
    If p.y + p.dy < 0 Then p.dy = p.dy * -1
    If p.x + p.dx > xmax Then p.dx = p.dx * -1
    If p.y + p.dy > ymax Then p.dy = p.dy * -1
    p.x = p.x + p.dx
    p.y = p.y + p.dy
End Sub

Sub changePlasma ()
    cN = cN + 1
    Color _RGB(127 + 127 * Sin(pR * .5 * cN), 127 + 127 * Sin(pG * .5 * cN), 127 + 127 * Sin(pB * .5 * cN))
End Sub

Sub resetPlasma ()
    pR = Rnd ^ 2: pG = Rnd ^ 2: pB = Rnd ^ 2
End Sub

Function rdir% ()
    If Rnd < .5 Then rdir% = -1 Else rdir% = 1
End Function

A similar thing with rectangles but not as elegant I think:
Code: (Select All)
_Title " *** Screen Saver #3 - Mystic Rectangles *** " ' by bplus 2018-03-01
' 2022-04-26 a couple mod before posting again use full screen and alpha coloring

' translated from
' Screen Saver #3 Mystic Rectangles.bas SmallBASIC 0.12.11 (B+=MGA) 2018-02-28
' instead of wire frame triangles try solid color rectangles
' arrays? we don't need no dang arrays!
' oh to share everything use GOSUBs instead of SUBs

'====================================================================================

'                  spacebar will switch the color scheme

'====================================================================================

Randomize Timer
Const xmax = 1024
Const ymax = 572
Screen _NewImage(xmax, ymax, 32)
'_ScreenMove 100, 20
_FullScreen
nT = 50 'number of Things per screen
GoSub newRect
savex1 = x1: savey1 = y1: savedx1 = dx1: savedy1 = dy1
savex2 = x2: savey2 = y2: savedx2 = dx2: savedy2 = dy2
cN = nT
GoSub resetPlasma
While _KeyDown(27) = 0
    Cls

    'reset color Number back to beginning + 1
    cN = cN - nT + 1

    'reset rect back to beginning and then update it once and save this for next round
    x1 = savex1: y1 = savey1: dx1 = savedx1: dy1 = savedy1
    x2 = savex2: y2 = savey2: dx2 = savedx2: dy2 = savedy2
    GoSub updateRect
    savex1 = x1: savey1 = y1: savedx1 = dx1: savedy1 = dy1
    savex2 = x2: savey2 = y2: savedx2 = dx2: savedy2 = dy2

    For j = 1 To nT
        GoSub updateRect
        GoSub changePlasma
        Line (x1 - 12, y1 - 7)-(x2, y2), , B
        'inverse image and color
        xx1 = xmax - x1: yy1 = ymax - y1
        xx2 = xmax - x2: yy2 = ymax - y2
        If xx1 > xx2 Then Swap xx1, xx2
        If yy1 > yy2 Then Swap yy1, yy2
        Line (xx1 - 12, yy1 - 7)-(xx2, yy2), invColor&&, B
    Next
    _Display
    _Limit 60
    'k$ = InKey$
    'If k$ = " " Then GoSub resetPlasma
    If _KeyDown(32) Then GoSub resetPlasma
Wend
System

newRect:
x1 = Rnd * xmax
y1 = Rnd * ymax
dx1 = (Rnd * 9 + 3) * rdir
dy1 = (Rnd * 5 + 2) * rdir
x2 = Rnd * xmax
y2 = Rnd * ymax
dx2 = (Rnd * 9 + 3) * rdir
dy2 = (Rnd * 5 + 2) * rdir
'keep x1, y1 the lesser corner and x2, y2 the greater
If x1 > x2 Then Swap x1, x2: Swap dx1, dx2
If y1 > y2 Then Swap y1, y2: Swap dy1, dy2
Return

updateRect:
If x1 + dx1 < 0 Then dx1 = -dx1
If x1 + dx1 > xmax Then dx1 = -dx1
x1 = x1 + dx1
If y1 + dy1 < 0 Then dy1 = -dy1
If y1 + dy1 > ymax Then dy1 = -dy1
y1 = y1 + dy1
If x2 + dx2 < 0 Then dx2 = -dx2
If x2 + dx2 > xmax Then dx2 = -dx2
x2 = x2 + dx2
If y2 + dy2 < 0 Then dy2 = -dy2
If y2 + dy2 > ymax Then dy2 = -dy2
y2 = y2 + dy2
'keep x1, y1 the lesser corner and x2, y2 the greater
If x1 > x2 Then Swap x1, x2: Swap dx1, dx2
If y1 > y2 Then Swap y1, y2: Swap dy1, dy2
Return

changePlasma:
cN = cN + 1
Color _RGB32(127 + 127 * Sin(pR * .5 * cN), 127 + 127 * Sin(pG * .5 * cN), 127 + 127 * Sin(pB * .5 * cN))
invColor&& = _RGB32(255 - (127 + 127 * Sin(pR * .5 * cN)), 255 - (127 + 127 * Sin(pG * .5 * cN)), 255 - (127 + 17 * Sin(pB * .5 * cN)))
Return

resetPlasma:
pR = Rnd ^ 2: pG = Rnd ^ 2: pB = Rnd ^ 2
Return

Function rdir ()
    If Rnd < .5 Then rdir = -1 Else rdir = 1
End Function


Attached Files Image(s)
               
b = b + ...
Reply
#2
Here's something I found collecting dust.  Made it when I started playing around with RotoZoom3.  Generates pages of clusters of balls and spins them around in various size, speed and transparency.

- Dav

Code: (Select All)
'====================
'SWIRLINGCLUSTERS.BAS
'====================
'Swirling clusters of colored balls
'Code by Dav, FEB/2021
'(I didn't make RotoZoom3 SUB)

SCREEN _NEWIMAGE(800, 800, 32)

RANDOMIZE TIMER

NumberOfClusters = 30
DIM Cluster(NumberOfClusters) AS LONG

ballsize = 20
balls = 80
FOR d = 1 TO NumberOfClusters
    Cluster(d) = _NEWIMAGE(_WIDTH, _HEIGHT, 32)
    _DEST Cluster(d)
    FOR i = 1 TO balls
        x = RND * _WIDTH
        IF x < ballsize * 2 THEN x = x + (ballsize * 2)
        y = RND * _HEIGHT
        IF y < ballsize * 2 THEN y = y + (ballsize * 2)
        ball x, y, RND * ballsize, RND * 128, RND * 128, 255, RND * 150
    NEXT
NEXT

_DEST 0

DIM ClusterX(NumberOfClusters), ClusterY(NumberOfClusters), ClusterSize(NumberOfClusters)
DIM ClusterRotate(NumberOfClusters), ClusterSpeed(NumberOfClusters)

FOR G = 1 TO NumberOfClusters
    ClusterX(G) = RND * _WIDTH
    ClusterY(G) = RND * _HEIGHT
    ClusterSize(G) = RND * 1.3
    ClusterRotate(G) = 2
    ClusterSpeed(G) = RND * 2
NEXT

DO
    CLS , _RGB(0, 0, 64)
    FOR G = 1 TO NumberOfClusters
        RotoZoom3 ClusterX(G), ClusterY(G), Cluster(G), ClusterSize(G), ClusterSize(G), _D2R(ClusterRotate(G))
        ClusterRotate(G) = ClusterRotate(G) + ClusterSpeed(G): IF ClusterRotate(G) > 360 THEN ClusterRotate(G) = 1
    NEXT
    _DISPLAY
    _LIMIT 30
LOOP UNTIL INKEY$ <> ""

FOR d = 1 TO NumberOfClusters
    _FREEIMAGE Cluster(d)
NEXT

END

' Description:
' Started from a mod of Galleon's in Wiki that both scales and rotates an image.
' This version scales the x-axis and y-axis independently allowing rotations of image just by changing X or Y Scales
' making this tightly coded routine a very powerful and versatile image tool.
SUB RotoZoom3 (X AS LONG, Y AS LONG, Image AS LONG, xScale AS SINGLE, yScale AS SINGLE, radianRotation AS SINGLE)
    ' This assumes you have set your drawing location with _DEST or default to screen.
    ' X, Y - is where you want to put the middle of the image
    ' Image - is the handle assigned with _LOADIMAGE
    ' xScale, yScale - are shrinkage < 1 or magnification > 1 on the given axis, 1 just uses image size.
    ' These are multipliers so .5 will create image .5 size on given axis and 2 for twice image size.
    ' radianRotation is the Angle in Radian units to rotate the image
    ' note: Radian units for rotation because it matches angle units of other Basic Trig functions
    '       and saves a little time converting from degree.
    '       Use the _D2R() function if you prefer to work in degree units for angles.

    DIM px(3) AS SINGLE: DIM py(3) AS SINGLE ' simple arrays for x, y to hold the 4 corners of image
    DIM W&, H&, sinr!, cosr!, i&, x2&, y2& '   variables for image manipulation
    W& = _WIDTH(Image&): H& = _HEIGHT(Image&)
    px(0) = -W& / 2: py(0) = -H& / 2 'left top corner
    px(1) = -W& / 2: py(1) = H& / 2 ' left bottom corner
    px(2) = W& / 2: py(2) = H& / 2 '  right bottom
    px(3) = W& / 2: py(3) = -H& / 2 ' right top
    sinr! = SIN(-radianRotation): cosr! = COS(-radianRotation) ' rotation helpers
    FOR i& = 0 TO 3 ' calc new point locations with rotation and zoom
        x2& = xScale * (px(i&) * cosr! + sinr! * py(i&)) + X: y2& = yScale * (py(i&) * cosr! - px(i&) * sinr!) + Y
        px(i&) = x2&: py(i&) = y2&
    NEXT
    _MAPTRIANGLE _SEAMLESS(0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image TO(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
    _MAPTRIANGLE _SEAMLESS(0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image TO(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
END SUB

SUB ball (BallX, BallY, size, r&, g&, b&, a&)
    FOR s = 1 TO size STEP .2
        CIRCLE (BallX, BallY), s, _RGBA(r&, g&, b&, a&)
        r& = r& - 2: g& = g& - 2: b& = b& - 2
    NEXT
END SUB

Find my programs here in Dav's QB64 Corner
Reply
#3
Cool! a little like galaxy clusters of our universe I imagine, though they might not overlap so much.

Thanks! (Allot of these screen shots don't do justice to the animation in the program.)

[Image: Swirling-Clusters-by-Dav.png]
b = b + ...
Reply
#4
Ah Curlie Borealis makes a nice screen saver!

Code: (Select All)
_Title "Curlie Borealis" 'Quick trans B+ 2019-08-29
'Curlie borealis.bas for SmallBASIC 0.12.2 [B+=MGA] 2016-04-23
' ;-) cool mods thanks to alpha

Const xmax = 1200, ymax = 700
Dim Shared qb(15)
qb(0) = &HFF000000
qb(1) = &HFF000088
qb(2) = &HFF008800
qb(3) = &HFF008888
qb(4) = &HFF88000
qb(5) = &HFF880088
qb(6) = &HFF888800
qb(7) = &HFFCCCCCC
qb(8) = &HFF888888
qb(9) = &HFF0000FF
qb(10) = &HFF00FF00
qb(11) = &HFF00FFFF
qb(12) = &HFFFF0000
qb(13) = &HFFFF00FF
qb(14) = &HFFFFFF00
qb(15) = &HFFFFFFFF

Screen _NewImage(1200, 700, 32)
_ScreenMove 100, 20
_FullScreen

Randomize Timer
ff = 2.03: maxi = 25000
Color &HFFFFFFFF, 0: Cls
x = xmax / 2: y = ymax / 2
While _KeyDown(27) = 0
    loopcnt = loopcnt + 1
    Line (0, 0)-(xmax, ymax), _RGBA(0, 0, 0, 3), BF 'Fells trick
    ff = ff + 100.431
    If Rnd < .1 Then c = 0 Else c = Int(Rnd * 16) 'need more black oh ALPHA my friend!!!
    For i = 0 To maxi
        f = f + ff
        x = min(xmax, -1 * x + Cos(f * i))
        y = min(ymax, -1 * y + Sin(f * i))
        PSet (x, y), qb(c)
    Next
    cc = cc + 1
    If loopcnt Mod 1000 = 0 Then
        Locate 1, 1: Print Space$(10)
        Locate 1, 1: Print loopcnt: _Delay 1
    End If
    If loopcnt Mod 1800 = 0 Then x = xmax / 2: y = ymax / 2: ff = 0: f = 0 'jiggle this sucker
    If Rnd < .001 Then Paint (Rnd * xmax, Rnd * ymax), _RGBA(Rnd * 255, Rnd * 255, Rnd * 255, Rnd * 255)
    _Display
    _Limit 200 'oh man my fan is hot
Wend

Function min (a, b)
    If a < b Then min = a Else min = b
End Function


[Image: Curlie-Borealis.png]

Eye Candy #9B

Code: (Select All)
_Title " Eye Candy #9B Closer" ' b+ 2022-03-09
DefDbl A-Z
xmax = _DesktopWidth: ymax = _DesktopHeight
Screen _NewImage(xmax, ymax, 32)
_ScreenMove 0, 0
xc = xmax / 2
yc = ymax / 2
diag = Sqr(xc * xc + yc * yc)
p2 = _Pi * 2
Dim colr(-100 To diag + 1000) As _Unsigned Long
Dim Shared cN, pR, pG, pB
While 1
    resetPlasma
    For i = -100 To diag + 1000
        colr(i) = Plasma~&
    Next

    ro = 950: s = 0
    While ro > -50 And _KeyDown(27) = 0
        k$ = InKey$
        If Len(k$) Then Exit While
        Cls
        For a = 0 To p2 / 64 Step p2 / (16 * 360)
            i = 50 * Sin(s) ' 2 * s or just s
            For r = 0 To diag
                PSet (xc + r * Cos(a), yc + r * Sin(a)), colr(r + i + ro)
            Next
            s = s + p2 / 180
        Next
        sx1 = xc: sy1 = yc: sx2 = xc + diag * Cos(.002): sy2 = yc + diag * Sin(.002): sx3 = xc + diag * Cos(p2 / 64 - .002): sy3 = yc + diag * Sin(p2 / 64 - .002)
        For a = p2 / 64 To p2 - p2 / 64 Step p2 / 64
            dx1 = xc: dy1 = yc: dx2 = xc + diag * Cos(a): dy2 = yc + diag * Sin(a): dx3 = xc + diag * Cos(a + p2 / 64): dy3 = yc + diag * Sin(a + p2 / 64)
            _MapTriangle (sx1, sy1)-(sx2, sy2)-(sx3, sy3), source& To(dx1, dy1)-(dx2, dy2)-(dx3, dy3), 0
        Next
        Line (0, 0)-(xc - 1.5 * yc, _Height), &HFF000000, BF
        Line (xc + 1.5 * yc, 0)-(_Width, _Height), &HFF000000, BF
        toggle = 1 - toggle
        If toggle Then _Display
        '_Limit 80
        ro = ro - 1
    Wend
    If _KeyDown(27) Then System
Wend

Function Plasma~& ()
    cN = cN + .2
    Plasma~& = _RGB32(127 + 127 * Sin(pR * cN), 127 + 127 * Sin(pG * cN), 127 + 127 * Sin(pB * cN))
End Function

Sub resetPlasma ()
    pR = Rnd ^ 2: pG = Rnd ^ 2: pB = Rnd ^ 2
End Sub

Eye Candy #9B?
[Image: Eye-Candy-9-B.png]
b = b + ...
Reply
#5
Here's another Screen Saver using RotoZoom.  Click on the mouse buttons to zoom gears in and out.  I used BASIMAGE to include the pic.  Making this I realized that .PNG images can be 16 color and still maintain transparency info, so on simple small images like this one I can lower them to 16 colors instead of 256 and reduce the pic size.  That's helpful when including images in code.

- Dav


Code: (Select All)
'================
'ROTOZOOMGEAR.BAS
'================
'Showcase speed of RotoZoom3 Function(not by me) by
'rotating a number of gears on the screen in various sizes.
'Coded by Dav

'Push Mouse Buttons for Zoom effects

SCREEN _NEWIMAGE(700, 700, 32)

gear& = BASIMAGE1& 'decode image included this BAS code

NumOfGears = 11 'number of gears shown on screen

DIM Gearx(NumOfGears), Geary(NumOfGears), GearSize(NumOfGears)
DIM GearRot(NumOfGears), GearSpeed(NumOfGears), GearDir(NumOfGears)

'assign random values for each gear
FOR G = 1 TO NumOfGears
    Gearx(G) = _WIDTH / 2
    Geary(G) = _HEIGHT / 2
    GearSize(G) = .1 + G / 2
    GearRot(G) = 1
    GearSpeed(G) = RND * 2.5
    GearDir(G) = INT(RND * 2)
NEXT

DO
    CLS , _RGB(0, 0, 64)
    FOR G = NumOfGears TO 1 STEP -1
        RotoZoom3 Gearx(G), Geary(G), gear&, GearSize(G), GearSize(G), _D2R(GearRot(G))
        IF GearDir(G) = 1 THEN
            GearRot(G) = GearRot(G) + GearSpeed(G): IF GearRot(G) > 360 THEN GearRot(G) = 1
        ELSE
            GearRot(G) = GearRot(G) - GearSpeed(G): IF GearRot(G) < 1 THEN GearRot(G) = 360
        END IF
        mi = _MOUSEINPUT
        IF _MOUSEBUTTON(1) THEN GearSize(G) = GearSize(G) + .1
        IF _MOUSEBUTTON(2) THEN GearSize(G) = GearSize(G) - .1
        IF GearSize(G) > 19 THEN GearSize(G) = .1
        IF GearSize(G) < .1 THEN GearSize(G) = 19
    NEXT
    _DISPLAY
    _LIMIT 30
LOOP UNTIL INKEY$ <> ""

_FREEIMAGE gear&

END

' Description:
' Started from a mod of Galleon's in Wiki that both scales and rotates an image.
' This version scales the x-axis and y-axis independently allowing rotations of image just by changing X or Y Scales
' making this tightly coded routine a very powerful and versatile image tool.
SUB RotoZoom3 (X AS LONG, Y AS LONG, Image AS LONG, xScale AS SINGLE, yScale AS SINGLE, radianRotation AS SINGLE)
    ' This assumes you have set your drawing location with _DEST or default to screen.
    ' X, Y - is where you want to put the middle of the image
    ' Image - is the handle assigned with _LOADIMAGE
    ' xScale, yScale - are shrinkage < 1 or magnification > 1 on the given axis, 1 just uses image size.
    ' These are multipliers so .5 will create image .5 size on given axis and 2 for twice image size.
    ' radianRotation is the Angle in Radian units to rotate the image
    ' note: Radian units for rotation because it matches angle units of other Basic Trig functions
    '       and saves a little time converting from degree.
    '       Use the _D2R() function if you prefer to work in degree units for angles.

    DIM px(3) AS SINGLE: DIM py(3) AS SINGLE ' simple arrays for x, y to hold the 4 corners of image
    DIM W&, H&, sinr!, cosr!, i&, x2&, y2& '   variables for image manipulation
    W& = _WIDTH(Image&): H& = _HEIGHT(Image&)
    px(0) = -W& / 2: py(0) = -H& / 2 'left top corner
    px(1) = -W& / 2: py(1) = H& / 2 ' left bottom corner
    px(2) = W& / 2: py(2) = H& / 2 '  right bottom
    px(3) = W& / 2: py(3) = -H& / 2 ' right top
    sinr! = SIN(-radianRotation): cosr! = COS(-radianRotation) ' rotation helpers
    FOR i& = 0 TO 3 ' calc new point locations with rotation and zoom
        x2& = xScale * (px(i&) * cosr! + sinr! * py(i&)) + X: y2& = yScale * (py(i&) * cosr! - px(i&) * sinr!) + Y
        px(i&) = x2&: py(i&) = y2&
    NEXT
    _MAPTRIANGLE _SEAMLESS(0, 0)-(0, H& - 1)-(W& - 1, H& - 1), Image TO(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
    _MAPTRIANGLE _SEAMLESS(0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), Image TO(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
END SUB


FUNCTION BASIMAGE1& 'gear.png
    v& = _NEWIMAGE(200, 200, 32)
    DIM m AS _MEM: m = _MEMIMAGE(v&)
    A$ = ""
    A$ = A$ + "haIkMn[Sd4[D5OR#8Q#2T09R9m:R9kRP0N08R744iTM3F9T#2N38UDNl^Lmb"
    A$ = A$ + "LfmgLjCifc^c<fmne1e^CgCgmhZLMLm7GfmUOoU;G>YCjT>YCjT>YCjT>YCj"
    A$ = A$ + "T>YCjT>YCjT>YCjT>YCJOjjWnCo;nSf#OLEc^=NBWd<8LDGlAS^SWe`gc9MB"
    A$ = A$ + "_BR7M?GoKGnmoKo;o=_Cok_mKOWn7o]oionoToQk`6Bh\4SmaWW]<jTneP\c"
    A$ = A$ + "\Iln6]ccXM?=<#3;8lASJ7oQ=Tg6hIMmC]WEknKooM\eKooWkdO]CjUAfIT>"
    A$ = A$ + "^d5o#gDGc0?WV>moi_kgl>]1O`kJ_WeOX=d\m#\FSnOo_nWNoknhI>KIh9mc"
    A$ = A$ + "U^n9Q;nGokn[OWT^HC7okR?JdOoOiOekd=ge>?[fmkhSoWOgOk7d9nhTNjde"
    A$ = A$ + "?9<1eYYNn=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G0kbKEbWIgWMB_NZgg>`mYi:_j:gMnVacam;Sege^][ROK??f3cOWd"
    A$ = A$ + "9i4?J`[E[kYD=N<dckb]_ggme=k^a`4JCdnSWcgkR7?YCj[BGn\VnhNgP_W5"
    A$ = A$ + "laMdiid8FgD9JXJj07Al1GSagL7cF6NBoLY[Ob[1;>78OLe3nLhlNciCoVi<"
    A$ = A$ + "LPWESH\7a[Nfb_CjW=eiKoZi:ReFRVG^fo7JN;6XM=dmOBWdSVfk:n^goGmI"
    A$ = A$ + "=Kib9MB?2jN^jIgF?YCjT>YCjT>YCjT>YCjT>YCjT>YCjT>YCjT>YCjT>Y3;"
    A$ = A$ + "moa[%%L2"
    btemp$ = ""
    FOR i& = 1 TO LEN(A$) STEP 4: B$ = MID$(A$, i&, 4)
        IF INSTR(1, B$, "%") THEN
            FOR C% = 1 TO LEN(B$): F$ = MID$(B$, C%, 1)
                IF F$ <> "%" THEN C$ = C$ + F$
            NEXT: B$ = C$: END IF: FOR j = 1 TO LEN(B$)
            IF MID$(B$, j, 1) = "#" THEN
        MID$(B$, j) = "@": END IF: NEXT
        FOR t% = LEN(B$) TO 1 STEP -1
            B& = B& * 64 + ASC(MID$(B$, t%)) - 48
            NEXT: X$ = "": FOR t% = 1 TO LEN(B$) - 1
            X$ = X$ + CHR$(B& AND 255): B& = B& \ 256
    NEXT: btemp$ = btemp$ + X$: NEXT
    btemp$ = _INFLATE$(btemp$,m.SIZE)
    _MEMPUT m, m.OFFSET, btemp$: _MEMFREE m
    BASIMAGE1& = _COPYIMAGE(v&): _FREEIMAGE v&
END FUNCTION

Find my programs here in Dav's QB64 Corner
Reply
#6
Hi @Steffan-68, sorry without the zip and proper loads of those files your posts don't work. How about just a clean pure code effort?

Everyone be careful with copy righted material, be sure to give credit if license requires it.

Honestly didn't expect Screen Savers to come with Image, Sound and Font files, but OK some people can really get into it! Smile

______________________________________________________________________________________________

Hi @Dav

Yeah, I like self contained single file, your gear image contained within. Looks like zooming out or zooming in lead to same? I luv gears.



[Image: image-2022-05-01-162627447.png]
b = b + ...
Reply
#7
Don't Attempt to Adjust Your Screen
Code: (Select All)
_Title "Scrolling Plasma Lines Mod 1" 'B+ 2019-10-09
Randomize Timer
xmax = _DesktopWidth - 1
ymax = _DesktopHeight - 1
Screen _NewImage(xmax, ymax, 32)
_FullScreen
Dim ln(0 To ymax) As _Unsigned Long
r = Rnd ^ 2: g = Rnd ^ 2: b = Rnd ^ 2
f = xmax / ymax
While _KeyDown(27) = 0
    If Rnd < .05 Then r = Rnd ^ 2: g = Rnd ^ 2: b = Rnd ^ 2
    For i = UBound(ln) - 1 To 0 Step -1
        ln(i + 1) = ln(i)
        Line (0, i)-Step(xmax, 0), ln(i + 1)
        Line (xmax - i * f, 0)-Step(0, ymax), ln(i + 1)
        Line (i * f, 0)-Step(f, ymax), ln(i + 1)
        Line (0, ymax - i)-Step(xmax, 0), ln(i + 1)
    Next
    ln(0) = _RGB32(127 + 127 * Sin(r * c), 127 + 127 * Sin(g * c), 127 + 127 * Sin(b * c), 40)
    c = c + 1
    _Display
    _Limit 60
Wend
b = b + ...
Reply
#8
nice effect
Reply
#9
Underwater Meditation
   

   

+ for more fish
- for less fish
Hope the swaying kelp doesn't make you seasick, I tried to make it subtle. Smile


Attached Files
.zip   Underwater Meditation.zip (Size: 1.68 MB / Downloads: 71)
b = b + ...
Reply
#10
Tanks Battle - The Movie
Code: (Select All)
_Title "Tanks Battle - The Movie" 'from  bplus 2018-02-03"
'from: Tanks Battle.sdlbas (B+=MGA) 2016-10-29
' let the projectiles fly!
' 2022-05-? fix color const for Sky
' 2022-05-09 Make a Movie / Screen Saver
Randomize Timer

'tank stuff
Const tN = 15 'number of tanks
Const tNm1 = tN - 1 ' for loops and arrays
Const tW = 20 'width of tank
Const tH = 8 'height of tank
Type tank
    x As Single
    y As Single
    da As Single
    v As Single 'velocity
    c As _Integer64 'color
    bx As Single 'barrel
    by As Single
    f As _Byte 'finished
End Type

'hole stuff
Const hR = tW + 3
Const topHole = 1000
Type hole
    x As Integer
    y As Integer
End Type

'projectile stuff
Const rightA = -10
Const leftA = -170
Const lVel = 7
Const hVel = 22
Const SkyC = &HFF848888~& ' try this for Rho
Const pC = &HFFFFFF00~&
Const gravity = .35

Dim Shared SW, SH
SW = _DesktopWidth
SH = _DesktopHeight

Screen _NewImage(SW, SH, 32)
_FullScreen

Dim Shared rad ' yeah don't need these with _D2R and _R2D but this was 4 years ago
rad = _Pi / 180

restart:
ReDim Shared tanks(tNm1) As tank, holes(topHole) As hole

'get holes set up
holeIndex = -1

land& = _NewImage(SW, SH, 32)
_Dest land&
drawLandscape
_Dest 0

initializeTanks
hotTank = tNm1

change = 1
While change 'get tanks landed before start shooting
    change = 0
    Cls
    _PutImage , land&, 0 'land the tanks and reland the tanks if the dirt is shot out under them
    For i = 0 To tNm1
        If Point(tanks(i).x + tW / 2, tanks(i).y + tH + 1) = SkyC Then
            tanks(i).y = tanks(i).y + 2
            change = 1
        End If
        drawTank i
    Next
    _Display
Wend

While _KeyDown(27) = 0 '< main loop start
    Cls
    _PutImage , land&, 0

    'the land with holes
    If holeIndex > -1 Then
        For ii = 0 To holeIndex
            drawHole holes(ii).x, holes(ii).y
        Next
    End If

    'reland the tanks if the dirt is shot out under them
    For i = 0 To tNm1
        If tanks(i).f = 0 Then
            While Point(tanks(i).x + tW / 2, tanks(i).y + tH + 1) = SkyC
                tanks(i).y = tanks(i).y + 2
            Wend

            'repoint barrels and reset velocitys
            If Rnd < .5 Then 'avoid straight up and down  suicide shots
                tanks(i).da = rand(leftA, -92)
            Else
                tanks(i).da = rand(rightA, -88)
            End If
            tanks(i).v = rand(lVel, hVel) 'velocity
            drawTank i
        End If
    Next
    _Display
    _Delay .1


    ''whose turn to shoot
    lastMan = hotTank
    hotTank = hotTank + 1
    hotTank = hotTank Mod tN
    While tanks(hotTank).f = 1 'look for a tank still alive
        hotTank = hotTank + 1 'whose turn to shoot
        hotTank = hotTank Mod tN
        'did we cycle through all the dead tanks?
        If hotTank = lastMan Then 'game over, last man standing
            _Display
            _Delay 5
            GoTo restart
        End If
    Wend

    'setup hotTank's shot
    rAngle = tanks(hotTank).da * rad 'convert here to radians for SIN and COS
    pX = tanks(hotTank).bx
    pY = tanks(hotTank).by
    pX_change = tanks(hotTank).v * Cos(rAngle) 'this is the cuurent  X vector of the projectile
    pY_change = tanks(hotTank).v * Sin(rAngle) ' this is the current Y vector of the projectile
    pActive = 0 ' do not Activate until projectile sees the skyC

    While 1
        pY_change = pY_change + gravity ' pY starts in upward direction but will eventually fall due to gravity
        pX = pX + pX_change
        pY = pY + pY_change

        'show projectile progress, hit or air
        If pX >= 0 And pX <= SW And pY <= SH Then ' still active
            'check for tank hit
            For iTank = 0 To tNm1
                If tanks(iTank).f <> 1 And pActive Then 'tanks can blow up themselves
                    If dist(pX, pY, tanks(iTank).x + tW / 2, tanks(iTank).y + tH / 2) < hR Then
                        tanks(iTank).f = 1
                        Color _RGB32(255, 0, 0)
                        For rr = 1 To hR
                            fcirc pX, pY, rr
                            _Display
                            _Delay .01
                            If rr Mod 2 Then
                                Color _RGB32(128, 255, 0)
                            Else
                                Color _RGB32(255, 0, 0)
                            End If
                        Next
                        If holeIndex < topHole Then
                            holeIndex = holeIndex + 1
                            holes(holeIndex).x = pX
                            holes(holeIndex).y = pY
                            drawHole pX, pY
                            _Display
                        End If
                        pX = SW + 10
                        pY = SH + 10
                        Exit While
                    End If
                End If
            Next

            If Point(pX, pY) = SkyC Then
                pActive = 1
                Color pC
                fcirc pX, pY, 2 ' <<<<<<<<<<<<<<<< to see round projectiles that could be replaced by image
            ElseIf pY < 0 Then
                'still hot but cant see
            ElseIf Point(pX, pY) <> SkyC And Point(pX, pY) <> pC And pActive Then 'hit ground?
                Color _RGB(255, 0, 0)
                For rr = 1 To hR
                    fcirc pX, pY, rr
                    _Display
                    _Delay .01
                    If rr Mod 2 Then
                        Color _RGB32(128, 255, 0)
                    Else
                        Color _RGB32(255, 0, 0)
                    End If
                Next
                If holeIndex < topHole Then
                    holeIndex = holeIndex + 1
                    holes(holeIndex).x = pX
                    holes(holeIndex).y = pY
                    drawHole pX, pY
                    _Display
                End If
                pX = SW + 10
                pY = SH + 10
                Exit While
            End If
        Else 'not active
            Exit While
        End If
        _Display
        _Delay .03
    Wend
Wend

Sub drawHole (xx, yy)
    Color SkyC
    For i = yy To 300 Step -1
        fcirc xx, i, hR
    Next
End Sub

Sub drawLandscape
    'the sky
    Line (0, 0)-(SW, SH), SkyC, BF

    'the land
    startH = SH - 100
    rr = 70: gg = 70: bb = 90
    For mountain = 1 To 6
        Xright = 0
        y = startH
        While Xright < SW
            ' upDown = local up / down over range, change along Y
            ' range = how far up / down, along X
            upDown = (Rnd * (.8) - .35) * (mountain * .5)
            range = Xright + rand%(15, 25) * 2.5 / mountain
            For x = Xright - 1 To range
                y = y + upDown
                Line (x, y)-(x + 1, SH), _RGB32(rr, gg, bb), BF
            Next
            Xright = range
        Wend
        rr = rand(rr - 15, rr): gg = rand(gg - 15, gg): bb = rand(bb - 25, bb)
        If rr < 0 Then rr = 0
        If gg < 0 Then gg = 0
        If bb < 0 Then bb = 0
        startH = startH + rand(5, 20)
    Next
End Sub

Sub initializeTanks ' x, y, barrel angle,  velocity, color
    tl = (SW - tW) / tN: tl2 = tl / 2: tl4 = .8 * tl2
    For i = 0 To tNm1
        tanks(i).x = rand%(tl2 + tl * i - tl4 - tW, tl2 + tl * i + tl4 - tW)
        tanks(i).y = 300 '<<<<<<<<<<<<<<<<<<<<<<<<<< for testing
        tanks(i).da = rand%(-180, 0) 'degree Angle
        tanks(i).v = rand%(10, 20) 'velocity
        If tanks(i).da < -90 Then 'barrel  is pointed left
            tanks(i).v = -1 * tanks(i).v
        End If
        tc = i * Int(200 / (3 * tN)) 'maximize color difference between tanks
        tanks(i).c = _RGB32(55 + 2 * tc, 13 + tc, 23 + tc) ' first tank is darkest
    Next
    'shuffle color order
    For i = tNm1 To 1 Step -1
        r = rand%(0, i)
        Swap tanks(i).x, tanks(r).x
    Next
End Sub

Sub drawTank (i)
    'ink(tanks(i, "c"))
    Color tanks(i).c
    'turret
    fEllipse tanks(i).x + tW / 2, tanks(i).y + tH / 3, tW / 4 + 1, tH / 4 + 1
    bX = tW / 2 * Cos(rad * tanks(i).da)
    bY = tW / 2 * Sin(rad * tanks(i).da)
    Line (tanks(i).x + tW / 2, tanks(i).y + tH / 3)-(tanks(i).x + tW / 2 + bX, tanks(i).y + tH / 4 + bY)
    Line (tanks(i).x + tW / 2 + 1, tanks(i).y + tH / 3 + 1)-(tanks(i).x + tW / 2 + bX + 1, tanks(i).y + tH / 4 + bY + 1)
    tanks(i).bx = tanks(i).x + tW / 2 + bX
    tanks(i).by = tanks(i).y + tH / 4 + bY
    fEllipse tanks(i).x + tW / 2, tanks(i).y + .75 * tH, tW / 2, tH / 4
    Color _RGB32(0, 0, 0)
    ellipse tanks(i).x + tW / 2, tanks(i).y + .75 * tH, tW / 2 + 1, tH / 4 + 1
    ellipse tanks(i).x + tW / 2 + 1, tanks(i).y + .75 * tH, tW / 2 + 1, tH / 4 + 1
End Sub

Function rand% (lo%, hi%)
    rand% = (Rnd * (hi% - lo% + 1)) \ 1 + lo%
End Function

Function rdir% ()
    If Rnd < .5 Then rdir% = -1 Else rdir% = 1
End Function

Function dist# (x1%, y1%, x2%, y2%)
    dist# = ((x1% - x2%) ^ 2 + (y1% - y2%) ^ 2) ^ .5
End Function

'Steve McNeil's  copied from his forum   note: Radius is too common a name
Sub fcirc (CX As Long, CY As Long, R As Long)
    Dim subRadius As Long, RadiusError As Long
    Dim X As Long, Y As Long

    subRadius = Abs(R)
    RadiusError = -subRadius
    X = subRadius
    Y = 0

    If subRadius = 0 Then PSet (CX, CY): Exit Sub

    ' Draw the middle span here so we don't draw it twice in the main loop,
    ' which would be a problem with blending turned on.
    Line (CX - X, CY)-(CX + X, CY), , BF

    While X > Y
        RadiusError = RadiusError + Y * 2 + 1
        If RadiusError >= 0 Then
            If X <> Y + 1 Then
                Line (CX - Y, CY - X)-(CX + Y, CY - X), , BF
                Line (CX - Y, CY + X)-(CX + Y, CY + X), , BF
            End If
            X = X - 1
            RadiusError = RadiusError - X * 2
        End If
        Y = Y + 1
        Line (CX - X, CY - Y)-(CX + X, CY - Y), , BF
        Line (CX - X, CY + Y)-(CX + X, CY + Y), , BF
    Wend
End Sub

Sub fEllipse (CX As Long, CY As Long, xRadius As Long, yRadius As Long)
    Dim scale As Single, x As Long, y As Long
    scale = yRadius / xRadius
    Line (CX, CY - yRadius)-(CX, CY + yRadius), , BF
    For x = 1 To xRadius
        y = scale * Sqr(xRadius * xRadius - x * x)
        Line (CX + x, CY - y)-(CX + x, CY + y), , BF
        Line (CX - x, CY - y)-(CX - x, CY + y), , BF
    Next
End Sub

Sub ellipse (CX As Long, CY As Long, xRadius As Long, yRadius As Long)
    Dim scale As Single, xs As Long, x As Long, y As Long
    Dim lastx As Long, lasty As Long
    scale = yRadius / xRadius: xs = xRadius * xRadius
    PSet (CX, CY - yRadius): PSet (CX, CY + yRadius)
    lastx = 0: lasty = yRadius
    For x = 1 To xRadius
        y = scale * Sqr(xs - x * x)
        Line (CX + lastx, CY - lasty)-(CX + x, CY - y)
        Line (CX + lastx, CY + lasty)-(CX + x, CY + y)
        Line (CX - lastx, CY - lasty)-(CX - x, CY - y)
        Line (CX - lastx, CY + lasty)-(CX - x, CY + y)
        lastx = x: lasty = y
    Next
End Sub

   
b = b + ...
Reply




Users browsing this thread: 2 Guest(s)