09-20-2025, 12:01 AM
+1 Man you really got into this! Hopefully your personal attention and interest is worth more than a point.
There is a point where a graphics screen starts to make sense for making enhancements, maybe 150-200 LOC even for old dogs that dont like learning new tricks.
Here take my spaceship out for a spin:
There is a point where a graphics screen starts to make sense for making enhancements, maybe 150-200 LOC even for old dogs that dont like learning new tricks.

Here take my spaceship out for a spin:
Code: (Select All)
Screen _NewImage(1024, 700, 32)
_Delay .25
_ScreenMove _Middle
Dim sc As _Unsigned Long ' ship color
sc = _RGB32(Rnd * 215 + 40, Rnd * 255, Rnd * 255)
_MouseHide
Do
Cls
lc = lc + 1 'loop counter
If lc > 3 * 60 Then sc = _RGB32(Rnd * 215 + 40, Rnd * 255, Rnd * 255): lc = 0 'every 3 secs change ship color
While _MouseInput: Wend
drawShip _MouseX, _MouseY, sc ' here is how to call drawShip easier than using circle
'drawShip _WIDTH / 2, _HEIGHT / 2, sc
_Display
_Limit 60
Loop Until _KeyDown(27)
Sub drawShip (x, y, colr As _Unsigned Long) 'shipType collisions same as circle x, y radius = 30
Static ls
Dim light As Long, r As Long, g As Long, b As Long
r = _Red32(colr): g = _Green32(colr): b = _Blue32(colr)
fellipse x, y, 6, 15, _RGB32(r, g - 120, b - 100)
fellipse x, y, 18, 11, _RGB32(r, g - 60, b - 50)
fellipse x, y, 30, 7, _RGB32(r, g, b)
For light = 0 To 5
fcirc x - 30 + 11 * light + ls, y, 1, _RGB32(ls * 50, ls * 50, ls * 50)
Next
ls = ls + 1
If ls > 5 Then ls = 0
End Sub
' ======== helper subs for drawShip that you can use for other things specially fcirc = fill_circle x, y, radius, color
Sub fellipse (CX As Long, CY As Long, xr As Long, yr As Long, C As _Unsigned Long)
If xr = 0 Or yr = 0 Then Exit Sub
Dim h2 As _Integer64, w2 As _Integer64, h2w2 As _Integer64
Dim x As Long, y As Long
w2 = xr * xr: h2 = yr * yr: h2w2 = h2 * w2
Line (CX - xr, CY)-(CX + xr, CY), C, BF
Do While y < yr
y = y + 1
x = Sqr((h2w2 - y * y * w2) \ h2)
Line (CX - x, CY + y)-(CX + x, CY + y), C, BF
Line (CX - x, CY - y)-(CX + x, CY - y), C, BF
Loop
End Sub
Sub fcirc (x As Long, y As Long, R As Long, C As _Unsigned Long) 'vince version fill circle x, y, radius, color
Dim x0 As Long, y0 As Long, e As Long
x0 = R: y0 = 0: e = 0
Do While y0 < x0
If e <= 0 Then
y0 = y0 + 1
Line (x - x0, y + y0)-(x + x0, y + y0), C, BF
Line (x - x0, y - y0)-(x + x0, y - y0), C, BF
e = e + 2 * y0
Else
Line (x - y0, y - x0)-(x + y0, y - x0), C, BF
Line (x - y0, y + x0)-(x + y0, y + x0), C, BF
x0 = x0 - 1: e = e - 2 * x0
End If
Loop
Line (x - R, y)-(x + R, y), C, BF
End Sub
724 855 599 923 575 468 400 206 147 564 878 823 652 556 bxor cross forever

