I Tried Making A Game In Godot With C#.

Поділитися
Вставка
  • Опубліковано 13 жов 2024
  • So I Decided To Try C# For The First Time In Godot, And I Have To Say I Kinda Liked It!
    Please Subscribe If You Do Enjoy My Content, And Also If You Don't Tell Me Why In The Comment Section So I Can Improve ;)
    original godot logo ( Godot 4.2.2 ) in the thumbnail by Andrea Calabro, license (CC BY 4.0 International): creativecommon...
    #godot #gameengine #indie

КОМЕНТАРІ • 19

  • @JohnLudlow
    @JohnLudlow Місяць тому +7

    "avoid getting yelled at" while using public settable fields

  • @SkrekkLich
    @SkrekkLich 3 місяці тому +14

    When working with value types like struct in C# (e.g. Vector3) and you want to just for example change the X Value, you can write it like this in C# 10:
    _camera.Position = _camera.Position with { X = 123f };
    It's especially usefull to prevent stuff like this:
    _camera.Position = new Vector3 { X = 123f , Y = _camera.Position.Y, Z = _camera.Position.Z };
    Nice video. C# is awesome :)

    • @Code_It_All
      @Code_It_All  3 місяці тому +1

      Thanks, didn't know it!

    • @SkrekkLich
      @SkrekkLich 3 місяці тому +1

      @@Code_It_All C# is full of nice QoL Syntax Candy :D Don't get me started on LINQ Extension Methods xD For anyone who doesn't know. Instead of writing for loops to find all enemies with Health e.Health < 80 && e.Name.Contains("bernd")).ToList();
      You can even order them directly:
      allBernds.OrderBy(e => e.Health);
      and so on.

    • @Сергей-и4б7к
      @Сергей-и4б7к 3 місяці тому

      C++ best for me

    • @SkrekkLich
      @SkrekkLich 3 місяці тому

      @@Сергей-и4б7к If you like recompiling and hooking up everything everytime, sure xD I use C++ mainly for Engine Plugins if needed.

    • @dgtemp
      @dgtemp Місяць тому +1

      Does this work with objects? :o this is amazing

  • @edgeofsanitysevensix
    @edgeofsanitysevensix 2 місяці тому +6

    I've been working with C# for 10 years but it's my first foray into Godot. Looking forward to having a go at it

  • @feelSmoothie
    @feelSmoothie 3 місяці тому +9

    A mix of both is the best approach.
    if you use Engine code, use GDScript, since it under the hood uses C++.
    if you want to do some heavy mathing (as example procedural generation stuff) use C#, C++
    since the Godot Engine allows you to use both, this is the best practice.
    The only downside with this approach is, if you are planning to port your game to consoles, I think most of the companies who offer that service, imo only support if it's either GDScript or C#.

    • @TomDytorn
      @TomDytorn 3 місяці тому

      How do I use c++?

    • @DivyeshVartha
      @DivyeshVartha 2 місяці тому

      ​@@TomDytornMy advice would be to look for the answer in the Godot documentation

  • @neer2415
    @neer2415 3 місяці тому +5

    Did it really improved the performance or it should be okay to stick with gdscript
    Great video btw , just keep goin 🙌

    • @pinkaltercation
      @pinkaltercation Місяць тому +2

      bit late of a reply and im not the guy who made the video, but gdscript is fast enough to do anything really (theres some edge cases but nothing you should worry about).

    • @neer2415
      @neer2415 Місяць тому

      ​@@pinkaltercationoh thanks for the reply
      So I don't need to learn csharp for godot . And also there is a new option while exporting to compile gdscript to binaries , I think it would also improve the performance with the reduction of size

    • @pinkaltercation
      @pinkaltercation Місяць тому

      @@neer2415 possibly 🤷‍♀ I haven't used godot in a while and when I did it was for a pretty short time so my knowledge of it is a bit poor. But yeah theres no need to learn c# or c++ for godot unless your project has something thats computationally expensive like procedural generation I guess.
      Best of luck with your projects :))

  • @nomadshiba
    @nomadshiba 2 місяці тому +3

    I'm planning to use Godot as rendering engine, with the C# ECS framework called Friflo.
    Godot has everything you need for rendering, and a Shader Graph, Materials, GPU instancing with MultiMesh etc..., makes it a good engine for graphics.
    And Friflo ECS is just fast, cpu cached, parallel and all the other good things about data-oriented ECS.

  • @afishperson
    @afishperson 8 днів тому

    Tip: if you use camelCase, you will get yelled at less