your objects speed must be calculated. let's say your object has speed 20.
20- e^-koef if koef =0 then e^- koef = 1 if koef > 0 then e^-koef is <1 and if koef <0 then e^-koef > 1
so if koef = 1 speed is 20 - e^-koef = 20 - 1/2.73 if koef =2 then 20 - 1/(2.72)^2 - almost no speed loss.
if koef = -1 then speed is 20 - 2.72, koef = -2 20-2.72^2 and so on.
now if you think about it- koef could be distance. and distance between 2 points is calculated like this:http://www.mathwarehouse.com/algebra/di ... /index.php
you could use foreach object visible on screen - calculate koef and apply speed formula.
and now for the "sucktion" part - you would have to give objects angle towards the object (Black hole). you could do that by giving it 2 speeds. let's say - bullet for movement, and custom for sucktion. - set angle towards black hole, and speed e^-koef , and use bullet for nomal movement (speed 20). so you would have all the time 20 - e^-koef.
i think that would work
there might be though a simpler (or already completed) solution, but i have no idea if there is one.