Skip to content

Releases: migueldeicaza/SwiftGodot

0.45: remove GodotObject protocol (#525)

20 Aug 17:44
f521910
Compare
Choose a tag to compare

SwiftGodot 0.45 is out!

This release works with both Godot 4.2 and Godot 4.3, but does not
surface yet any of the Godot 4.3 features, that is a patch I will
merge shortly after this release goes out.

Changes in this release:

  • Major upgrade to how we manage the lifecyle of object, which fixes
    some long-standing memory leaks in SwiftGodot, I did the initial
    pass, but Rob Mayoff found and fixed some hartd scenarios with
    Variants - and they should now all be handled correctly. Thank you
    Rob! (the major changes did not have a bug logged, but the commit
    is 738579a, the other fixes are for
    #513, #524).

  • PropInfo implements CustomDebugStringConvertible (miguel).

  • Arrays*.resize now have a @discardableResult and Array has it for
    append and push_back as well (miguel).

  • Arrays now conform to RandomAccessCollection (miguel)

  • Various warning fixes by Rob Mayoff (Fixes #516 and #520 for Xcode
    16 beta4)

  • Rob Mayoff also fixed a crash on startup on MacOS when launching the
    app (Fixes #517)

  • We now reference the new home for a few dependencies, (Rob Mayoff,
    #518)

  • Eliminated the GodotObject protocol that provided no value (Rob
    Mayoff, #525).

0.44.0: Drop the `value:` parameter name from the various PackedArray.* append

10 Jul 18:45
Compare
Choose a tag to compare
  • New IntersectRayResult strong type from Estevan Hernandez

  • Generates various native_structures, and also surfaces a handful of
    APIs that take pointers (those that exposed 'const void*' and
    'AudioFrame*') and were not available before. Additioanl
    pointer-based APIs will come, but there are some ambiguities and
    areas where we could surface a better API than just pointers, so I
    am explicitly going slow here, to avoid having to write a lot of
    additional compatibility hacks later.

  • The append methods in PackedArray classes no longer take a "value: "
    parameter, although a version is kept for compatibility.

  • The append methods now use the natural type for the array they
    contain, which should reduce the amount of casts necessary. That
    is, in the past we surfaced "append(value: Int64)" for the
    PackedArrayInt32, which was odd.

    Now:

    • PackedByteArray.append takes a UInt8
    • PackedFloat32Array.append takes a Float
    • PackedInt32Array.append takes a Int32

0.43.0: Only remove the callback value from our shared array when the last ex…

16 Jun 16:21
Compare
Choose a tag to compare
  • Optimization, BindNode will now cache the resolution of a node (Alex Loren)

  • BindNode now allows a path to be provided (Alex Loren)

  • GArray.append no longer takes a named "value:" parameter, to be
    closer to the Swift idiom on arrays (Joey Nelson)

  • Now the GodotError's localizedDescription uses Godot's own localized
    description rather than being a dump of the enumeration values
    (Miguel). Turns it into a more useful Swift Error.

  • Fixes the initialization process, so multiple Swift extensions can
    be added to a project (Miguel).

  • Fixes the deinitializtaion process (Miguel)

  • Brings support for Godot's built-in methods that take variable
    arguments, which were previoulsy not supported, and worked as if there had been no additional arguments provided, this brings:

    func Callable.call (_ args: Variant...)
    func Callable.callDeferred(_ args: Variant...)
    func Callable.rpc(_ args: Variant...)
    func Callable.rpcId(peerId: Int64, _ args: Variant...)
    func Callable.bind(_ args: Variant...)
    func Signal.emit(_ args: Variant...)
  • Fix resolution of dynamic types when only proper supertypes are exposed through GDExtension (#493, Gabor Koncz)

  • New documentation on how to launch extensions directly from VSCode,
    as an alternative to attach (Zacaria Guenna)

0.42.0: Export enum (#476)

21 May 18:58
04e47f5
Compare
Choose a tag to compare
  • Support for Exporting enumerations to Godot, to do this, flag your
    enumerations with CaseIterable, and then use @Export(.enum).
    See the Exports
    Documentation

    for additional information - Miguel.

  • Fix compilation when used with codebases that define their own
    Variant type, fix from Stefan Urbanek.

  • Fixes Godot documentation conversion by handling url fragments.
    Miguel.

  • Fix dynamic type of singletons (Gergely Kis, Gabor Koncz)

  • Performance: Exposed withUnsafeConstAccessToData for
    PackedByteArray, which avoids a data copy of the underlying buffer.
    Improvement by Kevin Watters.

  • Performance, all accessors to Packed data arrays now avoid copies, improvement by Kevin Watters.

  • Handle return as a special keyword, to fix compilation for some
    scenarios, fix by Josh Bromberg.

  • Various documentation updates, Miguel, Mikhail Tishin, Dolapo Falola

0.41.0

20 Mar 22:41
Compare
Choose a tag to compare

Version 0.41 is out, with lots of small improvements:

  • Wrapped.isValid can now be used to determine if an object has been
    released, this is the case when you might have called the
    queueFree method, use this on those objects to check if the object
    has alreayd been released or not.

    This helps alleviate the issue discussed in:
    #416

    Miguel

  • New helper method Variant.typeName (GType) which can be used to get
    the underlying type name (Miguel)

  • Add support for Swift 5.10 on Windows, which had a handful of
    breaking issues (Mikhail Tishin)

  • Upgraded Swift Syntax to a newer version (Mikhail Tishin)

  • GDictionary now supports debugDescription which will return the
    dictionary contents (Miguel)

  • Updates the documentation to reflect some recent API changes
    (Mikhail Tishin, Miguel).

  • We no longer depend on Foundation to build SwiftGodot, which should
    help users that do not want to pay the price of using it. The
    downside is that we lost the PackedByteArray.asData() method (as
    Data is defined in Foundation). But in exchange, we got an
    asBytes that reutnrs a byte array, and two unsafe with* methods
    that can be used to access the underlying buffer directly) - Mikhail
    Tishin and Miguel.

  • Packed Byte, Int32, Int64, Double and Float can now be initialized
    from arrays of those types without using an intermediary GArray of
    Variants (Miguel)

  • Now we have a static library of SwiftGodot in the build for those
    that need it (Mikhail Tishin)

  • Fixes a leak in returned VariatnCollections (Miguel).

0.40.0

27 Feb 15:48
Compare
Choose a tag to compare
  • Makes @export work with GArray and Variant types, fixes #410 by Miguel

  • API typo fix for degreesToRadians, spotted by @jbromberg

  • Fixes Exported VariantCollection and ObjectCollection types do not
    appear in the Editor (#408) by Estevan Hernandez.

  • Enumerations now conform to CustomDebugStringConvertible to assist
    in your debugging and GodotError exposes localizedDescription by Miguel)

  • Fixes running tests with swift test when using --verbose mode
    (Issue #407) by Mikhail Tishin

  • Fixes Unable to use await for Timer.timeout signal (#403) by Mikhail Tishin.

0.39.0

18 Feb 16:32
088b001
Compare
Choose a tag to compare

Bug fixes from Mikhail:

  • Make SceneTree macro path optional (#402)

  • Restructure VariantRepresentable conformances (#394)

  • Add AStar engine tests (#400)

0.38: The `Variant(fromContent:)` and `Variant(fromContentPtr:)` now make a

13 Feb 04:18
Compare
Choose a tag to compare

Release 0.38:

  • Many new framework type tests by Mikhail Tishin and many defaults in
    our core types to match the default values in Godot. Thank you
    Mikhail!

  • Methods for built-in types now also follow the pattern of the object
    types of Godot, if the first parameter name matches the last word of
    the method, the name is dropped (Mikhail Tishin)

  • Additional diagnostics in the use of macros, it will now flag when a
    @callable is applied to an async or throwing function (Jae Kong)

  • Bug fix #342: Fix editor crash when trying to set mismatched value
    to exported property. Mikhail Tishin

  • Workaroudn a Swift-ism that passes UnsafeRawPointers representing
    nil, but not being a UnsafeRawPointer - helps catch bugs when we get
    a null back from godot (Miguel)

  • Fixes Signal dispatching, these were incorrectly encoded and would
    crash your application (Miguel)

  • Fixes #exportGroup was applying the prefix to all subsequent
    exported properties' propertyName - Estevan Hernandez

  • Adds support for #exportSubgroups - Estevan Hernandez

  • Adds support for keyed indexer for built-in Types (Mikhail Tishin),
    fixes bugs #45 and #46

  • Prevent SwiftGodot subclasses from executing in editor by default
    (Mikhail Tishin). This brings a Godot @tool-like setup, you can
    control this by passing calling the @godot macro with either (.tool)
    or (.gameplay).

  • Fixes to the Snapping methods (Mikhail Tishin)

  • New unary minus operatos for Vectors (Mikhail Tishin)

  • Fixes for Hot Reloading (Mikhail Tishin), but we still have an issue
    with Godot or Swift not fully unloading libraries that is being
    tracked (#384

  • Fixes exporting of fields named value Airyzz.

  • Add support for calling variant methods and access elements of
    arrays held in variants (Miguel)

  • Makes the NodePath description method match the Godot method that
    produces their name - as Godot does not surface this method (Miguel)

  • New convenience for PackedByteArray: asData() returns the byte
    array as a Swift Data type.

  • Color now exposes HSV properties (Mikhail Tishin)

  • Variant memory leak fixes. Miguel See the discussion here for
    additional information:
    #388

  • StringName and GString are now Hashable (Mikhail Tishin)

0.37: Document VS Code (#335)

07 Jan 22:10
e18cfff
Compare
Choose a tag to compare
  • New guide on using SwiftGodot with Visual Studio Code by Joseph Hill

  • Strongly typed PhysicsDirectSpaceState3D.IntersectRayResult by
    Estevan Hernandez.

  • Fixed the default initializer for Quaternions (the Godot upstream
    documentation was wrong) Mikhail Tishin

  • Fewer debugging messages (Miguel)

0.36

04 Jan 23:57
d6a02db
Compare
Choose a tag to compare

Many math functions are now backed by direct swift calls, rather than
marshaling parameters, and calling Godot (Nathan Van Fleet).

@SceneTree path argument is now optional (Marquis Kurt)

Size reduction in binary by using call_object_method_bind_v (@pcbeard)

Vas improvements in @callable array return types and @export - now it
supports VariantCollection and ObjectCollection (Estevan Hernandez)

Fixes the default arguments for StringNames (Mikhail Tishin)

Fix static method generation for built-in structs (Mikhail Tishin)