r/qbasic • u/nickshardware • 14d ago
QBVision - QuickBASIC 32 bit DOS Compiler by RetroNick2020
r/qbasic • u/nickshardware • 14d ago
r/qbasic • u/nath_mojon • 20d ago
This project attempts to recreate the QBasic 1.1 interpreter and IDE in modern OSs, Windows / Linux binaries included, MacOS possible (if you compile from source). It implements all commands and emulates some MSDOS stuff to the point I was able to run all my old software plus some classics (like the original Wetspot). It is built on top of dos-like and it includes some additions such as native mouse support, the ability to play samples or MOD/MID files, a couple of enhancements to existing commands (a MASK method for PUT, for example), loads BMP / GIT to the screen or to PUT arrays, has huge memory limits (no more 64K constraints), etc.
It's still very early but I'd like to share it. I'm working on reproducing the quirks of the language and possibly add more to the emulation layer if that's necesary - I've just added what my old programs needed (for example, it can run the s3m ADLIB player by bisqwit). You can get it from GitHub - mojontwins/qblike: QBasic clone built upon dos-like for Windows & Linux · GitHub . MIT license.
There's documentation about the new features and general usage in the github repo linked above. For example, those are the extensions: qblike/EXTENSIONES_en.md at master · mojontwins/qblike · GitHub
Any comments are welcome.
r/qbasic • u/Fluffy-Log-4988 • 26d ago
r/qbasic • u/CelticGuy66 • Oct 11 '26
I was following a qb64 tutorial on how to display images. I converted the code listed as a .exe file and ran it and a popup appeared saying "Unhandled Error #5", "Line: 6 (in main module) Illegal function call". And then the code doesn't work.
The code in question:
Dim image As Long
Screen _NewImage(640, 400, 12)
image = _LoadImage("test.bmp")
_PutImage (100, 100), image
Is there anything I did wrong? I'm stumped.
r/qbasic • u/helpingfriendlybook • Oct 03 '26
r/qbasic • u/UnculturedGames • Sep 27 '26
r/qbasic • u/anadalg • Sep 07 '26
r/qbasic • u/GearPlot • Sep 06 '26
Still very much a work in progress, but I'm honestly blown away by how far you can push QuickBASIC if you hack on it enough.
Current feature set:
Working mouse support
Directory navigation
File details dialog windows (triggered when clicking things)
Escape key handling
What doesn't work yet:
Actually launching/opening files
The File menu
Basically everything else
It's amazing what you can build with BASIC
r/qbasic • u/20260819 • Sep 06 '26
⬆️⬆️ignore the pictures above which are not up-to-date
just a basic one. for study purpose. the "world" consists of a background and two balls. the background is an infinitely faraway color palette with azimuth = hue and altitude = lightness. the balls don't have any colors, only reflect and refract
controls
move mouse = change camera direction
left drag = move lmb ball
left hold + wheel = change lmb ball radius
left hold then right hold + wheel = change lmb ball refractive index
right drag = move rmb ball
right hold + wheel = change rmb ball radius
right hold then left hold + wheel = change rmb ball refractive index
wheel forward = camera position forward
wheel backward = camera position backward
[shift] key hold + wheel = change focus distance
[ctrl] key hold + wheel = change view angle
[alt] key hold + wheel = change aperture
[z] key hold + wheel = change background periodicity
[space] + move mouse = auto focus
[w] key = camera position up
[s] key = camera position down
[a] key = camera position left
[d] key = camera position right
[x] key = help you find the balls when you get lost
[z] key = change background
[c] key = full resolution render
control tricks
the mouse controls suck. qbjs doesn't support "mousemovement" command. if your mouse cursor reaches the left-most edge of the screen and you want to move to the left further, quickly move your mouse to the right then move your mouse to the left. my program ignores mouse movements that are too fast so you can use this trick to continue moving if your mouse cursor reaches the edge
the [x] key actually direct your camera toward the centre of mass of the two balls. it's useful when you want to align the placement before full resolution rendering
if you want to temporarily exit full screen (without exiting the program) you can use the standard windows key combo [alt]+[tab] etc. when you come back just click anywhere on the program screen and full screen mode would be restored
suggested usage
the program initially runs at low resolution so as to maintain real time response. at real time mode the program gives you a rough idea how the scene looks like. move the 2 balls around, change their parameters (positions, radii, refractive indices) and see what happens. if you spot an arrangement that you're interested in getting more details, hit [c] and wait for full resolution render. after completion hit any key to return to real time mode
if you want to explore the inside world (camera inside a ball) i suggest you disable the depth of field effect first (turn aperture to 0) as it would be easier to see what's in the scene. finding the correct focus distance are quite challenging when the camera is inside a ball. auto focus may not work as it always focus on the surfaces
r/qbasic • u/crazyqbee • Sep 01 '26
KARMA CITY 2! Coming soon!
This is my biggest project yet! It's a fully textured 3D open-world, rendered with Mode 7 and polygon mapping in QB64—that is no small feat! No hardware acceleration shortcuts or modern engine wrappers—just pure math, pixel manipulation, and vertex projection driving the whole world! This time the game is about an alien invasion, but with a twist: they are demons! Can you find out the truth about these malicious invaders? The game will feature various types of gameplay, what you see in this video is just the beginning.
https://youtu.be/oNnpRKryGHo?si=6wTMfNyxn4ZvcVFx
r/qbasic • u/20260819 • Aug 26 '26
keyboard controls
number 1 to 5 = select object
mouse controls
right drag = move spotlight xy position
right hold + wheel scroll = move spotlight z position
wheel scroll = move camera z position
left hold + wheel scroll = change mesh size
left drag = rotate the object
left hold + right hold + wheel scroll = change ambient
what i learned
quaternions, surely. they're very useful and made the coding a lot simpler than i had anticipated
for brightness calculation i found many different ways on internet. i picked this: for any point on any triangle, it's brightness = dot product (reflection light direction , camera view line). those vectors are normalized. this method is simple but doesn't take intensity loss due to distance into account
what i want to learn further
make the camera freely movable, like in 3d games
use ray tracing method to calculate brightness of each pixel
place more than 1 object in the scene so that at some perspectives one may block the others
draw shadows
r/qbasic • u/Weak-Chemical271 • Aug 16 '26
I'm looking for a suite of programs that'll let me test most if not all features of BASICA, GWBASIC, and QBASIC. I'm writing a dialect of QBASIC (not QB64, this'll be different, currently works on Linux but still want to port it to Windows but before I start porting it, I want to make sure my dialect works) and I'd like some good, decent test programs that'll test each and every command, statement, feature, function, and keyword. Not just BASICA / GWBASIC but QBASIC as well.
r/qbasic • u/20260708 • Aug 14 '26
an extension of previous post. just click▶️to run the program on browser. the welcome screen (attached image 1) shows the key map. select a subject (1 to 6) to enter the depth map mode (attached image 2). rotate it or change it until satisfied then toggle to autostereogram mode (attached image 3). adjust the foreground and background pattern widths to your desire (make it easy to focus and spot the subject). you're free to toggle back to depth map mode or rotate / change / disable subject anytime. if you disable the foreground 3d subject it's basically a kaleidoscope (attached image 4). i explained its mechanism in previous post and you can endlessly randomize it to experience the pareidolia effect
r/qbasic • u/Normal_Assignment226 • Aug 13 '26
I've updated *a BUNCH* of the code for this .BAS. I think it's getting pretty fun.
*When logging in, use any user name you want. The program will automatically prefix your login name with "Agent". Example, if you log in with user "3.5" it will call you "Agent 3.5", for example and again use any user name you want.
*The password MUST be "12345".
*What I plan to really build on is menu item "18". I'm going to copy the visual part of the 1980's movie "War Games" so when anyone launches a missile you can visually see it, just like here "https://alhinator.itch.io/global-thermonuclear-war", but with my own spy / comedy touches like I've been doing.
I've been using AI to help me with this, otherwise it would take me forever. Does this rub anyone the wrong way? I'm curious.
Please have a look and any suggestion would be appreciated.
Thanks
r/qbasic • u/Normal_Assignment226 • Aug 06 '26
I wrote a fun program I would like to share with the world. It's called "Whiskey Tango Foxtrot" (WTF) and named WTF.BAS. It's theme .. think Austin Powers!
I put a link in the Link URL field, I hope it works for you all. Google Drive is hosting it and I put the permission to share with anyone who has the link, so there shouldn't be any issues.
I wrote this program, structured it the way I did, in hopes that it might help others who are just learning things. I believe that it should be a fairly straightforward decipher for whoever dares try. But seriously, if anyone would like to use anywhere from a piece or pieces of, or whatever, I'd be honored for you to hack at mine in moving forward in your hijinks.
I'm no expert, nor do I think I am. I am however the author of this WONDERFUL piece of art and therefore if anyone likes it, and has any questions about it or needs any help, I'm happy to have a go at it, just let me know :)
Reviews please!!
r/qbasic • u/20260708 • Aug 05 '26
long story short. it was an enlightening journey and i learned a lot from it. one day i came across an autostereogram which was a poster on a wall. i forgot what it was about but it aroused my curiosity of how to make autostereograms. i won't go into the math details here and just give you guys a brief explanation in attached image 1. my program let you control "m" and "n/m". these two variables represent background pattern separation and foreground pattern separation respectively and lie between 0 and 1
the 3d subject is simply a sphere, quite boring. the background is the result of placing a color wheel in a kaleidoscope. see attached image 2. it can be easily noticed that the hsl system is in use. we can vary the saturation (attached image 3) and lightness (attached image 4) when the angle changes from 0 to 2π. i use the cosine function which reaches maximum at 0 and 2π, minimum at π
the color wheel can start at any angle. so do saturation and lightness. thus we have 3 degrees of randomness. i let you to change the background. every time you hit the relevant button, the hue, saturation and lightness shift by different random angles
here comes the surprising part. autostereograms need "noise" to guide viewers aligning their foci. a pattern that is too smooth is not suitable to act as the background of autostereograms. there'd be no "texture" on the 3d surface. i accidentally discovered that if the screen resolution is set to a number that is not divisible by something in the calculations (i'm not certain which thing it actually is to be honest) some unexpected noise would emerge. see the remaining attached images
i googled "prime number closest to 640" and the result was 641. i use it as the horizontal resolution
some of those unexpectedly emerging patterns are... strange. some of them look like human faces, some animals, some even aliens. this program is a good place for you to experience pareidolia
here's the program. run it in browser. click▶️to run. click⏹️to exit. when running the program
press [q] to make foreground patterns converge
press [w] to toggle 3d object (absent/present)
press [e] to make foreground patterns diverge
press [a] to make background patterns converge
press [s] to rotate the kaleidoscope
press [d] to make background patterns diverge
press [x] to toggle caption (off/on)
enjoy
r/qbasic • u/SchoolFreeware • Aug 03 '26
QB64 PE is a modern extended BASIC+OpenGL language that retains QuickBASIC 4.5 and QBasic compatibility and compiles native binaries for Windows (7 and up), Linux, and macOS (Catalina and up). QB64PE is a free download at:
https://www.qb64phoenix.com/
[Source - QB64PE Website]
#728, #750 - New QBJS Web Build option in Run menu. - u/boxgaming
Details and discussion of this feature can be found in this forum thread: https://qb64phoenix.com/forum/showthread.php?tid=4598
#730 - Adds source line tracking for Division-by-zero and other Critical Errors, so internal crashes report the BASIC source line/module instead of only Division by zero or Line: unknown. - u/QB64Petr
As this adds lots of additional function calls to the compiled program causing bloat and significant execution speed loss, it's considered a "debug" option which is disabled by default. Use the $ERRORLOCATION metacommand to enable it for a program.
#732. #751 - Adds descriptor-backed dynamic nested arrays in TYPE. It builds on the existing static nested arrays in TYPE support and keeps the legacy/static inline path compatible. - u/QB64Petr
New _STATIC and _DYNAMIC type field qualifiers. Note that dynamic arrays in TYPEs are considered unstable, and must be enabled with $UNSTABLE:TYPEFIELDS.
Handles supported REDIM, REDIM _RETAIN, ERASE, assignment/copy, and ownership cases.
Unsupported raw descriptor payload paths remain intentionally rejected. In particular, _MEM, PUT, and GET over descriptor/owner/variable-string payload layouts are not treated as plain legacy binary payload access.
It is possible using static or dynamic nested arrays as sub/function parameter.
#733 - Compressing undo events in the IDE, resulting in smaller undo files or more undo events fitting in same file size. - u/RhoSigma-QB64
#754 - Update miniaudio to v0.11.25 - u/RhoSigma-QB64
#722 - Correctly check for undefined nested array in ERASE. - u/QB64Petr
#726, #734 - Fix ANSI colors in Discord exports and adding missing keywords. - u/RhoSigma-QB64
#727 - Fix PRINT USING layout duplication when adding expressions before USING in an existing statement. - u/QB64Petr
#729 - Fix runtime error message boxes locking up program if SUB _GL is used. - u/QB64Petr
#730 - Fix case correction for indexed nested UDT member arrays according to the spelling in the TYPE declaration. Also fixes an IDE crash caused by corruption of an internal variable (introduced by "Arrays in TYPEs" changes in v4.5.0). - u/QB64Petr
#735 - Fix case correction of TO in arrays like myArray(1 TO 5) defined in UDTs. - u/QB64Petr
#740, #749 - Fix issue #659, where SUB calls could be incorrectly interpreted as array assignment, and issue #739, adding missing support to insepct the new "Arrays in TYPEs" with $DEBUG. - u/QB64Petr
#746 - Fixed a type mismatch between the identifier table index (LONG) and array descriptor id (INTEGER), which could crash or produce unexpected behavior in large programs with more than 32767 registered identifiers. Also fixed a bug in the $INCLUDE manager, which resulted into a misleading error message. Fixes issue #745. - u/bharvey42
#747 - Widen the UDT index field from 9 to 12 bits, raising the cap from 511 to 4095 UDTs (TYPE) per program. - u/bharvey42
#751 - Fix for selecting source code text by dragging the mouse (no longer need to move the mouse sideways if you are highlighting source code and the mouse moves outside the IDE window). - u/QB64Petr
Full Changelog: v4.5.0...v4.6.0
r/qbasic • u/BigAd4703 • Jul 24 '26
Not an emulator, and not a JavaScript interpreter pretending to be BASIC. It parses QBasic, lowers it through a typed IR, and emits a real WebAssembly module. The compiler itself is compiled to wasm, so the whole thing runs in your tab. Nothing gets uploaded anywhere.
SCREEN 13 works: PSET, LINE, CIRCLE, PAINT, GET/PUT, DRAW, PALETTE. So do BEEP/SOUND/PLAY, the file I/O keywords, INKEY$ with _LIMIT for animation, and DATE$/TIME$/TIMER. There's a playable Space Invaders sample in the editor if you just want to see it move.
497 test programs, 432 of them arbitrated against real QB64-PE output, 126 of 157 keywords fully implemented. Still missing: ON ERROR, PEEK/POKE, COMMAND$, and DRAW's M/N/A/S/P subcommands.
Free, no signup: https://kavak.run/studio/
QBasic was meant to be the pilot language for a larger compiler project, but it turned into the part I enjoyed most. If you've got an old .BAS lying around that breaks it, I'd genuinely like to see it.
r/qbasic • u/darkmatterjesus • Jul 25 '26
MoonBASIC is a 2D 3D game creation made easy. CharmingBlaze/moonbasic
r/qbasic • u/Floamorpg • Jul 18 '26
r/qbasic • u/Bobgar_the_Warbarian • Jul 17 '26
Hello! I've been spending a bit of time working on a quick basic interpreter in javascript that is pretty small and can wrap a game and publish to itch. My current demo is here if anyone wants to check it out (this is a game I made in 1998 when I was 16 or 17, apologies that its kind of terrible). https://bobgar.itch.io/drug-3d?password=qbasic Here is another one here that isn't as impressive but demos the multi-file export: https://bobgar.itch.io/odyssey-qbasic?password=qbasic
The interpreter has some cool features, like:
Bring up debug features with ctrl-break or by pressing debug on the button array at the bottom of the computer
Pre-set iops per game packaged, with turbo button to make the game run faster (either higher iops or completely remove throttling depending on export settings).
Set break points and step through execution, optional code execution highlight & following.
modify code and variables during execution and have them take effect immediately without restart.
save and load state so you can restore previous game states and even export / import saves so you can send them to friends or store for later sessions. Note, the exported saves are zipped, and you can convert back to their verbose json by unzipping if you want to dig into the abomination that is how I'm saving state.
scan lines you can turn on and off for a little retro flair
There is a separate UI (not linked above) for testing & exporting too. You can point it at a full directory of games, browse them, run them, and set up exports including which additional files to export.
Are there people here that would be interested in this kind of thing if I released it? (for free, open source). Do better versions of this already exist? Are there features I should add that would be useful?
Compatibility is not 100%, especially since some games use x86 assembler hooks and things. I've shimmed and emulated a few of the most popular libraries but it is still common for me to run into games that won't play, or play but have some breaking issues.
r/qbasic • u/nickshardware • Jul 14 '26
r/qbasic • u/OkScene375 • May 06 '26