This is just an experiment on how sprites can move in relation to each other. It was originally just a testing place for testing how enemies would move in relation to the player in my RPG, but I thought it might be interesting to add more stuff to it then share it. Move the purple dot with the arrow keys. The arrow will react differently to its position depending on the modes you are on. The arrow will use deceleration based on how close it is to the purple dot if it is on the attract mode, and it will "run away" from it if it is on the repel mode. Press n to switch if it is attracting or repelling from the dot. You can also move the arrow itself WHILE it is moving in relation to the dot. Use WASD to do this. If you want the arrow to stop moving so you can control it without the extra movement interfering, press m to switch the modes on this. To get the arrow back in the middle, press space. To get both the arrow and the dot back in the middle, press L.
I pretty much just did this by myself, with ideas from various other people.