Pre-Order the Game!

Desura Digital Distribution

Monday, March 18, 2013

Wormholes and Starlanes! Well, kinda...

I've re-worked the old drawing code for starlanes to work with the new system.  Note that when you define a "gateway", you also define the distance multiplier and its color.  For example, a stargate would be not connected, has multiplier of 0 (meaning it takes 1 turn to move to other system with a stargate).  A wormhole is connected, has multiplier of 0, and has the color of green.  A starlane is connected, has no multiplier (uses default distance), and is white.

You then define which, if any, and amount of each, that a star system can have.  So this way, if you dislike starlanes with a passion, you can just remove it from the data files, and the game won't even know it's not there.  Likewise with wormholes.

When I got the rendering working, I realized that my connecting algorithm (closest/farthest) didn't exactly work...  For this test, each star has a minimum of 2 starlanes, and maximum of 4.  So theoretically, each star should be connected to at least one other star, right?  Well... here's the result (note that black holes have 50% chance of having a wormhole, so it may connect to a star that have 5% chance of wormhole).  I'll need to fix the connecting algorithms, but this is the first screenshot with wormholes!


2 comments:

  1. When distance multiplier is 0, does such gateway consume fleet's "movement points"? I don't remember what was design choice, would it be possible of set path over multiple waypoints (MoO 3) or not (MoO 1&2).

    ReplyDelete
  2. When distance multiplier is 0, it don't consume anything, but still requires a turn to move, because you can't move fleets in the same turn.

    Let me explain how pathfinding will work in the game. There are three possible ways of traveling to a star: The generic galaxy speed that don't rely on a gateway (think MoO 1), a gateway that connects two stars, or a connectionless gateway that enables you to travel to any other star containing the same type of gateway.

    The pathfinding will explore all possible paths to the destination, including the above three methods of travel, so it'd be possible to travel through a wormhole, travel over an empty expanse of space to an nearby star, then finally use a starlane to arrive to the destination. It will also avoid any unfriendly systems in its calculations unless the destination is an unfriendly system.

    I'm actually considering having three different types of starlanes, slow, normal, and fast (all three are faster than generic travel, with 1.0x, 0.5x, and 0.25x multipliers respectively), with different level of shade to indicate their speed. Then you can upgrade a starlane from a slow to normal, then fast. Handy for speeding up travel inside your empire. Can also sabotage starlane to be slower, or to stop existing, forcing slower space travel outside your empire.

    ReplyDelete