Hi. So this is something I've been thinking about for a while, and that is, how do you create an actual functioning relative game world?
Well, I sat down today and made it, and was surprised when it didn't take very long at all.
What it does and why
It basically finds a "center" of the universe. It means that the actual origin which in most games is at (0, 0) is not constant, but determined by the location of every other object, the average. In this way no-one can really say they are at the center of the universe, because the center is not literal, it's just where everything else seems to be.
And as for the reason, this demonstrates that there can in fact, logically, be a center of the universe. Trouble is we would need to first explore the entire universe and find the density of everything just to find it.
This is such a simple idea I'd be surprised if no-one had tried it before.
It's basically 3 steps.
1. For each object, add the object's coordinates to a global variable.
2. Divide this global variable by the amount of objects to find the average position.
3. Take away this average from the current positions of every object, and add a constant offset value to keep it centered rather than in the top left corner at (0,0).
And that is all there is to it.