This video provides 10 crucial tips for developers starting large projects in Godot, aiming to prevent common mistakes that can cost months of development.
offset for animation and visual alignment, and position for game truth (real movement), to prevent physics issues with child nodes.Sprite2D.flip_h for visuals and explicitly reposition physics nodes.preload creates permanent references, potentially keeping entire scene chains in memory. Use preload for small, reusable resources and keep references localized.VisibleOnScreenNotifier2D or VisibleOnScreenEnabler2D to manage enemy activity only when visible, optimizing performance and ensuring proper enemy placement.
position, the marker moves with it.offset, the marker stays in its original "game truth" position, which is crucial for consistent projectile spawning.
offset is for art, position for real game movement.
scale.x by -1) to flip entities.Area2Ds, CollisionShape2Ds, RayCast2Ds, and offsets.
Sprite2D.flip_h.
preload functions:preload acts like a global static reference, incrementing a resource's reference count.MainGame preloads MainMenu, MainMenu preloads OpeningCutscene, OpeningCutscene preloads Level_1. If MainGame persists, all these scenes and their assets stay in memory.
preload:preload for small, reusable gameplay elements (e.g., projectiles preloaded by the player).preload statements as close as possible to where the resource is actually used.VisibleOnScreenNotifier2D:screen_entered and screen_exited signals when its rectangle enters or leaves the screen.
VisibleOnScreenEnabler2D:show_rect option allows hiding the rectangle in the editor while keeping the logic active.VisibleOnScreenNotifier2D to control when enemies spawn, where they spawn, and under what conditions they respawn (e.g., spawn once, respawn only if killed and spawner is on-screen, continuous respawn at random intervals).
Viewport Width and Viewport Height: Set your game's native resolution (e.g., 640x360).Default Window Size: (Advanced settings) Set a comfortable launch resolution (e.g., 1920x1080).Scale Mode: Set to canvas_items or viewport.Aspect: Set to keep to preserve the aspect ratio.Integer Scaling: Enable for crisp pixel art scaling (disables fractional scaling which can cause artifacts).
var health: int).
Untyped Declaration to warn to be notified of untyped variables.
Engine.time_scale to slow down or speed up the entire game for debugging or special effects.