All Projects → kelvin13 → godot-swift

kelvin13 / godot-swift

Licence: other
swift language support for the godot game engine

Programming Languages

swift
15916 projects
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to godot-swift

Godot Card Game Framework
A framework which comes with prepared scenes and classes and scenes to kickstart your card game, as well as a powerful scripting engine to use to provide full rules enforcement.
Stars: ✭ 210 (+89.19%)
Mutual labels:  godot
Luascript
Lua language support for Godot Engine
Stars: ✭ 240 (+116.22%)
Mutual labels:  godot
defendo
A tower defense game made using Godot Game Engine
Stars: ✭ 41 (-63.06%)
Mutual labels:  godot
Cartographer
A GPU powered Terrain editor and renderer for Godot Engine
Stars: ✭ 216 (+94.59%)
Mutual labels:  godot
Godot Realistic Water
Godot - Realistic Water Shader
Stars: ✭ 235 (+111.71%)
Mutual labels:  godot
godot-hexgrid
a godot based framework to build hex map boardgames.
Stars: ✭ 48 (-56.76%)
Mutual labels:  godot
Godotfirebase
FireBase for godot
Stars: ✭ 199 (+79.28%)
Mutual labels:  godot
godot-website
The code for the official Godot Engine website. A static site built using Jekyll.
Stars: ✭ 167 (+50.45%)
Mutual labels:  godot
Simplegodotcrtshader
A simple Godot shader that simulates CRT Displays
Stars: ✭ 236 (+112.61%)
Mutual labels:  godot
godot-local-notification
Godot module for local notifications (android and iOS)
Stars: ✭ 111 (+0%)
Mutual labels:  godot
Whiskers
A Visual Dialogue Editor made using the Godot Engine
Stars: ✭ 229 (+106.31%)
Mutual labels:  godot
Godottie
A simple Text Interface Engine to control text output (like in a RPG dialogue) for Godot.
Stars: ✭ 230 (+107.21%)
Mutual labels:  godot
GodotGeometryElements
Geometry elements using Godot Engine 2.14 and Godot 3.0
Stars: ✭ 27 (-75.68%)
Mutual labels:  godot
Godot Gdscript Toolkit
Independent set of GDScript tools - parser, linter and formatter
Stars: ✭ 214 (+92.79%)
Mutual labels:  godot
hydro
Hydro is a Godot Engine module which allows rigid bodies to behave realistically in water.
Stars: ✭ 39 (-64.86%)
Mutual labels:  godot
Godot oculus quest toolkit
An easy to use VR toolkit for Oculus Quest development using the Godot game engine
Stars: ✭ 207 (+86.49%)
Mutual labels:  godot
Godot Mixing Desk
A complete audio solution for Godot 3.2.x, making procedural sound and adaptive/procedural music possible with a few nodes and a couple lines of code.
Stars: ✭ 240 (+116.22%)
Mutual labels:  godot
RPG-Databases
Godot Engine addon to manage RPG databases
Stars: ✭ 15 (-86.49%)
Mutual labels:  godot
PixelDot
Godot plugin for making 2D sandbox games like Terraria and Starbound.
Stars: ✭ 57 (-48.65%)
Mutual labels:  godot
GestureControlledCamera2D
A Camera2D node controlled through gestures. It's also an example of how to use the Godot Touch Input Manager.
Stars: ✭ 39 (-64.86%)
Mutual labels:  godot


Swift for Godot
0.1.0

Godot Swift is a Swift Package Manager plugin that builds and packages Swift projects as Godot Native libraries.

final 
class MySwiftClass:Godot.NativeScript
{
    var foo:Int = 5
    
    init(delegate _:Godot.Unmanaged.Spatial)
    {
    }
    func bar(delegate _:Godot.Unmanaged.Spatial, x:Int) -> Int 
    {
        self.foo * x
    }
    
    @Interface 
    static var interface:Interface 
    {
        Interface.properties 
        {
            \.foo <- "foo"
        }
        Interface.methods 
        {
            bar(delegate:x:) <- "bar"
        }
    }
}

extension Godot.Library 
{
    @Interface 
    static var interface:Interface 
    {
        MySwiftClass.self <- "MyExportedSwiftClass"
    }
}

getting started

Godot Swift uses the experimental Swift package plugins feature, which is currently only available in recent nightly Swift toolchains. Because this feature is in active development, we strongly recommend using the following Swift toolchain version to avoid compilation issues:

  • DEVELOPMENT-SNAPSHOT-2021-06-01-a

We recommend using swiftenv to manage multiple Swift toolchain installations. You can install a custom toolchain using swiftenv by passing the swiftenv install command the url of the toolchain on swift.org.

For example, to install the 2021-06-01-a snapshot on Ubuntu 20.04 x86_64, run:

swiftenv install \
https://swift.org/builds/development/ubuntu2004/swift-DEVELOPMENT-SNAPSHOT-2021-06-01-a/swift-DEVELOPMENT-SNAPSHOT-2021-06-01-a-ubuntu20.04.tar.gz

Godot Swift builds native libraries for Godot 3.3.0.

Warning: Although Godot Swift libraries should be compatible with later Godot versions, we strongly recommend using Godot 3.3.0 to avoid unrecognized-symbol errors at runtime.

To use Godot Swift in a project, add it as a dependency in Package.swift, and add the GodotNative module and the GodotNativeScript plugin to your build target.

// swift-tools-version:5.5
import PackageDescription

let package = Package(
    name: "example",
    products: 
    [
        .library(name: "godot-swift-example", type: .dynamic, 
            targets: 
            [
                "GodotSwiftExample"
            ])
    ],
    dependencies: 
    [
        .package(url: "https://github.com/kelvin13/godot-swift/", .branch("master"))
    ],
    targets: 
    [
        .target(name: "GodotSwiftExample", 
            dependencies: 
            [
                .product(name: "GodotNative",      package: "godot-swift")
            ],
            plugins: 
            [
                .plugin(name: "GodotNativeScript", package: "godot-swift")
            ])
    ]
)

tutorials and example programs

  1. basic usage (sources)
  2. advanced methods (sources)
  3. advanced properties (sources)
  4. signals (sources)
  5. life cycle management (sources)
  6. using custom types (sources)

api reference

math library reference

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].