Guide to the Godot game engine/Tips And Tricks
Appearance
- When writing code, try to add comments wherever you can, as it makes it easier to understand. Trust me, my first game never used comments, and I gave up on it. At the same time, don't use too many comments. Only add them when necessary.
- Remember: "less is more". When creating code, don't try to think ahead and add hundreds of things you think you will need later. Stick to the few things you need now.
- When optimizing your code, try using the profiler, found on the "Debugger" dock, which is found next to "Output" and "Animation".
- It helps to have "separator" comments in very large scripts (more than 1000 lines) that have different sections. Example:
# ===================== # ===== Attacking ===== # =====================