Pre-Order the Game!

Desura Digital Distribution

Tuesday, May 29, 2012

Minimum Spanning Tree

Since having every star have starlanes to all of its neighboring stars be hard to defend, and no surprises while exploring, I implemented randomized starlanes.  How it works is that it creates all the adjacent starlanes as usual (my previous post showed a screenshot of visible starlanes connecting to my two systems, note that there's no star without a starlane connecting).  Then when all the legal starlanes are created, it then goes through the nodes and activating the next starlane with the shortest length.  After this is done, every star is connected with the shortest starlane, or in other words, a minimum spanned tree.

Since this often results in one route to most of the stars, I added in a percentage of unactivated starlanes at random, which adds some alternate routes.  I can modify the percentage value (10% will barely add anything, while 30% will add a lot) to alter the number of starlanes, this will be an option in galaxy setup.

I'm quite pleased with the result, this reminds me a lot of MoO 3's starlanes!  Here's a screenshot showing all the activated starlanes, notice that not all stars are connected to all of its neighboring stars, resulting in possible strategic strongholds:

Next up is replacing the line drawing with a thicker line using a different rendering system.  The current line is too thin, and is slow.  There's some other improvements that needs to be done, then I can finally focus on fleet/squadron movement and combat resolution.


  1. I just watched your videos on youtube
    I noticed that in the combat have to select your weapon and then click on the enemy.

    Will you keep it that way? I guess not, what are your ideas how to impove that click fest?

  2. The main difference between this and MoO 1/2's space combat is that you don't fire all of your weapons in one turn. Each equipment cost time and power, so you might only fire one or two times with a weapon before that ship runs out of time and/or power.

    While it does reduce the amount of clicking, it's still tedious clicking on an item, then on a target. Maybe an selection that can be moved up/down with the mouse scroll button? I'm open to suggestions, space combat is far from final at this point.

  3. Maybe use hotkeys?
    1 selects first weapon
    2 selects second weapon ...

    Tab cycles through ships....

    By time and power, what do you mean?
    Isnt this turn based?
    Why is firing 2 weapons taking more time than firing 1 weapon?
    I understand the power though.

    Im not sure if that level of micromanagement is practical. How will larger battles play out?
    What about the movement?
    Maybe use left mousebutton to move and right mouse button to fire. Going back and forth to the menu bar is annoying id expect.

    Anyway I really like what Ive seen so far, Im reading your Blog since this week. Keep up the good work!

  4. @Sledge Hammer, it is going to be turn based. Instead of movement points and action points (Fallout 1/2) there will be time units. Something like ground combat in X-Com. All your questions were answered at some point but blog is not the best format for documenting stuff. At quick glance I managed to find this:

    I can swear there is the post that answers when does firing 2 weapons consume more time than 1 but I can't find it. Anyway you can group weapons, something like in MoO 2. Firing group of 4 lasers would use the same amount of time units as a single laser (with same mods). Answer to "why?" is probably simplicity.

    I support the hotkey idea. Probably there won't be a need for having more than 10 weapon groups on the same ship.