BambooBasic

Retro BASIC Programming using the newest DirectX technology.

A powerful, modern BASIC language inspired by BlitzBasic. Create games, GUI applications, and utilities with elegant syntax. BambooBasic transpiles to C++ and compiles via G++ to produce native 64bit executables. Features DirectX 12 graphics, integrated debugger, visual GUI designer, and comprehensive Windows API support.

Version 1.0 • Windows 11 • DirectX 12 • 64bit Only
HelloWorld.bam
; BambooBasic Sample Code

; 'Main' calling function, this is our entry to the
; application
Function Main()
    ;Print message to the console (Or output pane)
    Print "Hello World"

    ;Return false to the calling process
    ;to show there is no error.
    Return False
EndFunction

Powerful Features

Everything you need to create amazing applications

Native Compilation

Transpiles to C++ source code, then compiles via G++ to native 64bit executables. No virtual machine, no interpreter overhead.

🎮

DirectX 12 Graphics

Full 3D graphics runtime with GLB mesh loading, skeletal animation, PBR materials, lighting, shadows, and 2D overlay rendering. Includes terrain system with heightmaps and detail textures.

⚙️

Advanced 3D Physics

Comprehensive physics system with rigid bodies, vehicles, character controllers, constraints, force fields, and collision detection. Perfect for realistic game physics.

🔊

3D Spatial Audio

Play sounds and music with built-in support for WAV, OGG, and MP3 formats. Includes 3D spatial audio for immersive soundscapes. Powered by SoLoud audio engine.

🎨

Custom HLSL Shaders

Four shader types: Image shaders, Text shaders, Screen shaders (post-processing), and Entity shaders (3D materials). Full access to 64 parameters and texture registers.

🎭

Bamboo Studio

Included 3D modelling tool (BambooBasic Edition) that enables beginners to easily create 3D objects and scenes. Perfect for prototyping game assets and learning 3D design.

📦

Custom Types

Define your own data structures with custom types. Create complex data models with fields and methods for powerful object-oriented programming.

🌐

Network Support

Built-in TCP/UDP networking for multiplayer games and networked applications. Simple API, powerful capabilities.

🛠️

Modern IDE

Integrated development environment with syntax highlighting, auto-completion, and one-click building.

🐛

Integrated Debugger

Step through your code, inspect variables, and track the call stack. Full debugging support with breakpoints and stepping controls.

📚

DLL Import System

Import and use functions from any DLL. Extend BambooBasic with existing C/C++ libraries.

🪟

BGI (Bamboo Gizmo Interface)

Create native Windows GUI applications with windows, buttons, menus, toolbars, list boxes, tree views, combo boxes, progress bars, date pickers, scrollbars, trackbars, rich text boxes, HTML viewers, and more.

🎬

Visual GUI Designer

Design Windows GUI applications visually with the BGI Designer. Drag-and-drop interface builder with automatic event dispatching and property panels.

📝

Rich Documentation

Comprehensive documentation with runtime API reference, beginner tutorials, shader guides, and coordinate system reference. Over 1000 documented functions.

See It In Action

Clean, readable syntax that gets out of your way

Variables & Types

; Variable Types

Global globalInt:Int = 10
Const constantDouble:Double = 19.99

Function Main()
    ;Create a variable to store our message
    Local message:string = "This is a string"
    Local dble:Double = 3.14159265359

    ;Print values to the console (Or output pane)
    Print globalInt
    Print constantDouble
    Print message
    Print dble

    Return False
EndFunction

Functions

; FUNCTION example

Function Main()
    ;Call our custom functions
    Print ReturnString()

    DisplayInteger(10)

    Return False
EndFunction

;Function that returns a string
Function ReturnString:String()
    Return "Hello"
EndFunction

;Function that takes an integer as a parameter
Function DisplayInteger(i:Int)
    Print i
EndFunction

2D Graphics

; 2D Overlay with Images

Global running:Int = True
Global img1:Int, img2:Int

Function Main()
    ; Initialize graphics engine
    b3dGraphics3D(800, 600, BBR_WINDOW_MODE_WT)
    b3dSetWindowTitle("2D Overlay Example")

    ; Load images for 2D overlay
    img1 = b2dLoadImage("background.png")
    img2 = b2dLoadImage("sprite.png")
    b2dSetImageMidHandle(img2)

    While BBR_AppRunning()
        BBR_UpdateEvents()
        b3dCls3D()

        ; Draw 2D overlay
        b2dDrawImage(img1, 0, 0)
        b2dDrawImage(img2, inpGetMouseX(), inpGetMouseY())

        b3dFlip3D()
    Wend

    b3dEnd()
    Return False
EndFunction

3D Graphics

; 3D Scene with Rotating Cube

Function Main()
    ; Initialize 3D graphics
    b3dGraphics3D(800, 600, BBR_WINDOW_MODE_WT)
    b3dSetWindowTitle("3D Example")

    ; Create camera, light, and cube
    Local camera = b3dCreateCamera()
    b3dPositionEntity(camera, 0, 0, -5)

    Local light = b3dCreateLight()
    b3dPositionEntity(light, 5, 10, -5)

    Local cube = b3dCreateCube(BBR_ONE_SLOT, BBR_NO_TEXTURE_UV, 1)

    While BBR_AppRunning()
        BBR_UpdateEvents()

        ; Rotate cube
        b3dTurnEntity(cube, 0.5, 1.0, 0.0)

        ; Render scene
        b3dRenderWorld()
        b3dFlip3D()
    Wend

    b3dEnd()
    Return False
EndFunction

Arrays & Loops

;Array example
Const ARRAY_ONE_SIZE = 10

Function Main()
    ;Create a single, and multiple dimensional array
    Local arrOne:Int[ARRAY_ONE_SIZE]
    Local arrTwo:String[20][20]

    ;Add some values to various elements
    arrOne[0] = 10
    arrOne[5] = 23

    arrTwo[0][0] = "Hello"
    arrTwo[10][10] = "There"

    ;Print out the contents of the arrays, first with a
    ;loop, then with direct element access
    Local i = 0

    For i = 0 To ARRAY_ONE_SIZE-1
        Print arrOne[i]
    Next

    Print arrTwo[0][0]
    Print arrTwo[10][10]

    Return False
EndFunction

Windows GUI (BGI)

;Simple GUI Application
Import "BBRuntime64.decls"

Global running:Int = True
Global window:Int
Global button:Int
Global label:Int

Function Main()
    ;Initialize BGI and create window
    BGI_InitBGI("Arial", 16)
    window = BGI_CreateWindow("My App", 400, 200)

    ;Create controls
    label = BGI_CreateLabel("Click the button!", 20, 20, 300, 25, window)
    button = BGI_CreateButton("Click Me", 20, 60, 100, 30, window)

    ;Event loop
    While running
        BBR_UpdateEvents()

        Local eventMsg:Int = BGI_GetEventMessage()
        Local eventID:Int = BGI_GetEventID()
        Local eventSource:Int = BGI_GetEventSource()

        If eventMsg = BGI_EVENT_COMMAND_CLOSE Then
            running = False
        EndIf

        If eventMsg = BGI_EVENT_COMMAND_CLICK And eventSource = button Then
            BGI_SetGizmoText(label, "Button clicked!")
        EndIf

        BGI_FlushEvent()
        BBR_Delay(10)
    Wend

    BBR_End()
    Return False
EndFunction

Get Started Today

Download BambooBasic and start creating

🎯 Full Package

Version 1.0

  • BambooBasic Compiler
  • Integrated Editor with Debugger
  • Bamboo Studio - BambooBasic Edition (3D modelling tool)
  • Visual GUI Designer (BGI)
  • Shader Compiler (compile shaders with the editor)
  • Runtime Library (DirectX 12, Audio, Networking)
  • Complete Documentation
  • 50+ Example Programs
Download for Windows

Windows 11 • DirectX 12 • 64-bit

By downloading, you agree to the End User
License Agreement HERE

System Requirements

OS: Windows 11 (64-bit) with DirectX 12
RAM: 4GB minimum, 8GB recommended
Storage: 500MB free space
Graphics: DirectX 12 compatible GPU

Join the Community

Get support, share your projects, and connect with other developers