Skip to content

Releases: boxgaming/qbjs

v0.4.0-beta

16 May 14:54
39d67e1
Compare
Choose a tag to compare
v0.4.0-beta Pre-release
Pre-release

Release Highlights

Touch Support for Mobile

Existing QB64 mouse keywords are now mapped automatically to touch events on devices that support it.  We've also added support for QB64 resize methods to size your application dynamically.  Here are a couple of examples to try on your phone:

  • QBJS Paint - Touch enabled drawing program
  • Flappy Bird - Ported from Terry Ritchie's excellent QB64 version

Expanded set of QBasic/QB64 Keywords

See the full list below.

Export your "Compiled" Program

The Share feature now has a new option.  When you chose a share mode of "Play" or "Auto" you now have the option to export the compiled javascript version of your program (along with supporting html assests) to a self-contained zip file.  Ready to share on your favorite forum or upload to game sharing sites like itch.io.

Create Reusable Modules with Import/Export

We've implemented the ability to include "modules" from external source files into your program.  This concept is similar to include from C/C++ and import from Javascript.  The idea here is to make it easy to create reusable libraries that can be shared between projects. 

Standard Libraries

In an effort to allow QBJS to grow in an organized way beyond the initial set of QBasic/QB64 keywords, we are introducing standard library modules to support extended functionality.  This will allow you to include only what you need for each program.  The first of these standard libraries included with this release are the Dom and Storage libraries which provide access to the current web page and browser storage.  You can read more about it in the Supported Keywords page.

Release Notes

Fixes

  • Fix implementation of startAngle and endAngle parameters in Circle keyword
  • Improve accuracy of _Limit keyword by incorporating time elapsed since last loop iteration
  • Fix implementation of Val keyword to correctly convert strings with hexidecimal (&H), octal (&O), and binary (&B) prefix.

Enhancements

  • Add support for touch events on mobile
    • Basic touch events are now mapped by default to mouse-state methods _MouseX, _MouseY, _MouseButton and _MouseInput
    • More fine-grained touch event logic can be handled with the DomEvent method
  • Scale canvas to screen size when in fullscreen mode
    • Add support for _FullScreen keyword
  • Add support for module imports via new Import/Export keywords
  • Add support to export compiled program and dependencies to a standalone zip file
  • Update Circle keyword to support optional aspect parameter
  • Add support for hex, oct and binary number literals
  • Add support for RGB colors defined with number literals
    (e.g. Line (100, 100)-(200, 200), &HFFFF0099, BF )
  • Update _NewImage, _Width, and _Height methods to support character-based screen sizing
  • Add support for additional QBasic/QB64 Keywords:
    • Beep, Csrlin, Draw, Hex$, Oct$, Paint, Pos, Point, Preset, Time$, Window
    • _Cosh, _D2R, _R2D, _Sinh

v0.3.0-beta

30 Mar 22:44
Compare
Choose a tag to compare
v0.3.0-beta Pre-release
Pre-release

QBJS 0.3.0 - Beyond the Screen!

Fixes

  • Cls is not resetting the text location to the top left of the screen.
  • _FreeImage is being reported as an unrecognized method
  • Using the "Call" keyword to call a sub with no arguments causes an error

Enhancements

  • Add parameter to launch QBJS in "Play" mode with no IDE (mode=play or mode=auto)
    • Add mode selection on the share dialog to automatically add this parameter to the generated URL
  • Add support for additional string keywords:
    • String$, Space$, Cvi, Cvl, Mki$, Mkl$
  • Add support for basic sound keywords:
    • _SndOpen, _SndClose, _SndPlay, _SndLoop, _SndVol, _SndPause, _SndStop
  • Add Keywords to interact with the HTML Page / Browser
    • Add DOM (Document Object Model) manipulation and event keywords:
      DomCreate, DomAdd, DomRemove, DomGet, DomGetImage, DomContainer, DomEvent
    • Added support for standard web page message boxes:
      Alert, Confirm, Prompt
    • Added support for browser persistent and session storage:
      StorageClear, StorageGet, StorageKey, StorageLength, StorageSet, StorageRemove
  • Add support for detecting browser window resize:
    • Implement keywords: _Resize, _ResizeWidth, _ResizeHeight

v0.2.1-beta

15 Mar 16:16
Compare
Choose a tag to compare
v0.2.1-beta Pre-release
Pre-release

Fixes

  • Keywords that perform a system wait or sleep (_Delay, _Limit, Sleep) do not wait correctly when called from a Sub
  • Keywords that perform a system wait (_Delay, _Limit, Sleep, Print, Input, Line Input) error when called from a Function
  • Array declaration (Dim/ReDim)
    • (x To y) syntax not supported at present (e.g. Dim myArray(0 To 10))
    • Multi-dimensional arrays are not initialized correctly unless using the "Dim As Type" format (e.g. Dim As Integer myArray(10, 20))
  • Improved support for standard key mappings for InKey$, _KeyDown and _KeyHit methods
  • Single-line If/Then/Else statements are not converted correctly
  • Single-line If/Then statements with ":" to combine additional lines do not work correctly

Enhancements

  • Implement color table for the various screen modes so the simple indexed color numbers can be used in addition to colors defined with _RGB(32)
  • Add support for QB64 image handling methods (_NewImage, _LoadImage, _PutImage, _CopyImage, _FreeImage)
  • Improved runtime error reporting