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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 323
» Latest member: Frankvab
» Forum threads: 1,745
» Forum posts: 17,906

Full Statistics

Latest Threads
astuce pour survivre fina...
Forum: Utilities
Last Post: coletteleger
05-14-2025, 04:47 AM
» Replies: 0
» Views: 48
trouver permis de conduir...
Forum: Utilities
Last Post: nicolasrene
05-05-2025, 05:24 AM
» Replies: 0
» Views: 56
LIGHTBAR Menu
Forum: Programs
Last Post: nicolasrene
05-05-2025, 05:08 AM
» Replies: 15
» Views: 1,067
Learning Pallet Rack Safe...
Forum: Utilities
Last Post: Sandrapew
04-03-2025, 09:36 AM
» Replies: 0
» Views: 62
Choosing New Versus or Pr...
Forum: Utilities
Last Post: Sandrapew
03-18-2025, 01:11 AM
» Replies: 0
» Views: 63
The QB64 IDE shell
Forum: Utilities
Last Post: JasonPag
09-16-2024, 05:37 PM
» Replies: 9
» Views: 1,149
Importance regarding Ches...
Forum: Utilities
Last Post: JasonPag
09-01-2024, 06:34 PM
» Replies: 0
» Views: 91
Chess and Analysis and En...
Forum: Utilities
Last Post: JasonPag
08-28-2024, 02:37 PM
» Replies: 0
» Views: 92
DAY 009:_PutImage
Forum: Keyword of the Day!
Last Post: grymmjack
09-02-2023, 02:57 PM
» Replies: 54
» Views: 3,788
Fall Banner Contest?
Forum: Site Suggestions
Last Post: grymmjack
08-31-2023, 11:50 PM
» Replies: 36
» Views: 2,410

 
  Crop Circles 3 mod 2 Blender
Posted by: bplus - 04-21-2022, 02:33 PM - Forum: Programs - Replies (7)

Dedicated to all farmers who code with Basic ;-))

Code: (Select All)
_Title "Crop Circles #3 Mod 2 Blender" 'b+ trans and mod to QB64 2021-01-25
Randomize Timer

Const Xmax = 1024, Ymax = 730, Cx = Xmax / 2, Cy = Ymax / 2, nCrops = 4
ReDim Shared CCircle As Long
Screen _NewImage(Xmax, Ymax, 32)
_Delay .25
_ScreenMove _Middle
ReDim Shared LowColr As _Unsigned Long, HighColr As _Unsigned Long, cNum As Long
HighColr = _RGB32(240, 220, 80): LowColr = _RGB32(100, 50, 10)
crop0
Do
    _PutImage , CCircle, 0
    While _MouseInput: Wend 'aim with mouse
    mx = _MouseX: my = _MouseY: mb = _MouseButton(1)
    drawShip mx, my, LowColr
    If mb Then
        PLC mx, my, Cx, Cy, 360
        _Display
        _Delay .2
        FlagChange = -1
    End If
    If FlagChange Then
        If Rnd < .5 Then
            crop3
        Else
            cNum = (cNum + 1) Mod nCrops
            Select Case cNum
                Case 0: crop0
                Case 1: crop1
                Case 2: crop2
                Case 3: crop3
            End Select
        End If
        FlagChange = 0
    End If
    _Display
Loop Until _KeyDown(27)

'crop0 uses this
Sub drawc (mx, my)
    ReDim cc As _Unsigned Long
    cr = .5 * Sqr((Cx - mx) ^ 2 + (Cy - my) ^ 2): m = .5 * cr
    dx = (mx - Cx) / m: dy = (my - Cy) / m: dr = cr / m
    For i = m To 0 Step -1
        If i Mod 2 = 0 Then cc = HighColr Else cc = LowColr
        x = Cx + dx * (m - i): y = Cy + dy * (m - i): r = dr * i
        fcirc x, y, r, cc
    Next
End Sub

Sub fcirc (CX As Long, CY As Long, R As Long, C As _Unsigned Long)
    Dim Radius As Long, RadiusError As Long
    Dim X As Long, Y As Long
    Radius = Abs(R): RadiusError = -Radius: X = Radius: Y = 0
    If Radius = 0 Then PSet (CX, CY), C: Exit Sub
    Line (CX - X, CY)-(CX + X, CY), C, 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), C, BF
                Line (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
            End If
            X = X - 1
            RadiusError = RadiusError - X * 2
        End If
        Y = Y + 1
        Line (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
        Line (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
    Wend
End Sub

Sub PLC (baseX, baseY, targetX, targetY, targetR) ' PLC for PlasmaLaserCannon
    r = Rnd ^ 2 * Rnd: g = Rnd ^ 2 * Rnd: b = Rnd ^ 2 * Rnd: hp = _Pi(.5) ' red, green, blue, half pi
    ta = _Atan2(targetY - baseY, targetX - baseX) ' angle of target to cannon base
    dist = _Hypot(targetY - baseY, targetX - baseX) ' distance cannon to target
    dr = targetR / dist
    For r = 0 To dist Step .25
        x = baseX + r * Cos(ta)
        y = baseY + r * Sin(ta)
        c = c + .3
        fcirc x, y, dr * r, _RGB32(128 + 127 * Sin(r * c), 128 + 127 * Sin(g * c), 128 + 127 * Sin(b * c))
    Next
    For rr = dr * r To 0 Step -.5
        c = c + 1
        LowColr = _RGB32(128 + 127 * Sin(r * c), 128 + 127 * Sin(g * c), 128 + 127 * Sin(b * c))
        fcirc x, y, rr, LowColr
    Next
    cAnalysis LowColr, rr, gg, bb, aa
    HighColr = _RGB32(255 - rr, 255 - gg, 255 - bb)
End Sub

' PLC uses this
Sub cAnalysis (c As _Unsigned Long, outRed, outGrn, outBlu, outAlp)
    outRed = _Red32(c): outGrn = _Green32(c): outBlu = _Blue32(c): outAlp = _Alpha32(c)
End Sub

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

' drawShip needs
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

Function rand (low, high)
    rand = Rnd * (high - low) + low
End Function


Sub crop0
    If CCircle Then _FreeImage CCircle
    CCircle = _NewImage(_Width, _Height, 32)
    _Dest CCircle
    Color , HighColr
    Cls
    n = 12: stp = -40
    For br = 360 To 0 Step stp
        shft = shft + 720 / (n * n)
        For i = 1 To n
            x = Cx + br * Cos(_D2R(i * 360 / n + shft))
            y = Cy + br * Sin(_D2R(i * 360 / n + shft))
            drawc x, y
        Next
    Next
    _Dest 0
End Sub

Sub crop1
    If CCircle Then _FreeImage CCircle
    CCircle = _NewImage(_Width, _Height, 32)
    _Dest CCircle
    Color , HighColr
    Cls
    ga = 137.5: bn = 800
    br = 9.5: lr = .5: r = br: dr = (br - lr) / bn
    hc = 180: lc = 120: cr = (hc - lc) / bn
    For n = 1 To bn
        x = Cx + 10 * Sqr(n) * Cos(_D2R(n * ga))
        y = Cy + 10 * Sqr(n) * Sin(_D2R(n * ga))
        r = r - dr
        fcirc x, y, r, LowColr
    Next
    _Dest 0
End Sub

Sub crop2
    If CCircle Then _FreeImage CCircle
    CCircle = _NewImage(_Width, _Height, 32)
    _Dest CCircle
    'this needs big constrast of color
    HighColr = _RGB32(Rnd * 80, Rnd * 80, Rnd * 80) ' field
    LowColr = _RGB32(175 + Rnd * 80, 175 + Rnd * 80, 175 + Rnd * 80)
    Color , HighColr
    Cls
    For i = 45 To Xmax Step 50
        Line (i, 0)-(i + 10, Ymax), LowColr, BF
        Line (0, i)-(Xmax, i + 10), LowColr, BF
    Next
    For y = 50 To 650 Step 50
        For x = 50 To Xmax Step 50
            fcirc x, y, 10, LowColr
        Next
    Next
    _Dest 0
End Sub

Sub crop3
    If CCircle Then _FreeImage CCircle
    CCircle = _NewImage(_Width, _Height, 32)
    _Dest CCircle
    Color , HighColr
    Cls

    r0 = rand(1, 5) / 5: r1 = rand(1, 5) / 10: r2 = rand(1, 5) / 10
    fc = rand(1, 200) / 10: st = rand(10, 500) / 1000
    xol = 0
    yol = 0
    mol = 0
    For i = 0 To 120 Step st
        a0 = (i / r0) * (2 * _Pi)
        a1 = ((i / r1) * (2 * _Pi)) * -1
        x1 = Cx + (Sin(a0) * ((r0 - r1) * fc)) * 30
        y1 = Cy + (Cos(a0) * ((r0 - r1) * fc)) * 30
        x2 = x1 + (Sin(a1) * ((r2) * fc)) * 30
        y2 = y1 + (Cos(a1) * ((r2) * fc)) * 30
        If mol = 0 Then
            mol = 1
            xol = x2
            yol = y2
        Else
            Line (xol, yol)-(x2, y2), LowColr
            xol = x2
            yol = y2
        End If
    Next


    _Dest 0
End Sub

[Image: Crop-Circles-3-Mod-2-Blender.png]

Print this item

  Reaction Diffusion
Posted by: justsomeguy - 04-21-2022, 02:07 PM - Forum: Utilities - Replies (1)

I found this cool little program written by the guy from "The Coding Train", so I ported it to QB64. He has a lot of cool stuff on his channel and I've learned a lot from his videos.

Code: (Select All)
' Program based off of "The Coding Train" Video
' "Coding Challenge #13: Reaction Diffusion Algorithm in p5.js"
' https://www.youtube.com/watch?v=BV9ny785UNc
' Ported to QB64 by justsomeguy

OPTION _EXPLICIT

CONST cSIZEX = 100
CONST cSIZEY = 100
CONST cZOOM = 8

'Some base values to start off with
'dA = 1
'dB = .5
'feed = .055 , white border .45 . no border .65
'k = .062


CONST cREACTDIFF_dA = 1
CONST cREACTDIFF_dB = 0.45
CONST cREACTDIFF_feed = 0.055
CONST cREACTDIFF_k = .062

CONST cRESTARTTIME = 45 ' Timer to restart simulation

TYPE tCELL
  a AS SINGLE
  b AS SINGLE
END TYPE

DIM grid(cSIZEX, cSIZEY) AS tCELL
DIM nextGrid(cSIZEX, cSIZEY) AS tCELL
DIM tmr AS LONG


RANDOMIZE TIMER
_TITLE "Reaction Diffusion"
SCREEN _NEWIMAGE(cSIZEX * cZOOM, cSIZEY * cZOOM, 32)
reactDiffSetup grid(), nextGrid()
tmr = TIMER

DO
  reactDiff grid(), nextGrid()
  reactDiffRender grid(), nextGrid()

  IF TIMER - tmr > cRESTARTTIME THEN
    tmr = TIMER
    reactDiffSetup grid(), nextGrid()
  END IF

  _DISPLAY
  _LIMIT 250
LOOP UNTIL _KEYHIT = 27
SYSTEM

SUB reactDiff (grid() AS tCELL, nextGrid() AS tCELL)
  DIM AS INTEGER x, y
  DIM AS SINGLE a, b
  FOR x = 1 TO cSIZEX - 1
    FOR y = 1 TO cSIZEY - 1
      a = grid(x, y).a
      b = grid(x, y).b
      nextGrid(x, y).a = a + cREACTDIFF_dA * reactDiffLaplaceA##(grid(), x, y) - a * b * b + cREACTDIFF_feed * (1 - a)
      nextGrid(x, y).b = b + cREACTDIFF_dB * reactDiffLaplaceB##(grid(), x, y) + a * b * b - (cREACTDIFF_k + cREACTDIFF_feed) * b
      nextGrid(x, y).a = constrain(nextGrid(x, y).a, 0, 1)
      nextGrid(x, y).b = constrain(nextGrid(x, y).b, 0, 1)
    NEXT
  NEXT
END SUB

SUB reactDiffRender (grid() AS tCELL, nextgrid() AS tCELL)
  DIM AS INTEGER i, j
  DIM AS SINGLE a, b, c
  FOR i = 0 TO cSIZEX
    FOR j = 0 TO cSIZEY
      a = grid(i, j).a
      b = grid(i, j).b
      c = INT((a - b) * 255)
      c = constrain(c, 0, 255)
      ' IF c > 127 THEN c = 255 ELSE c = 0
      LINE (i * cZOOM, j * cZOOM)-(i * cZOOM + cZOOM, j * cZOOM + cZOOM), _RGB32(c, c, c), BF
    NEXT
  NEXT
  reactDiffSwap grid(), nextgrid()
END SUB

SUB reactDiffSetup (grid() AS tCELL, nextGrid() AS tCELL)
  DIM AS INTEGER i, j, iter, iterCount, rsx, rsy, rszx, rszy
  ' Reset Map to all chemical A
  FOR i = 0 TO cSIZEX
    FOR j = 0 TO cSIZEY
      grid(i, j).a = 1
      grid(i, j).b = 0
      nextGrid(i, j).a = 1
      nextGrid(i, j).b = 0
    NEXT
  NEXT
  iterCount = INT(RND * 20) + 10
  FOR iter = 1 TO iterCount
    'Make a random blob a chemical B
    rsx = RND * (cSIZEX * .50) + (cSIZEX * .25)
    rsy = RND * (cSIZEY * .50) + (cSIZEY * .25)
    rszx = RND * (cSIZEX * .10)
    rszy = RND * (cSIZEY * .10)

    FOR i = rsx TO rsx + rszx
      FOR j = rsy TO rsy + rszy
        grid(i, j).b = 1
      NEXT
    NEXT
  NEXT
END SUB

FUNCTION reactDiffLaplaceA## (grid() AS tCELL, x AS INTEGER, y AS INTEGER)
  DIM AS SINGLE sumA: sumA = 0
  sumA = sumA + grid(x, y).a * -1
  sumA = sumA + grid(x - 1, y).a * 0.2
  sumA = sumA + grid(x + 1, y).a * 0.2
  sumA = sumA + grid(x, y + 1).a * 0.2
  sumA = sumA + grid(x, y - 1).a * 0.2
  sumA = sumA + grid(x - 1, y - 1).a * 0.05
  sumA = sumA + grid(x + 1, y - 1).a * 0.05
  sumA = sumA + grid(x + 1, y + 1).a * 0.05
  sumA = sumA + grid(x - 1, y + 1).a * 0.05
  reactDiffLaplaceA## = sumA
END FUNCTION

FUNCTION reactDiffLaplaceB## (grid() AS tCELL, x AS INTEGER, y AS INTEGER)
  DIM AS SINGLE sumB: sumB = 0
  sumB = sumB + grid(x, y).b * -1
  sumB = sumB + grid(x - 1, y).b * 0.2
  sumB = sumB + grid(x + 1, y).b * 0.2
  sumB = sumB + grid(x, y + 1).b * 0.2
  sumB = sumB + grid(x, y - 1).b * 0.2
  sumB = sumB + grid(x - 1, y - 1).b * 0.05
  sumB = sumB + grid(x + 1, y - 1).b * 0.05
  sumB = sumB + grid(x + 1, y + 1).b * 0.05
  sumB = sumB + grid(x - 1, y + 1).b * 0.05
  reactDiffLaplaceB## = sumB
END FUNCTION

SUB reactDiffSwap (grid() AS tCELL, nextGrid() AS tCELL)
  DIM AS INTEGER i, j
  FOR i = 0 TO cSIZEX
    FOR j = 0 TO cSIZEY
      SWAP grid(i, j), nextGrid(i, j)
    NEXT
  NEXT
END SUB

FUNCTION constrain (n AS SINGLE, low AS SINGLE, high AS SINGLE)
  DIM o AS SINGLE
  o = n
  IF o < low THEN o = low
  IF o > high THEN o = high
  constrain = o
END FUNCTION


Coding Challenge #13: Reaction Diffusion Algorithm in p5.js

[Image: screenshot.png]

Print this item

  So what happened??
Posted by: admin - 04-21-2022, 11:16 AM - Forum: General Discussion - Replies (25)

Seems like that's the question that everyone has been asking here lately -- "What the heck happened to the old forums?  Why did everything disappear on us?"

I've been a little busy setting up the new forums and migrating the wiki over for us, bot now that those things are more or less complete, I wanted to take time to do into details and try and explain what's happened over the last week or so, so everyone can understand how we got to be where we currently are.

Things first started to change back in QB64 World back sometime in January.  Fellippe suddenly made an announcement to the community that someone new was popping up in the community and taking over as CEO for the project.  An unexpected move -- why the heck did a hobbyist language need a CEO to manage things, anyway?? -- but one which ultimately changed almost nothing at the time.  RC Cola was introduced to the project, he barely spoke to anyone or got involved with anything, and life moved on with him just more or less existing in the background.

***********************

Time flows, as time will, and suddenly we find ourselves at around a week ago.  Fellippe suddenly decides to just pack up and walk away from the project.  He goes from being a member of the forums to just becoming a "guest".  The Inform channels in the Discord are closed.  He makes no real announcement about anything, and just walks.  People who reach out to him via personal messages and such, get told that he's "Left the project for good and won't be back, for his mental health."  Fellippe did a lot of different things, and he put up with a lot, and it seemed like he'd more or less hit his breaking point and just said waltzed off into the sunset like any good Old Western hero would.

This left RC Cola as suddenly holding the reigns to the project.  At that point, much like at the point where we're at now, people became a little nervous about the state of the project.  RC Cola was asked, "What's the future of QB64?  What do you think QB64 is??"   His response to anything like that was more elusive than a politician two days before election day -- "I'm not going to get into that.  I'm not going to say..."

He's not going to answer any questions about the plans for the project?  Not even going to try and say what he thinks the project is about??

And then, someone brought up the rules of conduct which we were all operating under -- and if you guys are like me, you didn't have a single clue about them!!


[Image: Rules.jpg]

post image


Now, if you guys notice there's a line in there right above the page break that REALLY bothered me.  "Any media uploaded to QB64 sites, are the property of the QB64 Project."

For me, that meant that if I kept working on my little QB64 Bible, and sharing it for the members of the forums to make use, comment, and help point out things that might need editing, that once it was finished, I wouldn't be able to sell a hard copy of it anywhere!!  After all, the QB64 Team would OWN my work!!  If I did publish it, they could sue me for stealing THEIR property!!

And *this* glaring problem was brought up to RC Cola.  His response was just as lackluster as when asked about his plans for QB64.  His response was, "It's better for us to have too much control over stuff posted, than not having enough."

He didn't think that type of rule was over the top at all!!

So, at this point, people *really* started to complain and act up in the Discord channel.  You could almost taste the displeasure in the air, the feeling was so palpable.  Folks were getting quite upset at everything that was going down and was being said.

Rather than try and diffuse the situation, RC Cola decided to drop the mighty Hammer of Justice on people.  Folks were getting silenced for almost nothing in the Discord channel.  People were being banned from Discord.  At this point, one could almost take bets on who was going to be the next person to get kicked from the Discord channels. 

It was at this point that RC decided he was basically the one true ruler of QB64 World:


[Image: Dictator.png]


It was also around this same time when I found myself in RC Cola's crosshairs.  
 

Quote:RCcola198704/15/2022

@SMcNeill you have done a lot for the project and this is the only reason i didnt just ban you right now. Neo Nazi content is not allowed ANYWAEAR on this discords nor is it allowed on discord as a whole. I fyou remove the posts and stop this i will not ban. most of my family died fighting againt Hitler in ww2 and i will not stand for that. most things i will let slide in teh off topic but this is just astounding and not expected from someone like you. 


He... didn't??  Did he??  Just called me a Neo-Nazi supporter and threatened to ban me??  Needless to say, I wasn't very happy...  And the conversation we had after that made me even less happy.

Quote:
  1. RC... You know what... I've tried being a nice guy and ignore all the crap that's been going on, but I just can't do it anymore. At no point have I shared any neo-nazi content, nor do I stand for anything Nazi related. I'm certain I can hop in the car and head to the cemetery and point to just as many graves from my family who fought against the war, as you ever could. From our last genealogical study (my father was an amateur genealogist), we can count 106 members who died in WWI and WWI from both my mother's and father's side. All I posted was links to a lyrics.com collection of SONG LYRICS... in a topic which was tagged "off-topic" and flagged NSFW. There's nothing objectionable about what I posted, but what [b]IS[/b] objectionable is you thinking you're some sort of second rate dictator for the project just because Fellippe left.\
  2. [7:56 PM]
    Here, let me play dictator for a while: [b]I was the [i]only[/i] person who Galleon ever officially welcomed into the QB64 Team, before he stepped down.[/b] My code contributions to the project go all the way to version 0.5 or so, and were in the code well before Fellippe or anyone else branched off Galleon's github account and started pushing their own version of QB64. At no point have I ever given up on my intellectual property rights for the code which I added into the project. Galleon had NO license on QB64 back in the day, and the code anyone committed to the project always retained the property of the coder. Fellippe and them may have pushed to add a MIT license to [i]their[/i] github and QB64 project, but I never gave up the rights to my intellectual property.
    So here's my little asshole dictator demand: Take ALL my work out of the repo. I no longer feel that the project as it exists supports the spirit of BASIC with which I wrote my code and inserted itself into the project, and I refuse to give any rights to keep my code active and inside the source any longer. Failure to remove all my contributions from the language will result in my pursuing legal recourses against copyright infringement.


If the man is going to be an asshole and kick me from what I've always considered to be part of my home, then to hell with him!  If I'm not welcome, then I don't feel like any of my code should be welcomed either.  I'll damn leave, start over somewhere else, and he can do whatever the shit he wants without anything from me being involved with whatever his project was becoming.  It certainly wasn't the QB64 project which I'd grown up and loved working with a being a part of the community with, for all these many years!!

His response??


[Image: Kicked.png]
Yep!  I get kicked from the QB64 Team, and silenced from the Discord.

Which leads me to getting irked and going to bed not long after that...  Needless to say, I said more than a few BLEEPING BLEEPS before I drifted off to sleep that night..

When I woke up, I logged into Discord completely uncertain what the heck to do next, and I find this little gem in my personal message box:


[Image: Transfer.png]


Yep!  Apparently things had continued on during the night while I was sleeping, and in the end, our other developer -- flukiluke -- had decided that he'd had enough of all the drama.  He'd transferred the Discord which he'd owned over to me, and then walked away.  Honestly, it was kind of fitting in a way:  The last post that was ever posted over at QB64.rip was luke's Goodbye post.  

RC Cola, is apparently a very spiteful man.  Once he realized that he could no longer control the Discord, since Luke had passed ownership of the channel over to me, he....

...simply went nuts, is about the only way I know to describe things.


[Image: Tantrum.jpg]

First he kicks out all the editors of the wiki -- even people who don't even have Discord accounts, and who weren't caught up in the internal bruhaha at all!


Then the next thing you know, the forums are down.  The wiki is completely down.  Youtube videos are gone.  The password for the Twitter account is changed.  Everything is taken down and destroyed, with the exception of one thing in particular:  QB64 Team is creating QB64 at QB64.org | Patreon

Yep!! That's right!  He kept the Patreon up so he could keep collecting money from all the people donating to the QB64 team!

After all, that's all that RC Cola was after, when all is said and done.  He wanted money.  Money!  $$$$$$!!


[Image: Money.png]

According to him, the team only pulled in $400 a year or so, and they were going to have to raise Patreon teirs soon to start bringing in more money!!  

And yet, even though I'm not the best person in the world with math, I can click on the link above and go to the QB64 Patreon site even now -- even after all that's happened, he's never taken the Patreon down!!  There's *still* 24 subscribers, at the moment of this writing, and each is donating $2 per month.  That's about $50 per month total, and in 12 months, that's over $600 which people are donating into the project.  (Not counting individual, one-time donations, which people give, nor is it counting the sales which the QB64 team has with whatever merchandise they offered like the coffee cups.)

To give an illustration of costs, here's what it cost for me to set up the forums and the wiki here, and to register the domain name which I've chosen:

[Image: Costs.png]


Less than $100 for a year, and the server here has "unlimited bandwidth" and "unlimited storage".

And yet, he needed to pilfer more money from the user base here, so he could keep things running??



RC Cola might not be able to say what he thinks QB64 is, but I'll happily tell you guys what I think it is:

QB64 is a community of like minded individuals who enjoy writing and coding in BASIC.  Many of us grew up using the language in our youth, and most of us are stubborn, nostalgic "old skoolers".  We know the rest of the world has moved on and embraced other various languages and coding styles over the years, but we like where we're at!  QB64 -- and BASIC, in general -- is a community that is our home.  We've got roots here.  We've lived here.  We've laughed here.  More than once, several of us have butted heads and fought here.

BUT...  At the end of the day, QB64 is the spirit of companionship which we all hold with each other!!  Our forums are secondary.  Discord is a baby come lately.  The majority of folks around here either have memories of IRC, or else they wish they did!  

RC Cola might get rid of a few videos.  We might lose a few posts.  The forums might go down.  The wiki might end up losing a few months of updates... 

At the end of the day, WHO GIVES A SHIT?!!

We're still here.  We're still a community.  If one home burns down, we'll simply form another.  We're family...

...and that's what RC Cola couldn't understand.  He simply couldn't look past the $$$ to truly understand who we are, or what we stand for.  The moment he started relentlessly kicking people and destroying the community, was the moment when he truly lost control of QB64.

**************************************************
**************************************************

And, with all of that said and done, let me finish up by saying:

WELCOME HOME, ONE AND ALL!!!

Print this item

  Running QB64 on a Raspberry PI (And known issues)
Posted by: George McGinn - 04-21-2022, 01:34 AM - Forum: General Discussion - Replies (9)

To run QB64 on a Raspberry PI, you need to do a few things to QB64 in order to compile and run programs.

Also, right now, QB64 will only run on a 32-bit running on the RPI. I haven't yet gotten it to work on 64-bit OS's. I am still researching if this is possible. It just might be a PI ARM issue. I am experimenting with settings in the ARM chip itself and GCC/G++ compiler options from the ARM technical documents I've obtained from the IEEE. Very few in my local chapter have had experience in the ARM, and none with QB64.

However, there are a few issues that are part of the PI's ARM processor that cannot be easily fixed in QB64.

Most programs will compile and run fine. Others will get one or both of the following issues:

1) Racing Conditions (can appear as SIG BUS errors)
2) Misaligned Addresses, or misaligned word errors (appears as SIG BUS errors)

For the most part, identifying where the racing condition is occuring (you will need to do a gdb session to find out), a simple _DELAY .3 will fix it. Racing occurs when QB64 creates multiple threads, and since QB64 isn't really a multithreaded programming language (the backend C++ is), there can be issues.

There are two ways to fix the misaligned address/word issue. One way is to use the -fsanatize compiler option. However, the better fix for most of these issues has been added to the common.h file provided. The code that fixes this and other non-x86 issues is:

Code: (Select All)
//Setup for ARM Processor (Similar to -fsanitize=address GCC compiler flag)
#ifdef __arm__
    #define QB64_NOT_X86
#define POST_PACKED_STRUCTURE
#else
#define POST_PACKED_STRUCTURE __attribute__((__packed__))
#endif /* ARM */

I've included the #define for the non-ARM processors. It doesn't hurt, and on the slim occasion you run into this error, that code will fix it.

The misaligned address, or misaligned word error (SIG BUS), is a hardware issue in the ARM processor. The reason this does not occur on the x86_64 chips is the manufacturers of these chips fixed this issue within its circuitry. If you were to get this error on an x86, it will be a really really bad day for you.

Code, like the following used in the program supplied, is giving the PI ARM processor fits:

Code: (Select All)
TYPE tENTITY
    objectID AS LONG
    objectType AS LONG
    parameters AS tENTITYPARAMETERS
    pathString AS STRING * 1024 ' for A* Path 'U'-Up 'D'-Down 'L'-Left 'R'-Right
    fsmPrimary AS tFSM
    fsmSecondary AS tFSM
END TYPE


It just can't handle these.

One of the ways to fix this on the PI ARM is to rewrite the backend of QB64. This is not practical.

In the enclosed compressed file, I included an example of a program that has both conditions - racing and misaligned addresses.

One of the things I plan to do late summer is to get my hands on an Apple M1 ARM laptop, and test this out. This is important, as Apple plans to roll this out to their other products. Also, INTEL is close to finishing their ARM processor, and last October (2021), Microsoft and AMD announced a joint venture to develop their own ARM processor. God only knows what, if any, standards any of these chips will follow. The ability to run QB64 on these systems, although my sources say they are at least 5 years away, means we need to take a headstart in determining, if any, changes need to be made to QB64 itself.

I am hoping that it will be mostly parameters added to the GCC compiler, and that the chips will follow some of the X86 fixes.

To install QB64 on the PI:

1. Extract QB64 but do not run the install.
2. From the compressed file, copy/replace the common.h file in the /internal/c directory.
3. Replace the setup_lnx.sh script in the qb64 folder with the one from the compressed file.

Note: I have provided the makedat files, just to show you what changes were needed here. Without these changes, your binary executables will get ASAN errors, or malformed binary files. (This is the issue with running QB64 on the 64-bit OS. I have a question in to PI support, and am trying to find out from GNU if there are other things I need to do.

I have run 12 openGL programs with no issues. My EBACCalculator runs fine. I even ran my baseball/softball statistics system, that incorporates mySQL (on the PI they use mariaDB), Zenity, HTML/CSS, and multiple shell calls to programs and use of pipecom with memory allocations, call to C++ functions from header files, runs with no issues.

Right now, it mostly works. If you use UDT types, it may compile, but will not run.


Here are the files.



.zip   qb64RPI.zip (Size: 64.83 KB / Downloads: 99)

George

Print this item

Rainbow Screen Blankers
Posted by: RhoSigma - 04-20-2022, 10:43 PM - Forum: RhoSigma - No Replies

Some simple Screen blankers written in QB64


Most of the screen blanker modules in this small collection are written by myself, others were just graphic sample programs from other Forum members, which I've altered into a blanker module. Just read the header notes in each module for credits and more information.

These blankers work with every QB64 version since v0.954, so if you're one of these normal people who not update to the latest build every week, that's not a problem. Just use whatever QB64 version you've installed, as long it's greater or equal to the 0.954 version. This also includes all Phoenix Edition versions.

Blanker modules:
  • Fractal
  • Lightning
  • Mystify
  • Spinner
  • Splines
  • Worms
  • and several more

.7z   ScreenBlankers.7z (Size: 16.73 KB / Downloads: 50) --- (Dec/22)(Screen blankers pack)

Move the extracted ScreenBlankers folder with its entire contents to any place of your choice. For installation instructions have a look into the ScreenBlankers-Info.html file.



Attached Files Thumbnail(s)
           
Print this item

  Hell's Angles never had it this good!
Posted by: Pete - 04-20-2022, 08:32 PM - Forum: General Discussion - No Replies

I'd like to help build up the forum, but I'm too busy helping TheBOB build up his chopper...
[Image: Screenshot-558.png]

Build your own custom bike, and not just the paint, also build from scratch the frame, tires, handle bars, seat, fenders, engine, and all the accessories. Oh, for those of you who don't know the developer, Bob Seguin, he was a graphics artist in the 1970's and worked on computer art projects in the 1980s. He retired several years ago, but still comes by The QBasic Forum on a daily basis, probably because it's just a short walk from his home.

https://staging.qb64phoenix.com/showthre...323#pid323

Pete

Print this item

  Floating Point issues finally SOLVED!
Posted by: Pete - 04-20-2022, 06:21 PM - Forum: General Discussion - Replies (3)

Thanks to TheBOB were providing this elegant solution...

[Image: Screenshot-555.png]

See it in action, here: https://staging.qb64phoenix.com/showthre...317#pid317

Pete

Print this item

Lightbulb Notepad++ setup for QB64
Posted by: RhoSigma - 04-20-2022, 05:01 PM - Forum: RhoSigma - Replies (9)

Tired of the native QB64 IDE?
Well, Notepad++ is a good alternative, if there wouldn't be the fight to configure the whole mess...


I did, and you can use it as a reliable foundation to build on and tweaking things for your personal taste and needs. The following archive contains all required files. Installation is described in detail and consists mainly of some simlple copy&paste or import operations. If you don't have Notepad++ installed yet, then I recommend to select the portable mode when you do, as it keeps all config files in the program folder rather than scattering everything all over the harddrive.
  • all provided files are based on the Notepad++ release 8.5.6
  • contains all keywords up to QB64 Phoenix Edition release 3.8.0

.7z   NppThemesQB.7z (Size: 125.86 KB / Downloads: 40) --- (Aug/23)(Notepad++ integration pack)

As additional part you also find a chapter in the archive, which describes how to set up default icons for .bas, .bi and .bm files using Windows Registry entries, if you like to do that.



Attached Files Thumbnail(s)
       
Print this item

Star The GuiTools Framework
Posted by: RhoSigma - 04-20-2022, 04:12 PM - Forum: RhoSigma - No Replies

GuiTools - A graphic UI framework for QB64


GuiTools is a ready to use program template/skeleton to create neat graphic UI applications with QB64, ie. to build your own UI forms you just need to add the desired object definitions into the template and the handler code which shall be called when your objects are triggered, while leaving all other parts of the template as is.
  • GuiTools works with every QB64 version since v0.954, so if you're one of these normal people who not update to the latest build every week, that's not a problem. Just use whatever QB64 version you've installed, as long it's greater or equal to the 0.954 version. This also includes all Phoenix Edition versions.

  • GuiTools was developed with its main attention at dynamic UI creation, ie. you can easily create, modify and delete objects during runtime on the fly. There is intentionally no Designer tool here, as it would encourage people to build static UIs only. Although static UIs are quite legitimate here and there (and also possible with GuiTools), it would be a waste of GuiTools its capabilities.

  • GuiTools can handle multiple forms in one program, each form in its very own independent window on your desktop, but all forms are still controlled in realtime by that one program, hence real multi-windows applications. As shown in the Multi Windows Demo, it's even possible to have interactions between several forms windows.

  • GuiTools does already include a huge amount of useful functions, ready for use within your handler code. The range goes from general file and string handling functions to specialized functions like image processing and packing/unpacking. The inbuilt MessageBox and FileOpenDialog do perfectly fit into the GuiTools look and feel.

  • GuiTools its UIs can be customized by every local user. Using the provided Preferences Editor, users can easily change colors, wallpapers and patterns of the GuiTools UIs without the need to recompile any applications.
Note that GuiTools does not implement the usual Windows like look and feel, but is inspired by the AmigaOS versions 2.0 to 3.9, which have a simple yet elegant look (see pictures below).

Release v0.16

For the full list of changes see the docs\ReleaseNotes.txt file in the archive.

.7z   QB64GuiTools.7z (Size: 6.06 MB / Downloads: 88) --- (Dec/22)(Windows only (Linux/Mac may work with Wine))

Make sure to move the extracted QB64GuiTools folder with its entire contents into your QB64 installation folder. If you're new to GuiTools, then please also read the GuiTools-Info.html file in the main folder for a short introduction of the project structure.



Attached Files Thumbnail(s)
           
Print this item

  Keybone's GUI Projects
Posted by: Keybone - 04-20-2022, 03:34 PM - Forum: Keybone - No Replies

This section is a place where I can post all my various code for my projects.
Some of it might seem nearly identical to the end user,  or very similar to other versions.
I am posting it all to accomplish 2 goals: 1) share my code, 2) organize my stuff.
Hope you all enjoy it.  Cool

Print this item