Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Pages: 1 2 3 [4] 5

Author Topic: Economy Revamp  (Read 39872 times)

David

  • Global Moderator
  • Admiral
  • *****
  • Posts: 909
    • View Profile
Re: Economy Revamp
« Reply #45 on: April 29, 2016, 11:31:52 AM »

Since "bigger icons" is out and "numeric overlays" is out, how about a special icon meant to represent "caselots" for a given commodity (like the board game Risk)?  It might not solve the problem entirely, but if there was a special "crate" or "barrel" icon that was readily distinguishable as being a multiple rather than another unit of the commodity (sounds like a challenge for David to distinguish supplies against ;-)), then you could replace the first few icons at the bottom (front) of the icon stack and it would help indicate very large quantities.  Say if the commodity load is greater than 50, then caselot icons would begin to appear, each representing 5 units, with 25 actual icons or some such always included in order to give a sense of scale.

This would create a disparity where ~49 commodities would appear bigger (49 icons) than 50 commodities (5 caselots + 25 icons), but that could be tuned to taste -- lowering the allowed number of "actual" icons, setting the required number of "actual" icons to equal the same threshold where caselots appear, etc.

We actually tried that, using MoO2 as inspiration - remember how science/food/production/pollution stacked and had 10x icons? Didn't work very well in Starsector due to the sheer number of different icons and their more representational nature. MoO2's icons were very abstract and there were only 4 categories, for 8 total icons, contained in three very clearly designated rows on the screen. Meanwhile Starsector has .. uh, what, 16 or something base for 32 total? (somewhat) arbitrarily placed on the screen. The market screen is already visually noisy and this just made it worse because suddenly the number of different icons doubled.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile
Re: Economy Revamp
« Reply #46 on: April 29, 2016, 11:40:02 PM »

**in regards to icon discussion** Have you ruled out a tab-based or sorting UI  for commodities to categorize them by logical relevance? This would allow the "caselot" format to be less noisy because you have less icons to deal with per logical grouping.

You lose a tad of "at a glance" readability that way, for sure, since you cannot view every commodity on one screen, but the payoff is more general readability in larger markets and less overall dead space in smaller ones since most markets are smaller markets.

Just a ~2min thought-out solution so there is probably issues there that have already been considered, but figured I'd throw in my two cents.  :)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Economy Revamp
« Reply #47 on: April 30, 2016, 10:25:14 AM »

That's rather vague, so I'm not sure I can really respond in detail :) As you note, though, it would reduce at-a-glance readability, which is the main point of the main info screen, and there's already a commodity detail screen for more specialized information.
Logged

JMPicard

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Economy Revamp
« Reply #48 on: April 30, 2016, 10:36:22 AM »

Alex, would you care to give a more specific problem statement for the goods distribution? You mentioned in your blog post you had written a technical description of your second (current) solution as well -- perhaps you still have this somewhere? I'm asking because I have a fair bit of experience with such problem solving, and I'd be interested to see if I could help out -- I'd love it if I could :)

Specifically: What is the optimisation problem you want to solve? Are the accepted deals carried out by transport fleets, which can be disturbed? (And what happens in such a case? Who's responsible for the goods during transport?) Can you be a bit more specific on the allotted CPU resources as well? Implementation in Java, I suppose?

I also wonder if you considered an economy where the markets are more passive, and only set their prices based on current stockpiles, and where merchants -- independent or faction-owned -- drive the market through "buy low, sell high"? This has been rather successfully implemented in e.g. the X3 series.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Economy Revamp
« Reply #49 on: April 30, 2016, 11:21:44 AM »

Alex, would you care to give a more specific problem statement for the goods distribution? You mentioned in your blog post you had written a technical description of your second (current) solution as well -- perhaps you still have this somewhere? I'm asking because I have a fair bit of experience with such problem solving, and I'd be interested to see if I could help out -- I'd love it if I could :)

I don't have that anymore - it was part of the blogpost but was edited out.


Specifically: What is the optimisation problem you want to solve? Are the accepted deals carried out by transport fleets, which can be disturbed? (And what happens in such a case? Who's responsible for the goods during transport?) Can you be a bit more specific on the allotted CPU resources as well? Implementation in Java, I suppose?

Basically - the markets are in a (mostly) fully-connected, bidirected graph. Edge weights represent the overhead for a trade between the two markets - hostile factions, distance, etc. Specifically, the weight is a multiplier for the price. E.G. if one market is buying food that another is selling 20 credits per unit, and the edge weight is 1.5, the actual cost to the first market is 30 credits per unit.

Prices are based on stockpile compared to max(local demand, local supply), roughly.

The deals are carried out directly by the algorithm; there are transport fleets that spawn based on the deals, and them being destroyed feeds back into connection weights.

The main desired property is that there are no profitable trades remaining to be made, the prices of things being balanced across all connections. E.G. the price market A is willing to pay for food is less than the price at which all connected markets are selling food at, times the relevant edge weight. Not meeting this 100% is fine, just something the sim aims for.

There are complications, though - for example, a "stability" rating for each market, with more stable markets being able to pay more, and charging more. Stability is in turn raised by being able to meet demand, and exports, but lowered by imports. Another is being able to support transitive trade - i.e. market A sells to B sells to C, when the edges A-B and B-C combined are cheaper than A-C directly, or A-C directly just doesn't exist.

CPU-wise, it's... well, that's hard to quantify. As a ballpark, the new version takes maybe 5-6 seconds (fully dedicated to running the economy) to more or less stabilize, on my dev pc. It should also be able to run incrementally, though; if an iteration takes more than half a second it's quite a bit too much. Obviously CPU-dependent, hence "hard to quantify".


I also wonder if you considered an economy where the markets are more passive, and only set their prices based on current stockpiles, and where merchants -- independent or faction-owned -- drive the market through "buy low, sell high"? This has been rather successfully implemented in e.g. the X3 series.

I think that boils down to much the same thing as this new version is doing, as both favor making trades across higher price gaps first.


(I appreciate your curiosity/desire to help, but I'd hate for you to spend a lot of time on it. From my perspective, the new approach pretty much solves the problem!)
Logged

JMPicard

  • Ensign
  • *
  • Posts: 2
    • View Profile
Re: Economy Revamp
« Reply #50 on: April 30, 2016, 02:56:46 PM »


(I appreciate your curiosity/desire to help, but I'd hate for you to spend a lot of time on it. From my perspective, the new approach pretty much solves the problem!)


Allright! I got the impression you were only partially satisfied :> I'll let you know if I have any revelations about it in my dreams, then ;> (I simply enjoy problems like this, so I might look into it just for fun!)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Economy Revamp
« Reply #51 on: April 30, 2016, 10:44:26 PM »

Allright! I got the impression you were only partially satisfied :>

Well, I'd be more satisfied if it didn't run in O(n^2), but I suppose one can't have everything - and the actual performance is quite alright, since the constant factors are super low.

Might run into problems with the simulation when working in industry/outposts etc, but it *seems* in a good place to fit into that right now - certainly a good enough place that I don't want to mess with it until adding those things and seeing how it works out, to guide any potential changes.

I'll let you know if I have any revelations about it in my dreams, then ;> (I simply enjoy problems like this, so I might look into it just for fun!)

Much appreciated, and yeah, I hear you. It's fun stuff to dig into!
Logged

JT

  • Commander
  • ***
  • Posts: 129
    • View Profile
Re: Economy Revamp
« Reply #52 on: May 04, 2016, 12:55:41 AM »

Since "bigger icons" is out and "numeric overlays" is out, how about a special icon meant to represent "caselots" for a given commodity (like the board game Risk)?  It might not solve the problem entirely, but if there was a special "crate" or "barrel" icon that was readily distinguishable as being a multiple rather than another unit of the commodity (sounds like a challenge for David to distinguish supplies against ;-)), then you could replace the first few icons at the bottom (front) of the icon stack and it would help indicate very large quantities.  Say if the commodity load is greater than 50, then caselot icons would begin to appear, each representing 5 units, with 25 actual icons or some such always included in order to give a sense of scale.

This would create a disparity where ~49 commodities would appear bigger (49 icons) than 50 commodities (5 caselots + 25 icons), but that could be tuned to taste -- lowering the allowed number of "actual" icons, setting the required number of "actual" icons to equal the same threshold where caselots appear, etc.

We actually tried that, using MoO2 as inspiration - remember how science/food/production/pollution stacked and had 10x icons? Didn't work very well in Starsector due to the sheer number of different icons and their more representational nature. MoO2's icons were very abstract and there were only 4 categories, for 8 total icons, contained in three very clearly designated rows on the screen. Meanwhile Starsector has .. uh, what, 16 or something base for 32 total? (somewhat) arbitrarily placed on the screen. The market screen is already visually noisy and this just made it worse because suddenly the number of different icons doubled.

Were there unique "caselot" and "individual" icons for each commodity, or a re-used "caselot" graphic for every commodity?  I was actually suggesting the latter -- the same "caselot" graphic would be used for every commodity, and then the individual units of commodities themselves would distinguish that stack from the others.  Envisioning it in my brain, the only problem would be that it would start to "same-ify" the commodities rather than make it busier, since very large markets would just show a crapton of crates.  If the crates were hue-shifted to be similar to the commodities they represent, it might even accomplish the effect of "square" shapes representing lots and "dynamic" shapes representing individual loads, which might also work for better cognitive flow.

I'm probably just laying down track on a spur that's already miles behind your thought trains, though. ;-)
Logged

miljan

  • Commander
  • ***
  • Posts: 105
    • View Profile
Re: Economy Revamp
« Reply #53 on: May 05, 2016, 04:12:45 AM »

How big of negative impact will this have on people that dont have that good PC? I read that on dev computer it was ok, but I am more worried about my *** comp.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Economy Revamp
« Reply #54 on: May 05, 2016, 09:40:17 AM »

@JT: Yeah, I think you're pointing out some good problems with that approach :) Hue-shifting is... well, for one, it's adding an assumption that all commodity icons have unique hues, which, while true in vanilla at this point, is not a good assumption to make, especially when you consider mods.

@miljan: Shouldn't have an impact either way.
Logged

Deshara

  • Admiral
  • *****
  • Posts: 1578
  • Suggestion Writer
    • View Profile
Re: Economy Revamp
« Reply #55 on: May 06, 2016, 01:11:28 AM »

I feel that chicomotzoc's market screen being an unmanageable cluster *** is a problem that doesn't necessarily need to be solved. It kind of fits, thematically
Logged
Quote from: Deshara
I cant be blamed for what I said 5 minutes ago. I was a different person back then

Linnis

  • Admiral
  • *****
  • Posts: 1009
    • View Profile
Re: Economy Revamp
« Reply #56 on: May 08, 2016, 01:39:59 PM »

This is good groundwork and all. But I am wondering what direction you are planning to take the economy in the game to? I got some questions and concerns...

From what I understand is that: Most trading is done behind the scenes with simple number swapping between markets. While if actual transport fleets is destroyed, there will be an "status effect" applied on the affected markets. Also, the trading automatically accounts and adjusts for smaller and large market interaction so small markets will not be "ignored"


Will this mean that players will not actually need to manage their own markets? Maybe we just need to prevent shipping from being destroyed?

Will we then get a tax on the profit of our markets that goes into the player credit count? And or access to market shipyard productions?

Will there be an option to decide who our markets trade with? Or ability to set up our own trading and production network?

From the current view of the game it seems fleet production also needs a rework... Because once its in player's hands, I don't think many people will be happy with the set value but random ships that come out of markets.

Then this also will prob lead to a market "shipyard" where perhaps somehow value is gathered so players and AI will create their ships from?
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Economy Revamp
« Reply #57 on: May 08, 2016, 02:53:46 PM »

I feel that chicomotzoc's market screen being an unmanageable cluster *** is a problem that doesn't necessarily need to be solved. It kind of fits, thematically

I like the way you think :)

Will this mean that players will not actually need to manage their own markets? Maybe we just need to prevent shipping from being destroyed?

Will we then get a tax on the profit of our markets that goes into the player credit count? And or access to market shipyard productions?

Will there be an option to decide who our markets trade with? Or ability to set up our own trading and production network?

From the current view of the game it seems fleet production also needs a rework... Because once its in player's hands, I don't think many people will be happy with the set value but random ships that come out of markets.

Then this also will prob lead to a market "shipyard" where perhaps somehow value is gathered so players and AI will create their ships from?

Good questions, all. I'll just say that the new economy sim is meant to be flexible enough and/or adaptable enough to handle a range of answers to these questions, all of which are ones I've been thinking about. I don't want to get into any details, though, due to the answers not being quite settled yet.
Logged

kazi

  • Admiral
  • *****
  • Posts: 714
    • View Profile
Re: Economy Revamp
« Reply #58 on: May 08, 2016, 07:05:55 PM »

<rant>

I have to admit, the displays for commodities feels absolutely uninterpretable to me. I have absolutely no idea what's going on in the economy either in the current build or this blog post (without studying each screen for a solid 10 minutes). There's all these icons, some of which it's impossible to tell how many of them there are when stacked (looking at you, organics), and some have red outlines, some have green, some don't have any, and I don't know what's going on.

Would it be possible to redo the graphics to more intuitively reflect what's going on? Because I have no idea what's happening except for those beautiful line graphs you've got going on. Like the line graphs are seriously the most exciting part of this update for me. That and the planet underlays.

</rant>

(I'll see if I can sketch up a better prototype.)
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23988
    • View Profile
Re: Economy Revamp
« Reply #59 on: May 08, 2016, 08:07:30 PM »

One thing to keep in mind is that there's mouseover information which provides detail/explains what's what. Some things are not going to be possible to glean just from the color coding (green is "good", ok, but what does it mean in a particular context?), but they can be learned from the mouseover info.

some of which it's impossible to tell how many of them there are when stacked (looking at you, organics),

Well, that's very much not a thing the UI is trying for. "5 icons of organics" is not particularly useful information. If you want a specific number - which isn't "5 icons", but rather "X units" - then that's available from the mouseover. The only thing that the group of icons is required to convey is relative size. I.E. can you tell that this group of organics is smaller/bigger/of similar size to another one? If so, the job's done.


Because I have no idea what's happening except for those beautiful line graphs you've got going on. Like the line graphs are seriously the most exciting part of this update for me. That and the planet underlays.

Honestly, I'm pretty excited both about the graphs and the planet underlays, myself :)

But I'm also excited about the UI. Seriously, I hope you give it a chance when you get your hands on it - I freely admit that the previous (i.e. currently out) version was not, uh, very elucidating. But this one "works", by which I mean it's given me a lot of insight into the economy of specific markets that I haven't had before, and it's done so in an at-a-glance fashion.
Logged
Pages: 1 2 3 [4] 5