Devlog: Comms and Trading

Snap702Hey, weekly devlog thingy !

I will make this one short, not because there’s not a lot that has been done, but because the important bits can be explained rather quickly, for once (and absolutely not because I need to sleep). Anyway ! In the stuff that you can see, I started improving the communication channel thingy with the other ships and added a setup menu for your factories. In the stuff you can’t, I drastically improved stability and multi-threading.

As usual details and relevant screenshots in the article. Enjoy 🙂

Communications

Ship to ship communications haven’t been improved since, well, the first time I put the relevant menu in the game. It’s was time to change that ! Well, so far nothing fancy, but I added a few new options. First, thanks to the mission system implemented last week, if a ship is being attacked by another, you can talk to it and it’ll ask for help. You’ll receive payment and reputation if the enemy is destroyed. There’s a few fun bugs to iron out: I can accept mission from both sides, and no one will mind for instance. Secondly, hostile pirate ships may be persuaded to leave you alone, at least for a while, if you pay them. The amount of credits is proportional to the size of the wing attacking you right now. But it will probably be to the amount of firepower they have in the release.

This menu now pauses the game so things don’t get too hectic. Also, enemy ships won’t be as nice as before, and they won’t tell you what they are doing anymore.

Of course this is only a few preliminary improvements on that matter, more options will be introduced once I am done testing these ones. Ship-to-ship communications tend to be overlooked or severely lacking in this kind of game (X3 I am looking at you), I think it’s sad because it’s an important part of what can make a game look alive. I don’t necessarily have the answer, but I will at least try.

Trading

Snap700I added a new menu to deal with your factories. I replaces the screen you’d see when “talking” with a NPC factory. From here you can rename said factory, set the amount of transport ships it is using, and the price at which it buys and sells wares. It has also other tabs to see its cargo and docked ships.

The menu isn’t 100% finished, and I will probably add a few more options, but the general idea is there. You won’t have to micro-manage your transports, your factories will manage themselves once built.

Also, I am using a new algorithm for trading vessels, same logic as the other self sufficient AI modules (miners, raiders, bounty hunters). They are more independent, and if I allow it, which I am not sure yet, they can request to be paid or buy escort fighters. It’s also a first step toward having “universe traders” that are not tied to a specific factory.

Other Improvements

I reviewed the way I am multi-threading the game, successfully. I could even allow the player to set the amount of threads he wants to run in the config screen. Not that I would because there’s an optimal setting depending on the amount of cores you have in your CPU. I am quite happy with the result anyway, it boosted the responsiveness of the game, even when there’s way more ships in the galaxy than it should normally be.

I did another pass at fixing exceptions (bugs that you do not necessarily see as a player because I “handle” them, but that may still lead to instability and issues, to keep my explanation simple), making the game quite stable. There’s still a long road ahead of us, given that I am sure to add more bugs with each new feature, but that’s just part of any development process.

Final Words

So, what’s next ? More missions and fixing issues with the existing ones, and better dialogs as I said. But it’s going to be a gradual process. There’s the war and diplomacy part, I want to review too. Factions get extremely confused when they have to wage war on several fronts. That’s a lot of complex code to edit, and more to the point it’s slow to debug, mainly because I don’t have savegames implemented yet. So that may be another possibility. Not a full save system, but enough to at least debug the war system in peace.

We’ll see 🙂

Cheers,
SK.