Build #251


Build #251 is up - A small but important update since it fixes the ongoing issue of the area production bonus.

The problem was that it was basically not calculating the area correctly. Or rather, it was correct in theory, but failed in the real world because computers suck at numbers. Maybe an explanation is in order :)

The land areas in DR9 are built from connected cells in a Voronoi map - they have the nice attribute of being convex polygons so you can find their area by calculating the determinant of the polygons vertices. This mean cross multiplying coordinates and alternately adding and subtracting the result.

The problem we ran into is that the DR9 map is big, so coordinate values are also big. When you multiply big numbers on a computer, you lose precision. This is mostly acceptable because when you're dealing with large numbers (or areas in our case), it doesn't matter if you're a few decimals off. It *does* matter if you're trying to calculate a tiny area far away from the origin (0,0) since you'll get a major bias in the average error away from the center, yielding an area that is way too big.

The simple solution is to transform the polygon so that it is centered around the origin *before* calculating the area. This way you get an even bias in all directions and an accurate(ish) area.

Not sure why it took so long to figure this out, but it's what happens when you do a small scale test and everything looks fine.

Files

deep-rift-9-win.zip 386 MB
Version 251 Apr 04, 2021
deep-rift-9-mac.zip 399 MB
Version 251 Apr 04, 2021

Get Deep Rift 9

Leave a comment

Log in with itch.io to leave a comment.