9
submitted 1 month ago* (last edited 1 month ago) by jupiter@programming.dev to c/godot@programming.dev

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...)

32
submitted 1 month ago* (last edited 1 month ago) by jupiter@programming.dev to c/godot@programming.dev

Hewwo, fellow Gamedevs!

While listening to the stupidly hard drum and bass by Rat Syndicate, my inner cozy fluffy being came out and this is a small celebration for Fall.

Here it is (youtube.com)

tweens.gd is a free, libre, and open source tweening addon for Godot 4.7 and up. Looking for beta testers and early adopters :3

[-] jupiter@programming.dev 1 points 1 month ago* (last edited 1 month ago)
42
submitted 1 month ago* (last edited 1 month ago) by jupiter@programming.dev to c/godot@programming.dev

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.

[-] jupiter@programming.dev 1 points 3 months ago* (last edited 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. 🤪

[-] jupiter@programming.dev 3 points 3 months ago* (last edited 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.

[-] jupiter@programming.dev 3 points 3 months ago* (last edited 3 months ago)

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!

[-] jupiter@programming.dev 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.

[-] jupiter@programming.dev 5 points 3 months ago* (last edited 3 months ago)

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...

[-] jupiter@programming.dev 4 points 3 months ago* (last edited 3 months ago)

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

[-] jupiter@programming.dev 5 points 3 months ago
[-] jupiter@programming.dev 19 points 3 months ago

I, for one, welcome our new robot overlord!

57
submitted 3 months ago* (last edited 3 months ago) by jupiter@programming.dev to c/godot@programming.dev

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.

7
submitted 9 months ago* (last edited 9 months ago) by jupiter@programming.dev to c/csharp@programming.dev

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

[-] jupiter@programming.dev 1 points 2 years ago

It's been a while since this was "hot news" - but here's a link to one of their GDC talks :) https://www.gamedevs.org/uploads/data-driven-game-object-system.pdf

[-] jupiter@programming.dev 4 points 2 years ago

That's really awesome, would love to see how and what you're doing with it! There are many approaches to composition in the various ECS flavors, and the "OG" ECS, "Entity System" in Dungeon Siege, had no-code composability for designers as one of its core principles.

88
submitted 2 years ago* (last edited 2 years ago) by jupiter@programming.dev to c/godot@programming.dev

(this is my first post on lemmy, I hope this works like I expect it does. critique and advice are very welcome and appreciated)

a cartoon fennec swinging a giant brush, painting a rainbow

fennecs 🔗

Hello, I'm tiger (aka jupiter), and since earlier this year I've been working on a free, libre, and open source Entity-Component System in pure C# that aims to minimize boilerplate and dependencies, works without code generators, and give decent flexibility and performance.

Who is it for?

ECS are an architecture to apply game or other logic to large numbers (ballpark: tens and hundreds of thousands) of objects or actors in an interactive game or simulation, and ECS libraries usually enable expressive composition that go beyond the the intrinsic optimizations of keeping data close together in memory.

fennecs is lightweight and works well with Godot 4.x, The NuGet package is going into its 0.6.0 release soon (about 20 releases so far - see the roadmap)

fennecs is made to operate in just about any sufficiently advanced .NET environment (.NET 8 or later), sadly this precludes using it with Unity for about another two years - but it was created after I spent around five years working with DOTS and coming to the conclusion that it is just too heavy on boilerplate for small teams or solo developers.

There are two simple demos for Godot, a demo for the Stride engine, and when I or one of the other contributors get around to it, demos for raylib_cs, Flax, MonoGame, and others are coming, as well as more demos for Godot.

Possibly ShapeEngine and especially Murder Engine are first in line, though.

What would I like?

Easy - I'd love to hear your thoughts or questions about it if you find the time. It means the world to me to hear other viewpoints or discuss features and contributions with the wider public.

Performance?

Funny you should ask. Everywhere I post, somehow with ECS this appears to be the first question.

Even though top performance isn't the focus (minimum boilerplate is!), thanks to its compact memory layout, fennecs is doing quite all right in Doraku's synthetic C# ECS benchmarks; of which you can find an excerpt on fennecs's github. Performance hardliners can rest assured that another optimization pass comes with the 0.7.x release cycle, after the SIMD interfaces are made available.

Unique traits

fennecs is relational, allowing grouping entities by data-backed relations with other entities (bob owes alice) that are automatically cleaned on entity despawn; by link objects (in physics world P); and soon by arbitrary typed secondary keys (version 0.6.x).

Its Stream Views allow code to access the contiguous storage components are stored in in various ways (including just the raw memory to submit to GPUs or game engines),

Batch operations can modify whole groups of entities or components at once, in a fast and intuitive way.

a cartoon fennec splashing purple paint onto the screen with the word "BLIT" written into it

The SIMD operators currently in development are likely to keep fennecs at the forefront for a wide variety of typical tasks, such as integrating positions and accelerations, matrix transforms, increments, etc.

SIMD ops internally use AVX2, SSE2, and AdvSIMD intrinsics to vectorize their operations where possible, and more complex operations can be composed by sequential ops.

This field is where fennecs' "low boilerplate" design goal doesn't clash with actual high performance and systems programming, and it is great for the optimization stages in game development.

Each release has close to 100% unit test coverage, and because it's pure C#, debugging, inspection and refactoring tools work very well with it.

One last, hidden advantage of being pure C# is that fennecs keeps its data in the .NET domain. Potential performance drawbacks of this are compensated very well by having to marshal function calls and component data back and forth much less frequently than many native-code ECS with C# bindings would.

[-] jupiter@programming.dev 1 points 2 years ago* (last edited 2 years ago)

"shared" folders seem like an antipattern to me. It quickly becomes the largest folder of even a small projects, and large projects developed by whole teams often end up with multiple shared (sub-)folders.

What techinques can you suggest against this, or to, in an advanced project, safely refactor and move many such folders without breaking the project?

view more: next ›

jupiter

0 post score
0 comment score
joined 2 years ago