Skip to content

RydeTec/blitz-forge

Repository files navigation

BlitzForge

BlitzForge

Blitz3D, modernized.

An open-source, cross-platform compiler and runtime for the Blitz programming language — keeping a generation of games and tools alive while moving them onto modern hardware.


CI Lint Latest Release Stars Open Issues Pull Requests Last Commit Discussions

Windows x86_64 macOS arm64 alpha Language: C++17 Build: CMake + Ninja

Download · Quick Start · Language Reference · Samples · Discussions · Contribute


Why BlitzForge

Blitz3D and BlitzBasic shaped a generation of indie game development. The original toolchain was tied to 32-bit Windows, closed-source, and frozen. BlitzForge is the alternative:

  • Open source. MIT-style community development, public CI, no surprise binaries.
  • Cross-platform foundations. Native Windows x86_64 is the stable target today. A macOS Apple Silicon (arm64) port is in alpha — same source tree, ARM64 codegen, Cocoa runtime backend — but not yet ready to ship games on. See macOS (Apple Silicon) — alpha below.
  • Modern build system. CMake + Ninja, optional static analysis, GitHub Actions CI on every push.
  • Drop-in compatible. Existing .bb source compiles. Existing .decls userlibs work. We do not break your games.
  • Production-tested. Powers RealmCrafter: Community Edition and the games built on top of it.
Original Blitz3D BlitzForge
License Proprietary Open source
Source Closed Public
Platforms Windows 32-bit Windows x86_64 (stable) + macOS arm64 (alpha)
Build system Custom / VS6-era CMake + Ninja
Codegen targets x86 only x86 + ARM64
CI None GitHub Actions: build, test, lint
Dev tooling Built-in IDE only VS Code extension + native IDEs
Maintenance Frozen Active

Features

  • blitzcc — the BlitzBasic compiler, producing native executables.
  • Two code generatorscodegen_x86 and codegen_arm64, sharing a common assembler abstraction.
  • Native runtimeruntime.dylib / runtime.dll providing the standard Blitz library surface (graphics, audio, input, filesystem, sockets, etc.).
  • Linkerlinker.dylib / linker.dll for producing standalone executables.
  • Userlib system — load existing .decls + DLL/dylib pairs unchanged.
  • macOS backend — a Cocoa/Objective-C++ runtime backend (macos_runtime_backend.mm) provides the Win32 surface that legacy modules expect.
  • Tests + CI — a Blitz-language test suite under tests/ runs on every commit and on every PR.

Install

Download a pre-built release for your platform from Releases.

Platform Artifact Status
Windows x86_64 blitzforge-windows-x64.zip Stable
macOS arm64 blitzforge-macos-arm64.zip Alpha — not for production use

Each release ships:

bin/
├── blitzcc           # the compiler
├── runtime.{dll,dylib}
├── linker.{dll,dylib}
└── OpenAL32.dll      # vendored audio runtime (Windows-style name preserved cross-platform)

Add bin/ to your PATH and you're done.

Quick start

; hello.bb
Print "Hello from BlitzForge!"
WaitKey
End
blitzcc -o hello hello.bb
./hello

For graphical samples, see samples/ and games/.

Build from source

Prerequisites

Tool Windows macOS
C++17 compiler MSVC 2019+ (Build Tools or Visual Studio Community) Xcode Command Line Tools
CMake ≥ 3.20 ≥ 3.20
Ninja
Node.js (for VS Code extension) 22.10.0 (via nvm) 22.10.0 (via nvm)

Windows

git clone https://github.com/RydeTec/blitz-forge.git
cd blitz-forge
compile.bat
test.bat
publish.bat

macOS (Apple Silicon) — alpha

Status: alpha. Not stable. Expect breakage.

Native macOS arm64 support is under active development. The compiler (blitzcc) builds and can target macos-arm64, but the runtime execution path is incomplete and many language and standard-library features are not yet wired up. Do not rely on it for shipping work. Issues and feedback specific to the macOS port are welcome on the issue tracker.

git clone https://github.com/RydeTec/blitz-forge.git
cd blitz-forge
./scripts/bootstrap_macos.sh    # one-time: installs cmake/ninja/llvm and runtime deps via Homebrew
./compile.sh                    # builds bin/blitzcc, bin/runtime.dylib, bin/linker.dylib
./test.sh                       # runs tests/*.bb against -target macos-arm64
./publish.sh                    # stage release/ and write release/blitzforge-macos-arm64.zip

Build artifacts land in bin/, a staged release/ directory, and a redistributable ZIP archive such as release/blitzforge-macos-arm64.zip or release/blitzforge-windows-x64.zip.

The compiler accepts an explicit -target flag (host, windows-x86, or macos-arm64). On macOS hosts, host and macos-arm64 are equivalent; cross-compiling to a foreign target is rejected up-front rather than producing a broken artifact. Until a native macOS runtime is wired up, ./test.sh validates the full compile/translate/assemble pipeline and explicitly skips the in-process execution smoke with a clear "alpha stub runtime" notice — so a stub runtime can never be silently mistaken for a working one.

Repository layout

BlitzForge/
├── src/blitzrc/
│   ├── blitz/             # entry point, libs, frontend glue
│   ├── compiler/          # parser, AST, type system, semantic analysis
│   │   ├── codegen_x86/   # x86 backend (legacy + 64-bit)
│   │   └── codegen_arm64/ # macOS / Apple Silicon backend
│   ├── bbruntime/         # standard library implementation
│   ├── bbruntime_dll/     # runtime DLL/dylib glue
│   ├── linker/            # link step
│   ├── linker_dll/        # linker DLL/dylib glue
│   ├── gxruntime/         # Windows graphics/audio/input runtime
│   ├── debugger/          # debug protocol
│   └── stdutil/           # cross-platform utility layer
├── tests/                 # Blitz-language test suite (runs on every commit)
├── samples/ · games/      # example programs
├── help/                  # language reference and command docs
├── tutorials/             # learning material
├── userlibs/              # bundled .decls + DLL/dylib pairs
├── cfg/                   # IDE / editor configuration
├── scripts/               # cross-platform build helpers
└── bin/                   # compiled output

CI and quality

Every push and every pull request runs:

  • Build + test (ci.yml) — compiles blitzcc and runs the Blitz test suite.
  • Workflow lint (static-analysis.yml) — yamllint and actionlint for GitHub Actions hygiene.

This repo ships local Git hooks under .hooks/, but they are opt-in per clone. Enable them once with git config core.hooksPath .hooks.

After that:

  • the pre-commit hook runs test.bat on Windows shells and test.sh on Unix-like hosts,
  • the post-commit hook strips ;~IDEal Editor Parameters: metadata from committed Blitz source files so IDE-only noise does not linger in the tree.

Tests must pass to commit.

Documentation

Contribute

You are a... You can... Start here
Blitz user File bugs, request features, write tutorials Issues · Ideas
Blitz developer Improve the standard library and samples samples/ · tests/
C++ developer Improve the compiler, codegen, or runtime src/blitzrc/
Tooling enthusiast Improve CI, build scripts, packaging scripts/ · .github/workflows/
Writer Improve docs, examples, onboarding help/ · tutorials/

Workflow

  1. Fork or clone; branch from develop.
  2. Enable the repo hooks once per clone: git config core.hooksPath .hooks.
  3. Add or update tests in tests/ for any behavior change.
  4. Run compile.bat / compile.sh and test.bat / test.sh locally.
  5. Open a PR targeting develop. Releases are PRs from developmaster.
  6. CI must be green.

For push access, request to join the RCCE Contributors team.

Coding standards

  • C++17, no exotic compiler extensions.
  • Keep the codegen backends behind the assem.h abstraction — don't leak ISA-specific assumptions into the front end.
  • Prefer adding tests over adding comments.
  • One purpose per commit.

Community

Used by

Heritage

BlitzForge is a respectful continuation of the work of Mark Sibly and the original Blitz Research team, and stands on a long lineage of community ports, patches, and re-implementations. We aim to preserve compatibility with existing Blitz code while bringing the toolchain into the modern era.

License

BlitzForge is community-developed and openly available. Subsystems vendored from third parties retain their original licenses (see in-tree headers and LICENSE files where present). For questions about reuse, redistribution, or commercial use, please open a Discussion or contact the maintainers.


Compile fearlessly. Ship anywhere.

Download · Star the repo · Join the discussion

About

BlitzForge is a programming language based on Blitz3D that has been modified to include modern programming language features.

Topics

Resources

Stars

Watchers

Forks

Contributors