Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aheze/swiftuicraft

Minecraft but made with SwiftUI.
https://github.com/aheze/swiftuicraft

3d 3d-graphics ios minecraft prism swift swiftui

Last synced: 5 days ago
JSON representation

Minecraft but made with SwiftUI.

Awesome Lists containing this project

README

        

# SwiftUICraft

Minecraft but made with SwiftUI.

- 100% SwiftUI. No SceneKit, SpriteKit, or anything else.
- Powered by [Prism](https://github.com/aheze/Prism), a lightweight 3D renderer for SwiftUI.
- Place and destroy 20+ blocks.
- Supports liquid physics with water and lava.
- Works in both landscape and portrait mode.
- Includes 3 levels to choose from.
- Auto-saves your progress.
- LASERS!

https://user-images.githubusercontent.com/49819455/200998762-50a279ca-6460-4aa9-bb85-0d1b96c580ed.mp4

![Level 1](Assets/Level1.PNG)

![Level 2](Assets/Level2.PNG)

![Level 3](Assets/Level3.PNG)

![Lasers](Assets/Lasers.gif)

![Level 1 in portrait mode](Assets/Level1Portrait.PNG) | ![Level 2 in portrait mode](Assets/Level2Portrait.PNG)
--- | ---

![Main menu](Assets/Menu.PNG)

## Community

Author | Contributing | Need Help?
--- | --- | ---
SwiftUICraft is made by [aheze](https://github.com/SwiftUICraft). | All contributions are welcome. Just [fork](https://github.com/aheze/SwiftUICraft/fork) the repo, then make a pull request. | Open an [issue](https://github.com/aheze/SwiftUICraft/issues) or join the [Discord server](https://discord.com/invite/Pmq8fYcus2). You can also ping me on [Twitter](https://twitter.com/aheze0). Or read the source code — there's lots of comments.

### I thought SwiftUI was for making buttons and VStacks and other stuff!

Yes. No one said you couldn't make it 3D though :)

### How does it work?

Perspective transforms. All the 3D functions are wrapped in my [Prism](https://github.com/aheze/Prism) library which I released last month.

### Is it 100% SwiftUI?

Yep, literally 100%. No UIKit, SceneKit, SpriteKit, etc.

## License

```
MIT License

Copyright (c) 2022 A. Zheng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```

---

![Promotional graphic](Assets/SocialPreview.jpg)

*Not affiliated with Minecraft or Microsoft or anything. This was just a weekend project — if there's any copyright stuff or whatever that you'd like me to change, just [message me](https://twitter.com/aheze0).*