I made a blog post about my experience switching from Unity to Godot earlier this year, and some tips for Unity devs.

  • Captain Aggravated@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    GDScript is very similar to Python; if you know Python, learning GDScript takes about an hour.

    • declaring a function uses the func keyword instead of def
    • there’s an actual concept of variables and constants, in python you’d just say number = 3 but in GDScript you do var number = 3 or const number = 3.
    • the constants “true” and “false” aren’t capitalized like in Python
    • “match” is switch…case but slightly more terse.
    • No lists, just arrays. There are also enums. There are also several built-in data types like vector2 or vector3 which are handy for storing position and velocity data in 2D or 3D space.
    • There isn’t a module/library system; some things like random number generation, timing, math etc. are provided by the base language because they’re ubiquitous in game making, others, such as functions for audio playback, are provided by the node that your script extends. Right about here we get into territory where it’s more about how Godot works and less about how GDScript works, and concepts such as onready, signals etc. would be required learning no matter what language you use with Godot.