← All posts

Project archive

Receiving full star-system data from the server

No picture today. There's almost no visible progress, but a lot has happened under the hood.

1. Instead of a short piece of test data, I received the full data for a star system. On one hand it worked; on the other, things broke. There was a great deal of tedious work on both server and client to parse and serialize the data. 2. When I started loading large amounts of data from the server into the client to build star systems, I ran into a problem: the data gets split into several packets. The algorithm then loses the object that falls at the split while building the system. I had to build a buffer for incoming data and logic on the server and client to receive and join the pieces, confirm that everything has arrived, trim the excess, prepare the data for batch parsing, and only then get an array of tasks for building the star system. 3. It took more than one attempt, but I got planet and object processing to run from Keplerian data. There seems to be just one problem left: the Z coordinate is still zero for some reason. That's clearly an error, and I'll find it soon. The first part of the algorithm works; I'll finish the second tomorrow. It's complicated and involves such brutal trigonometry that even I look at it in horror now, though I wrote it myself three years ago. 4. The new 64-bit dimensions allow us to model space with accuracy down to a meter, and I tried that today. I set one coordinate unit to a kilometer. Roughly speaking, it calculates to six decimal places, or millimeter accuracy. I can't see the planets yet, but they're moving. They're simply very far away and very small.

Tomorrow I'll work on diameters, textures, and drawing the orbits. This was all present in the old project, so progress should be quick.

The main victory right now is the new data-exchange protocol and receiving a large data set from the server.

Project Facebook profile ↗