Welcome, Guest
You have to register before you can post on our site.

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 308
» Latest member: Donaldvem
» Forum threads: 1,741
» Forum posts: 17,901

Full Statistics

Latest Threads
The QB64 IDE shell
Forum: Utilities
Last Post: JasonPag
09-16-2024, 05:37 PM
» Replies: 9
» Views: 762
Importance regarding Ches...
Forum: Utilities
Last Post: JasonPag
09-01-2024, 06:34 PM
» Replies: 0
» Views: 31
Chess and Analysis and En...
Forum: Utilities
Last Post: JasonPag
08-28-2024, 02:37 PM
» Replies: 0
» Views: 32
DAY 009:_PutImage
Forum: Keyword of the Day!
Last Post: grymmjack
09-02-2023, 02:57 PM
» Replies: 54
» Views: 2,032
Fall Banner Contest?
Forum: Site Suggestions
Last Post: grymmjack
08-31-2023, 11:50 PM
» Replies: 36
» Views: 1,261
ColorPicker - Function th...
Forum: Dav
Last Post: Dav
08-31-2023, 11:04 PM
» Replies: 3
» Views: 315
Goals(1) = New Tile()
Forum: Works in Progress
Last Post: RhoSigma
08-31-2023, 09:45 PM
» Replies: 3
» Views: 127
micro(A)v11
Forum: QBJS, BAM, and Other BASICs
Last Post: bplus
08-31-2023, 09:14 PM
» Replies: 90
» Views: 3,589
Updating The Single Most ...
Forum: QBJS, BAM, and Other BASICs
Last Post: bplus
08-31-2023, 09:13 PM
» Replies: 7
» Views: 254
QBJS Image Question
Forum: QBJS, BAM, and Other BASICs
Last Post: bplus
08-31-2023, 05:49 PM
» Replies: 5
» Views: 155

 
  Moon Lander
Posted by: ChiaPet - 04-27-2022, 02:29 AM - Forum: Programs - Replies (7)

[Image: lander-000.png]

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.  

Will try again tomorrow.



Attached Files
.7z   L64.7z (Size: 2.72 MB / Downloads: 89)
Print this item

  GFX256 - Graphics Drawing and Animation Suite.
Posted by: Pete - 04-27-2022, 01:32 AM - Forum: TheBOB - No Replies

GFX256.bas by Bob Seguin.
[Image: Screenshot-643.png]
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".



Attached Files
.7z   TheBOB-GFX256.7z (Size: 116.08 KB / Downloads: 71)
Print this item

  Gothic - A Font Demo Using Masks.
Posted by: Pete - 04-27-2022, 01:00 AM - Forum: TheBOB - No Replies

Gothic.bas by Bob Seguin.
[Image: Screenshot-581.png]
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".



Attached Files
.7z   TheBOB-Gothic.7z (Size: 2.99 KB / Downloads: 50)
Print this item

  Halftone - A Utility to Demonstrate 255 Colors Mixed in Screen 12
Posted by: Pete - 04-27-2022, 12:35 AM - Forum: TheBOB - No Replies

Halftone.bas by Bob Seguin
[Image: Screenshot-585.png]

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.

Print this item

  Screen Savers
Posted by: bplus - 04-27-2022, 12:29 AM - Forum: bplus - Replies (49)

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 Thumbnail(s)
               
Print this item

  BASIMAGE - Put image files in BAS code to use with _PUTIMAGE
Posted by: Dav - 04-26-2022, 11:23 PM - Forum: Dav - Replies (12)

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.

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

DEFINT A-Z
DECLARE FUNCTION E$ (B$)

PRINT
PRINT "=============="
PRINT "BASIMAGE v0.22"
PRINT "=============="
PRINT

INPUT "IMAGE File to load --> ", IN$
INPUT "BAS File to make ----> ", OUT$: IF OUT$ = "" THEN END

'Load image file to screen mode
SCREEN _LOADIMAGE(IN$, 32): SLEEP 1
DIM m AS _MEM: m = _MEMIMAGE(0)

'Grab screen data
INDATA$ = SPACE$(m.SIZE)
_MEMGET m, m.OFFSET, INDATA$
'Compress it
INDATA$ = _DEFLATE$(INDATA$)
'get screen specs
wid = _WIDTH: hih = _HEIGHT

SCREEN 0

OPEN OUT$ FOR OUTPUT AS 2
PRINT: PRINT "Converting image to BAS code...";

Q$ = CHR$(34) 'quotation mark
SCREEN _NEWIMAGE(600, 600, 32)
pic& = BASIMAGE1&
_PUTIMAGE (0, 0), pic&

PRINT #2, "'EXAMPLE USAGE OF BASIMAGE1&"
PRINT #2, "'==========================="
PRINT #2, "'SCREEN _NEWIMAGE(600, 600, 32)"
PRINT #2, "'pic& = BASIMAGE1&: _PUTIMAGE (0, 0), pic&"
PRINT #2, ""
PRINT #2, "FUNCTION BASIMAGE1& '"; IN$
PRINT #2, "v&=_NEWIMAGE("; wid; ","; hih; ",32)"
PRINT #2, "DIM m AS _MEM:m=_MEMIMAGE(v&)"
PRINT #2, "A$ = "; Q$; Q$
PRINT #2, "A$ = A$ + "; Q$;

BC& = 1

DO
    a$ = MID$(INDATA$, BC&, 3)
    BC& = BC& + 3: LL& = LL& + 4
    IF LL& = 60 THEN
        LL& = 0
        PRINT #2, E$(a$);: PRINT #2, Q$
        PRINT #2, "A$ = A$ + "; Q$;
    ELSE
        PRINT #2, E$(a$);
    END IF
    IF LEN(INDATA$) - BC& < 3 THEN
        a$ = MID$(INDATA$, LEN(INDATA$) - BC&, 1): B$ = E$(a$)
        SELECT CASE LEN(B$)
            CASE 0: a$ = Q$
            CASE 1: a$ = "%%%" + B$ + Q$
            CASE 2: a$ = "%%" + B$ + Q$
            CASE 3: a$ = "%" + B$ + Q$
        END SELECT: PRINT #2, a$;: EXIT DO
    END IF
LOOP: PRINT #2, ""

PRINT #2, "btemp$="; Q$; Q$
PRINT #2, "FOR i&=1TO LEN(A$) STEP 4:B$=MID$(A$,i&,4)"
PRINT #2, "IF INSTR(1,B$,"; Q$; "%"; Q$; ") THEN"
PRINT #2, "FOR C%=1 TO LEN(B$):F$=MID$(B$,C%,1)"
PRINT #2, "IF F$<>"; Q$; "%"; Q$; "THEN C$=C$+F$"
PRINT #2, "NEXT:B$=C$:END IF:FOR j=1 TO LEN(B$)"
PRINT #2, "IF MID$(B$,j,1)="; Q$; "#"; Q$; " THEN"
PRINT #2, "MID$(B$,j)="; Q$; "@"; Q$; ":END IF:NEXT"
PRINT #2, "FOR t%=LEN(B$) TO 1 STEP-1"
PRINT #2, "B&=B&*64+ASC(MID$(B$,t%))-48"
PRINT #2, "NEXT:X$="; Q$; Q$; ":FOR t%=1 TO LEN(B$)-1"
PRINT #2, "X$=X$+CHR$(B& AND 255):B&=B&\256"
PRINT #2, "NEXT:btemp$=btemp$+X$:NEXT"
PRINT #2, "btemp$=_INFLATE$(btemp$,m.SIZE)"
PRINT #2, "_MEMPUT m, m.OFFSET, btemp$: _MEMFREE m"
PRINT #2, "BASIMAGE1& = _COPYIMAGE(v&): _FREEIMAGE v&"
PRINT #2, "END FUNCTION"

PRINT "Done!"
PRINT UCASE$(OUT$); " saved."
END

FUNCTION E$ (B$)

    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 it on screen

FUNCTION BASIMAGE1& 'king.png
    v& = _NEWIMAGE(150, 150, 32)
    DIM m AS _MEM: m = _MEMIMAGE(v&)
    A$ = ""
    A$ = A$ + "haIkMfSLK3346EG7GZBeZBGZBejBEjBgVbDV[#>6i\i<0a>344hoPhKGXGaK"
    A$ = A$ + "6C8>V[Fl60A0#`3ONh`100000V1_ofU?Okj[gQjH2l=W?MLh?e0a7h?6eYn6"
    A$ = A$ + "34WP_0_2f3bmZolkO5i^cb0a9h7:eFEA_:P1RG`NLiecONjh;A6k<7d[:`[W"
    A$ = A$ + "?Q_m<c2>kUhEo7eOoPfc2>k_M:L;HBb:9gMF;?LUDom4J;IUPG1EQ5Lfd?8\"
    A$ = A$ + "8F`ISC1K56o:H_8Ol\HlfQJ0N5DK:=fkd?8\Ib:QaB0f<IU`hD1KUQFK<hF`"
    A$ = A$ + "JIY>5^5TBliNH6WiZmZ<>6^703lm6Z3C]NZ6SU<OPohmgFmeQeYU?HF[9m_8"
    A$ = A$ + "llKE[iJ>hF1B;;lo?j=c=N^M57cH<EK6edQf:Cjn68O27><dWXfOV31O7obP"
    A$ = A$ + "h#GJ<`]<0IU4Nn7Dk5hEM2hE`>kE1Dk5edYHo51gZfN5>UA`i^EJ\7772eiC"
    A$ = A$ + "XXK56SAe^bJLZ8ZcS`PNE0enbZl:ei#X;L[dHmFH<BEWoPIiFZmVijD<oc>Q"
    A$ = A$ + "_n[`JDA]o<IOO1DW_P5iEFe]BS_KGYo?GAbAZm8J[ZS8[4enDA_BM>2f\KYf"
    A$ = A$ + "W2l`jlCMn1f\GYN\BcGkQlkZl;OTEGV_FQEeoge;WaYl>IUH1_BN>1Z^KY`Y"
    A$ = A$ + ">Vo\1Y>O0MQGUNm3[o#ii3XjNU2gj^[_jL1\K^5N5hM_jQ8AMN0f=_ZUSUEj"
    A$ = A$ + "eUeGL7BF9d78\7^5N5d3N5??4M<hE`>jDOG?_g>ELN0C^V\6fk0d71c3mA0<"
    A$ = A$ + "Gd71;3mA0<1aiO;Y4;^OPT7SG_`hJIN<^C=TK9?_1cf[Dk>C1NUS8iX`lVXf"
    A$ = A$ + "M6R7f__EWgPA9_o5;jFi>5on:O`3of533>U_H;kGo=3mA0\2:iFVhgXSCiO<"
    A$ = A$ + "XGaL5f1DXDe]EQGe9X?2^7mA0D;d71o3mA0DAR__\B:ABOP68?0eWK9_WSJ]"
    A$ = A$ + "G5_gD3T30l:`7T>o9]f[n0_ZKAYGm>[1i^UdeKN[m:FKkm;Yc7Mcm:fOnjFB"
    A$ = A$ + "Og:gJ_RmX_nUdmg\FkEl>UXS9iXFkE<WPM<2mZ8Zon3hEPO0_2`[0_0N5PG1"
    A$ = A$ + "N1l:0_2L0FHmRbJ`Zo8M^1EiE<G>M8IU8YO`0Zc3`^iEQf=JUGakb[>WTSJi"
    A$ = A$ + "kKRdeD?NE7BbA]bY:fGXjl0PG1f7l:0_2l2hE#UAeH]Gb[H<gk8b:AJkE1DW"
    A$ = A$ + "?PZkEQaCZeNEL_Y5_Zo8iXFkDlK\jH`[0l:`14gG4<VG5_oD3TKP=#bA]hMT"
    A$ = A$ + "j#T_n_TWGPECnk1GE>5]IeITLD;GcEdVEWCbAZMZB]I9?o0hEP=8[4enDA_2"
    A$ = A$ + "gbOH#WRf\j0`[PMdY\`m1V3gGXC9i8e>4]Ie9h0W2gbITERJ_IAN5^U=aI>5"
    A$ = A$ + "^U]iQWWH7iD3iF\6heBLoI9[dOna=iNB=L[hkL53TSOjX#YZMSJkFADWWOFH"
    A$ = A$ + "P?A]C\[^5nECmYC7OA^7POiHb:YUkc#Z9O]9RK]?>UjjIcdnUjj5_3>EIgBM"
    A$ = A$ + "mRS9OL4DG_ZT`hWTV;HL8ZSCm\kFUb5hF;0mAP?AO4HGd71n6mAPm8[TNN\Y"
    A$ = A$ + "Z5?\n0a]6eYDGOi=`]Vf[DG7iE`[`[`[`[l2hESkEFliWajl`HmY^nd:X?2j"
    A$ = A$ + "6RgSXlX`#X?2j3d71fR2UZ^o5[3NebL:eeGN3L[Ym:eeAN5l:l:lZfkEhFKd"
    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

Print this item

  Halloween Screen Saver - Happy Halloween!
Posted by: Pete - 04-26-2022, 11:21 PM - Forum: TheBOB - No Replies

Halloween.bas by Bob Seguin
[Image: Screenshot-640.png]
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$ = ""

SYSTEM

Print this item

  Jigsaw Puzzle of Anna Chlumsky - Jigsaw Puzzle Game.
Posted by: Pete - 04-26-2022, 10:26 PM - Forum: TheBOB - No Replies

sdfsfsf

Anna-Chlumsky-Jigsaw.bas by Bob Seguin.
[Image: Screenshot-639.png]
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".



Attached Files
.7z   TheBOB-Anna-Chlumsky-Jigsaw.7z (Size: 345.27 KB / Downloads: 55)
Print this item

  Jigsaw Puzzle of Jennifer Aniston - A Jigsaw Creation Demo.
Posted by: Pete - 04-26-2022, 09:46 PM - Forum: TheBOB - No Replies

Jennifer-Aniston-Puzzle.bas by Bob Seguin.
[Image: Screenshot-648.png]
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".



Attached Files
.7z   TheBOB-Jennifer-Aniston-Puzzle-Creator-Demo.7z (Size: 61.55 KB / Downloads: 46)
Print this item

  Jigsaw Piece Creator - Turn Image into a Jigsaw Puzzle.
Posted by: Pete - 04-26-2022, 09:19 PM - Forum: TheBOB - No Replies

Jigsaw-Piece-Creator.bas by Bob Seguin.
[Image: Screenshot-637.png]
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".



Attached Files
.7z   TheBOB-Jigsaw-Piece-Creator.7z (Size: 5.26 KB / Downloads: 38)
Print this item