Palico 引擎:基于 Metal 的 Swift 游戏引擎 🐑

macOS license

platform-compatibility swift-version-compatibility

使用 Metal API 在 macOS 上实现一个游戏引擎。仍在开发中。目前我正在开发一个更强大的实体-组件-系统 MothECS :)

Palico Engine Screenshot

Palico (随从猫) - 它是怪物猎人中的一种猫型战斗伙伴!

This is Palico! Credits: Francesco

Palico 引擎在 Jira 上的 Sprint Board(迭代看板)(需要权限申请)。目前共有 65 个 issue(问题)

🔧 安装 & 运行

# Clone
git clone https://github.com/forkercat/PalicoEngine.git
cd PalicoEngine

# Compile
swift build

# Run
swift run Editor

📝 用户指南

鼠标控制

键盘控制

创建 GameObject(游戏对象)

Palico Engine Screenshot

🍻 依赖项

dependencies: [
    .package(url: "https://github.com/forkercat/OhMyLog.git", .branch("main")),
    .package(url: "https://github.com/forkercat/MathLib.git", .branch("main")),
    .package(url: "https://github.com/forkercat/MothECS.git", .branch("main")),
    .package(url: "https://github.com/forkercat/SwiftImGui.git", .branch("update-1.86-docking")),  // forked from @ctreffs
    .package(url: "https://github.com/forkercat/SwiftImGuizmo.git", .branch("master")),            // forked from @ctreffs
],

感谢 @ctreffs 的 SwiftImGui,我才能够在应用程序中使用 ImGui。

我 fork 了该仓库,并封装了 ImGui v1.86,并添加了新的 OSX 后端文件。相关 PR:

🥺 未来开发

渲染

模型

其他

🙏 参考

通过学习 TheCherno游戏引擎教程 系列开始,并用 C++ 编写了实现。 也可以查看 Hazel Engine 仓库。 这是一个很棒的学习资源!