Template and tutorial for the OctopusKit game engine.
-
🆕 In Xcode 12 or later, create a new App project, and choose Interface: SwiftUI.
❗️ Do NOT create a "Game" project, because that template does not use SwiftUI.
OctopusKit targets iOS/iPadOS/tvOS 14 and macOS Big Sur, but you may be able to get it to run with Xcode 11, iOS 13 and Catalina.
-
📦 Add OctopusKit as a Swift Package Manager Dependency.
Xcode File menu » Swift Packages » Add Package Dependency...
Enter the URL for the GitHub repository.
Download the "develop" branch for the latest version.
-
📥 Copy and include the
QuickStart/Universal/
folder (which supports iOS, macOS and tvOS) in your project.In the Xcode Project Navigator, select the
OctopusKit/QuickStart/
folder, then in the File Inspector, click the arrow next to "Full Path", then drag theUniversal
subfolder into your project folder in the Xcode navigator. -
🖼 Add the
OKQuickStartView
to theContentView.swift
file:var body: some View { OKQuickStartView() }
-
🚀 Build and run the project to verify that the template works.
-
👓 Examine the
OKQuickStartView.swift
file and dig around in the QuickStart folder to see how everything works, then modify the template for your specific game.📁 The main content of the template is in the
TitleState
andPlayState
folders.🏷 Filenames are prefixed with a number denoting the order they come in during the application's life cycle.
🔍 Search for comments prefixed with
STEP #
for a quick overview of the flow of execution.💡 Try out different components from the
Sources/OctopusKit/Components
folder. -
Check the documentation:
-
For a detailed explanation of the engine architecture, see Architecture.md in the
Documentation
folder of the OctopusKit package/repository. -
To see how to do common tasks, refer to Usage Guide.md
-
OctopusKit © 2021 Invading Octopus • Apache License 2.0