Devlog: Pirates, Invasions and new faction

Snap1313Hey !

When I am writing code for a project, I usually have a sort of “plan” for each week. It works, most weeks. This is not one of those weeks.

I still did a lot for the pirates, but there’s some unrelated changes as well, like a new faction, more detailed scenarios and some other random stuff.

Anyway, let’s get to it 🙂


Snap1315I added conditions like the player’s guild membership and rank to the mission system so it’s now possible to restrict some missions until the player in high ranked enough. I also completed the system used by the bases to select which action to pick next.

To try out these features, I added a new behavior: large pirate bases can attack factories (notice that docks can drop loot, now) and post a mission restricted to level 2 guild members. It seems to be working so far.

Right now, and it was the case in my Pirate Guild plugin as well, guild ships are directly controlled by the pirate base, basically they are drones. What I would like to use instead is another agent based system where pilots can pick jobs on their own, recruiting other similar ships when needed. It’s more elegant and war-boss promotion could be done using data from the highest ranked pilot in the base as a result. I will probably give it a shot sooner or later.

Also, keeping in mind that pirate sectors are usually nebulae and bordering regions: standard factions cannot declare war on pirates anymore. Instead they can use any neighboring pirate nebulae or territory as a staging point for an invasion on any enemy sector on the other side. This change has multiple benefits:

  • There will always be some territory where illegal factories can be built and ships can be attacked freely.
  • I don’t rely on a special pirate “don’t invade this sector” flag in the map file anymore, making future procedural map generation less cumbersome.
  • As a player, you can still declare your independence with your stations in pirate territory. Making it possible to have your own territory, starting from scratch, without getting immediately destroyed by one of the big players.
  • It’s possible in some situations to attack other empires in their back.

With that done, I can start turning my attention on the diplomatic side of the pirates as proxy agents. Also, writing the AI for the pirate base made me rethink the code I wrote for the faction AI, which is kinda clunky.


Snap1309Capital ships (battleships, carriers) are bigger now, giving a better sense of scale between the puny fighter and the mighty battleship. I replaced a few sprites too. Also, I made most big ships go faster, however, they don’t turn as fast anymore.

Asterian Empire

Meet our new faction, the Asterians. Rock people skilled at extracting ores from asteroids. They have their own ships (a lot of hull but less shields) and buildings. It is a “full” faction AI wise which can conquer territory and use diplomacy.

Starting Scenarios

The first screenshot gives a pick at a new map in the making. It’s extremely large and should be interesting to try out with the new invasion mechanism explained earlier. I also rewrote how starting scenarios are defined. Now, selecting a new scenario will also fill the “empire” tab with corresponding settings. I also redefined the available scenarios, we have pirate raider, neutral trader, sirak mercenary and lost fleet so far.

The Lost Fleet scenario intend to replace the “start as an empire” option. In this scenario you begin in a random and unclaimed sector. You have a decent military fleet, 2 dock builders and enough money to build your first stations and factories.

The new Pirate Raider scenario puts you in an Osprey-R with 2 escort ship. You’ll begin your journey in a large pirate sector and as a member of the pirate guild, it will be used to demo the beta 2.

Misc Changes

Snap1308I added two new faction / player traits : Miner gives +15% ore collected by mining ships, Looter gives a higher chance for destroyed objects to drop cargo pods. One point each.

Mining ships are less suicidal now and will try to jump away when attacked. Mining in a pirate infested territory is still a bad idea, though.

I also was wondering why the faction go on the offensive always. I found the culprit, in some cases, factions completely ignored war weariness and cease fire agreements. It’s fixed now, but I am not sure how effective it is yet.

And there’s a few small improvement to the UI, buttons glow when hovered upon, all the menu bars use the same design now too.

I have other plans to add some effect to the rendering, like glow on suns and nebulae. It could also improve lasers or add a halo around objects when needed. Not sure how much it would impact the FPS, though.