6 Programming Languages in 1 Godot Game! Trying out GDExtension!

  Рет қаралды 25,744

Context Free

Context Free

Күн бұрын

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
@ElvisZhou
@ElvisZhou 2 ай бұрын
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.
@contextfree
@contextfree 2 ай бұрын
Thanks so much!
@SophiaWaggoner
@SophiaWaggoner 2 ай бұрын
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.
@abmarnie9
@abmarnie9 2 ай бұрын
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.
@Volt-Eye. 2 ай бұрын
If that happens Am gonna write my whole game in assembly then 😂😂😂😂😂
@NeZversSounds
@NeZversSounds 2 ай бұрын
@@Volt-Eye. What's holding you back?
@Volt-Eye.
@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
@JustVoylin
@JustVoylin 2 ай бұрын
As someone writing daily in GDExtensions ... I hope this will happen as the current GDExtension workflow is everything except smooth sailing ^^"
@sanderbos4243
@sanderbos4243 2 ай бұрын
Awesome! I am happy to see Zig being represented too
@sporefergieboy10
@sporefergieboy10 2 ай бұрын
ziggers rise up
@RenderingUser
@RenderingUser 2 ай бұрын
​@@sporefergieboy10nah, yall need a better name 💀
@ArcWeltraumpert
@ArcWeltraumpert 2 ай бұрын
me too 😂
@themathophage8238
@themathophage8238 2 ай бұрын
The name's actually "ziguanas"
@steveoc64
@steveoc64 2 ай бұрын
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.
@ariansun4879
@ariansun4879 2 ай бұрын
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.
@contextfree
@contextfree 2 ай бұрын
Nim is a lovely language. (And I'd be happy to take contributions to the repo, if you're up for it!)
@GZXC993
@GZXC993 2 ай бұрын
A cool idea and well presented. It really showcases the flexibility Godot and its community foster. Great work!
@casperes0912
@casperes0912 2 ай бұрын
Swift version looks pretty good
@sean_r
@sean_r 2 ай бұрын
Always great to see Zig get some usage
@vectoralphaAI
@vectoralphaAI 2 ай бұрын
Godot is awesome. Allowing devs to make video games in whatever language they want or know best is great.
@UliTroyo
@UliTroyo 2 ай бұрын
I recently saw a devlog for a game being made in Odin that was pretty good. I like the abundance of languages!
@dranon0o
@dranon0o 2 ай бұрын
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
@MyCodingDiarie
@MyCodingDiarie 2 ай бұрын
Your channel is like a hidden gem on KZbin. So glad I found it!
@TeamPuzel
@TeamPuzel 2 ай бұрын
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.
@MyCodingDiarie
@MyCodingDiarie 2 ай бұрын
I've never commented on a video before, but I had to for this one. It's that good!
@leonss2356
@leonss2356 2 ай бұрын
hell yeah zig
@moofree
@moofree 2 ай бұрын
I always knew this kind of thing was possible with Godot, but seeing it in action is amazing.
@lucy-pero
@lucy-pero 2 ай бұрын
Very cool idea for a video. I'm making games in Godot currently and this is very interesting. Thank you!
@shableep
@shableep 2 ай бұрын
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_Dev
@Kitsune_Dev 2 ай бұрын
can you also showcase Lua? I’m from Roblox and would love to try out Godot
@mjKlaim
@mjKlaim 2 ай бұрын
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.
@contextfree
@contextfree 2 ай бұрын
Any handy links for that build2 setup by chance?
@contextfree
@contextfree 2 ай бұрын
Maybe have to format links weird for KZbin to let you paste them, though.
@mjKlaim
@mjKlaim 2 ай бұрын
@@contextfree yeah my answer got erased, I'll ping you privately
@contextfree
@contextfree 2 ай бұрын
Seeing if I can post your link here: github.com/build2-packaging/godot-cpp
@oriyadid
@oriyadid 2 ай бұрын
​@@contextfreeThanks!
@rafae5902
@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?
@ThomazMartinez
@ThomazMartinez 2 ай бұрын
Which language did you find most enjoying to work with?
@Kapendev
@Kapendev 2 ай бұрын
Haxe and DLang seem interesting.
@jonas1ara
@jonas1ara 2 ай бұрын
Swift is sweet
@sirbuttonhd
@sirbuttonhd 2 ай бұрын
always hyped when you release a new video
@nightRobinO_O
@nightRobinO_O 2 ай бұрын
Godot is so versatile 😮 Could you do Go, too?
@contextfree
@contextfree 2 ай бұрын
I've got to move on to other things right now, but feel free to contribute to the repo!
@remcogreve7982
@remcogreve7982 2 ай бұрын
To be honest I really like swift. Too bad it is not really used outside the apple ecosystem.
@Tomsudobrej
@Tomsudobrej 2 ай бұрын
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?
@contextfree
@contextfree 2 ай бұрын
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
@contextfree
@contextfree 2 ай бұрын
Core support code seems to be here. github.com/migueldeicaza/SwiftGodotKit/blob/main/Sources/SwiftGodotKit/SwiftGodotKit.swift
@contextfree
@contextfree 2 ай бұрын
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
@Tomsudobrej
@Tomsudobrej 2 ай бұрын
@@contextfree Thanks man for your responses :D This is very interesting!
@FightClass3
@FightClass3 2 ай бұрын
Swift ❤
@noctemcat_
@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
@contextfree
@contextfree 2 ай бұрын
Can GDScript still connect to them in code?
@noctemcat_
@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
@contextfree
@contextfree 2 ай бұрын
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#.
@commentingexistentialcrisi9564
@commentingexistentialcrisi9564 2 ай бұрын
Swift actually looks like a really good option, can anybody provide any more cons? Im actually considering using it for a big project
@KyleLuce
@KyleLuce 2 ай бұрын
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
@dugtrioramen Ай бұрын
Apparently there's a web assembly gd extension now. So every wasm language is now fair game too 😂
@romankoshchei
@romankoshchei 2 ай бұрын
What linux are you using?
@contextfree
@contextfree 2 ай бұрын
Pop, but I'm not totally in love with it. It's ok.
@ArcWeltraumpert
@ArcWeltraumpert 2 ай бұрын
wait, zig, it's interesting, i thought you will develop an os using zig 😂😂😂
@sayaks12
@sayaks12 2 ай бұрын
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
@contextfree
@contextfree 2 ай бұрын
I'm weird and find if/else bothersome, but understood that my style is unusual.
@omg33ky
@omg33ky 2 ай бұрын
​@@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)
@BrunodeSouzaLino
@BrunodeSouzaLino 2 ай бұрын
Rust favors pattern matching instead of if statements for most things.
@sayaks12
@sayaks12 2 ай бұрын
@@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
@contextfree
@contextfree 2 ай бұрын
@@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.
@verbnoun1531
@verbnoun1531 2 ай бұрын
13:30 Interesting that the Rust lib was over 100x the size of the C++ lib.
@contextfree
@contextfree 2 ай бұрын
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-too
@obkf-too 2 ай бұрын
Odin lang soon!?
@contextfree
@contextfree 2 ай бұрын
I have to move on to other things but Odin would be awesome. Feel free to contribute to the repo!
@Volt-Eye.
@Volt-Eye. 2 ай бұрын
Should we bring Swift for Godot than C# ?
@BrunodeSouzaLino
@BrunodeSouzaLino 2 ай бұрын
Not really. Swift is very hard to use outside the Apple ecosystem.
@gertrudessampaio8689
@gertrudessampaio8689 2 ай бұрын
Rust 😊😊
@Lycam
@Lycam Ай бұрын
It does a half ass job full of bugs with c#, why they keeo waste resources with anything else
@K4rmy
@K4rmy 2 ай бұрын
That C# logo is old
@contextfree
@contextfree 2 ай бұрын
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.
@K4rmy
@K4rmy 2 ай бұрын
​@@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
@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!
@WaliaIbex
@WaliaIbex 2 ай бұрын
Why craps like swift , c# and not js
@inkryption3386
@inkryption3386 2 ай бұрын
why would you use JS for this? it's slow and designed primarily for writing scripts for websites.
@WaliaIbex
@WaliaIbex 2 ай бұрын
@@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
@rafae5902 Ай бұрын
what a joke LOL
@sumofat4994
@sumofat4994 2 ай бұрын
Did you intentionally picked the worst languages for game dev on purpose?
@inkryption3386
@inkryption3386 2 ай бұрын
how are these the worst languages?
@BrunodeSouzaLino
@BrunodeSouzaLino 2 ай бұрын
Almost everything is C++ these days so you probably didn't watch the video.
@inkryption3386
@inkryption3386 2 ай бұрын
@@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.
@adicide9070
@adicide9070 2 ай бұрын
it's whack how these languages look like one another. shit has become so homogenized.
@contextfree
@contextfree 2 ай бұрын
What kinds of things would you find interesting?
@adicide9070
@adicide9070 2 ай бұрын
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
@contextfree
@contextfree 2 ай бұрын
Thanks for the thoughts and the encouragement! And I still need to spend some time in OCaml 5.
@adicide9070
@adicide9070 2 ай бұрын
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
Godot Powered! - 15 Apps Created using the Godot Game Engine
11:35
Gamefromscratch
Рет қаралды 36 М.
WHY did this C++ code FAIL?
38:10
The Cherno
Рет қаралды 169 М.
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 4 МЛН
Why It (Mostly) Doesn't Matter How You Code In Rust
22:57
Oliver Jumpertz
Рет қаралды 11 М.
Java 21 Is Good?! | Prime Reacts
27:08
ThePrimeTime
Рет қаралды 214 М.
4 Godot 4 Devs Make 4 Games in 44 Hours
25:19
DevLogLogan
Рет қаралды 471 М.
Starting my own hobby language (again)
13:17
Context Free
Рет қаралды 6 М.
Async Rust Is A Bad Language | Prime Reacts
28:46
ThePrimeTime
Рет қаралды 87 М.
Rust: When C Code Isn't Enough
8:26
CodeAhead
Рет қаралды 153 М.
Godot 4.2, Restorer of The Lost | Full Feature Breakdown
21:35
We can now write scripts using these languages, but is it worth it?
8:28
How charged your battery?
0:14
V.A. show / Магика
Рет қаралды 6 МЛН
Ждёшь обновление IOS 18? #ios #ios18 #айоэс #apple #iphone #айфон
0:57