Objective is to land softly on level ground. Cancel the horizontal velocity
with left and right arrow, land by controlling the main thrust with up and
down arrow.
Has 10 surface features, including a McDonalds. Several flying features,
like a Death Star, Borg spacecraft, and black holes.
Most of the files, in the directories stars1-3, are optional, only called upon
if one turns on the stars with 1-4.
Originally written in QB4.5. Translated to QB64 it's much faster, which
allows all features to be active at once - stuff like fancy ground, stars,
a rotating Death Star, etc.
Take a trip down memory lane with /, which changes the display to green
screen, amber, or black & white.
Oy vey. I attached a .7z file twice, and don't see it.
Posted by: Pete - 04-27-2022, 01:32 AM - Forum: TheBOB
- No Replies
GFX256.bas by Bob Seguin. Description: Graphics-256 is a graphics/animation utility designed to create graphics specifically for programs written in QB64's 8-bit (256 color) screen. Files can be of any size.
Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-GFX256".
Install: Compile GFX256.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".
Posted by: Pete - 04-27-2022, 01:00 AM - Forum: TheBOB
- No Replies
Gothic.bas by Bob Seguin. Description: A simple demonstration of mask usage to create typed text with transparent background in QBasic for SCREEN 12.
Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Gothic".
Install: Compile Gothic.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".
Posted by: Pete - 04-27-2022, 12:35 AM - Forum: TheBOB
- No Replies
Halftone.bas by Bob Seguin
Code: (Select All)
'****************************************************************************
'
' HALFTONE.BAS: Bob Seguin - 2003 (freeware)
'
' A program to examine the possibilities of mixing the
' 16 basic palette colors in SCREEN 12 as halftones to
' provide more than 16 colors on the screen at one time.
'
' To use, send the sub program the left/top/right/bottom
' boundaries of the shape being halftoned along with
' ColorKEY and ToneCOLOR (the shape is in ColorKEY).
'
' NOTE: Follow row and column from the halftone to find the
' attribute numbers involved.
'
' Comments: (textury, but useful in certain applications,
' such as fabrics, wood, etc.)
'
'
'****************************************************************************
DEFINT A-Z
_TITLE "Halftone.bas by Bob Seguin"
DIM Box(1 TO 1600)
SCREEN 12
PALETTE 4, 63 'set default dark red to brightest red
LOCATE 2, 2: PRINT "0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15"
FOR x = 8 TO 384 STEP 24
GET (x, 16)-(x + 16, 28), Box(n + 1)
n = n + 100
NEXT x
CLS
FOR y = 0 TO 15
FOR x = 0 TO 15
LINE (x * 40, y * 30)-(x * 40 + 37, y * 30 + 27), y, BF
HalfTONE x * 40, y * 30, x * 40 + 37, y * 30 + 27, y, x
NEXT x
NEXT y
n = 0: y = 8
FOR x = 15 TO 611 STEP 40
IF x = 415 THEN x = 411
PUT (x, y), Box(n + 1)
n = n + 100
y = y + 30
NEXT x
DO: LOOP UNTIL INKEY$ <> ""
END
SUB HalfTONE (x1, y1, x2, y2, ColorKEY, ToneCOLOR)
FOR x = x1 TO x2 STEP 2
FOR y = y1 TO y2 STEP 2
IF POINT(x, y) = ColorKEY THEN PSET (x, y), ToneCOLOR
IF POINT(x + 1, y + 1) = ColorKEY THEN PSET (x + 1, y + 1), ToneCOLOR
NEXT y
NEXT x
END SUB
Description: A program to examine the possibilities of mixing the 16 basic palette colors in SCREEN 12 as halftones to provide more than 16 colors on the screen at one time.
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
BASIMAGE converts images to BAS code and sets it up as an image handle to use with _PUTIMAGE to display the image. Using this program you can easily embed little images to use directly in your code, and inside your EXE programs, without extracting them to disk first. First the program will ask you for an image to load, then a filename of the BAS code to output.
I will post the BASIMAGE program below first, and then an example program made by BASIMAGE output to show what it can do.
- Dav
Code: (Select All)
'==================
'BASIMAGE.BAS v0.22
'==================
'Coded by Dav for QB64-PE, JULY/2023
'=-=-=-=
'ABOUT :
'=-=-=-=
'BASIMAGE lets you easily put images INSIDE your QB64 compiled programs.
'It does this by loading an image, then converting the screen memory to
'BAS code that you can add to your programs. When you run the code, it
'recreates the data to an image handle you can use with _PUTIMAGE.
'BASIMAGE will ask you for an image load, and the BAS file to create.
FOR T% = LEN(B$) TO 1 STEP -1
B& = B& * 256 + ASC(MID$(B$, T%))
NEXT
a$ = ""
FOR T% = 1 TO LEN(B$) + 1
g$ = CHR$(48 + (B& AND 63)): B& = B& \ 64
'If @ is here, replace it with #
'To fix problem posting code in the QB64 forum.
'It'll be restored during the decoding process.
IF g$ = "@" THEN g$ = "#"
a$ = a$ + g$
NEXT: E$ = a$
END FUNCTION
And here's a sample output program made with code BASIMAGE output. This program shows a small chess piece image which is embedded as code.
Code: (Select All)
'KING.BAS
'Example of what BASIMAGE can do
king& = BASIMAGE1& 'Load the king image
SCREEN _NEWIMAGE(600, 600, 32) 'set up a screen
_PUTIMAGE (0, 0), king& 'put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Kd"
A$ = A$ + "Y`[6d[Pe3Sc#6jS0g3>e8X?2l9jS000`5lG0Z8mh%%%0"
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
Posted by: Pete - 04-26-2022, 11:21 PM - Forum: TheBOB
- No Replies
Halloween.bas by Bob Seguin Description: Halloween screen saver with flickering jack-o-lantern.
Code: (Select All)
_TITLE "Halloween.bas by Bob Seguin"
SCREEN 12
_FULLSCREEN
OUT &H3C8, 1: OUT &H3C9, 40: OUT &H3C9, 12: OUT &H3C9, 0
OUT &H3C8, 2: OUT &H3C9, 6: OUT &H3C9, 12: OUT &H3C9, 0
OUT &H3C8, 3: OUT &H3C9, 30: OUT &H3C9, 8: OUT &H3C9, 0
OUT &H3C8, 4: OUT &H3C9, 3: OUT &H3C9, 8: OUT &H3C9, 0
OUT &H3C8, 7: OUT &H3C9, 63: OUT &H3C9, 0: OUT &H3C9, 0
OUT &H3C8, 8: OUT &H3C9, 46: OUT &H3C9, 0: OUT &H3C9, 0
OUT &H3C8, 9: OUT &H3C9, 63: OUT &H3C9, 63: OUT &H3C9, 63
OUT &H3C8, 12: OUT &H3C9, 20: OUT &H3C9, 20: OUT &H3C9, 20
OUT &H3C8, 13: OUT &H3C9, 0: OUT &H3C9, 0: OUT &H3C9, 0
OUT &H3C8, 14: OUT &H3C9, 55: OUT &H3C9, 35: OUT &H3C9, 0
DATA 1,1.2,1.8,5
CIRCLE (320, 240), 100, 3, , , .9
PAINT (320, 240), 3
CIRCLE (320, 230), 90, 1, , , .9
PAINT (320, 230), 1
FOR Reps = 1 TO 4
READ Elipse
FOR E = Elipse TO Elipse + .1 STEP .01
CIRCLE (320, 240), 100, 3, , , E
NEXT E
NEXT Reps
FOR Radius = 38 TO 43
CIRCLE (320, 160), Radius, 3, , , .4
NEXT Radius
CIRCLE (320, 160), 40, 14, 3.3, 6, .4
CIRCLE (320, 240), 100, 5, , , .9
PAINT (0, 0), 5
CIRCLE (320, 240), 100, 0, , , .9
PAINT (0, 0), 0
FOR Radius = 12 TO 18
CIRCLE (320, 153), Radius, 2, , , .3
NEXT Radius
CIRCLE (320, 150), 12, 2, , , .6
PAINT STEP(0, 0), 2
CIRCLE (300, 143), 32, 2, 6, 1.1
CIRCLE (276, 143), 32, 2, 6, .6
DRAW "BM302,125 C2 M+15,-10 BD10 P2,2"
PAINT (320, 145), 2
CIRCLE (282, 143), 32, 4, 6, .73
CIRCLE (266, 156), 60, 4, .1, .68
CIRCLE (320, 150), 12, 4, 3.14159, 0, .2
DRAW "BM302,125 C4 M+15,-10 BD10"
CIRCLE (276, 143), 32, 4, 6, .6
PAINT STEP(35, 0), 4
'Face begins
CIRCLE (303, 316), 100, 14, 1.5, 2
CIRCLE (337, 316), 100, 14, 1.1, 1.64
PSET (310, 215), 14
DRAW "H30 M-20,+40 M+12,-4 M+14,-29 BL2 P14,14 BF12 P15,14"
PSET (330, 215), 14
DRAW "E30 M+20,+40 M-12,-4 M-14,-29 BR2 P14,14 BG12 P15,14"
PSET (320, 246), 14
DRAW "R20 H20 G20 R20 U nL19 nR19 BU2 P15,14"
CIRCLE (320, 170), 100, 14, 3.8, 4.1
CIRCLE (320, 170), 100, 14, 4.42, 5.01
CIRCLE (320, 170), 100, 14, 5.33, 5.62
CIRCLE (320, 220), 80, 14, 3.29, 4.5
CIRCLE (320, 220), 80, 14, 4.66, 6.15
PSET (260, 250), 14
DRAW "D10 F8 U13 M+10,+5 D12 M+12,+6 U12 BR60"
DRAW "D12 M+12,-6 U12 M+10,-5 D13 E8 U10"
PSET (300, 297), 14
DRAW "U14 R16 D16"
CIRCLE (320, 212), 80, 14, 3.42, 4.5
CIRCLE (320, 212), 80, 14, 4.66, 6
LINE (300, 280)-(316, 283), 14, BF
PAINT (320, 296), 14
PAINT (290, 292), 14
PAINT (300, 278), 15, 14
CIRCLE (100, 240), 32, 13
PAINT STEP(0, 0), 13
FOR x% = 58 TO 142
FOR y% = 198 TO 282
IF POINT(x%, y%) = 13 THEN
IF POINT(x% + 220, y%) = 15 THEN PSET (x% + 220, y%), 9
END IF
NEXT y%
NEXT x%
COLOR 13: LOCATE 1, 1: PRINT "HAPPY HALLOWEEN!"
xx = 64: yy = 360
FOR x% = 0 TO 300
FOR y% = 0 TO 16
IF POINT(x%, y%) = 13 THEN
IF y% > 6 THEN Colr = 8 ELSE Colr = 7
LINE (x% * 4 + xx, y% * 4 + yy)-(x% * 4 + xx + 3, y% * 4 + yy + 3), Colr, BF
END IF
NEXT y%
NEXT x%
FOR x% = 0 TO 639
IF POINT(x%, 368) <> 0 THEN PSET (x%, 368), 14
NEXT x%
LINE (5, 5)-(634, 474), 12, B
LINE (8, 8)-(631, 471), 12, B
LINE (50, 354)-(580, 420), 15, B
DO
FOR Reps = 1 TO 3
WAIT &H3DA, 8
WAIT &H3DA, 8, 8
NEXT Reps
Flicker = FIX(RND * 20)
OUT &H3C8, 14
OUT &H3C9, 40 + Flicker
OUT &H3C9, 25 + Flicker
OUT &H3C9, 10 + Flicker
OUT &H3C8, 15
OUT &H3C9, 43 + Flicker
OUT &H3C9, 38 + Flicker
OUT &H3C9, 20 + Flicker
LOOP WHILE INKEY$ = ""
Posted by: Pete - 04-26-2022, 10:26 PM - Forum: TheBOB
- No Replies
sdfsfsf
Anna-Chlumsky-Jigsaw.bas by Bob Seguin. Description: Jigsaw puzzle of Canadian actress Anna Chlumsky. The program
Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Anna-Chlumsky-Jigsaw".
Install: Compile Anna-Chlumsky-Jigsaw.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".
Posted by: Pete - 04-26-2022, 09:46 PM - Forum: TheBOB
- No Replies
Jennifer-Aniston-Puzzle.bas by Bob Seguin. Description: Demo that creates a jigsaw layout and applies it to a photo of American actress, Jennifer Aniston.
Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Jennifer-Aniston-Puzzle".
Install: Compile Jennifer-Aniston-Puzzle.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".
Posted by: Pete - 04-26-2022, 09:19 PM - Forum: TheBOB
- No Replies
Jigsaw-Piece-Creator.bas by Bob Seguin. Description: This is a limited utility that demonstrates how an image can be mapped into a jigsaw puzzle.
Download: Download the zip file below. Unzip to either your QB64 folder, or for better organization, to a folder you create like "TheBOB-Jigsaw-Piece-Creator".
Install: Compile Jigsaw-Piece-Creator.bas with QB64 v1.3 or above, and make sure the compiler output is set to create the .exe file in the same folder. See the option in the QB64 IDE RUN menu and check the RUN option: "Output EXE to Source Folder".