Trade UI

Hey Folks! Working on the trade UI today, in a continued effort to connect systems into at least a crude game loop. I've mostly finished the first draft of the layout, as you can see in today's image. And I've started on the code for it.

The layout isn't anything too surprising. Your usual scrolling list of items for sale/trade, with widgets to control how much you want to buy/sell for each. I'm going to try and use the item's image scaled-down alongside each item name, and we'll see how that looks in practice. I've also made each item name a button in case I want to make them interactive later (such as clicking/rollover to get item details).

The rest of the row are mainly related to how much each person has, how much they'll pay, and how much is being traded, plus a subtotal on the right. I mucked around with this layout a bit, as I wasn't sure how best to arrange it so the information was both clear and complete.

In the end, I settled on showing "us" inventory counts on the right, "them" on the left, and the arrows correspond to moving the items into either of those traders' stockpiles. The amount the subtotal changes depends on which direction the items are flowing. Negative numbers are selling to "them," so we use the price to the left, and buying items uses the price to the right. Basically, use the price that is in the direction the item is moving. (I think that's clear?)

I can probably show/hide the arrow buttons appropriately for cases where the items are not available, and even newcomers to the screen should be able to figure it out once they try a few clicks and see numbers change.

Anyway, you line up all the stuff you want to trade, and the "Balance" at the bottom is the final tally. I think I'll need to do something here to account for leftover change if the trade isn't perfect. Or else make money one of the items in the list so it can be traded to make up a deficit.

I've also been wondering whether it adds anything to have two prices like this, or if I should just make it one. Realistically, each party in a trade has different prices for the same object. But in practice, is that going to matter much? Or is it just unnecessary complexity? We'll have to test and see, I guess.

Anyway, we're into the code now, hooking the logic up. Once that's done, I'll be able to trade food packets for money until I get the zones wired-in to this. And then? Maybe more items to loot, sell, buy?

Comments

ra1's picture
ra1

Buy and sell price is typically different. However, if you want to make the UI simpler, just add a "Purchase Surcharge %" outside the table, that is implicitly included in every purchase (vendor to player), but not sale (player to vendor). This percent could go up or down based on relationship with the vendor.

Separately, if resource trade is going to be necessary, please make it easier than in most games. It is my opinion that having to write down the prices of every resource at every port is very tedious, and boring. Instead, perhaps provide a method to optionally see prices historically across the solar system - such as a graph that shows up when you hover the mouse over the resource. (Maybe limit to only showing prices viewed while docked at each station, or received via communication).

dcfedor's picture
dcfedor

For now, I can leave the two prices in, since it fits already. My concern was just whether it was clear or not which price applies to which direction. I think the way it's setup above is clear (basically, you pay the price that is closest to the arrows you click).

As for commodities trading, I'll have to see how it compares to the other in-game activities. I sort of want the game to focus more on hustling, scrounging, and gray-market deals, since the above-board jobs are already cornered by the big corps.

Sort of like the dystopian aspects of America: only the big boys and people with an "angle" really make money. The little guys and rule-followers are just living check-to-check, and never get ahead.

Dan Fedor - Founder, Blue Bottle Games