Devlog: Trading System (mostly)

title07My apologies for the delayed devlog, it has been a busy month for me, but don’t worry the development is still going as it’s used to. Beta 4 is even going to be released later this week barring any last minute major problem.

Back on topic, the last two weeks were spent putting the finishing touches on the general user interface, fixing a bazillion small issues, improving things left and right, and more importantly finalizing the trading system.

Let’s get to it 🙂

Trading System

Snap1487The first order of business regarding trading was to review the production chains. Thanks to the work of Paul from the Bay12 forum, we now have relatively efficient chains. In instance, supplying a single ship part production facility so it can produce non stop no longer requires dozens upon dozens of solar power plants, same goes for all factories. And speaking of solar power plants, they continuously produce small batches of energy instead of one big batch every minute or so, making the job of dock suppliers easier and reducing how messy is the traffic in the early game.

Secondly, trading stations have been redesigned. Now, what they sell and buy is based on what’s the solar system they are in is producing. If there’s an overflow of energy cells but not enough iron to satisfy production in the entire system, they will sell energy and buy iron. Prices are still based on stocks for the moment being, but it’s not possible to cheat anymore by buying and selling large quantities of goods at the same station as it will either buy or sell each good, not both. Dock traders from the same faction as the trade station understand the change and will bring overflowing goods there and take the needed ones from its cargo hold. And to prevent high end goods that have no specific usage in the simulation from clogging the system, trade stations slowly sell them to colonies in order to generate money.

Finally, the recently introduced luxury goods (ale, jewelery) have been given a role in the simulation. They are now consumed by the factions to reduce their war weariness.

note : war weariness increases continuously when a faction is at war. Loosing warships during a conflict increases it even more. It slowly decays when the faction is at peace. The higher the war weariness is, the slower the shipyards are to produce new ships. It is a determining factor during peace talks between warring factions.

Buying price of luxury goods at trade stations, contrary to other goods, isn’t based on stocks but on the current war weariness of the faction controlling the station. It can lead to interesting gameplay opportunities for the player who can take advantages of wars (or lead AI factions into war) to make a larger margin. Incidentally, he can hinder or aid another faction through the trading of those goods.

Gameplay

Snap1426There’s way too many small tweaks to the gameplay to list them all here, but there’s a few major ones that need to be covered.

The Independent Sector Alliance (and basically any faction built on the passive AI module) received a small buff. While they still can’t invade sectors, they can try to take back sectors that belong to them, making them a bit more resilient against the Core or the Swarm. The latter is now considered as “always at war” with other factions (same as Core). While it has no major impact for the player, it allows AI factions to better evaluate how threatened they are by those creatures and, more importantly, to try to claim back lost sectors more easily.

AI factions can now recognize when you are trying to build a military base in their sectors and consider any dock builder doing this an enemy. While you can still get away with it in remote locations, it’s unlikely to work as well as before in solar systems. Several other similar exploits (of sorts) have been fixed too.

User Interface

Snap1486Here again, many improvements. The most notable being on the Galactic Map.

The main issue with that map is that it was fairly impractical to use when you had ships selected, it was fairly easy to order ships to move around the map by accident. To rectify that, the small info popup you usually got by left-clicking a sector has been moved in the top right corner (it’s updated as you move your mouse around), clearing the left button for more important duties. As a result, the left button is now used to view the sector’s content while the right one is still used to give orders to your selected ships.

Selecting and deselecting ships and stations is now consistent everywhere and works much better. Well, the previous implementation worked fine, but it had an awkwardness to it I hope to have cleared. I also added dock and undock buttons for your ships, while not strictly needed from a gameplay perspective, I guess it can be useful to store some of your ships safely somewhere. It’s also now possible to exchange cargo between your ships and stations the same way you’d do between ships.

Game Stability

While the game runs perfectly fine for most people (me included, which doesn’t help), others have been experiencing recurring crashes and stability issues. As you may know, Unending Galaxy is a fully multi-threaded game, able to take advantage of up to 8 CPU cores (and the current build is optimized for 4). Without entering into the nitty-gritty details, such an application is no simple task, you need to make sure that threads don’t step on each others’ toes otherwise everything can go “boom” in fairly unpredictable ways.

So, I spent an unhealthy (sanity wise) amount of time securing parts of the code that were potentially unsafe. Did I catch them all ? Probably not, the code base is too huge to find all the holes in a single pass, but I did catch all the major ones which should make the game way more stable, especially on lower end machines. Such changes have a performance cost, but it’s compensated by other optimizations I made the last few weeks.

Stuff Left

There’s still a few improvements to the UI to be made, I just added a menu to customize your trade stations and military bases, but its actual content isn’t finished yet, the sector map also need a makeover, but I am not so sure I want to tackle it right before this release.I also need to finish some of the new options on the “New Game” menu and remove a few shortcuts that were put in place for beta testing purposes like the reduced station building time, the ‘unlimited’ ship battery energy, the free pirate guild membership or unlimited access to high end warships and weapons from other factions.Anyway, the Beta 4 should be available this week.

After that, granted we don’t need another last minute beta to balance things out, it’ll be the first official release 🙂

Cheers,
SK.

2 thoughts on “Devlog: Trading System (mostly)”

  1. Stability? Smarter AI? What more is there to ask for? Keep up the good work!

Comments are closed.