Code: github.com/contextfreecode/gdext 0:00 Intro 0:46 GDScript 1:41 C# (csharp) 4:15 C++ (cpp) 8:18 Rust 11:23 Swift 14:19 Zig 18:39 Outro
Пікірлер: 100
@ElvisZhou2 ай бұрын
godot-zig's author here, it's great to see zig related stuff spread, really awesome job! FYI: the issue mentioned in the video has been fixed.
@contextfree2 ай бұрын
Thanks so much!
@SophiaWaggoner2 ай бұрын
I'm a Rustacean for sure but I've been recently going back to explore other languages to expand my horizons and I've discovered my favourite language for the more low-level stuff is definitely Zig. My main criticism is that its not quite there yet in terms of popularity and support and good bindings are scarce so it's really awesome to see stuff like this (both your bindings and the inclusion of it in this video) as it proves that Zig is growing and has a solid shot at becoming everything it's capable of.
@abmarnie92 ай бұрын
I've heard that they are hoping to eventually move C# to GDExtension (maybe for 5.0) but also generally improve the experience of GDExtension languages to be as easy to use as C# currently.
@Volt-Eye.2 ай бұрын
If that happens Am gonna write my whole game in assembly then 😂😂😂😂😂
@NeZversSounds2 ай бұрын
@@Volt-Eye. What's holding you back?
@Volt-Eye.2 ай бұрын
@@NeZversSounds The need bro ! Why code in assembly if am making a platformer. Its like to go 200mtrs you first preparing an F35 then burning gallons of gas to travel it. Just use feet or a scooter. Its just like this
@JustVoylin2 ай бұрын
As someone writing daily in GDExtensions ... I hope this will happen as the current GDExtension workflow is everything except smooth sailing ^^"
@sanderbos42432 ай бұрын
Awesome! I am happy to see Zig being represented too
@sporefergieboy102 ай бұрын
ziggers rise up
@RenderingUser2 ай бұрын
@@sporefergieboy10nah, yall need a better name 💀
@ArcWeltraumpert2 ай бұрын
me too 😂
@themathophage82382 ай бұрын
The name's actually "ziguanas"
@steveoc642 ай бұрын
lol, people that use Zig are called “programmers” .. just like C programmers, etc. it’s not a religious cult, which is one of the great appeals.
@ariansun48792 ай бұрын
Such a cute idea and nice project. I remember toying around with Nim and the OG GDNative a few years back and I really liked how GDScript and Nim shared some ergonomics, which made a shared code based a bit nicer to look at. Also really liking the Zig version, excited to see it mature a bit.
@contextfree2 ай бұрын
Nim is a lovely language. (And I'd be happy to take contributions to the repo, if you're up for it!)
@GZXC9932 ай бұрын
A cool idea and well presented. It really showcases the flexibility Godot and its community foster. Great work!
@casperes09122 ай бұрын
Swift version looks pretty good
@sean_r2 ай бұрын
Always great to see Zig get some usage
@vectoralphaAI2 ай бұрын
Godot is awesome. Allowing devs to make video games in whatever language they want or know best is great.
@UliTroyo2 ай бұрын
I recently saw a devlog for a game being made in Odin that was pretty good. I like the abundance of languages!
@dranon0o2 ай бұрын
Very nice, super cool to have put Zig in it I would have been curious about the size of the builds for each languages, just to know if it change something and if there is a need to have dll or if godot can be embed, pretty sure a zig build could make godot part of the binary build
@MyCodingDiarie2 ай бұрын
Your channel is like a hidden gem on KZbin. So glad I found it!
@TeamPuzel2 ай бұрын
Yeah, Swift can't yet easily cross compile. There is however an experimental "embedded" mode that removes the libc and unicode dependencies, and aside from String and existential support still being work in progress it's actually really usable (you can now build for freestanding wasm for example). I don't know if or when SwiftGodot will support that though.
@MyCodingDiarie2 ай бұрын
I've never commented on a video before, but I had to for this one. It's that good!
@leonss23562 ай бұрын
hell yeah zig
@moofree2 ай бұрын
I always knew this kind of thing was possible with Godot, but seeing it in action is amazing.
@lucy-pero2 ай бұрын
Very cool idea for a video. I'm making games in Godot currently and this is very interesting. Thank you!
@shableep2 ай бұрын
honestly really hoping for a strong non-Apple ecosystem for Swift. it’s such a beautifully language. intuitive and ergonomic enough to be approachable by beginners, and at the same time with comparable performance to C++ for experts.
@Kitsune_Dev2 ай бұрын
can you also showcase Lua? I’m from Roblox and would love to try out Godot
@mjKlaim2 ай бұрын
For the C++ case and package managers: I current lhave a game project using build2 (as build-system + package manager) and Godot+GDExtension, I made a build2 package of the godot-cpp library you need to use for your GDEXtension (it's available to the community but is not deeply testeD). Once I setup that package it simplified a lot of things in the game project as it's now automatically doing all the necessary code generation and linking, probably similar to how it works with the other languages with package managers providing the same thing. I think in C++ to also have less of the binding declaration noise parts, we would need it to be generated through reflection. So maybe in 10 years XD Auto-reloading works well for me but I didnt try to expose signals yet so maybe you found some limitations.
@contextfree2 ай бұрын
Any handy links for that build2 setup by chance?
@contextfree2 ай бұрын
Maybe have to format links weird for KZbin to let you paste them, though.
@mjKlaim2 ай бұрын
@@contextfree yeah my answer got erased, I'll ping you privately
@contextfree2 ай бұрын
Seeing if I can post your link here: github.com/build2-packaging/godot-cpp
@oriyadid2 ай бұрын
@@contextfreeThanks!
@rafae5902Ай бұрын
Very interesting. I wonder about how well Zig will perform when being used inside GDExtension. Do you believe that the way Zig allocates memory could be a problem?
@ThomazMartinez2 ай бұрын
Which language did you find most enjoying to work with?
@Kapendev2 ай бұрын
Haxe and DLang seem interesting.
@jonas1ara2 ай бұрын
Swift is sweet
@sirbuttonhd2 ай бұрын
always hyped when you release a new video
@nightRobinO_O2 ай бұрын
Godot is so versatile 😮 Could you do Go, too?
@contextfree2 ай бұрын
I've got to move on to other things right now, but feel free to contribute to the repo!
@remcogreve79822 ай бұрын
To be honest I really like swift. Too bad it is not really used outside the apple ecosystem.
@Tomsudobrej2 ай бұрын
Hey, this is cool, I really wanted to see these differences. What's the thing you said about firing up Godot from (e.g.) C++ instead of going through the editor? I never read about this, can you explain a little please?
@contextfree2 ай бұрын
I thought I saw it discussed in godot-rust docs, but I may have misread that. Here's some discussion about it for SwiftGodot, though, and maybe their same methods can apply elsewhere, although it might take some coding work. github.com/migueldeicaza/SwiftGodot?tab=readme-ov-file#driving-godot-from-swift
@contextfree2 ай бұрын
Core support code seems to be here. github.com/migueldeicaza/SwiftGodotKit/blob/main/Sources/SwiftGodotKit/SwiftGodotKit.swift
@contextfree2 ай бұрын
I may have seen this in godot-rust and imagined/misremembered more, but if there are cli options to start up the game immediately rather than enter the editor, that might be good enough for main dev purposes. godot-rust.github.io/book/intro/hello-world.html#admonition-tip-1
@Tomsudobrej2 ай бұрын
@@contextfree Thanks man for your responses :D This is very interesting!
@FightClass32 ай бұрын
Swift ❤
@noctemcat_2 ай бұрын
3:51 tbh, in C# you don't need to use signals. You can just use C# events, the workflow should be similar, and they should be faster as long as you just use C# with the only minus being that you wouldn't be able to see and connect them in the editor
@contextfree2 ай бұрын
Can GDScript still connect to them in code?
@noctemcat_2 ай бұрын
@@contextfree Nope, because of this I specified "as long as you just use C#" and just connect to signals in code. The last time I looked at it, you could call C# methods from GDScript and vice versa(page "Cross-language scripting" in the docs), so it should be possible to cludge something that will store connected node and call its method on event. But at this point you are paying way too much for it and should just use Signals. I don't have too much experience with it, but mixing different languages together was very clumsy the last time I tried it
@contextfree2 ай бұрын
Thanks much for the extra info! In this case, I'm definitely communicating across languages, so signals are important here. I'm also calling a C# method from GDScript. But thanks for adding the context that this doesn't apply to people using only C#.
@commentingexistentialcrisi95642 ай бұрын
Swift actually looks like a really good option, can anybody provide any more cons? Im actually considering using it for a big project
@KyleLuce2 ай бұрын
Not certain on specific issues you will encounter, but recognize the inherent risk of taking the less treaded/vetted path. You'll probably have a lot less knowledge base, from the community to lean on and many times the lesser used language bindings aren't feature complete. I'd look through the issues on bindings repo to see if there are any show stoppers for your project.
@dugtrioramenАй бұрын
Apparently there's a web assembly gd extension now. So every wasm language is now fair game too 😂
@romankoshchei2 ай бұрын
What linux are you using?
@contextfree2 ай бұрын
Pop, but I'm not totally in love with it. It's ok.
@ArcWeltraumpert2 ай бұрын
wait, zig, it's interesting, i thought you will develop an os using zig 😂😂😂
@sayaks122 ай бұрын
some of that rust code is a bit weird, like let position = match () { _ if .. => .. _ => .. }; is just a more complicated way of writing let position = if .. { .. } else { .. }; clippy would probably pick up on that if i were to guess
@contextfree2 ай бұрын
I'm weird and find if/else bothersome, but understood that my style is unusual.
@omg33ky2 ай бұрын
@@contextfree it is quite unusual but if you like it go for it. One more way you could write it is: let position = match self.state == State::Wait { true => self.start, false => position, }; This might be a bit more readable for other people and still avoid the else if you don't like it. (Note: I wrote this code from memory so it might have some small syntax errors)
@BrunodeSouzaLino2 ай бұрын
Rust favors pattern matching instead of if statements for most things.
@sayaks122 ай бұрын
@@BrunodeSouzaLino not in cases like this. rust has if expressions because they're more appropriate sometimes. and matching on () just to use an if guard to distinguish between two cases is absolutely a situation where an if expression is more appropriate
@contextfree2 ай бұрын
@@sayaks12 To state my usage differently, I find match structure much clearer. I suspect many languages mostly support traditional if/else because it's traditional and people are used to it. Familiarity of course does matter in usability, though.
@verbnoun15312 ай бұрын
13:30 Interesting that the Rust lib was over 100x the size of the C++ lib.
@contextfree2 ай бұрын
Funny, I didn't even look at that. Thanks for noticing! I just made a release mode build and checked the size, and it's about 6 MB. Glad release mode makes a big difference there.
@obkf-too2 ай бұрын
Odin lang soon!?
@contextfree2 ай бұрын
I have to move on to other things but Odin would be awesome. Feel free to contribute to the repo!
@Volt-Eye.2 ай бұрын
Should we bring Swift for Godot than C# ?
@BrunodeSouzaLino2 ай бұрын
Not really. Swift is very hard to use outside the Apple ecosystem.
@gertrudessampaio86892 ай бұрын
Rust 😊😊
@LycamАй бұрын
It does a half ass job full of bugs with c#, why they keeo waste resources with anything else
@K4rmy2 ай бұрын
That C# logo is old
@contextfree2 ай бұрын
There's no official C# logo, last I went looking. This one is actually still referenced secretly on some MS pages, though, at least in the past year or two. There's also the unofficial logo that's designed to look like the C++ logo, but I'm not sure where it comes from.
@K4rmy2 ай бұрын
@@contextfreeI have posted few answers already, but for some reason they disappear. Anyway, lookup C# on Wikipedia and you'll find the actuall current logo, if you click on it you'll find their source's location.
@contextfreeАй бұрын
Wikipedia sometimes has unofficial logos, but I dug into the sources now, and even if this one still doesn't quite seem "official", you're right that is newer and Microsoft is using it at least sometimes in official places, so I used it for my latest video. Thanks much for the tip on that!
@WaliaIbex2 ай бұрын
Why craps like swift , c# and not js
@inkryption33862 ай бұрын
why would you use JS for this? it's slow and designed primarily for writing scripts for websites.
@WaliaIbex2 ай бұрын
@@inkryption3386 If js is Good for Unity it is good enough for GODOT. These days js is not only for web it is everywhere .
@rafae5902Ай бұрын
what a joke LOL
@sumofat49942 ай бұрын
Did you intentionally picked the worst languages for game dev on purpose?
@inkryption33862 ай бұрын
how are these the worst languages?
@BrunodeSouzaLino2 ай бұрын
Almost everything is C++ these days so you probably didn't watch the video.
@inkryption33862 ай бұрын
@@BrunodeSouzaLino I wouldn't say most things are in C++, most people are writing in JavaScript frameworks, probably followed by python and maybe Go, C++ is mainly legacy and specialized use cases like Unreal that basically define a DSL.
@adicide90702 ай бұрын
it's whack how these languages look like one another. shit has become so homogenized.
@contextfree2 ай бұрын
What kinds of things would you find interesting?
@adicide90702 ай бұрын
I always watch youe stuff and think it's mighty interesting! I've probably been learning too much ocaml recently and now everything brace-delimited looks samey :) semantic differences notwithstanding, that is. I like your own language for videos, to be honest @@contextfree
@contextfree2 ай бұрын
Thanks for the thoughts and the encouragement! And I still need to spend some time in OCaml 5.
@adicide90702 ай бұрын
ah that's right. I forgot but you did say you would in your language overview for... 2023 it was? multicore and effect handlers ;)@@contextfree