登录 注册
图像、视频与音频游戏与娱乐
6,783
Stars
—
Forks
0
Watchers
—
Open Issues
待补全
许可证
C
语言
—
创建时间
最近更新

项目能做什么

专为游戏设计的 3D 物理引擎。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
# Box3D

[![Build Status](https://github.com/erincatto/box3d/actions/workflows/build.yml/badge.svg)](https://github.com/erincatto/box3d/actions)
[![CLA assistant](https://cla-assistant.io/readme/badge/erincatto/box3d)](https://cla-assistant.io/erincatto/box3d)

![Box3D Logo](https://box2d.org/images/logo.svg)

Box3D is a 3D physics engine for games.

[![Introducing Box3D](https://img.youtube.com/vi/jr_Fzl2XwKU/maxresdefault.jpg)](https://www.youtube.com/watch?v=jr_Fzl2XwKU)

## Features

### Collision

- Continuous collision detection
- Contact events
- Convex hulls, capsules, spheres, triangle meshes, and height fields
- Multiple shapes per body
- Collision filtering
- Ray casts, shape casts, and overlap queries
- Sensor system
- Character mover

### Physics

- Robust _Soft Step_ rigid body solver
- Continuous physics for fast translations and rotations
- Island based sleep
- Revolute, prismatic, distance, motor, weld, and wheel joints
- Joint limits, motors, springs, and friction
- Joint and contact forces
- Body movement events and sleep notification

### System

- Data-oriented design
- Written in portable C17
- Extensive multithreading and SIMD
- Optimized for large piles of bodies
- Cross platform determinism
- Recording and replay

### Samples

- Uses sokol to run with D3D11 on Windows, Metal on macOS, and OpenGL 4.5 on Linux.
- Graphical user interface with imgui.
- Many samples to demonstrate features and performance.

## Building all platforms

- Install [CMake](https://cmake.org/)
- Install [git](https://git-scm.com/)
- Ensure these run from the command line

## Building with CMake presets (recommended)

This uses the presets in `CMakePresets.json`.

- Windows: `cmake --preset windows` then `cmake --build --preset windows-release`
- Linux: `cmake --preset linux-release` then `cmake --build --preset linux-release`
- macOS: `cmake --preset macos` then `cmake --build --preset macos-release`
- Windows MinGW: `cmake --preset mingw-release` then `cmake --build --preset mingw-release`

Run the samples app (must be in the Box3D directory).

- Windows: `.\build\bin\Release\samples.exe`
- Linux: `./build/bin/samples`
- macOS: `./build/bin/Release/samples`

## Building for Visual Studio

- Install [Visual Studio](https://visualstudio.microsoft.com/)
- Run `build_vs2026.bat`
- Open and build `build/box3d.slnx`

## Building for Linux

- Run `build.sh` from a bash shell
- Results are in the build sub-folder

## Building for Xcode

- mkdir build
- cd build
- cmake -G Xcode ..
- Open `box3d.xcodeproj`
- Select the samples scheme
- Build and run the samples

## Building for Web

- [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html)
- `emcmake cmake -B build -DBOX3D_SAMPLES=OFF`
- `cmake --build build`

Box3D uses SSE2 with WebAssembly. Define `BOX3D_DISABLE_SIMD` to disable SSE2.

## Building and installing

- mkdir build
- cd build
- cmake ..
- cmake --build . --config Release
- cmake --install . (might need sudo)

## Using Bo
阅读完整原文

项目深度分析 AI 生成

跨商业引擎插件包(Godot/Unity/Unreal 物理后端集成)

产品构想利用 Box3D 原生 C17、多线程与 SIMD 优势,将其封装为 Godot 4 GDExtension 插件或 Unity Native Plugin,替代臃肿或非确定性的内置物理引擎。
核心功能一键集成插件、物理组件映射、可视化调试 Gizmos、确定性同步保证测试案例。
目标用户追求高性能堆叠物理或需要帧同步网络物理的游戏开发者。
难度/周期中等 · 1-2个月 · 成本:极低(主要是开发机与各引擎测试环境)
收费模式Unity Asset Store / Itch.io / 独立商业许可证收费(单席位买断制)
竞争风险各引擎官方原生物理(如 Jolt 成为 Godot 热门方案、Unity PhysX/Havok)竞争激烈;版本升级维护成本高。
依据 已验证事实(Box3D为纯C17无额外依赖,便于做FFI/C集成绑定)

Web3D / WebAssembly 物理封装与商用组件库

产品构想针对 Three.js / Babylon.js 生态,基于 Emscripten + WebAssembly SIMD 构建低延迟、高并发的网页端 3D 物理模拟层与易用 JS/TS API。
核心功能Wasm 绑定包、TypeScript 强类型接口、Three.js 刚体与碰撞网格自动同步器、WebWorker 多线程解算集成。
目标用户Web 3D 游戏开发团队、电商 3D 交互展厅开发人员、元宇宙/虚拟空间开发者。
难度/周期中等 · 1个月 · 成本:极低
收费模式NPM 付费企业商用支持、高级扩展功能订阅(如复杂网格快速烘焙、破坏物理组件)
竞争风险Web 端已有 Ammo.js / Rapier 等成熟方案,需要突显性能优势与易用性。
依据 已验证事实(README 明确提供了 Emscripten SDK 构建流程及 SSE2 WebAssembly 支持)

确定性网络物理同步与回放分析中间件

产品构想利用 Box3D 的跨平台确定性(Cross-platform determinism)与录制回放特性,构建针对多人在线竞技游戏(如赛车、格斗、沙盒对战)的物理网络同步与回溯中间件。
核心功能状态快照保存与恢复(Save/Restore State)、回滚网络(Rollback netcode)集成适配器、录制帧偏差检查工具。
目标用户开发高要求物理同步竞技游戏的中小型游戏团队。
难度/周期高 · 3-4个月 · 成本:低(主要为研发与测试服务器成本)
收费模式源码授权许可费、技术咨询与定制集成服务费
竞争风险确定性在极端复杂跨平台(不同编译器/浮点标准)落地中易出现边缘误差,排查与服务成本高。
依据 已验证事实(README 特性中明确包含 Cross platform determinism 与 Recording and replay)
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
alattanzio/Box3DUnreal 中文介绍暂未生成
Box3DUnreal: Box3D Physics for Unreal Engine
398 C++
Suvitruf/box3d-unity 中文介绍暂未生成
Box3d Physics bindings for Unity
274 C#
bearlikelion/godot-box3d 中文介绍暂未生成
Godot Extension to add Box3D physics
207 C++
Asphaltian/VPhysics-Box3D 中文介绍暂未生成
Another fucking replacement module for Source's VPhysics
188 C++
isaac-mason/box3d.js 中文介绍暂未生成
89 C++
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建时间待补全,最近推送 ,发布过 1 个 Release
社区活跃Star 6,783 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

此项目未提供 Docker 镜像,安装步骤以原仓库 README 为准(涉及依赖安装与环境配置,对新手门槛较高)。