Modern BASIC Programming for the 21st Century
A powerful, modern BASIC language inspired by BlitzBasic. Create games, GUI applications, and utilities with elegant syntax and blazing-fast compilation to native executables. Features DirectX 12 graphics, integrated debugger, visual GUI designer, and comprehensive Windows API support.
; 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
Everything you need to create amazing applications
Compiles directly to native C++ and machine code for maximum performance. No virtual machine, no interpreter overhead.
Built-in graphics runtime with 2D primitives, image loading, text rendering, and sprite support powered by DirectX 12.
Play sounds and music with built-in support for WAV, OGG, and MP3 formats. Powered by SoLoud audio engine.
Define your own data structures with custom types. Create complex data models with fields and methods for powerful object-oriented programming.
Built-in TCP/UDP networking for multiplayer games and networked applications. Simple API, powerful capabilities.
Integrated development environment with syntax highlighting, auto-completion, and one-click building.
Step through your code, inspect variables, and track the call stack. Full debugging support with breakpoints and stepping controls.
Import and use functions from any DLL. Extend BambooBasic with existing C/C++ libraries.
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.
Compile shaders for production, but use HLSL source for development - the shader system handles both. Integrated shader compiler using D3DCompiler_47.DLL with example shaders included.
Comprehensive documentation with examples covering language features and runtime commands.
Clean, readable syntax that gets out of your way
; 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
; 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
; Image Loading and Display Example
Global running:Int = True
Global img1:Int
Global img2:Int
Function Setup()
BBR_Graphics(800,600,BBR_WINDOW_MODE_WT)
BBR_SetWindowTitle("Image Drawing Example")
img1 = BBR_LoadImage("BigBomb.png")
img2 = BBR_LoadImage("leaves.png")
BBR_SetImageMidHandle(img2)
EndFunction
Function Main()
Setup()
While running
BBR_UpdateEvents()
BBR_Cls()
BBR_DrawImage(img1,0,0)
BBR_DrawImage(img2,BBR_GetMouseX(), BBR_GetMouseY())
BBR_Flip()
Wend
BBR_End()
Return False
EndFunction
;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
;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
Download BambooBasic and start creating
Version 1.0
Windows 11 • 64-bit
By downloading, you agree to the End User
License Agreement HERE
Get support, share your projects, and connect with other developers