Pre-Order the Game!

Desura Digital Distribution

Saturday, March 16, 2013

Nebulaes and new stars

I'm currently working on overhauling the starlanes/sectors/etc system so that it's mostly data driven.  So far, the new galaxy generation code is complete, with two of the five connecting algorithms implemented.  I've explained that you can set a sector type to be a gateway, meaning that it connects to another star system.  You can pick one of the five available connecting algorithms.  They are:

Shortest - This algorithm is greedy in that it goes through the list of star systems and connects the closest systems, even if those systems have other systems more close.  Example, Star A have 2 starlanes, and it connects to Star B and C.  However, Star B has two other stars, D and E, that are closer, but since Star A was processed first, it's connected to A and D instead.

Farthest - Opposite of shortest - Useful for wormholes

Random - Systems are connected randomly - Useful for wormholes - an alternative

Minimum - This uses Minimum Spanning which attempts to connect all stars in the "smallest" tree possible.  This is similar to Shortest, but is not greedy

Maximum - Opposite of Minimum, with longest paths, but avoids intersecting existing paths, so it won't have systems connecting on opposite sides of galaxy

I've implemented Shortest and Farthest because they're relatively simple to do.  The other three are put on hold while I re-work the starlane drawing algorithm.

The galaxy generation script now specifies the type of star to place.  Before it'd just generate a list of points, then have the game randomly pick the type.  But I realized that some modders may want more control, so I've updated the game to allow the script to specify the type.

Another thing that I decided to change is the size of the stars.  They're now 32x32 pixels instead of 64x64, and have animation (random flare-up similar to MoO 1).  The artist has supplied me with the new artwork.  Included are 6 new nebula artwork, they are visitable locations in the game with random surprises.  Black holes are also reduced to 32x32, and are constantly animated.  The animation part is not working yet, I'll need to add an image handling class that handles animation and other stuff.  But here's a screenshot of the new artwork!  It no longer feel like you're up against the screen (this is at closest zoom) :)


2 comments:

  1. Have you decided to just decrease displayed size of the stars or the size of assets too? In any case, it looks pretty.

    Regarding the "shortest" algorithm, iterating through the list of edges (possible connections) would make even more greedy connection :).

    ReplyDelete
  2. I didn't programmatically decrease the size, the artist provided me with new star artwork featuring smaller stars than the old one. Those stars you see in the screenshot are their normal size (maximum zoom). Glad you like the look of it!

    As for shortest algorithm, that's another possible approach. I didn't think of that approach, I may add that as an alternative to current shortest connecting algorithm. Thanks for bringing that up! Right now I need rework the starlane drawing algorithm, then I'll add other connecting algorithms.

    ReplyDelete