2D ECS game engine in 100% Swift + SwiftUI for iOS, macOS, tvOS


OctopusKit OctopusKit Logo

A 2D game engine based on ECS and written in 100% Swift for iOS, macOS and tvOS.

If you've tried making a game in Swift while sticking to the official APIs, this may be for you! OctopusKit wraps and extends Apple's frameworks:

GameplayKit for a flexible Entity-Component-System architecture to dynamically compose game behavior.
SpriteKit for 2D graphics, physics and GPU shaders.
SwiftUI for quickly designing fluid, scalable HUDs with a declarative syntax.
Metal to ensure the best native performance under the hood.
• OS-independent components let you handle mouse/touch or keyboard/gamepad input with the same code, and compile natively for iOS + macOS without needing Catalyst.

QuickStart Demo

  1. Examples
  2. Overview
  3. Design Goals
  4. Getting Started
  5. Etcetera

OctopusKit is a constant work in progress and I'm still learning as I go, so it may change rapidly without maintaining backwards compatibility or updating the documentation.

This project is the result of my attempts to make games in pure Swift. I fell in love with the language but couldn't find any engines that supported it or had the kind of architecture that I found intuitive, so I started making my own.

Feedback welcome! – ShinryakuTako


🚀 Eager to dive in? Add OctopusKit as a Swift Package Manager dependency to a SwiftUI project, and use the QuickStart template (which also serves as a little demo.)

🎨 Using with SwiftUI

import SwiftUI
import OctopusKit

struct ContentView: View {

    // The coordinator object manages your game's scenes and global state.
    @StateObject var gameCoordinator = OKGameCoordinator(states: [
        Gameplay() ])
    var body: some View {

        // The container view combines SpriteKit with SwiftUI,
        // and presents the coordinator's current scene.
            .statusBar(hidden: true)

👾 Creating an animated sprite

var character = OKEntity(components: [
    // Start with a blank texture.
    NodeComponent(node: SKSpriteNode(color: .clear, size: CGSize(widthAndHeight: 42))),
    // Load texture resources.
    TextureDictionaryComponent(atlasName: "PlayerCharacter"),
    // Animate the sprite with textures whose names begin with the specified prefix.
    TextureAnimationComponent(initialAnimationTexturePrefix: "Idle") ])

🕹 Adding player control

// Add a component to the scene that will be updated with input events.
// Other components that handle player input will query this component.

// This lets us handle asynchronous events in sync with the frame-update cycle.
// A shared event stream is more efficient than forwarding events to every entity.

// PointerEventComponent is an OS-agnostic component for touch or mouse input.

let sharedPointerEventComponent = PointerEventComponent()

    // A relay component adds a reference to a component from another entity,
    // and also fulfills the dependencies of other components in this entity.
    RelayComponent(for: sharedPointerEventComponent),
    // This component checks the entity's PointerEventComponent (provided here by a relay)
    // and syncs the entity's position to the touch or mouse location in every frame.
    PointerControlledPositioningComponent() ])

🕹 Dynamically removing player control or changing to a different input method

character.removeComponent(ofType: PointerControlledPositioningComponent.self)

    // Add a physics body to the sprite.
    RelayComponent(for: sharedKeyboardEventComponent),
    // Apply a force to the body based on keyboard input in each frame.
    KeyboardControlledForceComponent() ])

🧩 A custom game-specific component

class AngryEnemyComponent: OKComponent, RequiresUpdatesPerFrame {
    override func didAddToEntity(withNode node: SKNode) {
        node.colorTint = .angryMonster
    override func update(deltaTime seconds: TimeInterval) {
        guard let behaviorComponent = coComponent(EnemyBehaviorComponent.self) else { return }
    override func willRemoveFromEntity(withNode node: SKNode) {
        node.colorTint = .mildlyInconveniencedMonster

🛠 Using a custom closure to change the animation based on player movement

// Add a component that executes the supplied closure every frame.
character.addComponent(RepeatingClosureComponent { component in
    // Check if the entity of this component has the required dependencies at runtime.
    // This approach allows dynamic behavior modification instead of halting the game.
    if  let physicsBody = component.coComponent(PhysicsComponent.self)?.physicsBody,
        let animationComponent = component.coComponent(TextureAnimationComponent.self)
        // Change the animation depending on whether the body is stationary or mobile.
        animationComponent.textureDictionaryPrefix = physicsBody.isResting ? "Idle" : "Moving"

// This behavior could be better encapsulated in a custom component,
// with many different game-specific animations depending on many conditions.

🎎 Loading a scene built in the Xcode Scene Editor and creating multiple entities from sprites identified by a shared name

// Load a ".sks" file as a child node.

if  let editorScene = SKReferenceNode(fileNamed: "EditorScene.sks") {

// Search the entire tree for all nodes named "Turret",
// and give them properties of "tower defense" turrets,
// and make them independently draggable by the player.

for turretNode in scene["//Turret"] {

    // Create a new entity for each node found.
    scene.addEntity(OKEntity(components: [
        NodeComponent(node: turretNode),
        RelayComponent(for: sharedPointerEventComponent),
        // Hypothetical game-specific components.
        // Track the first touch or mouse drag that begins inside the sprite.
        // Let the player select and drag a specific sprite.
        // This differs from the PointerControlledPositioningComponent in a previous example, 
        // which repositions nodes regardless of where the pointer began.
        PointerControlledDraggingComponent() ]))

// Once the first monster wave starts, you could replace PointerControlledDraggingComponent 
// with PointerControlledShootingComponent to make the turrets immovable but manually-fired.


OctopusKit uses an "Entity-Component-System" architecture, where:

  • 🎬 A game is organized into States such as MainMenu, Playing and Paused. Each state is associated with a SwiftUI view which displays the user interface, and a SpriteKit Scene that presents the gameplay for that state using Entities, Components and Systems.

    You can divide your game into as many or as few states as you want. e.g. A single "PlayState" which also handles the main menu, pausing, cutscenes etc.

    States, Scenes, and SwiftUI views may have many-to-many relationships that may change during runtime.

  • 👾 Entities are simply collections of Components. They contain no logic, except for convenience constructors which initialize groups of related components.

  • 🧩 Components (which could also be called Behaviors, Effects, Features, or Traits) are the core concept in OctopusKit, containing the properties as well as the logic* which make up each visual or abstract element of the game. A component runs its code when it's added to an entity, when a frame is updated, and/or when it's removed from an entity. Components may query their entity for other components and affect each other's behavior to form dynamic dependencies during runtime. The engine comes with a library of customizable components for graphics, gameplay, physics etc.

  • Systems are simply collections of components of a specific class. They don't perform any logic*, but they're arranged by a Scene in an array to execute components from all entities in a deterministic order every frame, so that components which rely on other components are updated after their dependencies.

    * These definitions may differ from other engines, like Unity, where all the logic is contained within systems.

  • 🎛 User Interface elements like buttons, lists and HUDs are designed in SwiftUI. This allows fluid animations, sharp text, vector shapes, live previews, automatic data-driven updates, and over 1,500 high-quality icons from Apple's SF Symbols.

See the Architecture documentation for a detailed breakdown of the object hierarchy.

Your primary workflow will be writing component classes for each "part" of the graphics and gameplay, then combining them to build entities which appear onscreen, or abstract entities that handle data on the "backend."

e.g. say a ParallaxBackgroundEntity containing a CloudsComponent, a HillsComponent and a TreesComponent, or a GameSessionEntity containing a WorldMapComponent and a MultiplayerSyncComponent.

Performance: Although extensive benchmarks have not been done yet, OK can display over 5000 sprites on an iPhone XS at 60 frames per second; each sprite represented by an entity with multiple components being updated every frame, and responding to touch input.

Design Goals

  • Tailored for Swift: Swift, Swift, Swift! The framework must follow the established guidelines for Swift API design. Everything must make sense within Swift and flow seamlessly with Swift idioms as much as possible.

  • Vitamin 2D: At the moment, OK is primarily a framework for 2D games, but it does not prevent you from using technologies like SceneKit or low-level Metal views, and it may be used for non-game apps.

  • Shoulders of Ettins: The engine leverages SpriteKit, GameplayKit, SwiftUI and other technologies provided by Apple. It should not try to "fight" them, replace them, or hide them behind too many abstractions.

    OK is mostly implemented through custom subclasses and extensions of SpriteKit and GameplayKit classes, without "obscuring" them or blocking you from interacting with the base classes. This allows you to adopt this framework incrementally, and lets you integrate your game with the Xcode IDE tools such as the Scene Editor where possible.

    The tight coupling with Apple APIs also ensures that your game is future-proof; whenever Apple improves these frameworks, OctopusKit and your games should also get some benefits "for free." For example, when Metal was introduced, SpriteKit was updated to automatically use Metal instead of OpenGL under the hood, giving many existing games a performance boost. (WWDC 2016, Session 610)

  • Code Comes First: OK is primarily a "programmatical" engine; almost everything is done in code. This also helps with source control. The Xcode Scene Editor is relegated to "second-class citizen" status because of its incompleteness and bugs (as of May 2018, Xcode 9.4), but it is supported wherever convenient. See the next point.

    💡 You can design high-level layouts/mockups in the Scene Editor, using placeholder nodes with names (identifiers.) You may then create entities from those nodes and add components to them in code.

    Now with SwiftUI, programming for Apple platforms is heading towards a focus on code instead of visual editors anyway.

  • Customizability & Flexibility: The engine strives to be flexible and gives you the freedom to structure your game in various ways. Since you have full access to the engine's source code, you can modify or extend anything to suit the exact needs of each project.

    You can use any of the following approaches to building your scenes, in order of engine support:

    1. Perform the creation and placement of nodes mostly in code. Use the Xcode Scene Editor infrequently, to design and preview a few individual elements such as entities with specific positions etc., not entire scenes, and use SKReferenceNode to load them in code.
    1. Use the Xcode Scene Editor as your starting point, to create template scenes that may be loaded as top-level SKReferenceNode instances of an OKScene. This approach allows a modicum of "WYSIWYG" visual design and previewing.
    1. Create a scene almost entirely in the Xcode Scene Editor, adding any supported components, actions, physics bodies, navigation graphs and textures etc. right in the IDE.
      Set the custom class of the scene as OKScene or a subclass of it. Load the scene by calling OKViewController.loadAndPresentScene(fileNamed:withTransition:), e.g. during the didEnter.from(_:) event of an OKGameState.
    1. You don't have to use any of the architectures and patterns suggested here; you don't have to use game states, and your game objects don't even have to inherit from any OK classes. You could use your own architecture, and just use OK for a few helper methods etc., keeping only what you need from this framework and excluding the rest from compilation.
  • Self-Containment: You should not need to download or keep up with any other third-party libraries if your own project does not require them; everything that OK uses is within OK or Apple frameworks, so it comes fully usable out-of-the-box.

Getting Started

  1. Read the QuickStart and Usage Guide. You will need Xcode 12, iOS 14 and macOS Big Sur (though OK may work on older versions with some manual modifications.)

    Skill Level: Intermediate: Although OK is not presented in a form designed for absolute beginners, mostly because I'm too lazy to write documentation from step zero, it's not "advanced" level stuff either; if you've read the Swift Language Book and have attempted to make a SpriteKit game in Xcode, you are ready to use OK!

    You should also read about the "Composition over inheritance" and "Entity–component–system" patterns if you're not already familiar with those concepts, although OK's implementation of these may be different than what you expect.

    Also see Apple's tutorials for SwiftUI.

  2. For a detailed overview of the engine's architecture, see Architecture.

  3. Stuck? See Tips & Troubleshooting.

  4. Wondering whether something was intentionally done the way it is, or why? Coding Conventions & Design Decisions may have an explanation.

  5. Want to keep tabs on what's coming or help out with the development of missing features? See the TODO & Roadmap.


  • Contributors & Supporters ❤︎

  • This project may be referred to as OctopusKit, "OK" or "OKIO" (for "OctopusKit by Invading Octopus") but "IOOK" sounds weird.

  • The naming is a combination of inspiration from companies like Rogue Amoeba, the .io domain, and the anime Shinryaku! Ika Musume.

  • The space before the last ]) in the Examples section is for clarity. :)

  • License: Apache 2.0

  • Incorporates shaders from ShaderKit © Paul Hudson, licensed under MIT License (see headers in relevant files).

  • Tell me how awesome or terrible everything is: Discord, Twitter or 🅾ctopus🅺it@🅘nvading🅞ctopus.ⓘⓞ

    I rarely check these though, so the best way to ask a question may be via opening an issue on the GitHub repository.

  • Support my decadent lifestyle so I can focus on making unsaleable stuff: My Patreon

  • This project is not affiliated in any way with Apple.

OctopusKit © 2021 Invading OctopusApache License 2.0

  • Compile target error

    Compile target error

    Category: 'Compilation'

    Describe the bug When I try to archive my iOS App, just after including this repo as a swift package dependency I get this error several time:

    error: error reading dependency file '/Users/alberto/Library/Developer/Xcode/DerivedData/OctopusKitPoC-efudzfgceuckifblpxhfvqbvjsuy/Build/Intermediates.noindex/ArchiveIntermediates/OctopusKitPoC/IntermediateBuildFilesPath/OctopusKit.build/Release-iphoneos/OctopusKit.build/Objects-normal/arm64/OctopusKit-master.d': unexpected character in prerequisites at position 14049458 (in target 'OctopusKit' from project 'OctopusKit')

    Then the archive generated is under the "other items" category inside the Organizer.

    To Reproduce Steps to reproduce the behavior:

    1. Start with a new 'iOS App SwiftUI' project
    2. Add this project as swift package dependency (development branch)
    3. In Xcode, Product->Archive
    4. Check the build process output

    Expected behavior Have a valid archive to distribute under the "iOS Apps" category in the Organizer.


    Captura de pantalla 2020-09-25 a las 17 20 34

    Captura de pantalla 2020-09-25 a las 17 20 17

    Build Environment (what you're developing on) - OctopusKit Version: '4.0.0.beta3 - development branch' - macOS Version: '10.15.6 (19G2021)' - Xcode Version: '12.0 (12A7209)' - Swift Version: '5'

    Target Device (what you're compiling for) - Device: 'iPhone, iPad' - Target OS Version: 'iOS14.0'

    opened by mindhells 5
  • [Help] Clarity on OKContainerView, OKGameCoordinator, OKViewController

    [Help] Clarity on OKContainerView, OKGameCoordinator, OKViewController


    Reading over the documentation and I would like some help on the ContainerView, GameCoordinator, and the ViewController.

    From the QuickStart Guide, I can see and understand how to use the project that is entirely SwiftUI.

    I created a sample SwiftUI project that follows your Universal code. I also have a project that is entirely UIKit and UIViewControllers (not using the storyboard, mostly generating buttons and labels in code).

    I want to combine these two projects together. I cannot change the UIViewController project, however, I can change the SwiftUI OctopusKit project.

    In your opinion, what is the best way to integrate these two projects together?

    Thank you.

    opened by astaranowicz 5
  • Swift Tools Version Error using SPM

    Swift Tools Version Error using SPM

    Category: 'Package Import'

    Describe the bug Trying to import my favorite library :) into a new project and getting this error:

    package at 'https://github.com/invadingoctopus/octopuskit' @ 4115ff2a63b0df684eca20367d59ffc22906faae is using Swift tools version 5.3.0 but the installed version is 5.2.0

    I've updated to Xcode Version 11.6... do I need to upgrade to Swift 5.3 outside of Xcode's normal install?

    Thanks for any help! Rob

    To Reproduce Steps to reproduce the behavior:

    1. Start with a new 'SwiftUI' macOS project
    2. See error:
    package at 'https://github.com/invadingoctopus/octopuskit' @ 4115ff2a63b0df684eca20367d59ffc22906faae is using Swift tools version 5.3.0 but the installed version is 5.2.0

    Expected behavior The package should import without error.


    Screen Shot 2020-07-26 at 2 08 38 AM Screen Shot 2020-07-26 at 2 03 43 AM

    Build Environment (what you're developing on) - OctopusKit Version: 'develop' - macOS Version: '10.15.15' - Xcode Version: '11.6 (11E708)' - Swift Version:

    Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)
    Target: x86_64-apple-darwin19.5.0

    Target Device (what you're compiling for) - Device: 'macOS app' - Target OS Version: 'e.g. macOS 10.x'

    Additional context Add any other context about the problem here.

    opened by chessboy 4
  • OK v3.2.x Migration Guide

    OK v3.2.x Migration Guide

    • Category: Documentation
    • Target Platform: macOS

    I'm excited about OK v4.0 and just wondering if there will be a migration guide... my project is fairly big. I will poke around now on a new branch and see if I can figure it out, but a guide would be super awesome! BTW, I am now supporting you on Patreon – Code Collaborator level. Hoping to make great things with you, ShinryakuTako, if that is your real name ;)

    opened by chessboy 3
  • 'KeyboardEventComponent' is unavailable in iOS

    'KeyboardEventComponent' is unavailable in iOS

    Describe the bug After trying to run the Quick Start guide steps I'm presented with a build error of 'KeyboardEventComponent' is unavailable in iOS - This seems to be in the source of the package rather than in the Quick Start files.

    To Reproduce Steps to reproduce the behavior:

    1. Follow Quick Start steps
    2. Build to iOS device
    3. See error

    Expected behavior Build to complete without errors

    Desktop (please complete the following information):

    • OS: macOS
    • Browser: Safari
    • Version: 10.15.3 (19D76)

    Smartphone (please complete the following information):

    • Device: iPhone 11 Pro (12,3)
    • OS: iOS
    • Browser: Safari
    • Version: 13.3.1
    opened by Harry-Harrison 3
  • Contact Detection

    Contact Detection

    First, let me say this is one hell of a useful library, and thank you for the hard work! I've ported most of my app (which used a homegrown ECS) to OctopusKit and everything is so much cleaner, and will probably be more performant when all is said and done.

    The only thing I'm stuck on is getting contact events. Are PhysicsEventComponent and PhysicsContactHandlerComponent supposed to be added to the scene's entity or to the individual "monster" entities?

    Thanks for any info! Rob

    opened by chessboy 3
  • Focus not initially set in OKScene

    Focus not initially set in OKScene

    Category: 'Behavior'

    Describe the bug I wouldn't categorize this as a bug, but I cannot for the life of me figure out how to set the focus (first responder) to the main window containing the OKScene without clicking inside it first. The result is that key commands are not being picked up until you click anywhere in the scene. I'm sure it's something simple I'm missing.

    To Reproduce Steps to reproduce the behavior:

    1. Pull my app's codebase: https://github.com/chessboy/biots
    2. Build and run the app (marvel at the nerd-beauty :) )
    3. Try to use the arrow keys to pan around the world
    4. Note the arrow keys do nothing and the Mac actually plays a beep tone to let you know you're typing into the void
    5. Click anywhere in the main window
    6. Use the arrow keys to pan around the world
    7. Now you can now pan around

    Expected behavior OKScene should be first responder when the scene is shown (I think)

    Build Environment (what you're developing on) - OctopusKit Version: '3.2.0' - macOS Version: '10.15.7 (build)' - Xcode Version: '12.0.1 (12A7300)' - Swift Version: 'Apple Swift version 5.2.4'

    Target Device (what you're compiling for) - Device: 'macOS app' - Target OS Version: 'macOS 10.15'

    Additional context Loving this framework... hope you like my app which builds heavily on OK!

    opened by chessboy 2
  • GamePadDirectionEvent



    I find this project very interesting,. I checked the TODO and it said you were planning to work on Gamepad as Inputs. Is this something you are already working on. If not, I would be happy to contribute. But would like some discussion to make sure I do it the proper way as per the conventions set out for other input sources. Can we catch-up on gitter https://gitter.im/ or elsewhere?

    • P
    opened by pradeeproark 2
  • How to get contact events triggered?

    How to get contact events triggered?

    Category: 'Behavior'

    Describe the bug didBegin and didEnd of PhysicsContactComponent not getting called.

    To Reproduce Steps to reproduce the behavior:

    1. Start with a new 'SwiftUI/tvOS' project
    2. Follow instructions in https://invadingoctopus.io/octopuskit/documentation/guide.html#physics-collisions to setup two components to collide/contact with each other.
    3. Add the following code:
    final class BunnyContactComponent: PhysicsContactComponent {
         func didBegin(_ contact: SKPhysicsContact) {
            print("hungry bunny")
        override func didEnd(_ contact: SKPhysicsContact, entityBody: SKPhysicsBody, opposingBody: SKPhysicsBody, scene: OKScene?) {
            print("hungry bunny")
    1. Build for 'tvOS'
    2. Run and perform these actions: Try to move the bunny around with a PointerControlledPositioningComponent and let it collide with a collectible component ( a carrot sprite with a physics body)
    3. Bunny pushes the carrot around without triggering the contact event

    Expected behavior didBegin/didEnd Contact event in BunnyContactComponent should be called

    Screenshots ezgif-2-5f05a32234ce

    Build Environment (what you're developing on)

    • OctopusKit Version: 'develop'
    • macOS Version: '10.15.6'
    • Xcode Version: 'Xcode-12 beta 6 (12A8189n)'
    • Swift Version: '5.3'

    Target Device (what you're compiling for)

    • Device: 'AppleTV Simulator'
    • Target OS Version: 'tvOS'

    Additional context The scene has the following setup in createContents

    self.entity?.addComponents([sharedMouseOrTouchEventComponent, sharedPointerEventComponent, PhysicsWorldComponent(), PhysicsComponent(physicsBody: SKPhysicsBody(edgeLoopFrom: self.frame))])
    self.componentSystems.createSystem(forClass: BunnyContactComponent.self)
    opened by pradeeproark 2
  • Unable to add OctopusKit as dependency from develop branch.

    Unable to add OctopusKit as dependency from develop branch.

    Category: 'Import Failure'

    Describe the bug When following the instructions in the QuickStart README here -> https://github.com/InvadingOctopus/octopuskit/blob/master/QuickStart/README%20QuickStart.md the 2nd step fails when adding a dependency to the develop branch

    To Reproduce Steps to reproduce the behavior:

    1. Start with a new 'SwiftUI' single page application project as suggested in the README.
    2. Add a swift package dependency and specify this repository. https://github.com/InvadingOctopus/octopuskit
    3. Click next and select 'Develop' branch for version.
    4. Click next
    5. See error

    Expected behavior Proceed to add OctopusKit dependency to project.

    Screenshots Screenshot 2020-09-08 at 17 24 44

    Build Environment (what you're developing on) - OctopusKit Version: 'develop' - macOS Version: '10.15.6' - Xcode Version: 'Xcode-12 beta 6 (12A8189n)' - Swift Version: '5.3'

    Target Device (what you're compiling for) - Device: 'AppleTV Simulator' - Target OS Version: 'tvOS'

    Additional context The issue appears to be the deprecated MacOS flag in the manifest now that BigSur has been released.

    opened by pradeeproark 0
  • 4.0.0-beta.4(Oct 20, 2020)

    Incomplete notes; Compare with previous release or latest development branch

    ❗️ Older projects will not compile. Many things have been renamed/modified/removed!

    Requires Xcode 12, iOS 14 and macOS 11 Big Sur

    ⭐️ Major New Stuff:

    • Swift 5.3 and SwiftUI 2.0
    • Support for Turn-Based games!
    • Tile Maps and Tile-Based components!
    • Device-independent "directional" input components (keyboard for now, gamepad next)
    • Lots of other new components!

    ⚡️ Massive Improvements:

    • Renamed the Octopus prefix to OK, finally adopting the prevailing convention :)
    • Improved shader support
    • Improved ECS core functionality and convenience
    • SwiftUI-like "Modifiers" for SpriteKit types
    • Improvements and overhaul for many components
    • Improved Logging
    • Lots of helper extensions, utilities, operators and aliases

    ✨ Fixed & Polished:

    • Improved macOS support
    • Randomization
    • Xcode Templates
    • Warnings and tips for gotchas and pitfalls
    • Various bugs

    🍱 Miscellaneous:

    • Improved Documentation
    • Better file organization and code formatting
    Source code(tar.gz)
    Source code(zip)
  • 3.2.0(Feb 10, 2020)

    Compare with previous release or latest development branch


    🖥 Major New Stuff:

    • Fixed and improved macOS and tvOS support! \(^▽^)/
    • OS-agnostic pointer input components that can be used with both touch and mouse!
    • Keyboard support!
    • Single QuickStart template for iOS, macOS and tvOS!
    • Easier to share a ton of code between all 3 platforms!

    ⚡️ Massive Improvements:

    • Sexier and smoother ECS core!
    • Time-dependent components now have options for per-frame or per-second time-steps.
    • Physics and movement-based components now have consistent support for acceleration.
    • More components!
    • Tests, finally!
    • Better, more-documenty documentation!
    • Logging

    ✨ Fixed and Polished:

    • Performance: @inlinable all the things!
    • Give into the more common convention of two-letter prefixes instead of Octopus by adding type aliases that begin with OK.
    • New logo inspired by the Sinclair ZX Spectrum ❤
    • Bug squishes
    • OCD indentation and other code formatting

    * This release was ready 2 months ago but I forgot to publish the draft.. 😖

    Jump from 3.0.0 to 3.2.0 because it ended up including better tvOS support as well. ^—^

    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Oct 28, 2019)

    Woo! A release so awesome it skips a version number! (See footnotes for explanation.)

    Compare with previous release or latest development branch

    Requires Xcode 11, iOS 13 and macOS 10.15 Catalina.

    ⭐️ Major New Stuff:

    • Super Sexy SwiftUI!
    • OK is now a proper Swift Package Manager package
    • Swift 5.1

    ⚡️ Massive Improvements:

    • Engine initialization and setup
    • Streamlined frame cycle updates
    • Subclass override/customization points
    • More sensible object hierarchy and roles
    • Eliminate boilerplate
    • Awesome QuickStart template

    Thanks to new Swift features (+ an increase in my INT), OK's core objects can now be initialized with much fewer lines of code which make a lot more sense, while still allowing advanced customization.

    ✨ Fixed and Polished:

    • Documentation (now with animated gifs! so hip!)
    • Xcode Templates
    • Logging

    🍱 Miscellaneous:

    • @OctopusUserDefault property wrapper to easily save and read user settings
    • Various convenience extensions to Apple APIs

    This is actually the first "proper" public release, as a full framework that can be "import"ed and used with Xcode project templates without hacks, so it should actually be tagged 1.0, but since OctopusKit has gone through 3 incarnations – first as a simple SpriteKit helper library, then GameplayKit ECS, and now SwiftUI and Swift Package – so the public version might as well reflect that. ^—^

    There are still a lot of commonly needed components (like game controller input) yet to be added. Onward to 3.1! \(^▽^)/

    Source code(tar.gz)
    Source code(zip)
  • 1.1.0-beta.1(Oct 26, 2019)

  • 1.0.0(Oct 26, 2019)

Palico Engine: Metal-Based Game Engine in Swift 🐑

Palico Engine: Metal-Based Game Engine in Swift ?? Implement a game engine on macOS using Metal API. Still in development. Currently I am working on a

Junhao Wang 24 Dec 1, 2022
A little arcade game that uses SwiftUI as a game engine.

SwiftUI Game A little arcade game that uses SwiftUI as a game engine :) Just copy the code into the Blank playgroundbook in Swift Playgrounds app on i

Roman Gaditskiy 10 Sep 30, 2022
🦁 🃏 📱 An animal matching puzzle card game– built with turn-based game engine boardgame.io and React-Native + React-Native-Web

Matchimals.fun an animal matching puzzle card game ?? ?? ?? Download for iOS from the App Store ?? Download for Android from the Google Play Store ??

iGravity Studios 137 Nov 24, 2022
CardGameEngine - Prototyping a game engine for the Bang card game

CardGameEngine Prototyping a game engine for the Bang card game. Features Engine is open source Powerful scripting language using JSON Card design is

stephtelolahy 5 Nov 22, 2022
🎯 Bull's Eye is the simple game which is consist in guessing the random number (1 ... 100) by using a slider.

The very first project made in ?? Swift language called Bull's Eye. ?? Bull's Eye is the simple game which is consist in guessing the random number (1

Wiktor 0 Nov 14, 2021
A game engine built with SDL and Swift.

Lark A game engine made with Swift and SDL. This is a pre-alpha work-in-progress. Don't try to use this unless you really know what you're doing. I ba

June Bash 41 Mar 11, 2022
This SwiftUI project is a result of the first 'milestone' in "Hacking With Swift's 100 Days of SwiftUI".

rock-paper-scissors-trainer This SwiftUI project is a result of the first 'milestone' in "Hacking With Swift's 100 Days of SwiftUI". In this simple ro

Eric Tolson 1 Dec 5, 2022
IOS Spin Game - A simple spin game using SwiftUI

IOS_Spin_Game A simple spin game using Swift UI.

Md. Masum Musfique 4 Mar 23, 2022
The one and only open source 4X MMO mid-core strategy game for iOS. Similar to Game of War and Mobile Strike

4X MMO Strategy Game for iOS I have spent 4 years of my life and a significant amount of money into completing this game and I hope you enjoy it. For

shankqr 69 Nov 16, 2022
Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Switshot is a game media manager helps you transfer your game media from Nintendo Switch to your phone, and manage your media just few taps.

Astrian Zheng 55 Jun 28, 2022
Gravity Switch - A dynamic game that integrates swiping and tapping to create a fun interactive game

GravitySwitch Gravity Switch is a dynamic game that integrates swiping and tappi

null 3 Nov 19, 2022
FlagGuess-Game - A game to collect points by guessing flags

Flag Guess Game A game to collect points by guessing flags! Wrong Choice

Ahmet Onur Sahin 3 Apr 18, 2022
Glide is a SpriteKit and GameplayKit based engine for building 2d games easily

Glide is a SpriteKit and GameplayKit based engine for building 2d games easily, with a focus on side scrollers. Glide is developed with Swift and works on iOS, macOS and tvOS.

null 433 Jan 6, 2023
A snake engine written in SpriteKit for all Apple devices.

A snake engine written in SpriteKit for all Apple devices. ⭐ Features Fully tested engine functionality. Framework based, super easy to integrate in d

Chris Jimenez 59 Dec 13, 2022
Cards - A SharePlay enabled card game for iOS & macOS

Deal ♣️ Overview A simple demo app showing the implementation of a card game acr

Oliver Binns 5 Jul 3, 2022
A peer-to-peer rock, paper scissors game for iOS and macOS

RPS - Rock, Paper, Scissors! Source code for my first SwiftUI tutorial. RPS utilizes the MultipeerConnectivity framework to connect devices directly w

Joe Diragi 3 Nov 14, 2022
A Simple iOS Game App - Designed in SwiftUI 🚀

A Simple iOS Game App - Designed in SwiftUI ?? The game's aim is to make a cap to fill the color among them. On tapping any shapes, it will rotate 90

Mohammad Yasir 2 Jan 18, 2022
Tic Tac Toe game developed in SwiftUI

TicTacToe Tic Tac Toe game developed in SwiftUI Requirements macOS 11.1 Big Sur Xcode 12.3 iOS 14 Getting Started Clone the Repository Royalty free au

Adesanya Segun 9 Sep 14, 2022
A 2048 game writing with SwiftUI.

2048 Game (SwiftUI app) This is a simple game to demonstrate the new SwiftUI framework. Note that the game algorithm may have issues, and this is stil

Cyandev 645 Jan 3, 2023