Distant Worlds - Legends Developer Notes
Published on 11/22/2011 by Elliot Gibbs.
Developer: Code Force
Publisher: Matrix Games
One of our key goals for Legends was to make the AI smarter and more unified in its approach to everything.
For example, although earlier versions of Distant Worlds moved fleets into position for attacks before wars started, with Legends we have tied all of this together much more closely. Under the covers, diplomatic strategies towards other empires are determined in advance. Then if a conquest strategy is determined against an empire, fleets are moved into position with specific targets in mind. Once the fleets are ready, war is declared and the fleets immediately proceed towards their initial targets.
Diplomacy could be somewhat disjointed in earlier versions of Distant Worlds. There was a standard set of modifiers that combined to give an overall score that determined how each empire felt about another empire. This included items like we like your style of government, your forces intrude in our systems, etc.
While this generally worked, the problem with this approach was that it was not subtle enough, and sometimes actions in the game did not really match the feeling of the empire. For example, sometimes advisors would recommend raids against an empire, and then also recommend offering the same empire a treaty a little schizophrenic J
In Legends the existing diplomatic modifiers are still important, but specific diplomatic strategies are also chosen based on other more long-term factors such as the likely prospects for treaties, the inevitability of war, etc. Then a more unified approach is taken to implementing the chosen diplomatic strategy. Thus no more confusion from your advisors theyre all on the same page as far as what they hope to achieve with a particular empire.
Diplomacy is also much more big-picture-aware. Choosing diplomatic strategies for each empire is not done in isolation: strategies already chosen for other empires are also considered. Thus the AI now works hard to avoid multi-front wars wherever possible itll pick off its enemies one at a time.
The AI logic for fleet operations in Legends has been rewritten from scratch. While there are rare occasions where the AI will use some of the old logic in assigning fleet missions, in general fleets now operate with completely new rules.
The new AI for fleet missions involves predetermining good enemy attack targets even before war starts. In fact this target selection process also drives diplomacy: other empires are chosen as conquest targets partially because they have viable nearby targets to attack. With targets selected, fleets are then assigned home bases close to the targets and move to these bases in preparation for war. Once the fleets are ready, war is declared and the attack fleets then head to the first target, then the next target, then the next, etc.
This makes fleet operations much more fluid and the AI is much more challenging, as it rapidly proceeds from one target to the next, while you scramble to defend against its attacks.
This new fleet AI also ties in with the new fleet postures. Fleet Postures determine a fleets role, either Attack or Defense. Fleets also have a range that determines how far they will respond from their home base (if a defense fleet), or how far they will look for new targets from their initial attack target (if an attack fleet).
Refuelling of fleets has always been a difficult aspect of the game to develop.
The refuelling concept adds a lot to the Distant Worlds game play. The logistical challenge of ensuring you have enough fuel to sustain a prolonged campaign in enemy territory makes the game more interesting and real-world. But this is also a very complex challenge for the AI.
There are a plethora of subtle situations that can trip up fleets so that they run out of fuel. Overcoming these issues required a lot of testing to ensure that AI fleets were doing what they were meant to do. But one by one these problems have been eliminated. While theres always room for improvement, we think that this now works much better.
Each alien race in Legends has been further differentiated with many unique new characteristics. Races now have differing victory conditions that combine 4-5 goals that relate to the races personality. This includes goals like: control the most colonies of a particular type (e.g. ocean planets or volcanic planets), have the happiest population, control the supply of special resources, or build a unique galactic wonder.
The objective of these differing characteristics is to reinforce the personality of each race, so that they role-play the game in a way that matches their character. Thus aggressive races might be inclined to enslave other factions, or build lots of large military ships. But more peaceful races might tend to focus on research or forming treaties with other empires.
Each race also has unique events that relate to their history, culture and environment. These events give extra flavour for the race, while also affecting gameplay.
The character system in Legends adds a completely new layer to the gameplay. Progressing the skills of your various characters and using them to expand your empire can be a very rewarding experience.
We wanted to avoid the generic blandness that often afflicts in-game character systems. Each character had to feel unique and useful in their own particular way.
To achieve this we used a combination of differing character roles (Leader, Ambassador, Governor, Admiral, General, Scientist, Intelligence Agent) and various skills and traits appropriate to each role.
Skills directly affect gameplay, e.g. Admirals can have a Ship Maneuvering skill that affects how fast all of the ships in his fleet can turn and maneuver. Traits can further reinforce existing skills (i.e. a bonus to the skill) or can give negative aspects to the character.
Acquisition of new skills and traits is directly affected by how you use the character in the game. Thus if your Admiral character is victorious in a space battle he might acquire a new skill or increase the level of an existing skill. Which skills or traits are affected is determined by how his forces performed in battle, e.g. if his Star Fighters performed especially well and destroyed many enemy ships then the Admiral might increase his skill in using Fighters.
This deep integration with gameplay makes characters feel more real and unique.
Each character has a personal history of all the major events that they have been involved with, such as forming new treaties, completing intelligence missions, battle reports, etc. This further helps to make each character unique and special.
Extensive Modding Support
Modding has received a major overhaul in Legends. This was largely related to support for the new Racial differences and the Character system all of these new features are fully moddable in simple text files. This new modding support allows for Distant Worlds to be tailored in diverse ways.
Races can be defined to have different victory conditions, events, character tendencies, periodic personality changes, bonuses or handicaps in many areas, and much more.
Each race also has its empire policy defined in a moddable external file. This determines how the race plays the game: which areas it focuses on, the mix of ship types it builds, what policy it takes towards foreign races at its colonies, which planet types it prefers to colonize, and so forth.
Characters can also be predefined in a simple file. Each predefined character can have their own unique artwork, skills, traits and race.
Graphics and Memory
Martin Wood designed a huge range of beautiful new ship and base images for Legends. This gives every race unique artwork, further adding to the distinctiveness of each race.
However this also introduced a new problem for us. With 650 ship and base images instead of about 300 (in original Distant Worlds and Return of the Shakturi), we could no longer follow our existing graphical model that relied on all images being preloaded into memory.
This old model had always caused issues preloading images meant that memory quickly became a scarce commodity. This especially showed up in very large games when we sometimes had out of memory errors. We worked around this by shrinking the images when we loaded them. This helped out with memory issues a lot, but at the cost of slightly blurry in-game graphics for ships, bases, planets, etc.
In Legends we wrote a completely new mechanism for handling all images. Instead of preloading everything, all ship and planet images are now loaded as needed. This means no need to reduce image quality, thus having sharp, full-resolution graphics. It also reduced memory usage and meant that we could have as many unique ship images as we wanted.
The new images are 50% larger and much sharper than the originals, which is a significant improvement. For those that prefer the older art, we included the original ship and base images as an optional theme that can be turned on in the main menu.
Distant Worlds Legends is a major upgrade: large sections of the game have been completely rewritten, and major new features have been added.
Vastly improved AI for diplomacy and fleet operations makes for a more challenging game. Distinctive races and characters populate the galaxy, adding even more flavour.
Thanks for reading this far! I hope you enjoyed these notes and that you will give Distant Worlds a try. I also hope it will meet your expectations and earn a long-term place on your hard drive.