logoalt Hacker News

reactordevyesterday at 3:28 PM6 repliesview on HN

You should definitely have a look at space engineers. They have a similar spherical problem with their voxels and I don’t think they went half as far as you did when implementing “orbital bodies”.

As someone who is rather keen on space, gfx, and the algorithms that render them. Kudos. The problems were known to me, which is why I didn’t attempt it, however - the distortion correction, the chunking, I’m thinking if you just limit how far down you can dig (half way to the “core”) it will be fine. You won’t run into those tiny squished blocks that make up the core.

It’s also important to call out the quad-sphere. This is what makes it doable. Naive devs may just map lat long to sin cos spherical coordinates and call it a day, not realizing that their poles are jacked up. The cartography problem. I’m really glad to see that called out as people don’t realize WGS84 sucks for mapping a sphere.


Replies

tomaskafkatoday at 11:25 AM

Everyone wants to dig to the core (and build a cool zero g habitat there), at least that was the first thing I did :)

maxnoetoday at 8:16 AM

> WGS84 sucks for mapping a sphere.

WGS84 is not a map projection, it's a geodetic reference frame prescribing a reference ellipsoid and reference positions of ground stations.

https://en.m.wikipedia.org/wiki/World_Geodetic_System#WGS84

lsaferiteyesterday at 3:32 PM

Not allowing excavation to the core solves weird gravity issue as well. Astroneer had super weird gravity at their planet core. You can get stuck oscillating there.

show 3 replies
RA2loveryesterday at 6:31 PM

My understanding is Space Engineers takes the "blocky sphere" approach mentioned early in the post, works around the "walk along its surface" part of the problem by making gravity direction point towards a fixed point, and bypasses the "trying to build 'upward'" part of it by not allowing voxel construction. It doesn't use a quad-sphere at all.

show 1 reply
cyptusyesterday at 8:40 PM

thats why a liquid core is needed in the matrix

show 1 reply