Post news RSS Bringing a space RTS/4X to life

Moving fleets in orbit to support deployed ground units on procedural planet surfaces as they build outposts and gather resources is at the heart of FE.

Posted by on

Hi again,

Finally moving on from shaping out the procedural world-building and system-building tools, I've since been developing the necessary framework to support the movement of the players' fleets and ground units around and atop of these numerous planets. It's certainly fair to say that my primary inspiration has been Homeworld throughout, but there's more than a touch of Sins of a Solar Empire in here too, with a system explorer that helps the player keep track of their units, and the star lanes between planet hubs.

Movement in FE


Modular units

Ships belonging to your fledgling fleet in Fragile Existence are a somewhat more personal affair, with designations, Hero-style captains (who can gain experience and new abilities, etc) and their own crew complement and storage capacity. Beyond this, the functions of a unit are completely dependent on the individual modules added to it, which visually slot into the overall structure shape (picture the structure like the chassis/frame of a car before anything else is added to it) and provide the unit with specific actions to perform or tasks for the crew to undertake, where the obvious example is the engine room which provides the movement action to a vessel, and the weapons deck which manages weapon targeting and firing.

Modules need crew to function, operating at a limited capacity when sufficient crew aren't available, or when the module itself is damaged (modules can be targeted by enemy units, and you can similarly target their modules to try to disable certain functions you find the most threatening..) Furthermore, modules can be assigned tasks or production items, featuring their own action queues which can be paused and continued as the module allows, using resources to upgrade components and provide additional capabilities.

I like to think of units in FE a little like cities in Civilisation VI, where the total population ultimately enables additional possibilities, and each specialised module is a little like the districts, in that you can only have as many modules as there is space within the hull structure, so the strategy can come from making choices about what your fleet needs to survive, and balancing external action abilities against more passive options as the situation allows. The key difference, of course, is that resources aren't auto generated from nearby land tiles, but have to be actively gathered from planets by sending your 'troops' out to gather them. Ground units and even ground bases function in a similar way, with modules added to outposts representing additional buildings that visually extend outwards from the central hub, with production buildings functioning somewhat like those in the Settlers, combining base resources at a certain rate to make more useful items, which eventually lead to replacement parts for the fleet, ammunition and enough fuel to even make the next warp jump..

Overview


Establishing the fundamentals of an RTS

So I recently had a great excuse to replay some of my favorite RTS games, but it was just for research purposes, honest... Having added orbital movement to the game, the next stage was to supplement this movement with all of the trimmings expected of a modern RTS these days. So in went group selection, implemented by a distance check of all units under the box region, and discarding those on the opposite side of the planet. Eventually I'll need to allow for easy distinguishing of space or ground selections, but that's easy enough, and it works pretty well so far.

Another thing that seemed sorely needed was orbital waypoint highlighting. This is shown in the image above, with descending waypoint targets showing the point on the planet surface relative to the orbital position above. Arcs are drawn between waypoints to show the route that the ship will take to move from point to point, and unlimited actions can be queued up (through the ships' engine room in this case).

Taking a leaf from Sins of a Solar Empire, the aforementioned system inspector (top left) lists each of the currently discovered planets in the system (planets aren't discovered until you've sent a ship or scout to investigate it). Units are then categorised by the planet they are present at, with notifications alerting the players' attention to any unit that needs attention, and easy camera shifting achieved through selection of the relevant unit or planet in the list itself.

Overview 2


Ships also display their 'organisation' allegiance, which represents a kind of preordained grouping of units into logical organisational units. This replaces the usual number grouping found in RTS titles, so fleets can be assembled into squads that can automatically follow and support a 'lead' unit, or serve as a 'home' location if they encounter trouble whilst separated. Such groupings can also automatically pool resources, and offer certain potential for future modding purposes (so W40K fans could have all their tech-savvy units be part of the Adeptus Mechanicus...) For the purposes of the plot, the default organisations represent whatever nationalities or company's a particular ship was aligned to prior to the invasion of Earth and subsequent exodus of the fleet. Getting these 'sub-factions' to work together will be part of the ongoing story.

And this almost sounds like an afterthought putting this here, but ground units are now using the long ago developed A* pathfinding to move around on the continents of the planet surface beneath the orbital sphere (and boats will work just fine on water too when I bother to add that).

Lens flares yo


Oh, and there have been a few visual upgrades and tweaks along the way too.

Going forward I'll be implementing ground resources, allowing construction units to build ground outposts, and getting these outposts churning out more refined goods from these base resources to realllly get into the game play cycle of FE. I'm also due to finish off ship movement from planet to planet, since that's a pretty core component of the game, but it felt like a good idea to get orbital movement working well before branching out further than that.

Thanks for reading, any suggestions always welcome :)


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.