Features
Everything you need for indie game development and educational programming
Game Development
Built-in sprite sheets, animation support, graphics commands, and seamless Phaser 3 integration for modern 2D game development.
- Sprite sheet support with LOADPNG
- Frame-based animation with FRAMECOUNT
- Drawing commands (LINE, CIRCLE, POLYGON, PSET)
- Modern canvas-based rendering
Multi-Threading
Advanced concurrent programming with CALL TIMER and CALL THREAD for responsive game loops and background processing, now with thread-safe variable locking and independent thread execution.
- CALL TIMER for scheduled execution
- CALL THREAD for background tasks
- Thread-safe variable locking (implicit & explicit)
- BEGIN LOCK/END LOCK for manual control
- Independent thread contexts prevent deadlocks
- Automatic resource cleanup
Multi-Layer Graphics
Professional 2D graphics system with multi-layer support, frame buffering, and 256-color RGBA palette for advanced visual effects.
- CREATE LAYER for multi-layer composition
- Frame buffering with BEGIN/END FRAME
- 256-color RGBA palette with transparency
- Per-layer scrolling for parallax effects
Modern IDE
Professional development environment with Monaco editor featuring syntax highlighting, autocomplete, and integrated debugging.
- Monaco editor with IntelliSense
- Syntax highlighting and validation
- Integrated help and documentation
- Error dialogs with line numbers for easy debugging
Multi-File Programming
Modular programming with IMPORT statements, automatic main.bas entry points, and seamless multi-file project management.
- IMPORT "module.bas" statement support
- Automatic main.bas entry point creation
- Visual .bas file management in resource panel
- Auto-save with file-specific change tracking
Custom Types & Data
Advanced data management with QBasic-compatible custom types, dynamic objects, and JSON serialization for game state persistence.
- TYPE...END TYPE custom structures
- Dynamic Object types with dot notation
- SERIALIZE$/DESERIALIZE$ for data persistence
- Complete structured programming (SUB/FUNCTION)
- Fixed local variable scoping and negative integer handling
Audio System
Web Audio-based sound system with chiptune support and modern audio format compatibility.
- PLAY command with chiptune sounds
- MP3 and WAV file support
- SOUND command for tone generation
- Web Audio API integration
Code Examples
See CrashBasic in action with these simple examples
Hello World
REM My first CrashBasic program
PRINT "Hello, World!"
PRINT "Welcome to CrashBasic!"
name$ = "Developer"
PRINT "Hello, "; name$; "!"
END
Multi-Layer Graphics
REM Multi-layer graphics example
SCREEN 320, 200
REM Create layers
CREATE LAYER 0, 320, 200 ' Background
CREATE LAYER 1, 320, 200 ' Sprites
CREATE LAYER 2, 320, 200 ' UI
REM Draw to different layers
SET LAYER 0
CLS 1
SET LAYER 1
CIRCLE (160, 100), 50, 14
SET LAYER 2
PRINT "Score: 100"
END
Multi-File Programming
REM main.bas - Program entry point
IMPORT "lib/math.bas"
IMPORT "lib/graphics.bas"
PRINT "Multi-file program!"
result = Calculate(10, 20)
CALL DrawBox(50, 50, 100, 100, 14)
PRINT "Result:", result
END
REM lib/math.bas - Math library
FUNCTION Calculate(a, b) AS INTEGER
Calculate = a * 2 + b
END FUNCTION
Custom Types & Serialization
REM Custom types and data persistence
TYPE PlayerType
name AS STRING
level AS INTEGER
health AS SINGLE
END TYPE
DIM player AS PlayerType
player.name = "Hero"
player.level = 15
player.health = 100.0
REM Save game state
saveData$ = SERIALIZE$(player)
PRINT "Saved:"; saveData$
END
Pixel-Perfect Text Positioning
REM Advanced text positioning with LOCATE ORIGIN
SCREEN 320, 200
REM Standard grid positioning
LOCATE 10, 15: PRINT "Standard positioning"
REM Pixel-level fine tuning with ORIGIN
LOCATE 12, 15 ORIGIN(5, 3): PRINT "Fine-tuned +5,+3"
LOCATE 14, 15 ORIGIN(-2, 8): PRINT "Offset -2,+8"
REM Perfect alignment for game UI
LOCATE 20, 10 ORIGIN(16, 0): PRINT "Score: 1000"
END
Getting Started
Start programming with CrashBasic in minutes
Launch the IDE
Click the "Launch IDE" button to open the CrashBasic development environment in your browser.
Write Your Code
Use the Monaco editor to write your CrashBasic programs with full syntax highlighting and autocomplete.
Run & Debug
Press F5 to run your program, use the integrated debugging tools, and see your games come to life.
Share!
Export your programs as bundles and share them with friends. Your games can run anywhere with just a web browser.
Keyboard Shortcuts
Current Version: 0.15.0
Latest features and improvements - Performance optimizations and bulletproof thread termination
✅ Multi-File Programming (NEW v0.7.0)
- IMPORT statement for modular programming
- Multiple .bas file support with auto-save
- Enhanced resource panel with .bas management
- Backwards compatible legacy bundle conversion
✅ Enhanced Palette System (NEW)
- 256-color RGBA palette system
- Enhanced PALETTE command with transparency
- Semi-transparent colors and effects
- Backward compatible with 16-color CrashBasic
✅ Custom Types & Serialization (NEW)
- QBasic-compatible TYPE...END TYPE
- Dynamic Object types with dot notation
- SERIALIZE$/DESERIALIZE$ functions
- JSON data persistence for game saves
✅ Complete WAV Audio Support (v0.7.2)
- LOADWAV command for loading WAV audio files
- PLAYWAV command with loop and volume parameters
- STOPWAV command for audio control
- Complete Phaser 3 audio system integration
🚀 Version 0.15.0 Highlights
- Bulletproof Thread Termination: Implemented global shutdown manager ensuring threads terminate immediately when program ends
- Performance Optimizations: Streamlined thread architecture with OptimizedThreadManager as the single thread management system
- Memory Leak Fixes: Enhanced audio cleanup for both PLAYWAV and PLAYMP3 to properly destroy Phaser sound objects
- Cross-Instance Communication: GlobalShutdownManager singleton enables shutdown propagation across all interpreter instances
- Enhanced Thread Control: All threads now receive AbortController for proper cancellation support
Get In Touch
Questions, feedback, or want to contribute? We'd love to hear from you!
Why Contact Us?
- Feature Requests: Suggest new BASIC commands or IDE improvements
- Bug Reports: Help us improve CrashBasic's reliability
- Educational Use: Discuss using CrashBasic in classrooms
- Game Development: Share your indie game projects
- Contributions: Join our development community