| Welcome, Guest |
You have to register before you can post on our site.
|
| Forum Statistics |
» Members: 714
» Latest member: HenryG
» Forum threads: 3,569
» Forum posts: 31,909
Full Statistics
|
| Latest Threads |
QB64PE v 4.4.0
Forum: Announcements
Last Post: madscijr
2 hours ago
» Replies: 8
» Views: 673
|
4x4 Square Elimination Pu...
Forum: bplus
Last Post: bplus
5 hours ago
» Replies: 12
» Views: 408
|
Container Data Structure
Forum: Utilities
Last Post: bplus
5 hours ago
» Replies: 3
» Views: 125
|
Accretion Disk
Forum: Programs
Last Post: bplus
5 hours ago
» Replies: 11
» Views: 286
|
QBJS v0.10.0 - Release
Forum: QBJS, BAM, and Other BASICs
Last Post: Unseen Machine
Today, 04:14 AM
» Replies: 13
» Views: 1,295
|
Arrays inside Types?
Forum: General Discussion
Last Post: hsiangch_ong
Today, 03:24 AM
» Replies: 47
» Views: 1,412
|
Has anybody experience wi...
Forum: Help Me!
Last Post: Rudy M
Yesterday, 08:47 AM
» Replies: 31
» Views: 1,937
|
Sorting numbers - FiliSor...
Forum: Utilities
Last Post: PhilOfPerth
03-11-2026, 12:48 AM
» Replies: 11
» Views: 349
|
Quick Sort for variable l...
Forum: Utilities
Last Post: SMcNeill
03-10-2026, 03:14 PM
» Replies: 3
» Views: 94
|
Ready for Easter!
Forum: Holiday Code
Last Post: bplus
03-10-2026, 12:15 PM
» Replies: 0
» Views: 58
|
|
|
| Admin on vacation!! |
|
Posted by: admin - 04-22-2022, 10:14 PM - Forum: General Discussion
- Replies (5)
|
 |
Ok guys, this has been one heck of a productive week as far as restoring QB64 is concerned!
We've got the forums here back up and going.
I've got us half a homepage up and going. (https://qb64phoenix.com)
The wiki has been rebuilt (though its still missing a few things which we'll find and replace over time.), and new editors have signed up to help maintain and build it.
We've got an official repo over at github now, and we've got a First Edition release available to help remove any issues with QB64 trying to link to the old site and error out when it can't do so...
In other words, I couldn't be any prouder of what we've accomplished as quicky as we have, BUT... I need a break now. My arthritis in my knuckles and shoulders is acting up from being hunched over the keyboard so much this week, and it looks like we're too the point where things should be able to exist without me for a few days. I'm going to log out, take a good bath, maybe get dressed afterwards, before I go outside and grill me a nice big steak for supper, and then I'm going to just chill and relax and avoid everything for the next few days until the week starts back up again on Monday.
If anyone wants me before then... Sorry! You'll just have to wait.
Try not to burn down the place until I get back, and God forgive me for even saying it, but it looks like Pete is the boss in charge around here for now!
|
|
|
| Load a webpage externally |
|
Posted by: Michelle - 04-22-2022, 08:26 PM - Forum: General Discussion
- Replies (8)
|
 |
Well first, it has been awhile since I last fiddled with BASIC, and I kept trying to hunt down the 'other' site that seems to have gone bye-bye. Oh well, I guess stuff happens.
Anyway, I am writing an app to help some folks in a group I support. Once of the things I'd kinda like the app to do is bring up a webpage based on a given URL is the user makes a certain selection in the program. I'm sure this has probably been ask before, but I've searched some, and finding nothing, probably due to not using the correct words to search on. Anyway, thanks for any help, Michelle
|
|
|
| Linux difficulties compared to Windows |
|
Posted by: bplus - 04-22-2022, 12:29 PM - Forum: Help Me!
- Replies (3)
|
 |
I, bplus, am newbie to Linux the Mint Cinnamon Distro which is a subset of Ubuntu but with more Windows like appearance if I read my book right.
Anyway I am testing the Battleship app Johnno and I put together, everything is fine until I am halfway through a game with all effects going (mostly just sound files playing) and the thing just ups and quits, no messages, nothing?! When I play without effects it's fine and I can run a whole game to win or lose. I think there were some wav files and possibly those are Windows preferred? But why would they work for awhile and then not?
Another goofy thing: I am testing a graphics program, a mod of Kens's spiral flower and it just automatically says compiler error see log... I check and it's blank, over and over? I'm thinking there is some invisible character that doesn't show in IDE because I commented out the whole program and still get compiler error message. Weird!
And another thing:
I am testing old Spinners program, that takes a screenshot of desktop and then displays that with spiders crawling all over... oh wait the Wiki did say taking screen shots does not work in Linux, never mind.
Windows has no problem with this, IDE in Linux is happy but the compiler gives me error even when I comment more and more until all of the code:
Code: (Select All) _Title "b+ Makeover #2 of Ken's Rotating Flower"
Dim image As Long
Screen _NewImage(700, 700, 32)
_ScreenMove 250, 20
For r = 0 To 60 Step .25
Circle (350, 350), r, _RGB32(255 - r * 4, 0, 0), , , .5 'ovals half width for height
Next
image = _CopyImage(0)
Print " Here is one petal, press any to continue..."
Sleep
For i = 0 To 700
Line (0, i)-(700, i), _RGB32(0, 160, 255 - i / 700 * 255)
Next
For r = 20 To 0 Step -.25 ' draw a yellow center
Circle (350, 350), r, &HFFFFFF00
Next
r = 250: zoom = 1
Do ' each loop draws a ring of petals around the center starting on outside
For a = start To _Pi(2) - .00001 Step _Pi(2 / 30) ' a goes around a circle from 0 to 2*pi = 360 degrees
x = 350 + r * Cos(a): y = 350 + r * Sin(a) ' here is x, y coordinate for petal center
angle = _Atan2(350 - y, 350 - x) ' here is the angle of the petal to the center of screen
RotoZoom x, y, image, zoom, _R2D(angle) ' draw petal centered at x, y, scaled at zoom level, convert angle radians to degrees for rotozoom
_Display
_Delay .1
Next
zoom = zoom * .75 ' decrease petal scale by 75%
r = r * .75 ' 'next ring of petals decrease radius by 75%
If r < 20 Then Exit Do ' r is too small we are done!
toggle = 1 - toggle ' this alters petals so they are offset each time around
If toggle Then start = -_Pi(1 / 30) Else start = 0 ' offset by half the angle "a" step size
Loop Until InKey$ = Chr$(27)
Sleep
Sub RotoZoom (X As Long, Y As Long, image&, Scale As Single, Rotation As Single)
Dim px(3) As Single: Dim py(3) As Single
W& = _Width(image&): H& = _Height(image&)
px(0) = -W& / 2: py(0) = -H& / 2: px(1) = -W& / 2: py(1) = H& / 2
px(2) = W& / 2: py(2) = H& / 2: px(3) = W& / 2: py(3) = -H& / 2
sinr! = Sin(-Rotation / 57.2957795131): cosr! = Cos(-Rotation / 57.2957795131)
For i& = 0 To 3
x2& = (px(i&) * cosr! + sinr! * py(i&)) * Scale + X: y2& = (py(i&) * cosr! - px(i&) * sinr!) * Scale + Y
px(i&) = x2&: py(i&) = y2&
Next
_MapTriangle (0, 0)-(0, H& - 1)-(W& - 1, H& - 1), image& To(px(0), py(0))-(px(1), py(1))-(px(2), py(2))
_MapTriangle (0, 0)-(W& - 1, 0)-(W& - 1, H& - 1), image& To(px(0), py(0))-(px(3), py(3))-(px(2), py(2))
End Sub
|
|
|
| ASCII Picker |
|
Posted by: SMcNeill - 04-22-2022, 03:11 AM - Forum: SMcNeill
- No Replies
|
 |
You guys may have seen something like this somewhere before, but this is the original, prettier version than the one that exists inside the QB64 IDE. 
Code: (Select All) _Title "External ASCII Picker"
Screen _NewImage(640, 480, 32)
f = _LoadFont("cour.ttf", 128) 'a nice large display font, not a 100% match to QB64's inbuilt version,
_Font f ' but it works easily here for a demo highlight character
_ControlChr Off
Do
out$ = ASCIIbox$ 'get an ASCII character
If out$ = "" Then System
Print out$, Asc(out$) 'preview it
Sleep: _KeyClear 'hit a key to select another
Cls
Loop
Function ASCIIbox$
Static temp As Long, temp1 As Long, ws As Long
d = _Dest
font = _Font
If temp = 0 Then 'static backgrounds so we don't have to make them over and over, or worry about freeing them
temp = _NewImage(640, 480, 32)
temp1 = _NewImage(640, 480, 32)
ws = _NewImage(640, 480, 32)
End If
Screen temp
Dim CurrentASC(1 To 16, 1 To 16)
Dim CurrentOne As Integer
Cls , _RGB(0, 0, 170)
Color , _RGB(0, 0, 170)
For y = 1 To 16
For x = 1 To 16
Line (x * 40, 0)-(x * 40, 480), _RGB32(255, 255, 0)
Line (0, y * 30)-(640, y * 30), _RGB32(255, 255, 0)
If counter Then _PrintString (x * 40 - 28, y * 30 - 23), Chr$(counter)
counter = counter + 1
Next
Next
_Dest temp1
Cls , _RGB(0, 0, 170)
Color , _RGB(0, 0, 170)
counter = 0
For y = 1 To 16
For x = 1 To 16
Line (x * 40, 0)-(x * 40, 480), _RGB32(255, 255, 0)
Line (0, y * 30)-(640, y * 30), _RGB32(255, 255, 0)
text$ = LTrim$(Str$(counter))
If counter Then _PrintString (x * 40 - 24 - (Len(text$)) * 4, y * 30 - 23), text$
counter = counter + 1
Next
Next
_Dest temp
x = 1: y = 1
_PutImage , temp, ws
Do: Loop While _MouseInput 'clear the mouse input buffer
oldmousex = _MouseX: oldmousey = _MouseY
Do
_Limit 60
Do: Loop While _MouseInput
If oldx <> _MouseX And oldy <> _MouseY Then
x = _MouseX \ 40 + 1 'If mouse moved, where are we now?
y = _MouseY \ 30 + 1
End If
oldx = _MouseX: oldy = _MouseY
num = (y - 1) * 16 + x - 1
If num = 0 Then
text$ = ""
Else
flashcounter = flashcounter + 1
If flashcounter > 30 Then
Color _RGB32(255, 255, 255), _RGB(0, 0, 170)
text$ = Chr$(num)
If Len(text$) = 1 Then text$ = " " + text$ + " "
Else
Color _RGB32(255, 255, 255), _RGB(0, 0, 170)
text$ = RTrim$(LTrim$(Str$(num)))
End If
End If
If flashcounter = 60 Then flashcounter = 1
Cls
If toggle Then _PutImage , temp1, temp Else _PutImage , ws, temp
_PrintString (x * 40 - 24 - (Len(text$)) * 4, y * 30 - 23), text$
Line (x * 40 - 40, y * 30 - 30)-(x * 40, y * 30), _RGBA32(255, 255, 255, 150), BF
k1 = _KeyHit
MouseClick = 0: MouseExit = 0
If MouseButtonSwapped Then
MouseClick = _MouseButton(2): MouseExit = _MouseButton(1)
Else
MouseClick = _MouseButton(1): MouseExit = _MouseButton(2)
End If
Select Case k1
Case 13: Exit Do
Case 27
GoTo cleanexit
Case 32: toggle = Not toggle
Case 18432: y = y - 1
Case 19200: x = x - 1
Case 20480: y = y + 1
Case 19712: x = x + 1
End Select
If x < 1 Then x = 1
If x > 16 Then x = 16
If y < 1 Then y = 1
If y > 16 Then y = 16
_Display
If MouseExit GoTo cleanexit
Loop Until MouseClick
ret% = (y - 1) * 16 + x - 1
If ret% > 0 And ret% < 255 Then
ASCIIbox$ = Chr$(ret%)
End If
cleanexit:
_AutoDisplay
Screen d
_Font font
_Dest 0: _Delay .2
End Function
|
|
|
| Announcements |
|
Posted by: Pete - 04-22-2022, 02:39 AM - Forum: TheBOB
- No Replies
|
 |
This thread is reserved for any upcoming announcements.
|
|
|
|