As someone that prefer space ships and explosions, i have to admit this blog post left me a bit apathetic.
I guess all of this will become more relevant once we'll get the Industry system though.
Just one thing that confused me in those screenshots. Shouldn't "Imports" and "Production" be reversed? My eyes have to "cross" the screen to read and it feel surprisingly... Uncomfortable. It's hard to explain, so i just changed it a bit :Spoiler(http://i.imgur.com/24PHg1S.jpg)[close]
Having "Production" facing "Exports" and "Imports" facing "Demand" feels less confusing. Or maybe it's just me, i just wanted to note it.
Dumb CS question here: isn't this a perfect task to use a second CPU on?
None of this appears unsolvable, and it's definitely something I'll take a look at if performance becomes an issue. But as it stands? It's not using enough cycles to warrant the significant extra complexity it would introduce into the codebase. It's the best candidate out of everything so far for doing on another CPU, though.Without getting into details, yeah, this just seems like it'd be amenable. I'd like to hear more about the technical approach, though; it seems like this should all be pretty clean, fast spreadsheet shuffling and it's pretty weird to me that, when we start a game, it takes forever for those market "months" to execute.
Lack of comments is probably due to the fact that the Economy/Trading are currently no match for the awesomeness of the combat system. :)+1 for this, but in order to build an effective fleet, trading is the best way to go.
I'd like to hear more about the technical approach, though; it seems like this should all be pretty clean, fast spreadsheet shuffling and it's pretty weird to me that, when we start a game, it takes forever for those market "months" to execute.
That probably points at update frequencies more than anything else; it's really just not that important, from a player POV, if markets only update in major ways (as opposed to dynamic events from local fleets arriving) once a week or so, I'd think.
Re stock icons; if there are more than ~5 of them, I'd overlay a number too. (Like Colonisation did)
...
While the exact number might not be particularly relevant to the player, it does help quantify the relative scales of product.
Oooh this is relevant to my interests.
I kind of like 2^p here - it produces results that "feel" right and are just in the player's grasp to influence on the high end. E.G. something like 8000 food/month needed by Chicomoztoc (size 8), vs 500 by a size 4 market. And it does help keep the number of icons in a manageable range on the low and high end, where I'm fairly positive a base of 3 or 4 would get away from that. As you can see, for Chicomoztoc it's juuust barely manageable already.
- Thank goodness markets can have realistic populations without causing massive supply/demand shocks. In fact I think 2^n is low enough to risk Fridge Logic thing from big markets not seeing much more traffic than small ones, could probably get away with 3^n or even 4^n.
Right - for oversupply, production drops off to 0 when local stockpiles reach 2x base supply. For undersupply, nothing right now, but I'm thinking about some ways to handle this on a higher level - we'll see how that pans out :)
- Is there now any built-in mechanism for correcting or at least compensating for Sector-wide
over/undersupply (i.e.too manyor not enough market conditions)? EDIT: okay, I see it does dynamically scale back
Don't want to make it scrollable, though, since it's supposed to be an "at a glance" thing.
- If the economy flow panel was scrollable the icons on that Chicomoztoc screenshot might not look so crowded. Though I think you really should do as TJJ suggests and use numbers instead of icon spam. Or use big icons that represent multiples of the small icons.
Should just work. In fact, should work better than before - it'll influence prices, show local demand as being not met, will show a nice huge dip in the "stockpiles" graph, etc.
- A couple of mods (Interstellar Imperium and Nexerelin) have events that cause one-off destruction of stockpiles. Will the new economy reflect such events? Can it handle such events without making things go Horribly Wrong? Or should we target supply or something instead?
The big planets in the background of the new detail overview is a nice touch. This is cool, but I'm mostly excited about what upcoming features it paves way for... ;)
Thought: why not simply allow for each Market to set its current-bid price, taking into account the global running average and global demand, then each Market purchases with credit that's based on the Faction, rather than the individual location?
neither is the Hegemony going to let one of its military bases starve
rather than it being a bunch of relatively-finicky, complicated internal workings.
Re: reducing the overall number of commodities-- what about all the campaign missions that require you to get 10,000 tonnes of heavy machinery? What about the giant freighters in the game? Will there be nothing to put in them? A pity if the ships became purely decorative.
Re: many icons in last screenshot -- Since every commodity icon is a very distinct, separate color (good design btw), can't you just represent them as bar graphs? ie pink bar for drugs, dark green for organics, etc.
Now a theoretical consideration:
I don't claim to be an economist or computer scientist familiar with all the algorithms you mention, but something to keep in mind: In real life trade is often irrational from a profit standpoint, so your simulation may not work as desired if you make markets behave entirely rationally. There's a metagame of trade that goes beyond simple profit.
In addition to immediate rational economic gain, trade happens for:
-Solidifying relationships between merchants, district leaders, or heads of state; part of diplomacy (gift giving,)
-Bailing out/stabilizing/developing other markets within one state (ie, buying a poor district's useless stuff to keep them from starving, or selling stuff to another district at a low price because they need it)
-Humanitarian aid to other states
-Useless displays of vanity and status (ie olympic villages)
-Internal political considerations (producing/selling at loss something nobody much wants, because some powerful faction inside the state benefits from it)
-Because it happened before and people are just used to it and it has an inertia. Nomads use the same paths and trading oases in the desert because thats what their grandfathers did. You've already addressed this with accepted bids remaining accepted for a while. Inertia is perhaps even more influential than that however.
I don't say that all this stuff should be simulated in detail in the game. It just may be useful to think about stuff like that, and give yourself (and modders) some way to include provision for "irrational trade" in the simulation. Probably some factions would have a lot of centrally planned (for better or worse) economic activity, while others would be totally hands off and more 'rational.'
In the old model the unit price of goods dropped inside a single transaction. Is this still the case? In reality there usually is a short period before the market figures out that the shortage has ended and the excess goods are unsellable and the price drops.
I think you might mean that factions buy and sell as a unit - i.e. you'd be buying ore from the Hegemony, rather than from a specific marketMy thought here was that Markets would go to the global exchange and buy XYZ at whatever XYZ's bid prices were, hit their locally-available Credits, and then draw from the Faction if necessary. Naturally, that would mean that some Factions would run at a deficit; but perhaps they could increase their tax rates and pay down their debt in exchange for slower economic growth in the short term, like the real world.
Anyhow, I'll keep thinking about the n^2 issues; seems like there really ought to be ways to get it down to n passes without too much distortion, so that it's just not major weightlifting at all. Probably the biggest issue is treating commodities as commodities, and not as local produce that needs to be re-bid every time a transaction occurs; a futures market would probably simplify things a lot.
As far as that readability issue on large markets goes, what if instead of stacking icons based on absolute amounts (100 Organics/icon, etc) you made the stack sizes relative to the different goods on the market (%1 in market output/icon)? As far as I can tell, there's very little point in showing the actual number of a given good on the market in the "at-a-glance" view, nor is that view used to compare a market's output to another market's, so having a relative figure that scales with market size shouldn't cause many problems
will this help in making the game run faster?
Had an idea for the issue of many icons being fit onto the screen.
How about having a larger good icon to represent 10 units that would also stack next to the smaller ones?
Wouldn't it be nicer if the top icon of a stack was on the left? As it is now, if you don't recognize a symbol because of the overlay, you have to go all the way to the right to see it in full. That's counterintuitive for western reading habits.
And I'd maybe change "Incoming" and "Outgoing" to "Gain" and "Depletion" or something (Increase/Decrease, Adding/Subtracting). "Outgoing" strongly implies exports, which doesn't fit with "Demands".
"input" and "output"?
Wouldn't it be nicer if the top icon of a stack was on the left? As it is now, if you don't recognize a symbol because of the overlay, you have to go all the way to the right to see it in full. That's counterintuitive for western reading habits.
I'm not sure what you mean by "because of the overlay", and how that combines with reversing the ordering of the stack. I mean, if it's showing you that, say, the demand for food is not met, that's a quantity of food highlighted with a red border (if that's what you mean by overlay), but that's already to the right of the "food demand met" group. Shifting icon rendering within each group isn't going to affect the order of the groups in any case, though. Just not quite sure what you're saying - rather, it'd make sense w/o the "because of the overlay" part, but with that, I'm confused :)
"Outgoing" strongly implies exports, which doesn't fit with "Demands".
Hmm. Does it?
You're just so sensible, Gothars. A real voice of reason around here!
As someone studying economics and has interest in compsci, this is interesting.Wouldn't you then have the problem of a large market 'appearing' to have the same out-put and input as a small one?
As far as that readability issue on large markets goes, what if instead of stacking icons based on absolute amounts (100 Organics/icon, etc) you made the stack sizes relative to the different goods on the market (%1 in market output/icon)? As far as I can tell, there's very little point in showing the actual number of a given good on the market in the "at-a-glance" view, nor is that view used to compare a market's output to another market's, so having a relative figure that scales with market size shouldn't cause many problems
Sorry for being unclear, should have said "overlap" not "overlay".
What I meant is that this:
(http://i.imgur.com/nbpO8XH.jpg)
is easier to read than this:
(http://i.imgur.com/7T81DBy.jpg)
For western readers it feels natural to look to the left for the beginning of a semiotic construct ("icon sentence"). But here looking to the left doesn't clarify the icon, you have to look right to see in in full. It's a minor thing, but why not choose the better option?
"Outgoing" strongly implies exports, which doesn't fit with "Demands".
Hmm. Does it?
Yes! It's almost a synonym in this context. Just google "outgoing commodities", you could replace most of the results with "exports".
In German the correct word instead of "Incoming" would clearly be "Zuwachs", which translates to "increment" (or "accretion"). Then the opposite would of course be "decrement" (or "diminution").
I fear that I'm being overly dense to even ask this question...alas. :P
But all of these cool market supply/demand issues will be resolved by REAL fleets moving throughout the Sector right?
Fleets which will be carrying the desired supplies from the location with the surplus to the location with the demand?
Then if these fleets are assailed, the cargo recovered would naturally be the cargo which was being shipped due to this market system.
Anyways, sorry if that is old hat, but I didn't notice it being clearly laid out just now, maybe I overlooked it, or maybe I'm way off and this supply/demand chain will happen automagically. :P
Well that makes me a tad bit sad, lol. ;) I love the concept of each bit of shipping/cargo/goods existing in a real sense and having to be moved around via fleets. Would make blockades really cool imho, and pirates would be very disruptive just like they historically have been in real life.
But I respect your reasoning Alex, thanks for the explanation, it makes sense.
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.
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.
(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!)
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.
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
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?
some of which it's impossible to tell how many of them there are when stacked (looking at you, organics),
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.
Credits being a resource... also something I'd given some thought. For me, that feels like an unnecessary complication. I mean, what's the benefit? It's going to be confusing to the player, and my feeling is it would make it much more difficult for the simulation to stabilize. Especially if factions are capable of making more credits on demand, one would have to be careful to ensure there's no runaway inflation, etc. And then you'd need to adjust bounty payouts etc - lots of repercussions for unclear gains.@Alex
QuoteI think you might mean that factions buy and sell as a unit - i.e. you'd be buying ore from the Hegemony, rather than from a specific marketMy thought here was that Markets would go to the global exchange and buy XYZ at whatever XYZ's bid prices were, hit their locally-available Credits, and then draw from the Faction if necessary. Naturally, that would mean that some Factions would run at a deficit; but perhaps they could increase their tax rates and pay down their debt in exchange for slower economic growth in the short term, like the real world.
I agree about the black-market; that'd require some work to avoid various Bad Things.
Anyhow, I'll keep thinking about the n^2 issues; seems like there really ought to be ways to get it down to n passes without too much distortion, so that it's just not major weightlifting at all. Probably the biggest issue is treating commodities as commodities, and not as local produce that needs to be re-bid every time a transaction occurs; a futures market would probably simplify things a lot.