Here is a fun little demo. This shows one way to keep two sprites registered together which can be really useful. AWSD for tank movement L and R Arrows to turn turret SPACE to fire
Someone asked me to make a little tank with separate turret control. You could use this concept for all sorts of things.