https://github.com/forkercat/palicoengine
Metal-Based Game Engine in Swift 🐑
https://github.com/forkercat/palicoengine
game-dev game-engine hazel metal swift
Last synced: 16 days ago
JSON representation
Metal-Based Game Engine in Swift 🐑
- Host: GitHub
- URL: https://github.com/forkercat/palicoengine
- Owner: forkercat
- License: mit
- Created: 2022-01-01T09:30:17.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-16T07:27:15.000Z (about 4 years ago)
- Last Synced: 2026-01-23T12:38:10.541Z (about 2 months ago)
- Topics: game-dev, game-engine, hazel, metal, swift
- Language: Swift
- Homepage:
- Size: 3.88 MB
- Stars: 46
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Palico Engine: Metal-Based Game Engine in Swift 🐑
[](https://github.com/forkercat/PalicoEngine/actions/workflows/ci-macos.yml)
[](LICENSE)
[](https://swiftpackageindex.com/forkercat/PalicoEngine)
[](https://swiftpackageindex.com/forkercat/PalicoEngine)
Implement a game engine on macOS using Metal API. Still in development. Currently I am working on a more capable entity-component-system [MothECS](https://github.com/forkercat/MothECS) :)
[Palico](https://monsterhunterworld.wiki.fextralife.com/Palicoes) - It is a cat-like combat companion in Monster Hunter!
Palico Engine's [Sprint Board](https://forkercat.atlassian.net/jira/software/projects/PALICO/boards/1) on Jira (need permission request). Currently there are **65 issues** in total!
## 🔧 Install & Run
```sh
# Clone
git clone https://github.com/forkercat/PalicoEngine.git
cd PalicoEngine
# Compile
swift build
# Run
swift run Editor
```
## 📝 User Guide
Mouse Controls:
- `Command + Left`: Rotate camera
- `Right`: Look around
- `Middle`: Pan
- `Scroll`: Zoom in/out
Keyboard Controls:
- `Tab`: Select next in-scene object
- `F`: Focus on object
- `Q`: No action
- `W`: Translate
- `E`: Rotate
- `R`: Scale
Create GameObject:
## 🍻 Dependencies
```swift
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
],
```
Thanks to SwiftImGui by [@ctreffs](https://github.com/ctreffs) I am able to use ImGui in this application.
I forked the repository and wrapped ImGui v1.86 and added new OSX backend file. Related PRs:
- [Update to 1.86 and update OSX backend (fix keyboard issue) #7](https://github.com/ctreffs/SwiftImGui/pull/7)
- [Update ImGui 1.86-docking #8](https://github.com/ctreffs/SwiftImGui/pull/8)
## 🥺 Future Development
Rendering:
- [ ] Add skybox
- [ ] Add shadow
- [ ] Support PBR
- [ ] Support deferred rendering (render pass has already been setup)
Model:
- [ ] Load 3D models
- [ ] Load textures in models
- [ ] Load animation
Other:
- [ ] Improve MothECS
- [ ] Integrate ImGuizmo
- [ ] Property/Inspector panel
- [ ] Game object selection
- [ ] Scene loading (yaml)
- [ ] Content browser (Asset Panel)
## 🙏 Reference
Started by following [game engine turotial](https://www.youtube.com/playlist?list=PLlrATfBNZ98dC-V-N3m0Go4deliWHPFwT) series by [TheCherno](https://www.youtube.com/c/TheChernoProject) and wrote implementation in C++. Also check out [Hazel Engine](https://github.com/thecherno/hazel) repository. It is a great learning resource!
- [Metal by Tutorial](https://www.raywenderlich.com/books/metal-by-tutorials/v2.0) by Caroline Begbie & Marius Horga
- ImGui on GitHub: [ocornut/imgui](https://github.com/ocornut/imgui), [cimgui/cimgui](https://github.com/cimgui/cimgui), [ctreffs/SwiftImGui](https://github.com/ctreffs/SwiftImGui)
- More to be added!