I don't know LazyFoo's tutorials that well... but if you're just copy/pasting the code from the tutorial without trying to understand what it's actually doing, then it's no wonder you're running into problems.
My advice is to put the tutorials aside for now and try to solve this problem without trying to just find out "how did I mess up the tutorial".
So the general flow of a game is:
1) Process events
2) Do logic updates (ie: move everything, do collisions, etc)
3) Draw the scene
4) Repeat until user wants to quit
You seem to be having a logic problem. Your red dot is not moving when you want it to be.
The way it usually works is:
a) "Velocity" modifies position
b) "Force" modifies velocity
So in your case, your red dot has a position and a velocity. So for point 'a' all you have to do in the logic update is:
That's it. It's that simple.
The trickier bit is part 'b'. Applying force to change the velocity based on where the red dot is relative to the player dot. But this isn't particularly complicated. You could have some simplistic logic:
- if the player dot is to the left of the red dot.... apply force to move the red dot left (-x velocity)
- if the player dot is to the right of the right dot... apply force to move the red dot right (+x velocity)
- ditto for Y coord.