this post was submitted on 13 Sep 2023
255 points (99.6% liked)

Godot

5840 readers
25 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 1 year ago
MODERATORS
 

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

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 12 points 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.