Guide to the Godot game engine/Programming/GDScript/Manipulate scene tree

So, you can add, rename, move and delete nodes in the editor. But how do you do it with code? This is such an important thing, yet it isn't obvious how to do it.

Basic manipulation
This is how to create a bullet, add it to the scene, and delete it after 10 seconds:


 * player.gd


 * bullet.gd

queue_free: Deletes a node on the next frame, or after the node's script has finished.

add_child(node: Node): Adds  as a child of the node that the   was called on, providing   doesn't already have a parent.

Advanced control
How do you close your game? How do you pause/unpause your game (the correct way)?