• Register
Post news RSS Connecting the dots: Interplanetary travel

Starting from the system warp-in point, you're probably going to need to move your fleet from world to world if you're going to get very far in FE...

Posted by on

Hi again,

This update is largely to celebrate the introduction of interplanetary travel between planets, which I realise doesn't sound too exotic when I put it like that, but is nonetheless a truly fundamental aspect of a game set across multiple solar systems!

OrbitalEntry2

One of the biggest stumbling blocks for many a space game developer is dealing with large distances and replicating the sense of scale proffered by something so vast as space. More than just a mere game design consideration, off the shelf game engines aren't particularly well suited to dealing with objects placed so far apart, so you generally have to find a way to compromise and/or conceal some fancy tricks to pull it off. A common solution is the so-called 'floating origin' where you essentially move the world in the opposite direction to that of the player entity instead of the player themselves, which is afaik used in games like Kerbal Space Program.

Floating origin is somewhat harder to adapt for a strategy game that allows the player to focus on multiple 'player' entities (though certainly not impossible), and my solution was to instead place the surrounding region of space around each planet into its own 'celestial bubble'. These bubbles of space exist on top of one-another at the Unity origin point, and we essentially only render the objects on the relevant layer whilst calculating everything that is happening everywhere in the solar system regardless of whether it is being rendered or not. In practice, this works fine, though there is a hard limit on the number of 'bubbles' that can be maintained in this manner, but there was a lot of groundwork that needed to be put in place before we could approach something akin to seamless transitions between planet-centered layers.

IndicatorsMap

With most of this work now done, I started to double down on the 'hud' indicators which show relevant information about player ships/units and celestial objects in the solar system. There are actually four separate layers in use now, two for static celestial objects in the layer and map views, and similarly for player entities, which can each have their own configuration and display information depending on the distances to other entities, etc.

FocusCam

Another essential component of this update was the expanded focus cam controls, with everything in the solar system capable of being a 'focus' target which locks the freely rotating and zooming camera onto a point which can be used to zoom to and from the solar system map as required. Hopping from entities to planets is as easy as double-clicking a target object, and the system automatically calculates the correct orbit and zoom radii based on the object focused. I feel this degree of camera movement (coupled with the hud-style indicators) is crucial for being able to quickly keep track of player entities across the entire system.

OrbitalEntry

This update also sees the evolution of the spline-based ship movement tech to include the calculation of orbital entry and departure curves depending on insertion direction, offset from the central 'space lane' thread (which will be useful for programming formations) and current position on a particular orbital sphere. There's probably a very good reason that space games generally stay well away from having units moving on a sphere, but until I figure what that reason is I'll keep believing it can work :)

On top of this a solar system-wide pathfinding algorithm can calculate the shortest route between planets when such a route is requested by a ship, and splines are calculated to path around subsequent orbits along the interplanetary route as required automatically (and I choose to force ships to traverse directly between planets to avoid having battles in the middle of nowhere, and because I believe you need some form of bottlenecks to inject real strategy into proceedings).

WarpConduit

I also reworked the warp conduit 'loading screen' so that the conduit is placed correctly (as directed by the solar system editor) and has some fancy distortion effects to boot. Going forward I'm probably going to be turning my attention back to the planet surfaces, adding obstacles, resources and the ability to build some simple bases to mine and refine and ship supplies back up to the ships waiting in orbit.

As ever, thanks for checking in :)


Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Related Games
Fragile Existence
Fragile Existence Real Time Strategy
Related Engines
Unity
Unity Commercial