It still surprises people to hear that Basic is alive and well in 2023. Let's just say that rumors of its demise have been greatly exaggerated. There are many dialects still in use, from classics modernized for the 21st century to those made to ease development with complex libraries.

QBJS appears to be one of the former at first, given its connection to the QB64 project. But in reality it was from the start a vehicle for the GX game engine. It can still be used just as well to run old games, and put them online for everyone to see, like this port of Land / Lord.

(Unfortunately it doesn't work in Privacy Browser on my Android tablet. But it does work in WebPositive on Haiku OS.)

And you know what? That strikes me as very educational. Follow the link, and you'll see the game's source code in a nice IDE where you can actually change it, test it and share the modified version with other people. Or for that matter export it as a stand-alone web app, complete with a virtual filesystem.

Screenshot of a web-based IDE with three panes, showing a tall column of colorized source code next to an output window and a console, all with few buttons.

Speaking of which: QBJS is a compiler: it emits clean Javascript that runs fairly fast in modern browsers. It also comes with a library to access the DOM, create user interfaces and the like, making it useful for web apps.

For once, an engine I want to use instead of coding in JavaScript. To be continued.

Important note! QBJS expects all subroutine and function definitions to come after the main program (and an end statement), like this:



sub hello
    print "Hello, world!"
end sub

This is in line with other classic dialects like BBC Basic, but surprising to people who code in modern scripting languages. It tripped me up at first; luckily members of the community were very helpful.