MoonBASIC:一款用于构建 2D 和 3D 游戏的现代 BASIC 语言
MoonBASIC: A modern BASIC for building 2D and 3D games

原始链接: https://github.com/CharmingBlaze/moonbasic

MoonBASIC 是一个现代化的多合一编程环境,用于构建 2D 和 3D 游戏,无需外部编译器、构建工具或 Go、C 等语言运行时。 该平台包含一个功能强大的引擎,集成了 Raylib、Box2D 和 Jolt,提供了 4200 多条用于图形、音频、物理、网络和用户界面的命令。用户可以选择独立的“moonBASIC IDE”,获得包含内置文档、对初学者友好的完整体验;也可以选择“完整运行时”版本,适合习惯使用 VS Code 或终端的用户。 主要功能包括: * **零配置:** 在 Windows、Linux 或 macOS 上下载、解压即可立即开始编程。 * **全面的工具链:** 包含 `moonbasic`(编译器/LSP)和 `moonrun`(运行时)。 * **易于使用:** 支持项目脚手架、集成调试和简单的命令行执行。 * **广泛的引擎功能:** 内置对 3D 物理、粒子系统和地形等高级功能的支持。 无论您是初学者还是资深开发者,MoonBASIC 都为游戏开发提供了一种精简且“开箱即用”的方案。请访问[其 GitHub 仓库](https://github.com/CharmingBlaze/moonbasic/releases/latest)下载最新版本并开始构建。

抱歉。
相关文章

原文

A modern BASIC for building 2D and 3D games — write .mb source, download pre-built binaries, and run. No Go, no C compiler, no build tools on your machine. Download from here: (https://github.com/CharmingBlaze/moonbasic/releases/tag/v1.2.27)

One download gives you moonrun (play games), moonbasic (check, compile to .mbc, language server), and optionally the moonBASIC IDE — a desktop editor with the full documentation built in. The engine bundles Raylib, Box2D, and Jolt — graphics, audio, 2D physics, 3D physics, networking, terrain, UI, particles, and more behind 4,200+ built-in commands across 40+ namespaces (WINDOW.*, ENTITY.*, PHYSICS3D.*, GUI.*, NET.*, …).

This repository is the official home for documentation, examples, and pre-compiled downloads for Windows, Linux, and macOS (Apple Silicon).


Download (nothing else required)

Latest release: github.com/CharmingBlaze/moonbasic/releases/latest

Direct links by platform: charmingblaze.github.io/moonbasic/

You do not need to install Go, GCC, Node.js, or Raylib separately.

Your goal Download
moonBASIC IDE (editor + compiler + runtime + docs — easiest) IDE bundlemoonbasic-<tag>-ide-windows-amd64.zip, linux-amd64.tar.gz, or macos-arm64.tar.gz
Play / make games (terminal only) Full runtimemoonbasic-<tag>-windows-amd64.zip, linux-amd64.tar.gz, or macos-arm64.tar.gz
Lint / compile / LSP only (no game window) Compiler onlymoonbasic-<tag>-compiler-…
VS Code / Cursor Included in full-runtime zip + moonbasic-<tag>-vscode.vsix on Releases

IDE bundlemoonbasic-ide, moonbasic, moonrun, README-IDE-RELEASE.txt, START-IDE. Documentation is inside the IDE.

Full runtimemoonbasic, moonrun, README-RELEASE.txt, VS Code .vsix, INSTALL-VSCODE.bat / INSTALL-VSCODE.sh.

All artifact names and platform notes: RELEASES.md


moonBASIC IDE (recommended)

The fastest way to start — one folder, no extra setup.

moonBASIC IDE — editor, documentation, check, compile, and run in one app

  1. Download moonbasic-<tag>-ide-… for your OS from Releases.
  2. Extract anywhere permanent.
  3. Run START-IDE.bat (Windows) or chmod +x START-IDE.sh moonbasic-ide moonbasic moonrun && ./START-IDE.sh (Linux/macOS).
  4. Write or open a .mb file in the editor.
Shortcut Action
F5 Run game (moonrun)
Ctrl+Shift+C Check syntax
Ctrl+Shift+B Compile to .mbc
Alt+H Help at cursor
Gear menu (title bar) Themes, fonts, colors, settings

The IDE auto-detects moonbasic and moonrun in the same folder. Open Documentation in the sidebar for BEGIN_HERE.md, guides, and the full command reference.

Engine source: moonbasic-compiler (moonbasic ide/).


If you downloaded the full runtime instead of the IDE:

moonrun --version          # Windows: moonrun.exe --version
moonbasic new MyGame
cd MyGame
moonrun main.mb

Try an example from this repo (clone or Download ZIP — examples ship here, not inside release zips):

moonrun examples/spin_cube/main.mb
moonrun examples/guides/game_loop.mb

VS Code / Cursor (one command)

After extracting the full runtime:

Or double-click INSTALL-VSCODE.bat (Windows) / run ./INSTALL-VSCODE.sh.

That installs the extension and sets moonbasic.languageServerPath and moonbasic.moonrunPath automatically. Then open any .mb file — completions, hover help, Ctrl+F5 run, Ctrl+Shift+C check, Alt+H help at cursor.

Extension source: editors/vscode-moonbasic/ · Guide: docs/GETTING_STARTED.md



Layer Technology
Graphics & audio Raylib
2D physics Box2D
3D physics & KCC Jolt
Multiplayer ENet (where enabled)

APP.OPEN(960, 540, "Hello moonBASIC")
WHILE NOT APP.SHOULDCLOSE()
    RENDER.CLEAR(20, 24, 32)
    RENDER.FRAME()
WEND
APP.CLOSE()

(APP.* aliases WINDOW.* — same engine, clearer tutorials.)


Tool / command What it does
moonBASIC IDE (moonbasic-ide) Desktop editor — syntax, docs, check, compile, run, themes
moonrun game.mb Compile (if needed) and run — primary terminal entry point
moonbasic --check game.mb Parse and type-check without running
moonbasic game.mb Compile to game.mbc bytecode
moonbasic --lsp Language server (stdio) for other editors
moonbasic new Name New project: main.mb, assets/, .vscode/
moonbasic install-vscode Install VS Code / Cursor extension + configure paths

MIT — see LICENSE.

Engine source (contributors): github.com/CharmingBlaze/moonbasic-compiler

联系我们 contact @ memedata.com