
Show HN: I released my first Android game: “Black Hole Escape” - psy_
https://play.google.com/store/apps/details?id=com.quarkdev.blackhole
======
th0br0
It's pretty easy to get a high score by keeping the finger on the display.
Just got 299 without doing anything.

~~~
psy_
yep, I also found this bug. It will be fixed in the next release. ty for you
feedback. :)

------
musgravepeter
As a fellow physics geek mobile dev (eg. ThreeBody, Geodesic Asteroids) I
gotta ask: how are you modelling the gravitational force?

~~~
psy_
Each frame, I calculate the velocity (x/y) of each objects based on their
distance between the object and the center (target). Then, I apply a linear
velocity on the body + the rotation based on the angle. I've used Box2D for
that

Here is a part of the code (lua, LÖVE framework) :
[https://gist.github.com/psych0pat/2b7c8f52b9191f28ef8f](https://gist.github.com/psych0pat/2b7c8f52b9191f28ef8f)

It's a bit dirty but it's working :)

~~~
musgravepeter
Thanks for the snippet.

Working code is a good thing. I tend to rat-hole on the physics stuff, since I
have a background in it.

