Trade! Also, how UI Evolves.

We are still out of the office until January 4th, 2016, at which point the terrifying cogs of progress begin turning once again. Today’s blogpost, therefore, is put together out of whatever images I can find on my computer. Which is okay, because we’re really interested in Trade Depots today, and I took a lot of screenshots of Trade Depots. But first, a little history.

Here is the first version of the Character Info screen for Clockwork Empires, circa January 2013 (right at the point where, maybe, we had little characters running about and doing something.) For those of you who are wondering how much optimization has already gone into the game, we seem to be running at 28 FPS here despite… not rendering much of anything.

CWYhj9pUkAAb7_jOne year later, we had moved to this:

character_info_jan2014This is taken from David’s design notes, which he sent to me to try to clean up the UI. The version on the right is *fairly* similar to what we still have today, albeit there is a Great Big Whacking Emotional Widget on the right hand side of the character display now. So… UI is a constant, on-going evolutionary process. The screen you start with is not necessarily the screen you end up with.

So here is *where we are, right now* with the state of the Trade Depot:

CWOTUhJU4AIZcEs

Concerned citizens are welcome to speculate: is this UI pulled from Dwarf Fortress? Well, yes and no. Certainly the idea of the barter system and its basic mechanism is very similar to Dwarf Fortress, with a two column display representing goods for trade and goods to be traded for. At one point we had commodities arranged in both windows like in the commodity UI window, but doing it as a horizontal display like this seems to clean things up nicely. Your proposed trade is displayed on the bottom, and there will be some indication as to the relative economic worth of your offer versus the other player’s offer.

At present, Novorus Traders will actually arrive in your city to deliver goods. I’m not sure if this will actually make it into version 46A, or if the traders will just magically show up and the goods will be hidden in space somehow, via the invisible hand of Cog. The reason for this is that traders currently run using the AI mission control system that we wrote for simple things like “fishpeople march through your town and kill everything”, and it does not necessarily scale all that well to recovering from such an event. The term we use in the office is “Bethesda Failure-Case”, directly inspired by Fallout 4: if something goes wrong, do we have a minimum viable level of support in the game for cleaning up and handling the failure in a robust manner?

As a good example of a “minimal viable failure”, here is a band of Novorus Traders assaulting a wandering Obeliskian with preserves. Not really what we want, or how we want to handle it.

CV5_yl1W4AQNscmIn Dwarf Fortress, there are a number of failure cases that are handled when a merchant arrives: the merchant may fail to arrive, the merchant may fail to leave, their goods may be seized, their goods may be damaged, you may give wood products to the elves. The correct way to scale this system is by using a decision tree to run missions, which means I will probably hijack the decision tree code used by the military (and hopefully to handle things like “I’m on fire!”) and extend it to run missions with full crews of AI characters. This sort of hierarchical mission-planning is a very common thing in game development, especially for strategy games.

Other notes: goods can be reasonably expected to be different depending on which empire you are negotiating with, and your relative state of hostility. This, in turn, can feed into the foreign office that Daniel has been working on, and the global state of Empire-to-Empire negotiations in the overworld, once we have overworld meta-state working.

So that’s push number one this month for me: finishing trade. I had hoped to get it into 46, but there were just too many moving parts. Push number two… well, you’ll just have to wait and see..

7 Comments

7 Responses to “Trade! Also, how UI Evolves.”

  1. Alavaria says:

    Interesting. Bartering… I guess the colonies don’t even do things like “gold/silver by weight”.

    Wonder if the shadow prices of goods is planned to differ between factions and across time. Would be amusing if a war ended creating a glut of cheap guns. Which oh dear, the bandits have also taken to buying…

    { reply }
  2. Unforked says:

    I really hope you keep the traders visiting on the map instead of having them magically appear. The risk of attack seems fun to me, and in keeping with the procedural theme of the gameplay.

    Maybe there could be a barracks order that has soldiers execute escort missions?

    Happy New Year to Gaslamp and the Clockwork Empires community!

    { reply }
  3. Caffa says:

    Hey, I have a few questions if you don’t mind me asking.

    First, whats the chance of having colonists with different nationalities? And, will there be different sub-cultures within this Clockwork empire such as the Not-Welsh and the Not-Scottish? Or would this be adding to many cogs to the machine?

    Second, will these foreign trade companies have an oppertunity to set up shops (if temporary) within your colony? What would the interactions be between these rival trade companies, if rival at all? Or again, to many cogs to the machine?

    Thanks, and a happy new year.

    { reply }
  4. Samut says:

    How come CE keeps suggesting the Novorus are a bunch of communists? I thought they were Sorta-Imperial Russia (they still have a Tsar and all that).

    Now Le Republique Mechanique or whatever? Those guys are commies. FRENCH commies! French ROBOT commies!

    { reply }
    • AdminDavid Baumgart says:

      (CE doesn’t. That’s just Nicholas, who badly wants Red Revolution In Imperial Novorus.)

      { reply }
      • Samut says:

        Understood, although there is a reference in CE where the popup tool tip for the Communist trait says that the colonist/communist in question is overly fond of Novorus music or something like that.

        And Communist Revolution should absolutely be a possibility in CE. Please tell me Gaslamp isn’t putting that in the Hat Pack!

        { reply }
  5. MailersMate says:

    I’ve been looking forward to seeing trade put in. Might we soon be seeing elements of the meta game come into the game?

    { reply }

Leave a Reply

Your email address will not be published. Required fields are marked *