Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.95a is out! (03/26/21); Blog post: Of Slipstreams and Sensor Ghosts (09/24/21)

Pages: [1] 2

Author Topic: OOS simulation  (Read 5255 times)

PCCL

  • Admiral
  • *****
  • Posts: 1996
  • still gunnyfreak
    • View Profile
OOS simulation
« on: October 19, 2013, 02:31:43 PM »

I'm wondering, as is right now, how is OOS (Out Of System) simulations handled? Are they being ran at full detail? What kind of resources are they taking up? 2 systems seem ok so far, and ironclad's 24-ish (?) works fine at least on my comp (albeit taxing on memory), but alex was talking about 1000 or at least 200-300 systems, is full detail simulation still gonna work at that point?

idk, it just came to me while playing X3 earlier today... not quite sure how things are gonna work or if plans are in place for things like this
Logged
mmm.... tartiflette

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19207
    • View Profile
Re: OOS simulation
« Reply #1 on: October 19, 2013, 02:56:23 PM »

It's a good question; I don't have a definitive answer for exactly how things will work when there are a few hundred systems in play. Will see just how big a strain it is to run the way it's running now, and do whatever seems appropriate :)

Right now what it does is run every location the player's not in at 10x the step size. For example, if the player's location is running at 60fps, everything else is running at 6 fps (staggered, and with 10x the duration advanced each frame). So it's lower fidelity but not to the point where that should make a noticeable difference.
Logged

Gothars

  • Global Moderator
  • Admiral
  • *****
  • Posts: 4306
  • Eschewing obfuscatory verbosity.
    • View Profile
Re: OOS simulation
« Reply #2 on: October 19, 2013, 03:33:05 PM »

That leads me to the question: What will happen with hyperspace once there a hundreds of systems it has to connect? As it is now it would be awfully overcrowded with inter-system traffic, would it not? Will there be multiple hyperspace instances? Or will it simply only render things up to a certain distance from the player with full framerate?
Logged
The game was completed 8 years ago and we get a free expansion every year.

Arranging holidays in an embrace with the Starsector is priceless.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19207
    • View Profile
Re: OOS simulation
« Reply #3 on: October 19, 2013, 03:39:44 PM »

Or will it simply only render things up to a certain distance from the player with full framerate?

As far as rendering, it already only renders things that are on-screen.

The main potential problem there is if there's so much stuff in hyperspace that advancing it a normal step size/frame rate wouldn't work. That, in turn, depends on how long, on average, fleets spend in hyperspace vs in-system. But, you know, we'll see if it's an actual issue. Performance-related things can be pretty difficult to predict, oftentimes what you initially expect to cost a lot is actually trivial for one reason or another.
Logged

miljan

  • Commander
  • ***
  • Posts: 105
    • View Profile
Re: OOS simulation
« Reply #4 on: October 19, 2013, 03:51:36 PM »

Hmm, will we be able to chose how many system are there, or the size of the "map" so we can have some control to chose small maps for people that have bad comps?
Hope my crappy comp will be able to run it
Logged

VerifiedN

  • Ensign
  • *
  • Posts: 29
  • A random person on the internet.
    • View Profile
Re: OOS simulation
« Reply #5 on: October 19, 2013, 05:42:25 PM »

The current method will undoubtedly not scale well. Though you can simulate 'inactive' sectors fairly easily by boiling activity down to sparingly processing a numerical fleet type/faction/power/speed/depletion/target entity/position list (and then just randomizing details such as exact fleet status if the sector becomes 'active'). You lose detail there, but nothing noticeable considering it'd only be done for distant sectors the player can't reach quickly (nearby sectors could continue using the current method).

The issue of the hyperspace map becoming overcrowded (and possibly laggy due to that) could be resolved by introducing a distance beyond which other fleets are non-detectable and switch to the list method, and back should their coordinates update to coincide with the player's detection range (at which point they're placed at the edge of that range as close as possible to their listed position).

No idea how difficult that could be to put together, but it's food for thought.
Logged

PCCL

  • Admiral
  • *****
  • Posts: 1996
  • still gunnyfreak
    • View Profile
Re: OOS simulation
« Reply #6 on: October 19, 2013, 05:51:01 PM »

I don't know, it might scale well enough. as it stands, in OOS 6fps is a lot, if need be, maybe even 10 times that step size (0.6fps/1.67spf) actually sounds reasonable, therefore from a purely simulation standpoint 300 systems will have about the load of 30 as is (assuming simulation doesn't get more complex, but then optimizations are probably also being done along the way). It actually doesn't seem that bad...
Logged
mmm.... tartiflette

VerifiedN

  • Ensign
  • *
  • Posts: 29
  • A random person on the internet.
    • View Profile
Re: OOS simulation
« Reply #7 on: October 19, 2013, 11:08:11 PM »

I don't know, it might scale well enough.

The current system does help CPU load a great deal, but the amount of memory the game needs (and the amount of processing overhead on that data - increasing simulation step size/rate will do nothing to reduce encounters) will continue growing as more systems are added; something will definitely need to be done about that eventually, especially if it gets anywhere near the 32-bit memory limit.
Logged

Thaago

  • Global Moderator
  • Admiral
  • *****
  • Posts: 5817
  • Harpoon Affectionado
    • View Profile
    • Email
Re: OOS simulation
« Reply #8 on: October 19, 2013, 11:30:57 PM »

It seems strange to me that lots of systems should add much to the memory... how big are fleets in memory anyways? All my internal rules of thumb from this sort of thing are from low level languages where the object memory cost overhead is low to non-existent, so I don't even know how to estimate.
Logged

PCCL

  • Admiral
  • *****
  • Posts: 1996
  • still gunnyfreak
    • View Profile
Re: OOS simulation
« Reply #9 on: October 20, 2013, 01:25:13 AM »

judging by how much of the save file they take up, fleets are a huge part of the memories (assuming that translates to the RAM use in game at all)

So it's really not much about more systems, but the fact that fleets populate these systems
Logged
mmm.... tartiflette

Zaphide

  • Admiral
  • *****
  • Posts: 799
    • View Profile
Re: OOS simulation
« Reply #10 on: October 20, 2013, 01:34:16 AM »

judging by how much of the save file they take up, fleets are a huge part of the memories (assuming that translates to the RAM use in game at all)

So it's really not much about more systems, but the fact that fleets populate these systems

Yeah this is my experience with Exerelin. Sheer number of fleets (and stuff that is in those fleets such as CR for every member, buffs, repair trackers etc) seem to constitute a massive amount of the save file. I suspect this translates pretty much directly into RAM usage.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19207
    • View Profile
Re: OOS simulation
« Reply #11 on: October 20, 2013, 01:55:52 PM »

Yeah, I think it's safe to say that the amount of detail actually saved for non-player fleets is excessive. It currently saves the state of every single armor plate, for crying out loud - just for damaged ships, but still. (Why? It works fine for vanilla; and optimizing without knowing exactly how you'll be using something is not a good way to go about it.)

The good news is there'll be plenty of relatively easy things to change to improve the situation once vanilla gets more systems.
Logged

LarvaLounge

  • Ensign
  • *
  • Posts: 48
    • View Profile
    • Email
Re: OOS simulation
« Reply #12 on: October 21, 2013, 05:19:02 AM »

This is an issue I've thought about as well.

I'm no programmer, but...
reading "Explore hundreds of star systems" on the front page...
and playing a 24 system Exerelin campaign...

Yeah, something will have to change.
Logged

miljan

  • Commander
  • ***
  • Posts: 105
    • View Profile
Re: OOS simulation
« Reply #13 on: October 21, 2013, 07:49:28 AM »

I dont understand why is Out Of System done almost same as the in system?
Why not make it something simple like in SPAZ or something where you just get a list of planets where you can travel.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 19207
    • View Profile
Re: OOS simulation
« Reply #14 on: October 21, 2013, 08:08:29 AM »

Because there are *two* systems right now in vanilla, and premature optimization is the root of all evil.

Yeah, something will have to change.

Duh? :) What I mean is, if this is a concern, it probably needn't be.
« Last Edit: October 21, 2013, 08:28:17 AM by Alex »
Logged
Pages: [1] 2