Post #22: Godot CanvasLayer
Today's post is a shorter, quick explanation of CanvasLayer, based on the docs.
In a 2d game, you might want a nice background with a parallax effect. Or maybe you want a HUD (heads up display) that has a persistent map in the corner, showing the player where they are. What's the best way to do this in Godot?
Well, one way, that might be normal, is to make these features child nodes of the main scene. However, the movement of the parent scene (or other possibly conflicting nodes / changes) will interfere with the rendering of these game elements.
The solution is CanvasLayer, which ensures that all children and grandchildren nodes have their own 2d rendering layer. Then, the association as a child or grandchild node won't interfere with your goals for these nodes!
Here is a diagram so you can see it visually:

Have you ever used CanvasLayer? If so, let me know in an email! Thanks for reading.