I don’t have a tutorial that covers all of those topics, but here’s what I have found:
As for the other questions:
- Let my HUD move with the camera
If you place your hud as children of a CanvasLayer node, then they should stay in the same position relative to the camera. That said, I have not done very much Godot 2D work (especially not recently) so I might be misremembering.
- Let the player move the camera left and right with the keyboard
As long as you are using a Camera2D node, to move the camera all you need to do is change the position of the Camera2D node. Something like the code below should work if attached to the Camera2D node (untested):
extends Camera2D
const MOVE_SPEED = 100
func _process(delta):
if Input.is_action_pressed(“ui_left”)):
global_position += Vector2.LEFT * delta * MOVE_SPEED
elif Input.is_action_pressed(“ui_right”)):
global_position += Vector2.RIGHT * delta * MOVE_SPEED
- Let the player move the camera left and right by clicking and dragging
This would work similarly to the code I gave in answer 3, but you will need to use the _input function and InputEvents. It shouldn’t be too hard, but you will probably need to look at tutorials showing how to handle and process InputEvents in Godot, like this tutorial about Input in Godot from GamesFromScratch.
Hopefully this helps answer some of your questions
(Side note: Welcome to the forums)