5 beginner tips for using C# in Godot 4!

  Рет қаралды 2,963

Mina Pêcheux

Mina Pêcheux

Күн бұрын

Пікірлер: 15
@minapecheux
@minapecheux Жыл бұрын
And here are a few extra tips given by the community, to go beyond the video! Thanks to everyone for chipping in :) 1. When you use the built-in hooks like _Ready(), _Process(), etc., don't forget to add the underscore at the beginning so that you properly override the function, and Godot can run your logic! :)
@yess.6558
@yess.6558 9 ай бұрын
Your videos are amazing! Thank you so much for sharing❤
@luckyknot
@luckyknot Жыл бұрын
Perfect timing Mina, I was looking how to enable autocompletion of C# for Godot and bam! :) I'm struggling with the so many input systems but I finally found _UnhandledKeyInput() for my basic 2D keyboard needs. Also the official docs do not explain that some input methods in C# need to start with an underscore, like 'public override void _UnhandledInput(InputEvent @event)'. It's a bit confusing. Looking to make a very tiny topdown rpg, so any tutorials like making NPCs move random, dialogues, get items, tiny inventory, persist objects or NPCs across scenes, making a nice event system is more than welcome... i'm enjoying all your tuts anyways! :)
@minapecheux
@minapecheux Жыл бұрын
Haha, happy I could help! Yep I also found the different input hooks a bit confusing at first - but it's basically a way of having more control over your game loop so I think, ultimately, it's good ^^ Might do a tut on this, too, one day, actually ;) Ah you're right, I did forget to mention about then mandatory underscore... I'll add a pinned comment with those extra remarks, thanks! And I've noted the different ideas, thanks again for the support and the suggestions :) Cheers!
@djdavidj
@djdavidj Жыл бұрын
Great video, I use C# but will learn GD script soon. I am a bit lost with the basic game loop in Godot 4.1. I understand how to do this in Unity, but switching to Godot I am learning right now. Any future videos if you're asking would be on Basic game loop. The splash, start menu, game play, win/loose/gameover. I am more of a advance user, but just getting use to switching from GameObjects to Nodes. :) Thanks for your videos!
@minapecheux
@minapecheux Жыл бұрын
Thanks for the kind words - and definitely writing down your idea cause I think a basic gameplay pattern video like this could be great! Thank you for the idea :)
@TheBunzinator
@TheBunzinator 3 ай бұрын
Thanks! There was a thing or two in the casting tips that I wasn't aware of, and found very useful. Also, I don't really like describing C# as a complied language, since it compiles to bytecode, not machine code. But I guess that's my bigoted view as a C/C++ coder. (And a hater of Java. :))
@minapecheux
@minapecheux 2 ай бұрын
Glad it helped! Haha yep I know it's not technically correct - but it's easier to say that, and to distinguish it from GDScript that way ^^ the downfalls of popularising a topic I guess ;) (And I agree - Java's way too weird for its own good :D)
@hamsterbyte
@hamsterbyte Жыл бұрын
It's important to know how marshalling costs are going to affect the performance of your C# code in Godot as well.
@minapecheux
@minapecheux Жыл бұрын
Yup, that's indeed really important, thanks for pointing it out :) I didn't want to go into those (slightly) more advanced topics in this beginner video, but I do plan on doing a dedicated tutorial on "is C# really faster than GDScript?" where I talk about this kind of important caveats!
@R.Daneel
@R.Daneel Жыл бұрын
Can you mix and match? For example, add a few C# scripts to a GD project or vice-versa? Another example, converting from one to the other; is it all-or-nothing, or bit-by-bit?
@minapecheux
@minapecheux Жыл бұрын
From what I've tested, you can actually mix-and-match! Basically, you use GDScript for some objects and C# for others. And thanks to signals, you can have them talk to each other :) Haven't tried to thoroughly yet, so it definitely needs more tests, but I'd like to make a video about that when I find the time ^^
@reliewrewrite8226
@reliewrewrite8226 Жыл бұрын
I have a question about signals. I am just starting with godot and before this video i just connect signals with syntax like this. var area = this.GetNode("Area2D"); area.Connect(Area2D.SignalName.AreaEntered, new Callable(this,MethodName.OnCollision)); Is there id difference with standard event assign += ?
@minapecheux
@minapecheux Жыл бұрын
Hello! From what I've tested, it looks like in Godot 4+, when using C#, you need to use the event assign (+=) syntax; but the idea is still the same, only the syntax has changed :)
@copralpornov
@copralpornov 5 ай бұрын
спасибо, некоторые моменты прям прояснились...
Making a basic finite state machine [Godot 4/C# 🇬🇧 Tutorial]
22:15
THIS Is The Key To Good UIs in Godot
9:39
Mina Pêcheux
Рет қаралды 4,2 М.
ТИПИЧНОЕ ПОВЕДЕНИЕ МАМЫ
00:21
SIDELNIKOVVV
Рет қаралды 1,3 МЛН
버블티로 부자 구별하는법4
00:11
진영민yeongmin
Рет қаралды 17 МЛН
didn't manage to catch the ball #tiktok
00:19
Анастасия Тарасова
Рет қаралды 31 МЛН
THIS Is How To Protect Your Game Data in Godot 4
9:01
Mina Pêcheux
Рет қаралды 800
THIS Will Boost Your Godot Workflow!
2:34
Mina Pêcheux
Рет қаралды 1,6 М.
If Your Tech Job is Comfortable, You're in Danger
20:57
Thriving Technologist
Рет қаралды 14 М.
I'm Making A Game!
3:51
Mina Pêcheux
Рет қаралды 498
Cut-off shader Godot 4
10:27
Pixezy
Рет қаралды 20 М.
How to make RAIN in Godot for beginners
4:15
Einvard GameDev
Рет қаралды 1 М.
ТИПИЧНОЕ ПОВЕДЕНИЕ МАМЫ
00:21
SIDELNIKOVVV
Рет қаралды 1,3 МЛН