Skip to content

Repository files navigation

ABOUT

BazzBasic is built around one simple idea: starting programming should feel nice and even fun.

Ease of learning, comfort of exploration and small but important moments of success. Just like the classic BASICs of decades past, but with a fresh and modern feel.

It's easy to get started with and offers a rewarding experience with little effort. Simple syntax, modern features, and you'll be creating your first little game in a couple of evenings — hours perhaps.

Check this few lines long example game to see it yourself!

Development

BazzBasic is released under the open source MIT license.

Currently, the development work is done in the Windows 11 operating system, but with quite a bit of effort it can also be translated to Linux or MacOS.

Main functionalities

Most familiar BASIC features work either completely or almost completely as users of traditional BASIC languages ​​are used to using them.

User-Defined Functions

With or without recursion.

DEF FN factorial$(n$) 
    IF n$ <= 1 THEN 
        RETURN 1 
    END IF 
    RETURN n$ * FN factorial$(n$ - 1)
END DEF

PRINT FN factorial$(5) ' Output: 120
PRINT FN factorial$(10) ' Output: 3628800

See User-defined Functions

SDL2 Graphics & sounds

BazzBasic offers a reasonable sampling of SDL2 features.

If your program uses graphic features, SDL2.dll must be in the same directory. This does not apply to console-only programs.

See Graphics Commands

BazzBasic includes a sound system built on SDL2_mixer, supporting audio playback with both background and blocking modes.

See Sound Commands

Source Control

With the INCLUDE function, you can split the source code into different files and folders or generate tokenized libraries.

See Preprocessor or Generating libraries

Data types

Unlike many traditional BASIC interpreters, which required strong typing and often separated different data types with suffixes such as $ or %, BazzBasic copes smoothly with untyped data.

Typeless Variables and Constants

Variables automatically hold either numbers or strings:

LET num$ = 42            ' Number
LET text$ = "Hello"      ' String
LET mixed$ = "123"       ' String (quoted)

See Variables & Constants

Arrays

BazzBasic arrays are fully dynamic and support numeric, string, or mixed indexing.

DIM MyArray$
MyArray$("name") = "John Smith"
MyArray$("age") = 42

See Arrays & JSON

Getting Started

More Resources

BazzBasic size

Currently, BazzBasic requires about 70 megabytes + SDL2.dll

PublishTrimmed=true would reduce its size, but thorough testing is needed first.

BazzBasic includes .NET 10 assemblies during compilation, which affects the file size.

.NET 10, although a bit bulky, still offers compatibility far into the future.,