nuBASIC 2.0 is a major release that significantly expands the language, runtime, tooling, and Windows graphical capabilities of the project.
This version introduces a more modern BASIC programming model while preserving compatibility with the classic nuBASIC style where possible. The language now supports SELECT CASE, a formal main() entry point, open-ended array parameters, namespaced modules, stricter Syntax Modern rules, and a much more complete object-oriented programming model.
The OOP system has been substantially improved. Class instances now use true reference semantics, preserving object identity across assignments, parameters, and return values. The release also adds static class methods, Nothing, reference comparison, inheritance-aware assignability, MyBase, Protected members, stricter Overrides validation, stronger private encapsulation, first-class New expressions, and class destructors through Sub Delete() for RAII-style cleanup.
nuBASIC 2.0 also introduces native library calls on Windows x64, Linux x86_64, and macOS through Declare Function ... Lib ..., with optional aliases and calling conventions. This is supported by native memory helpers for manual buffer and structure layout, enabling BASIC programs to call platform APIs and external libraries directly. Native calls are enabled by default for trusted local hosts and can be disabled explicitly with --disable-native-calls or the matching IDE option.
A major highlight of the Windows build is the integration of WinRayCast, a lightweight pseudo-3D raycasting engine for Wolfenstein 3D-style first-person scenes. BASIC programs can drive the engine through the new raycast module, covering world loading, rendering, player movement, sprites, weapons, combat, input, map queries, and level transitions. The release includes examples/raycast/eclipse_protocol.bas, a complete tutorial-style FPS demo with multi-weapon combat, health and energy systems, HUD, minimap, locked doors, autosave checkpoints, and elevator transitions between levels.
Tooling has also been extended. nuBASIC 2.0 adds optional Visual Studio Code support with syntax highlighting, Run/Stop commands, executable discovery, packaging targets, and debugger integration. The interpreter core and Windows IDE now support debugger stepping modes such as Continue, Step Into, Step Over, Step Out, Pause/Break, and Run to Cursor. Graphical programs can also be debugged from VS Code using a separate GDI window for graphics, keeping debugger protocol output and graphical rendering separated.
The runtime has received important internal improvements as well. The central variant_t value representation has been optimized to avoid unnecessary scalar allocations, box struct/object metadata, use copy-on-write for struct payloads, and preserve declaration order for FFI and introspection. The statement parser has also been refactored and split into clearer implementation units for maintainability.
This release removes several deprecated scalar built-in functions. The old date/time functions such as SysDay, SysMonth, SysYear, SysHour, and similar functions have been removed in favor of GetDateTime(). Deprecated scalar mouse functions such as GetMouseX, GetMouseY, and GetMouseBtn have also been removed in favor of GetMouse().
nuBASIC 2.0 includes many compatibility, correctness, and quality fixes. These include improved CLI argument handling for scripts using main(argc, argv), support for line continuation with _, optional C-style hexadecimal literals such as 0xFF, fixes for Print #n, On...GoTo, inline labels, and improved Str$(double) formatting. Windows IDE diagnostics have also been hardened so runtime and syntax errors are reported consistently through the Output pane and dialogs.
Overall, nuBASIC 2.0 is one of the most significant releases of the project: it modernizes the language, strengthens object-oriented programming, opens the door to native platform integration, improves debugging and IDE support, and introduces a new experimental graphical/game-programming direction through WinRayCast.
