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: Planet Search Overhaul (07/13/24)

Pages: [1] 2 3 ... 5

Author Topic: Economy Revamp  (Read 42587 times)

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24875
    • View Profile
Economy Revamp
« on: April 20, 2016, 03:36:25 PM »

Blog post here.
« Last Edit: May 15, 2016, 04:34:41 PM by David »
Logged

HELMUT

  • Admiral
  • *****
  • Posts: 1363
    • View Profile
Re: Economy Revamp
« Reply #1 on: April 20, 2016, 04:30:55 PM »

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
[close]

Having "Production" facing "Exports" and "Imports" facing "Demand" feels less confusing. Or maybe it's just me, i just wanted to note it.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24875
    • View Profile
Re: Economy Revamp
« Reply #2 on: April 20, 2016, 05:11:00 PM »

As someone that prefer space ships and explosions, i have to admit this blog post left me a bit apathetic.

Fair enough - it's mostly groundwork, though some aspects of it I think are interesting enough, if not specifically exciting. (And, I should note, this is another case of dev progress overtaking blog posts; the last of the work on the economy revamp was maybe a month ago.)

I guess all of this will become more relevant once we'll get the Industry system though.

Yes!

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
[close]

Having "Production" facing "Exports" and "Imports" facing "Demand" feels less confusing. Or maybe it's just me, i just wanted to note it.

I get what you're saying, yeah. I don't think there's any ideal way to lay it out, though. Exports may be related to imports and not production (if the trade is flowing through the world), and production and demand are often related as well.

I like keeping imports/exports and production/demand paired up because it separates "outside the market" and "inside the market", but there's a degree of personal preference there. (I have to say, the way you've got it laid out confuses me a lot - though, again, personal preference/being used to it being the other way...)

Still, I'll keep what you said in mind, and thank you for the suggestion.
Logged

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Economy Revamp
« Reply #3 on: April 20, 2016, 06:35:30 PM »

Dumb CS question here:  isn't this a perfect task to use a second CPU on?
Logged
Please check out my SS projects :)
Xeno's Mod Pack

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24875
    • View Profile
Re: Economy Revamp
« Reply #4 on: April 20, 2016, 06:58:09 PM »

Dumb CS question here:  isn't this a perfect task to use a second CPU on?

Considered this pretty thoroughly during implementation, as, you're right, at first glance it really does look like one.

One problem is it's regularly updating the effects of market conditions, prices, connection weights, etc. It'd have to either make a deep copy of all of the markets (or make access synchronized, which could be troublesome performance-wise - or it might not, but it'd need to be investigated), and the implementation becomes significantly more complex (which isn't a problem by itself, but also makes it more error-prone).

The other problem is being able to save/load while still keeping this task's data around - you need to pause it when saving, collect the data, and then kick it off at the same point after loading. Again, doable, but painful enough and likely enough to introduce bugs that it's not really worth it. I seem to remember there was some non-obvious problem with doing that, but can't remember what it was - I mean, "pause, save data, resume on load" doesn't sound bad at all.

Also, pausing the game becomes iffy because the econ thread would have to get to a point where it can pause as well, right? Which means that pausing the game repeatedly actually speeds up how quickly each iteration of the simulation is computed. Not a problem if it's working with a deep copy (it'll just wait out its allotted time before copying changes over to the "real" data), but potentially weird if it's not.

On the flip side, making a deep copy seems likely to take a bit more time than you can spare in a single frame, mostly for the market connections, it being a fully connected graph. And if you do it over multiple frames, then what you're copying is changing and that's not good either. Might not turn out to be a valid concern, though - needs investigating.


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.

« Last Edit: April 20, 2016, 07:00:22 PM by Alex »
Logged

Dri

  • Admiral
  • *****
  • Posts: 1405
    • View Profile
Re: Economy Revamp
« Reply #5 on: April 20, 2016, 08:16:20 PM »

Aye, currently the Trading game can't hold a candle to the Combat so a post dedicated to trading isn't going to rile up much - I do understand that you've got to start small to get to the big, juicy stuff though. :)

Imo, it is currently too time consuming and requires too many random events to make a profit from trading and despite all that has been added to the campaign thus far, it is still 90% about building your fleet and blowing stuff up. My hope for the Trade system is not so much about making credits but rather to shape the sector; I want to funnel supplies into Asharu so it can complete it's terraforming! I want to create my own faction or ally with another and provide resources for the production of allied fleets for both defense and invasion! Industry and Trade should allow you to indirectly win battles and claim territory by providing the credits and resources needed to do just that.

Or, ships should become many times harder to come by so that all the time, effort and money needed to build up a market to the point that it can produce the ships you want, would be worth it!
Logged

Auraknight

  • Commander
  • ***
  • Posts: 125
  • I am a Knight of Aura.
    • View Profile
Re: Economy Revamp
« Reply #6 on: April 20, 2016, 10:06:16 PM »

Honestly, the biggest thing I want from this is to actuially be able to 'starve out' a planet if I'm good enough to keep any trade fleets from reaching it. At the moment, my actions against non-millitary fleets feels... unimportant. Most of my trading is either selling loot from spacebattles, or desperately running 1C things from one place, and selling them for 3-5C somewhere else to buy more supplies.
Logged
~Aura be with you

xenoargh

  • Admiral
  • *****
  • Posts: 5078
  • naively breaking things!
    • View Profile
Re: Economy Revamp
« Reply #7 on: April 20, 2016, 11:53:58 PM »

Quote
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. 

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.
Logged
Please check out my SS projects :)
Xeno's Mod Pack

TJJ

  • Admiral
  • *****
  • Posts: 1906
    • View Profile
Re: Economy Revamp
« Reply #8 on: April 21, 2016, 02:28:26 AM »

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.
« Last Edit: April 21, 2016, 02:30:44 AM by TJJ »
Logged

Bastion.Systems

  • Captain
  • ****
  • Posts: 440
  • Special Circumstances LCU
    • View Profile
Re: Economy Revamp
« Reply #9 on: April 21, 2016, 04:35:49 AM »

The economy fools!

I appreciate the fancy graphs, also the news that poorly balanced mod systems might not raise supply prices in the sector to 200-300 per unit would be nice.
Logged

Histidine

  • Admiral
  • *****
  • Posts: 4898
    • View Profile
    • GitHub profile
Re: Economy Revamp
« Reply #10 on: April 21, 2016, 05:08:45 AM »

Oooh this is relevant to my interests.

Brief comments/questions:
  • 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.
  • Is there now any built-in mechanism for correcting or at least compensating for Sector-wide over/undersupply (i.e. too many or not enough market conditions)? EDIT: okay, I see it does dynamically scale back
  • 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.
  • 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?
« Last Edit: April 21, 2016, 06:48:49 AM by Histidine »
Logged

Schwartz

  • Admiral
  • *****
  • Posts: 1454
    • View Profile
Re: Economy Revamp
« Reply #11 on: April 21, 2016, 06:44:54 AM »

tl;dr

Alex, in an attempt to write a transactional subroutine, has recreated the internet and eBay in one fell swoop. Next up: Tri-Tachyon's stranglehold on the search engine market.
Logged

Cycerin

  • Admiral
  • *****
  • Posts: 1665
  • beyond the infinite void
    • View Profile
Re: Economy Revamp
« Reply #12 on: April 21, 2016, 07:39:14 AM »

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... ;)
Logged

ClosetGoth

  • Commander
  • ***
  • Posts: 202
  • Permanently TTRPG-brained
    • View Profile
Re: Economy Revamp
« Reply #13 on: April 21, 2016, 08:03:51 AM »

Is there any indication of how this will affect/be affected by player or npc pirating? Will we see systems shift their purchasing faster, slower? Will it be easier/harder to keep farming the same area, or to see where the trade is happening?
Logged
Starfaring since the very beginning of 2012

CrashToDesktop

  • Admiral
  • *****
  • Posts: 3876
  • Quartermaster
    • View Profile
Re: Economy Revamp
« Reply #14 on: April 21, 2016, 08:11:06 AM »

This is totally off-topic, but has anyone noticed the total lack of comments about this blog post?  Usually there's 3 pages of comments by this time.
Logged
Quote from: Trylobot
I am officially an epoch.
Quote from: Thaago
Note: please sacrifice your goats responsibly, look up the proper pronunciation of Alex's name. We wouldn't want some other project receiving mystic power.
Pages: [1] 2 3 ... 5