Uhh yeah I think this might actually work. I'm using 2dog (for which I built a zero-copy GPU context to embed in other applications) and since it's 2dog.editor I have editor tools.

https://youtu.be/agaBILUUAis

(this is definitely earliest prototype jank but wow I am excited at how good this actually works... Java Swing window layouts are my nemesis, though...)

 

I had this idea lying around in pieces for a while, a much, much tighter and more flexible tweening API for Godot.

What inspired was this repo (unity-tweens) by Jeffrey Lanters, I used it a few times for Unity and after an upgrade, the API got super weird. All the fluent stuff was gone...

... until I realized it was so, so, so much better this way. ♥️

Well, Godot is full of fluent API for tweens, and I always found it bewildering and a bit clunky to use; even though Godot is my absolute favourite game engine right now.

Long (very looooong, tweens.gd users will get the joke later) story short - tweens.gd became a bit of a monster project, not gonna lie. Godot has, surprise!, a boatload of nodes, each with boatloads of properties.

... here it is. Still a little rough around the edges (generated docs at the end are dense, and the Godot in-engine samples are still very much WIP).

This has been a really fun practice effort to make a 'nice' asset/plugin for the Godot Asset Store. I want to keep maintaining it, of course (I run a small org on github called ⤜outfox⤏, making tools and libraries for fun rather than profit.

https://store.godotengine.org/asset/outfox/tweens/

Call to action - I would absolutely love for some indie devs to try it out and let me know what you think.

  • does the API make sense? (both C# and GDScript ... I know I'm getting kind of cute with a few of the concepts to eke out more legibility and less verbosity)

  • is the performance and stability okay? (I have a super basic benchmark that says it's doing okay, comparable to the built-in Godot Tween class.)

  • what's missing? what's needed from your end?

Cheers, and thanks in advance. I'll be here in the thread to answer questions.

[–] [S] 1 point 3 months ago*

v4. 7.1.64 or later should drastically improve loading performance. I find it acceptable with it, if not outstanding of course.

Turns out among other things, I was loading the PCK and the WASM blob twice depending on web server behaviour. 🤪

  • source
  • parent
  • context
  • [–] [S] 3 points 3 months ago*

    Just try it, in the worst case you have to git reset --hard and git clean -dxn / -dxf and dnx 2dog add again, but I think the dotnet restore --force should do it! There's only changes to the native library and the glue code.

    I plan to use 2dog a lot in future jams... it wasn't quite stable enough for GMTK jam, though, so... something to look forward to in upcoming jams.

  • source
  • parent
  • context
  • [–] [S] 3 points 3 months ago* (3 children)

    Yay! Your game works! *asterisk...

    I released a new release (v4.7.1.59) of 2dog that hardwires all the native WASM trampoline functions. It's one of those bugs that has me scratching my head, as in "how did this ever work?", but it did, including for samples from the Godot foundation, three friends' games, and two of my own. So... mega big thanks for this bug report, this was a big one!

    You may need to run dotnet nuget locals all --clear and dotnet restore --force or similar to get the fresh packages.

    Anyway. The asterisk: the loading performance of certain scenes and textures isn't great at all 😓, and I'm working on ways to make that nicer in the web html harness; and I also need to figure out where the majority of that time is spent; sometimes it's WASM compile time, sometimes it's scene load.

    PS: Super adorable game idea. That angry beach ball can get bent, though... sheesh. Ey, I'm walkin' crawlin' here!

  • source
  • parent
  • context
  • [–] [S] 3 points 3 months ago* (last edited 3 months ago)

    Getting closer, it's GD.PushError and some other functions with 7 parameters under the hood. (a little confused why these aren't generated, or how the native equivalent to GD.PushError("Blah") has 7 params, maybe it tries to look up all candidates) ... I need to do something else for the next hour or so, and then can get back to this. My automated and manual tests always fail on errors so ironically that led to GD.PushError never being tested.

    In related news, who ever in the .NET/mono team thought it was a good idea to call native signature strings "cookies" in the context of WASM specifically deserves a villain award... I navigated away from the documentation page three times thinking it was about web cookies.

  • source
  • parent
  • context
  • [–] [S] 5 points 3 months ago* (last edited 3 months ago) (2 children)

    Awesome, thanks for the detailed report and prepared repository to reproduce in. The failure is a bit different on my end - first I get a bunch of issues trying to serve the blender files (which it shouldn't, on the web, very likely my bug! bad dog, bad dog... - should already be imported), and then I get your crash. Is this what you get, too?

    Game seems to run okay in the editor. I'm working on making the blender import happen correctly or raise an error during the 2dog import step, I think this is where it goes wrong. (also, fantastic test case for future tests... I built 2dog because of resource import issues, now resource import bites me in the belly yet again, ha.)

    Edit: No, the problem is not the missing blender import, after correctly setting it to my blender path I get your behaviour. Which is great, only need to find the missing native trampoline now...

  • source
  • parent
  • context
  • [–] [S] 4 points 3 months ago* (last edited 3 months ago) (4 children)

    Oof, looks like a Godot crash, do you have a public repo with the game jam entry somewhere? I probably have to dig a little deeper, my suspicion is something related to some kind of native function/trampoline being completely missing. (weird)

    You could also try to create a source map: dotnet publish -c Release -p:WasmEmitSymbolMap=true -p:WasmNativeStrip=false

  • source
  • parent
  • context
  •  

    I needed a way to embed Godot in .NET applications, and ended up facilitating HTML5 export for C# games, too, which really reinvigorated my passion for Godot in game jams. And for boring work, I needed parallel unit testing (across multiple ALCs).

    But what is it...? I call it a C# front-end for the Godot engine, but really...

    2dog is still Godot

    All the Godot goodness still works, including programming with GodotSharp (their official C# SDK) and the 4.7 official editor, which was important to me for stability and trust (also, easier to swap out or extend).

    The nuget packages are free and libre open source under the MIT license. 2dog uses libgodot and creates a choice of small .NET "host" applications that you can tailor to your needs - HTML5 browser export, embedding in WinForms, xUnit testing, etc.

    Still hot off the press, always happy about visitors to the ⤜outfox⤏ discord or issues on our GitHub.

     

    I made another oopsie, I mean, Open Sourcie. :3

    Remember Haskell's newtype? Or F# type abbreviations?

    Well, newtype is a package that lets you use similar semantics in #CSharp for a large number of types, including the ability to add semantics and extension-like methods to your own derived types.

    MIT-Licensed, go wild!

    https://github.com/outfox/newtype

    https://www.nuget.org/packages/newtype

    newtype, easy distrinct type aliases for C#