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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 405
» Latest member: c141heaven
» Forum threads: 2,363
» Forum posts: 23,184

Full Statistics

Latest Threads
sin cos using SUB SumLoca...
Forum: General Discussion
Last Post: bplus
1 hour ago
» Replies: 9
» Views: 98
QB64 Tutorial IDE Lesson ...
Forum: Learning Resources and Archives
Last Post: TerryRitchie
10 hours ago
» Replies: 6
» Views: 84
Extended KotD #3: _NEGATE
Forum: Keyword of the Day!
Last Post: SMcNeill
10 hours ago
» Replies: 0
» Views: 14
Question about Window Wid...
Forum: General Discussion
Last Post: TerryRitchie
10 hours ago
» Replies: 3
» Views: 34
Odd behavior with Search ...
Forum: General Discussion
Last Post: bplus
11 hours ago
» Replies: 8
» Views: 85
QB64PE Version 3.13 is no...
Forum: Announcements
Last Post: bplus
Yesterday, 04:18 PM
» Replies: 8
» Views: 285
About dialog box call
Forum: Help Me!
Last Post: eoredson
Yesterday, 03:13 AM
» Replies: 4
» Views: 103
control characters in Cha...
Forum: Help Me!
Last Post: digitalmouse
Yesterday, 02:17 AM
» Replies: 10
» Views: 111
Classic board games
Forum: Help Me!
Last Post: BG 7
05-08-2024, 09:10 PM
» Replies: 8
» Views: 350
My first real QB64PE game...
Forum: Games
Last Post: Eugesippe
05-08-2024, 07:33 PM
» Replies: 15
» Views: 368

 
  Question about Find in Search
Posted by: TerryRitchie - 05-02-2024, 03:27 PM - Forum: General Discussion - Replies (3)

When you select find in the search menu an input box dialog appears. One of the options you can select is:

[   ] Whole Word

What exactly does this option do? I've been playing around with having it checked and unchecked but I see no difference. What am I missing?

Print this item

  Probability Tree Animation
Posted by: The Joyful Programmer - 05-02-2024, 09:44 AM - Forum: Works in Progress - No Replies

I thought I would share this little gem I recently created of an animated probability tree.

   

The source code is on GitHub:

https://github.com/TheJoyfulProgrammer/Q...ility-Tree

Print this item

  How to play a Midi file
Posted by: eoredson - 05-02-2024, 05:17 AM - Forum: Utilities - Replies (4)

This a short snippet on how to play a Midi file:

Code: (Select All)
Dim SoundHandle As Long
$Unstable:Midi
$MidiSoundFont:Default
Print "Enter midi file";
Input Midi$
Midi$ = UCase$(Midi$)
If Right$(Midi$, 4) = ".MID" Then
   If _FileExists(Midi$) Then
      Print "Playing.."
      Print "  Enter <space>=pause/+plus 10/-minus 10."
      Print "  Press <escape> to exit."
      '_SndPlayFile Midi$
      SoundHandle = _SndOpen(Midi$)
      If SoundHandle Then
         _SndPlay SoundHandle
         Do
            _Limit 50
            x$ = InKey$
            If Len(x$) Then
               If x$ = Chr$(27) Then Exit Do
               If x$ = "+" Then
                  z! = _SndGetPos(SoundHandle)
                  z! = z! + 10!
                  _SndSetPos SoundHandle, z!
               End If
               If x$ = "-" Then
                  z! = _SndGetPos(SoundHandle)
                  z! = z! - 10!
                  If z! < 0! Then z! = 0!
                  _SndSetPos SoundHandle, z!
               End If
               If x$ = " " Then
                  If _SndPaused(SoundHandle) Then
                     _SndPlay SoundHandle
                  Else
                     _SndPause (SoundHandle)
                  End If
               End If
            End If
         Loop
      End If
   End If
End If
End
note the included $metacommands..

attached is midiplay.zip which contains the midi player and midi.zip with some .mid files.



Attached Files
.zip   MIDIPLAY.ZIP (Size: 121.53 KB / Downloads: 10)
Print this item

  Who is mkilgore
Posted by: eoredson - 05-02-2024, 04:08 AM - Forum: GitHub Discussion - Replies (4)

I recently grabbed QB64PE 3.12.0 and found the name "mkilgore" in the credits.

I wanted to vote his reputation and give him a thanks for:

Code: (Select All)
Const Quote=Chr$(34)
work but could not find his name in the QB64PE member list (all 20 pages)..

Although he does exist as a member of GitHub. But then could not find a way to thank him in GitHub.

Seems his name is Matt Kilgore...

Who is this person and does he exist? Is he a "man in black"?

And who is John Galt? Smile

Thanks, Erik.

Print this item

  BASIC turns 60 today!
Posted by: TerryRitchie - 05-01-2024, 08:51 PM - Forum: General Discussion - Replies (10)

The BASIC language turns 60 today! Only 4 years older than me! Yikes!

https://arstechnica.com/gadgets/2024/05/...-turns-60/

Print this item

  QB64PE Version 3.13 is now released
Posted by: SMcNeill - 05-01-2024, 06:58 PM - Forum: Announcements - Replies (8)

https://github.com/QB64-Phoenix-Edition/...ag/v3.13.0

Enhancements
#478, #484 - Added support for _NEGATE, _ANDALSO, & _ORELSE Boolean operators. - @a740g, @mkilgore
#468 - Added support for _MOUSEWHEEL on macOS. - @a740g
#475 - Added support for _CLIPBOARDIMAGE on macOS & Linux. - @a740g
Bug Fixes
#468 - Fixed _MOUSEMOVEMENTx behavior on macOS. - @a740g
#470 - Fixed an issue where the IDE would lock up if the source code had too many DATA statements on macOS. - @a740g
#473 - Fixed the "Export As" menu state in the IDE. - @RhoSigma-QB64
#474 - Fixed the GLUT thread to redraw at an accurate 60 FPS. - @mkilgore
#476 - Fixed an issue on Windows where special keys were monitored even when the window was not in focus. - @a740g
#477 - Fixed the IDE to open the GUI file dialog when Ctrl+S was pressed and GUI Dialogs were enabled. - @a740g
#480, #487 - Fixed mono-mode font rendering and quality issues, and corrected font width calculations when loading monospaced fonts. - @a740g
#481 - Fixed an issue that would cause LLVM-MinGW to incorrectly generate Windows GUI applications when $CONSOLE was used. - @a740g
#484 - Fixed macOS startup script bugs. - @tothebin
#485 - Fixed various wiki issues. - @RhoSigma-QB64
#486 - Fixed an issue where the IDE was reporting an incorrect error. - @SteveMcNeill
Other Fixes
#467, #483 - Corrected multiple typos in the source code. - @RainRat
Full Changelog: v3.12.0...v3.13.0


Steve Note:  For all those who were seeing issues with the font rendering with the last version, you might want to grab a copy of this version and test things out.  I *think* the issue with those faded/blurred fonts has now been fixed and should no longer be an issue for anyone.  To me, that makes this version one which I'd almost consider to be an "essential update" for folks to grab and make use of.  Wink

Print this item

  Myself
Posted by: BloodyHash - 05-01-2024, 04:33 PM - Forum: General Discussion - Replies (1)

Uh, hello guys, name's Hash, im 24 years old and im pure basic gw_basic text adventure programmer i just love text and games so i merged those both, my current project is my test project which i will add text based gore, violence and toilet humor Big Grin

Print this item

  help needed
Posted by: BloodyHash - 05-01-2024, 01:32 PM - Forum: Help Me! - Replies (9)

say i made a character whom has 0 stats and he faced a slime the slime had 50 hp and he dealt only 2 hits how do i put that on the code im very new to GW_BASIC

Print this item

  Screen 0 PacMan game from an old Tutorial
Posted by: Delsus - 04-30-2024, 05:57 PM - Forum: Games - Replies (5)

In my archives, I found and old program I created following a simple tutorial. I thought I would share it.

Code: (Select All)

CLS
RANDOMIZE TIMER
SCREEN 0
DIM maze$(22)
maze$(01) = "±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±"
maze$(02) = "±ùùù±ùùù±±±±±±±±±±ùùù±ùù±±±±ùùù±ùùùùùù±±ùùù±±±±ùùùùùù±±±±±±±±±±ùùùù±±±±±ùù±±ùùù±"
maze$(03) = "±ù±ù±ù±ùùùùùùùùùùùù±ùùùùùùùùùùù±ùùùùùù±±ùùùùùùùùù±±ùùùùùùùùù±ùùùùùùùùùùùùùùùù±ù±"
maze$(04) = "±ù±ùùù±ùùù±±±±±±±ù±±±±±±±±±±±±ù±ù±±±±ù±±ù±±ùùùùùùù±ù±ùùùùùùù±ùù±±±±±±±ùùùùùùù±ù±"
maze$(05) = "±ùùù±ùùùùùùùùùùùùùùùùùùùùùù±±ùùùùùùù±ù±±ùùùùù±±±±ù±ù±±±±±±ùù±ùùùù±±±ùùù±±±±±ùùù±"
maze$(06) = "±ù±ùùùù±ùù±±±±±±±ù±±±ùù±±±ùùùùùù±±±±±ù±±ùùùùùùùù±±±ù±ùùù±±ùù±ùùùùùùùùùùùùùùùù±ù±"
maze$(07) = "±ù±ùùù±±±ùùùùùùùùùùùùùùùùùù±ùùùù±ùùùùùùùù±±ùùùùùùù±±±ù±ùùùùù±ùùù±±±±±±±ùùùùùù±ù±"
maze$(08) = "±ù±ùùùù±ùù±±±±±±±±±±±±±±±±±±±±ùù±ùù±±ùùùùù±±±±ù±±ùù±±±±±±±±ù±ùùùùùùù±±ùùùùùùùùù±"
maze$(09) = "±ùùùùùùùùùùù±ùù±ùù±±±±ùùùùùùùùùùùùù±±ù±±ùù±±±±ùùùùù±±±ùùùùùù±ùùùùùù±±±±±ùùùùù±±±"
maze$(10) = "±±±±±±±±±±ù±ùùùùùùùùùùùù±ùù±±±±±ùù±ùùùùù±±ùùùùùùù±±±ùùùùùùù±±ùùùùùùùùùùùùùùùùùù±"
maze$(11) = "±ùùùùùùùùùùùùù±±±±±±ù±ùù±ùùùùùùùùù±ùùùùùùùùù±±ùùù±±±±±±±±±ùùùùù±±±±±±±±±±ùù±±±±±"
maze$(12) = "±±±±±±ùù±ù±±±±±±±±±±±±±ù±ùù±±±±±±±±±±±±±ùù±±±±±ùù±±±ùùùù±ùùùùù±±±±ù±±±ù±ùùù±±ùù±"
maze$(13) = "±ùùùùùùù±ùùùùù±ù±±±±ù±±ù±ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù±±±ùùùùùùùùù±"
maze$(14) = "±ù±±ù±ùù±ùùù±ùùùùùùùùùùù±ù±±±±±±ùù±±±±±±±±±±±±±±±±±±±±±±±±±±±±±ùùùù±±±ùù±±±±ù±±±"
maze$(15) = "±ùùùùùùù±ù±±±±±±±±±ù±ùùùùùùù±ù±±ùùùù±±ùùùùùùù±±ùùùùùùùùùùùù±±±ùùùùùùùùùùùùùùùùù±"
maze$(16) = "±ù±±±ù±ù±ùùùùùùùùùùùùùùù±ùùùùùùùù±±ùùùù±±±±±ùùùù±±±±±±±±ùùùùùùùùùùù±±±ùùù±±±ù±±±"
maze$(17) = "±ùùùùùùù±±±±ù±ù±±±±±±±±±±ù±±±±±±ùùùù±±ùù±±ùùù±±ùùùù±ùùù±ùù±±±±±±±ùùùùùùùùùùùùùù±"
maze$(18) = "±ù±±±±ù±±ùùùù±ùùùùùùù±±ù±ùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùùù±ù±ùùù±±±±±±±ùù±"
maze$(19) = "±ùùùùùùù±ù±±±±±±±±±±ùùùù±±±ùùùùù±±±ù±±ù±±±±±±±±±±±±±±±±±±ùù±±±±±±ù±ùùùùùùùùùùù±±"
maze$(20) = "±ù±±ùù±ù±ùùù±ùùùùùùùù±ùùùùùù±±±ùùùùù±±ù±ùùùùùùùùù±ùù±±ùù±ùùùùù±±ùùùùùù±±±±±±±ùù±"
maze$(21) = "±ùù±ù±±±±±±ùùù±±ù±±ùù±±ù±±±ùùùùù±±±ùùùùùù±±ùù±ù±ù±ùùùùùùùùù±ùùùùùù±ùùùùù±±ùùùùù±"
maze$(22) = "±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±±"

row = 5
column = 3
ghostRow = 21
ghostColumn = 79

ghostRow2 = 13
ghostColumn2 = 2
dots = 949

DO
    LOCATE 1, 1
    FOR count = 1 TO 22
        PRINT maze$(count)
    NEXT count

    LOCATE row, column
    COLOR 2
    PRINT ""
    COLOR 7

    LOCATE ghostRow, ghostColumn
    COLOR 4
    PRINT "²"
    COLOR 7

    IF dots = 0 THEN
        LOCATE 8, 1
        PRINT "You won!"
        SLEEP
        SLEEP
        END
    END IF

    IF ((row = ghostRow) AND (column = ghostColumn)) THEN
        LOCATE 8, 1
        BEEP
        PRINT "You got caught!"
        SLEEP
CLS

Exit do
End If
    keyed$ = INKEY$

    _DELAY .055
    oldRow = row
    oldColumn = column

    REM examine the keys
    SELECT CASE keyed$
        CASE IS = "w"
            row = row - 1
        CASE IS = "s"
            row = row + 1
        CASE IS = "a"
            column = column - 1
        CASE IS = "d"
            column = column + 1
    END SELECT

    REM examine the maze
    SELECT CASE MID$(maze$(row), column, 1)
        CASE IS = "±"
            row = oldRow
            column = oldColumn
        CASE IS = "ù"
            MID$(maze$(row), column, 1) = " "
dots = dots - 1
    END SELECT

: REM new
    IF RND < 0.30 THEN
        : REM
        REM move ghost closer to PACMAN
        oldRow = ghostRow
        SELECT CASE ghostRow
            CASE IS < row
                ghostRow = ghostRow + 1
            CASE IS > row
                ghostRow = ghostRow - 1
        END SELECT
        IF MID$(maze$(ghostRow), ghostColumn, 1) = "±" THEN ghostRow = oldRow

        IF ghostRow = oldRow THEN
            oldColumn = ghostColumn
            SELECT CASE ghostColumn
                CASE IS < column
                    ghostColumn = ghostColumn + 1
                CASE IS > column
                    ghostColumn = ghostColumn - 1
            END SELECT
            IF MID$(maze$(ghostRow), ghostColumn, 1) = "±" THEN ghostColumn = oldColumn
        END IF
    END IF: REM  <ÄÄÄ new


LOOP

Print this item

  AAFB
Posted by: a740g - 04-30-2024, 01:16 PM - Forum: a740g - Replies (9)

I’ve been toying with the idea of rendering graphics to SCREEN 0 for a while and have figured out quite a few things on how to accomplish this at a reasonably good speed. However, one of those experiments turned out to be the most fun of all. So much so that I decided to convert it into a tiny library and share it here. You can use this to give your programs a retro artistic look.

The library has just two functions: AAFB_Render and AAFB_SetupScreen0.

The AAFB_Render function is used to render any graphics image onto a SCREEN 0 image. It takes two parameters: srcImage and dstImage. The srcImage parameter is the handle of the graphics image to be rendered, and the dstImage parameter is the handle of the destination SCREEN 0 image where the ASCII art image will be rendered onto. dstImage can be 0 (i.e. the real SCREEN). srcImage and dstImage must have the same dimensions.

Code: (Select All)
SUB AAFB_Render (BYVAL srcImage AS LONG, BYVAL dstImage AS LONG)

The AAFB_SetupScreen0 is just a convenience function that quickly sets up SCREEN 0 with optimal settings.

Code: (Select All)
SUB AAFB_SetupScreen0 (screenWidth AS _UNSIGNED INTEGER, screenHeight AS _UNSIGNED INTEGER)

QB64-PE 3.12 is required. To use an older compiler, remove the "$INCLUDEONCE" lines from AAFB.bi and AAFB.bas.

There are some demos included in the Demo folder.

[Image: Screenshot-2024-04-30-180035.png]
RokCoder's Galaga running on top of AAFB.

[Image: Screenshot-2024-04-30-180440.png]
FishTank demo running on top of AAFB.

Limitations:
  • There is no built-in scaling. However, this can be easily done with _PUTIMAGE
  • Although it is quite fast, the rendering is done on the CPU and hence may not be suitable for high-resolution rendering (e.g. WIDTH 1920, 1080). However, lots of performance can be gained if you compile with the QB64-PE optimization option enabled.
  • It does not render to the console / terminal. There are other of libraries that do that. However, they are limited to a reduced set of ASCII characters. AAFB uses all 256 ASCII characters.



Attached Files
.zip   AAFB.zip (Size: 7.61 MB / Downloads: 14)
Print this item