Skip to content

Releases: boxgaming/qbjs

Release 0.10.3

07 Mar 01:30

Choose a tag to compare

This is a maintenance release containing the following fixes:

General

  • Updates to support fonts 8 and 14 for associated screen modes (#177).
  • Updated to return character sizing for _Width and _Height in mode 0 images (#181)
  • Fixes to Screen method to support (#181)
  • Fix to alpha component of color object created in Point method (#180)
  • Updated to detect color object and convert to number for numeric parameters of built-in methods (e.g. Hex$(Point(1, 1))
  • Fix to browser storage library caused by recent compiler improvements
  • Fixed typo in RotoZoom preventing correct usage of _Dest other than 0
  • Fix for audio context close error (#176)
  • Update to set focus to canvas when clicked (#175)

IDE / Compiler

  • Add error checking for Import statement (#178)
  • Updated to correctly dispatch a window resize event when the sizing sliders are moved.
  • Updated to hide the active tab (instead of only the main code window) when the code panel is minimized.
  • Fix to IDE "play" mode

GX

  • Added missing GXSceneWindowSize method which will resize the scene to the specified height and width without changing the current scaling

Release 0.10.2

15 Nov 16:46

Choose a tag to compare

This is a maintenance release containing the following fixes:

  • Added missing _FreeFont method (#167)
  • Added getSound accessor method for extension libraries
  • Fix for array variable declaration issue (170#)
  • Fixes for global method variable declaration (163#)
  • Fixed console error message wrong module issue (#162)
  • Fixes to correctly handle reserved JS word "in"
  • IDE Fix to ensure that all code editor tabs use current key binding mode

GX

  • Framerate fix for higher frequency displays. This change also now allows setting framerate lower than the default (60).
  • Updated GXFrameRate function to return calculated, actual FPS
  • Entity animation speed fix
  • Entity gravity fix for frame rates other than 60 fps
  • Added support for "top down" mode entity rendering (GX)

Release 0.10.1

03 Oct 13:23

Choose a tag to compare

This is a maintenance release containing the following fixes:

  • Fix to MId$ statement when arrays are passed as arguments
  • Added error handling to prevent errors writing to screen text buffer past bounds
  • Attempting to use the SndVol method results in the following error: “GX.soundVolunme is not a function” (#166)
  • Syntax Highlighting Fixes for "Static" keyword and GX methods: GXEntityMapLayer, GXEntityFrame, GXEntityFrames, GXEntitySequence, GXEntitySequences (#164, #165)
  • Added missing mapping for the GXEntityFrame function (#165)

Full Changelog: v0.10.0-beta...v0.10.1-beta

Release 0.10.0

15 Aug 20:41

Choose a tag to compare

Try out the release online here: https://qbjs.org

Release Highlights

Language/Compatibility Enhancements

This release contains a number of important language support updates which should greatly enhance the compatibility of QBJS with QBasic/QB64.

Implicit Variable Declaration

One of the most significant updates included in this release is support for implicit variable declaration. It is no longer necessary to make sure that you DIM all of your variables in QBJS. This enhancement also includes support for the QB64 Option _Explicit and Option _ExplicitArray directives.

Integer Division Operator

This release also now includes full support for the integer division (\) operator. In previous releases integer division was treated identically to a normal division operator (/) and did not perform the expected rounding.

More Keywords

Support has been added for QBasic Mid$ statement as well as the QB64 Clipboard methods:

  • _Clipboard (statement)
  • _Clipboard (function)
  • _ClipboardImage (statement)
  • _ClipboardImage (function)

Numerous other compatibility enhancements and fixes can be found in the full release notes below.

New Language Features

This release adds support for Method Pointers which provide the ability to define Functions and Subs as variable types. Pointers to existing subs or functions can be referenced with the new '@' operator. Also included is a new standard String library containing commonly used string operations (e.g. Replace, Split) as well as advanced regular expression matching.

IDE Updates

The QBJS IDE has also received a major refresh with this update. A "New Project" button has been added to the toolbar to allow convenient creation of a new, blank project when one is already open.

Code tabs have been added to make it easier to manage larger projects with multiple resources in the QBJS IDE. Users can now open additional files from the virtual file system for edit in separate code tabs. This includes syntax highlighting for a number of known text file formats:
Code Tabs
All other text files will be loaded in a plain text editor as shown below:
Code Tabs
Image formats will be loaded in an image preview tab:
Code Tabs
Sound file formats will be loaded in an audio preview tab:
Code Tabs
All other binary files will be loaded in a hex viewer tab.

New Theme

A new theme named Blackout has been added for those who like a very dark look but retains the same font and feel as the original QBasic IDE.
Blackout Theme

Javascript Tab Syntax Highlighting

Syntax highlighting has been enabled for the Javascript tab in the console to aid in readability of the generated Javascript for troubleshooting:
Javascript Syntax Highlighting

Release Notes

Language/Compatiblility Updates

  • Support for implicit variable declaration (#57, #33, #151)
    • Support for Option _Explicit and Option _ExplicitArray
    • Fixes for method-level SHARED variable declarations.
  • Variables declared in the main module are effectively "Shared" whether they are defined as such or not. (#158)
  • Added support for method-level CONSTs
  • Full support for integer divison (\) operator (#147)
  • Implement Mid$ statement
  • Implement QB64 Clipboard functions (#76)
    • Implements _Clipboard$ (statement and function)
    • Implements _ClipboardImage (statement and function)
  • Update InKey$ to fill key press buffer when key is held down (#65)
    • Fixed InKey mapping for space and escape.
  • PRINT - Trailing space not being printed for numeric variables (#84)
  • Fixed error loading standard web fonts (#152)
  • Removed compiler warning for $NoPrefix since keyword prefixes are optional
  • Fix erroneous block end error messages when used in combination with "$If Javascript"
  • Add compiler error for unterminated string constants
  • Allow "ENDIF" as well as "END IF"
  • Allow "$ENDIF" as well as "$END IF"
  • Allow "?" to be used as shorthand for PRINT

New Language Features

  • Added support for Function and Sub as variable types (#156)
    • Added support for method reference prefix "@" and Function and Sub as types
  • Add extended standard library for common String operations (#157)

IDE Updates

  • Added 'New' button to IDE
  • Added code tabs to enable editing/preview of files in VFS (#132)
  • Added syntax highlighting to Javascript tab (#145, #148)
  • Added new "Blackout" theme
  • Set focus to editor when clicking an error or warning in console (#142)
  • Updated methods dialog in IDE to distinguish array parameters in method descriptions
  • Added module info to error/warning data to support showing errors in appropriate source file
  • Updates to disable code editor(s) while program is executing
  • Stops previous program at load
  • Stops program before creating new project
  • Added console settings persistence IDE

GX Fixes and Updates

  • Added missing GX methods: GXEntitySequence, GXEntitySequences
  • Collision detection fixes
  • Fixes to GXMapLoad for legacy web map format

0.9.1 Release

04 Feb 20:44

Choose a tag to compare

This is a maintenance release containing the following fixes and enhancements:

  • PLAY was not correctly extending the note duration when "." was encountered. (#126)
  • Updated _FileExists to correctly return status of files from relative URLs. (#118)
  • Updated _LoadFont to correctly load font resources from relative URLs. (#118)
  • Updated Str$ to correctly include a space before a positive number. (#123)
  • GX fixes and enhancements. Compatibility with GX 0.6.0.

0.9.0 Release

13 Jan 21:28

Choose a tag to compare

Try out the release online here: https://qbjs.org/

Release Highlights

Offline Mode

In this release QBJS will offer offline deployment as a progressive web application (PWA). This change allows you to install QBJS locally directly from the browser. A new icon will appear in the address bar which which will allow you to install the application. After the install is complete you can then run QBJS in a standalone application window. The best part of this change is that all of the content needed to run QBJS will be installed on your device. So, you will be able to use it when completely disconnected from the internet. But you'll still get the best of both worlds as it will download any updates when new releases come out.

A couple of notes:

  • The install as app feature is available in most major browsers but for some reason this is not fully supported on Firefox desktop version (although it is on the Android version of Firefox)
  • On iOS this can be installed by selecting the "Add to Home Screen" option.

IDE Updates

In addition to the above, this release also includes a new dialog window that will display the methods and allow you to jump to the method definition. As in QBasic and QB64 this dialog can be shown by pressing the F2 key or by clicking the icon in the toolbar. Additionally, this dialog will show the available methods of any imported library.

There have been a number of updates made in this release to improve the level of error handling and reporting. The IDE now supports compilation ERROR messages in addition to the previous WARN level messages. If ERROR level compilation issues are encountered they will prevent the program from running.

Finally, for any VIM fans out there you can now select a VIM key binding to use the editor in VIM mode.

Language/Compatibility Enhancements

There are a large number of updates intended to improve compatibility with QBasic/QB64. One of the most significant was the change to use Javascript bitwise operators in compiled programs instead of boolean ones for AND, OR, and NOT keywords. There are also a number of updates to improve the default font compatibility with the code page 437 character set and international characters. This release also includes support for PLAY and the SCREEN function.

Release Notes

IDE Updates

  • Add PWA Support (#112)
  • Add support for dialog to show and jump to methods (F2) (#106)
  • Add ERROR in addition to WARN for reported compiler issues. Prevent execution when ERRORs are reported. (#110)
    • Added numerous runtime assertions for better error reporting.
  • Add support for vim key bindings (#121)
  • Updated open project logic to determine if the zip file has a single folder and if so to treat it as the root
  • Update to correctly stop sound from playing when runtime is stopped

Language/Compatibility Enhancements

  • Updated to make mousewheel events cumulative
  • Added support for Screen function (#115)
    • Fix for font and text screen width calculations
  • Add support for Play (#62)
  • Implemented pixelated scaling for fullscreen unless _SMOOTH parameter is specified
  • Fixed parsing error preventing Exit from correctly exiting loop when nested inside Select Case (#109)
  • Handle JS reserved words (#120)
  • SOUND duration should be interpreted in units of TIMER ticks 1/18th of a second, instead of milliseconds (#119)
  • Support for international characters and UTF8 (#114)
    • Updated default font to use standard UTF code mappings. Added a character map to translate codes in Asc and Chr$ methods for backwards compatibility.
    • Fixed default font character mapping
  • Switch to Bitwise operators (And, Or, Not) (#113)
  • Support hex prefix (&H) on values in DATA (#106)
  • Updated to explicitly set method parameter types
  • Updates to correctly identify "Unsigned" parameter types
  • Export fix to prevent registering built-in functions.
  • Fixed typo in Asc method implementation
  • Fixes for Val NaN detection
  • Added _SMOOTH option for PutImage method
  • Fixed issue with export causing collisions between multiple imported libraries
  • Updated GX constants to use -1, 0 instead of actual boolean values
  • GX updates - animated tile and map resize support

Experimental

  • Updates to support nodejs-based command line compiling
  • Added support for gzip compressed code parameter

v0.8.2-beta

02 Feb 23:21

Choose a tag to compare

Fixes

  • Fix to correctly include pako dependency zip in exported program (#104)
  • Updated OPEN with ability to read files from URLs (#105)
  • Updated to prevent automatically setting the focus to the editor when embedded inside an iframe
  • Updated sleep to exit execution when the script has been stopped

v0.8.1-beta

21 Jan 20:06

Choose a tag to compare

Fixes

  • Fix to error line reporting for chrome-based browsers
  • Letter spacing fix to QB45 and QB45 VScode themes

0.8.0 Release

20 Jan 14:38

Choose a tag to compare

Try out the release online here: https://qbjs.org

Release Highlights

Language Support

A major focus of this release was improvements to QB/QB64 language support and compatibilty. This includes many compiler improvements as well as adding support for over 30 additional keywords. Some highlights include:

  • Support for SOUND
  • QB64 string compression: _Deflate$, _Inflate$
  • Support for STATIC variables in functions and subs
  • QB64 keywords can be used with or without leading underscore.

IDE Enhancements

Numerous fixes and enhancements to the IDE were included in this release. There is now a shortcut key for stopping the running application (SHIFT+F5). Files can now be uploaded to the virtual file system via an upload link in addition to the already supported drag and drop method. The largest and most visible change is the inclusion of a new integrated help tab to the console. This includes content directly from the github wiki.

2D Graphics Library

New methods were added to the extended 2d graphics library to apply dashed line style to any line drawing method as well as the ability to draw an inverted rect.

Release Notes

Enhancements

  • Added support for Sound keyword including new optional decay and gain parameters. (#53, #43, #44)
  • Added support for Static variable definitions. (#49)
  • Added support for Shared variable declarations in functions and subs. (#50)
  • Added support for new extended 2D graphics features InvertRect and LineDash(Off). (#99)
  • QB64 keywords can be used with or without leading underscore "_". (#68)
  • Support new QB64 way of defining multiple variables of the same time on a line for custom type declarations (#56)
  • Display flashing prompt when Input command is accepting user input. (#94)
  • Add support for QB64 string compression methods _Deflate$ and _Inflate$. (#74)
  • Text screen scrolling not working with Input after recent font support changes. (#93)
  • Added support for QB64 keyword modifier key functions: _NumLock, _CapsLock, _ScrollLock. (#77)
  • IDE Enhancements
    • Added integrated Help tab (#70)
    • Stopping program execution in the IDE should halt all playing sounds. (#91)
    • New IDE Theme - QB64 VSCode. (#51)
    • Always show Export button on Share dialog. (#87)
    • Implemented shortcut key to stop the running program (SHIFT+F5). (#90)
    • Add upload button to Files tab as an alternative to drag-and-drop. (#86)
    • Automatically set focus to code editor when in IDE mode. (#52)

Fixes

  • Amount of delay by _Limit not consistent between browsers (#55)
  • Render issue with PSet optimizations when changing _Dest image (#80)
  • Various tweaks and improvements to file operations. (#47)
  • Fixed Firefox specific text placement issues (#88)
  • Explicitly convert value when passing floating point values to integer method parameters. (#81)
  • Fixed parser error when IF statement follows a multi-line separator ":". (#79)
  • Fixed parser error for conditional keywords (if, elseif, while, until) with no space between keyword and open parenthesis. (#85)
  • Fixed parser error for subs and functions which contain "." in the name. (#83)
  • Subs with coordinate-style parameters with no space between the method name and first parameter were not correctly being identified as subs by the parser. (#54)
  • IDE Fixes
    • Fixed fullscreen link in exported html. (#96)
    • Reduced size of QBJS logo in exported html (#95)
    • Zip files created when saving or exporting the project were not compressed. (#100)
    • Prevent program from starting multiple times when pressing the run shortcut key (F5). (#89)

Added Keywords

  • QB
    • Environ, Environ$, Error, Loc, Static
  • QB64
    • Arccot, _Arccsc, _Arcsec, _CapsLock, _CommandCount, _Cot, _Csc, _Deflate$, _DesktopHeight, _DesktopWidth, _Dir$, _Echo, _EnvironCount, _Inflate$, _Sec, _MouseHide, _MouseShow, _NumLock, _ScreenMove, _ScreenX, _ScreenY, _ScrollLock, _Title$
  • QBJS
    • G2D.InvertRect, G2D.LineDash, G2D.LineDashOff

v.0.7.3-beta

14 Jun 15:42

Choose a tag to compare

Minor patch release to address the following issues:

  • Fixed Locate bug introduced by new custom font functionality
  • Fix for src url parameter to correctly handle source urls with parameters
  • Added ability to prefix parameters with "#" instead of "?" to allow for longer code URLs
  • Added detection logic for additional zip file content types: application/zip-compressed, application/x-zip-compressed
  • Fixed screen sizing issue in "auto" and "play" modes
  • Disabled beforeunload event when not in IDE mode (e.g. auto, play)