Development Log Week 54

We are knee-deep in code again. Well, at least Michi is. And there's pictures!

Martin

In week 53 I got to spend a full five days on Prosperous Universe. And as expected, this meant that in week 54 I had to catch up on all the other stuff. I got some organizational stuff done, helped out Michi with a few technical issues and completed some minor code changes myself, but that's about it.

The coming week I'll have to do some traveling for another project and launch a new game world over at AirlineSim, but I sincerely hope that I'll get to work on ground structures in Prosperous Universe anyway!

Michi

Let's talk about how we create the world of Prosperous Universe. We want a plethora of different stars, planets and other objects in the game's world. Handcrafting these things is not an option, since we would probably spend weeks just creating planets. So early during the development we decided to create a tool that would let us generate the map with all its stars and planets procedurally. We have been using this tool ever since to create test worlds during development.

Up until two weeks ago it worked like this: A random number generator would spit out some coordinates, we use them as "cluster centers" and would create stars around these centers. In a second step we randomly create connections between the stars, e.g. where space ships later can fly. If these process leads to a net of stars where no star is left out we'd then create all the suns and planet within these star systems.

While this worked out to produce great results, I found it was about time to move this makeshift prototype to a solid foundation. After all the results of this generation processs is what the players will be stuck with forever :)

First I upgraded the project to webpack, a bundler for javascript that we use in the main client as well. This was a bit more difficult than I anticipated because the UI package we used turned out to be incompatible, so I rewrote the UI to use another one.

The second big change affected how the stars are created. We decided it would make sense to move from "clusters of stars" to a more structured representation. The generator now creates a series of connected hexagons that are made up of little triangles. Each triangle can potentially have zero or one stars. This approach has two major advantages over the old: If the player looks at the map from the top (e.g. 2d) no two stars are at the spot and we can later use the hexagon/triangular mesh to display information.

There are a lot of things we need to add to the world generator in the future, but it feels like we're headed in the right direction.

Sectors Screenshot from the world generator