BBC BASIC for SDL 2.0 version 1.12a released

New releases of BB4W and BBCSDL, and other updates, will be announced here
RichardRussell
Posts: 306
Joined: Tue 15 Oct 2019, 09:10

BBC BASIC for SDL 2.0 version 1.12a released

Post by RichardRussell »

I've released version 1.12a of BBC BASIC for SDL 2.0 - the cross-platform programming language for Windows, MacOS, Linux, Raspbian, Android and iOS. The changes in this version are as follows:
  1. BASIC Interpreter / Run Time Engine

    Updated the MacOS edition (only) to SDL 2.0.12 to fix some graphical glitches.

    Enabled render batching in the iOS edition (deferred from 1.11a because of a compatibility issue).

    Improved the Windows edition's compatibility with the username containing non-ASCII characters.

  2. IDEs and Utilities

    In the SDLIDE file selector, starting to type the wanted filename scrolls the listbox.

    Updated BBCEdit to version 0.34.2 (thanks to Andy Parkes).

    Updated touchide to support copying-and-pasting entire directories.

    Fixed a memory leak in SDLIDE's Compile utility.

    When SDLIDE is used with BBC BASIC for Windows the Compile utility now works (it calls the BB4W compiler).

  3. Libraries

    Added the imglib library for rotating, scaling and flipping 2D images efficiently (a highly compatible library is also available for BBC BASIC for Windows).

    Modified the filedlg library so that starting to type the wanted filename scrolls the listbox.

    Added FN_utf8_to_ansi() and FN_ansi_to_utf8() functions to the utf8lib library.

    Fixed a bug in the box2dgfx library affecting non-zero y-origin values when PROC_gfxMatrix is used.

  4. Example Programs

    Added bbclock.bbc (in examples/physics), a graphical Box2D simulation of a 'Ball Bearing Clock'. This program is compatible with BBC BASIC for Windows if the Box2D libraries are installed.

    Added dunebuggy.bbc (in examples/physics), a Box2D demo of a vehicle with sprung suspension. This program is compatible with BBC BASIC for Windows if the Box2D libraries are installed.

    Added kerning.bbc (in examples/general/) to demonstrate the effect of kerning. This program is compatible with BB4W.

    Modified aliens.bbc to use the new imglib library; this also makes it compatible with BB4W, but without hardware acceleration it runs only slowly.

    Fixed a bug in SkyBaby.bbc affecting some editions (e.g. Android but not Windows), caused by a surprising anomaly in the 'asctime' and 'mktime' C runtime library routines.
This new version may be downloaded, for all the supported platforms, from the usual location. The GitHub repository has been updated (used to build the MacOS, Raspbian, iOS and 64-bit Linux editions, currently).
Last edited by RichardRussell on Sat 09 May 2020, 12:37, edited 1 time in total.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

RichardRussell
Posts: 306
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.12a released

Post by RichardRussell »

RichardRussell wrote:
Fri 08 May 2020, 17:22
Implemented OSWORDs 139 & 140 to read and redefine the 'teletext' font (compatible with Matrix Brandy).
DO NOT USE these calls. Although designed to be compatible with Matrix Brandy (and they currently are) they have been retrospectively documented differently here. This is likely to mean that they will be modified in an incompatible fashion in a future release.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

RichardRussell
Posts: 306
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.12a released

Post by RichardRussell »

For anybody who hasn't downloaded and run it themselves (and why not?!) here's the updated Box2D Ball Bearing Clock as supplied with BBCSDL, and also compatible with BB4W:

https://www.youtube.com/watch?v=YSzDa70dC7Q
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

RichardRussell
Posts: 306
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.12a released

Post by RichardRussell »

I've figured out why the Ball Bearing Clock starts to run erratically after a few hours, and eventually stops. It's because the angle of the 'rotor', internal to Box2D, inexorably increases; it is not constrained to the range -PI to +PI (-180° to +180°). Eventually the angle becomes so large that trig functions like SIN and COS are quite inaccurate; this is directly analogous to BBC BASIC's 'Accuracy Lost' error.

Adding code within the program's main loop to keep the rotor's angle in the range -PI to +PI seems to fix the issue. The program now happily runs for long periods, and its timekeeping is more accurate too. I will include the updated version with the next release of BBC BASIC for SDL 2.0.
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.

RichardRussell
Posts: 306
Joined: Tue 15 Oct 2019, 09:10

Re: BBC BASIC for SDL 2.0 version 1.12a released

Post by RichardRussell »

Another of the Box2D demos supplied with version 1.12a:

https://www.youtube.com/watch?v=mqJLBqMEne0
If you have a comment about the style or tone of this message please report it to the moderators by clicking the exclamation mark icon, rather than complaining on the public forum.