Orbital Fleet Behavior

This blog post is a bit different than usual – instead of talking about a major new game mechanic, I’d like to instead take a quick – but in-depth – look at something relatively minor, but that I thought was interesting. I will, of course, continue to write regular-style blog posts as well.

In Starsector, fleets will often orbit a planet for some time – trade fleets offloading cargo, patrols preparing for duty, and so on. The orbits of some well-to-do colonies can get quite crowded, with fleets overlapping each other and being difficult to pick out. This isn’t a huge problem in terms of game mechanics, but it’s still occasionally inconvenient and just messy to look at.

orbital_mess

The other day, encountering a particularly egregious case, I wrote a quick algorithm for the fleet AI to use to avoid overlapping other orbiting fleets  as much as possible.
Read the rest of this entry »

Expanded Battles

First, a brief summary of what this post is about – a new campaign feature that allows nearby fleets – naturally, including yours – to join ongoing battles.

If you’ve been following the development of this release, you’re probably aware that things are in the “polish things and make it fun to play” phase more so than in the “add more features” phase. Why, then, add a significant new feature at this stage? The answer is that it’s a direct response to playtesting, rather than a specifically planned-for feature on the roadmap – it’s meant to help address several important gameplay issues, some quite long-standing. Now was a good opportunity to do it, and here we are. Looking back, I’m glad I ended up taking this on now rather than later – with how many different pieces of the code this change touches, it would only get more difficult with time.

battle_join

Let’s take a brief look at what the design goals are, and then we’ll dive into the specifics of how it works. Read the rest of this entry »

Terrain

In the spirit of continuing to liven up the campaign layer of the game (and also knocking out a swath of high-level features in the most-straightforward-possible way), I’ve been working on terrain in the past couple of weeks.

But first, in the name of putting something shiny before the break: fleet contrails!

terrain_trails

In addition to being eye candy, these also serve as visual indicators of ability use. For example, using the “Emergency Burn” ability brightens up and extends the trail, while activating “Go Dark” reduces its length and duration.

With that, onwards to terrain. What does it do? It affects fleets that are in it – their speed, detection range, that sort of thing. Why is it there? As usual, part of the answer is “to give the player an opportunity to make interesting decisions”. Without terrain, if you’re being pursued, running one way or another is pretty much the same.

If you might lose your pursuers in an asteroid belt, or hide inside a nebula, then you’ve got reasons for going one way or another. Beyond that, adding terrain to star systems gives them more personality and makes them more interesting.

Read the rest of this entry »

Sensors

For a while now, the core campaign gameplay has been pretty … let’s say straightforward. You click somewhere, your fleet goes there, you may chase or be chased along the way, and that’s pretty much all there is to it. It does the job as the “thing you do between the fun stuff” – battles, interacting with markets, and so on – but it doesn’t stand up as anything you’d want to do for its own sake. To be fair, not a lot of time has been dedicated to making it into that – until now.

It’s going to take multiple mechanics working together to bring campaign-level gameplay up to par with combat, and I’d like to talk about the first one of these that we’ve been working on: sensors, that is to say, a set of rules that determine when one fleet is able to see another.

It’s important to note that how sensors work will both influence and depend on other related mechanics (to be added in the near future), and so the current incarnation of sensors – the one I’m going to discuss now – is very likely to change. In general, the more specific a detail, the less likely it is to remain exactly as-is.

That aside, why sensors? Why can’t all fleets always see each other, the way they do now? There’s a realism argument for it, as spotting fleets across light-years doesn’t make a lot of intuitive sense, but I’m not a fan of the “realism” argument in general. It takes days to travel light-years of distance, so who’s to say where sensor tech is relative to that? Internal consistency of the rules and good gameplay are more important; given those, an in-fiction explanation for how things work shouldn’t be too difficult, if it even proves necessary.

What else, then?

First of all, suspense and a sense of discovery. If you see everything, there aren’t going to be any surprises. Say you’re traveling from Corvus to Asharu, and you’ve opened up the map to see the route – and you see that it’s clear of any enemies. From that point on, you know for a certainty that there’s no risk to the trip, and it stops being engaging and becomes a wait until it’s over.

If you don’t have perfect vision, on the other hand, space gets big and mysterious again. You start the trip – and see a sensor blip.

sensor_contact

Read the rest of this entry »

Logistics & Fleet Management

In a previous post, I’d talked about combat readiness. One of the benefits of that system is that it makes it easy for other mechanics to tie into it, whether they’re in the combat or the campaign layer. I’d like to talk about what’s more or less an overhaul of the various fleet management mechanics, both fixing some long-standing issues and streamlining the approach without oversimplifying it. First, though, a brief recap of how things currently work.

The player character has a “fleet points” stat that determines the maximum size of their fleet.  (So do the AI fleet commanders, but never mind that for the moment.) The fleet has a cargo, fuel, and personnel capacity, based on the stats of the ships in it.

These are all soft caps – you can go over them, but doing so costs extra supplies every day, and there’s a risk of accidents when any of these is exceeded by too much.

Overall, this works well; there’s no reason to throw out the system and start from scratch. I’d actually started writing out the issues with the current system, but since it does work fairly well, it’s hard to build a compelling case against it. So instead, let me outline the new approach, and point out how it’s better.

Logistics
The general idea is to replace fleet points with something based on supply consumption, and since supply consumption already plays a role in other places, it can all be rolled together to clean things up. Enter the new stat, “logistics”. It’s a measure of how many units of supplies per day your character can manage to distribute efficiently. So, supply consumption up that limit is fine, but going above it introduces penalties.

The things that consume supplies are:

  • Ship maintenance – ships have a new stats that indicates how many supplies per day they require for maintenance. More on that later.
  • Crew and marines; marines consume more to reflect the cost of keeping those armored suits in good repair
  • Ship repairs
  • Combat readiness (“CR”) recovery
  • Being over-capacity in fuel, cargo, or personnel – a fixed supply cost per unit

The daily supply expenditure on all of that is added up, and together with the logistics stat, is used to produce a logistics rating (“LR”), which is a percentage value. Use up to the logistics value results in an LR of 100%, and it goes to 0% when supply use double the logistics value. For example, if your logistics stat is 50, and you’re using 75 supplies per day, the LR is 50%.

LR has the following effects:

  • When below 100%, reduces the maximum combat readiness of all the ships in the fleet by up to 50% (at 0% LR)
  • When at 0% for more than a day, there’s a chance of an accident happening (note that simply being way over capacity in something is not enough to cause one now)

Read the rest of this entry »

Forum Blog Media FAQ Features Digg it! Del.icio.us! Share this on Facebook Reddit Stumbleupon it! Technorati Tweet it! Download Starsector for Linux Download Starsector for Mac Download Starsector for Windows Preorder