## What is generated at "the edge"?

Post

### Re: What is generated at "the edge"?

#31
Dinosawer wrote: To use your planet position example, calculating positions by moving them in real time or in one big bunch is the same computational cost (unless you do dumb things in one of those, but lets not )
So you say doing those calcs only occasionally (when the player could notice) rather than all the time, regardless of anyone noticing, would not decrease computational load?

I'd like to see the rationale for that
Post

### Re: What is generated at "the edge"?

#32
For the systems the player visits (ie that get calculated) there is no difference. You have to get from time t0 to t1. Do it in realtime or in one big step, the computational cost is the same.
If you have to move 100 logs, and you do one a day for a hundred days, or you do hundred in one day, have you done a different amount of work?
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Post

### Re: What is generated at "the edge"?

#33
Dinosawer wrote:For the systems the player visits (ie that get calculated) there is no difference. You have to get from time t0 to t1. Do it in realtime or in one big step, the computational cost is the same.
If you have to move 100 logs, and you do one a day for a hundred days, or you do hundred in one day, have you done a different amount of work?
Take a position easily defined by a function f(t). Is it just as expensive to calculate f(t) every sixty seconds as it is to calculate f(t) sixty times a second?
Now, if you're actually simulating something, that's different. In that case, your argument is correct. But if you're able to abstract something into a time-dependent function,you can absolutely cheapen processing. To use the log analogy, it's like loading logs into a truck. No matter how many logs you put into the truck, it still takes the same time to deliver them. If you wait until there're lots of logs, you can use the truck for other things in between.
Post

### Re: What is generated at "the edge"?

#34
Realtime doesn't mean "with a timestep equal to the framerate", just "calculate new positions at the rate they appear". If you need a position a minute (to have the correct accuracy), you calculate them each minute.
The fact that your game runs at 60 fps is completely irrelevant for the physics simulation.
(for the system you're actually in you then add an interpolation between those positions to make sure your planet doesn't jerk sideways every minute, but the computational cost of that is negligible)
Dinosawer wrote:(unless you do dumb things in one of those, but lets not )
Simulating in realtime at 60fps when you can do it at a step per minute with sufficient accuracy is one of those dumb things I was talking about.

I did my master thesis in computational astrophysics, I know how this stuff works
The LT IRC / Alternate link || The REKT Wiki || PUDDING
Post

### Re: What is generated at "the edge"?

#35
Dinosawer wrote:that would only save CPU for systems the player never visits again, no? You still have to do the simulation, it's just bunched up instead of spread over time. To use your planet position example, calculating positions by moving them in real time or in one big bunch is the same computational cost (unless you do dumb things in one of those, but lets not )
Not quite. I'm suggesting a way -- I'll call it "suspending" a star system -- in which the game can avoid doing any direct* simulation of some star systems at all. And I'm proposing it as a computational optimization that might be needed for game universes that get extremely large, since that's been asserted as an argument against infiniteness via edge-expansion.

* "direct" meaning that there's some LT code that performs some amount of active LOD simulation of a star system itself. That's in contrast to what I earlier called "indirect" simulation, which is when connected systems save a few key bytes of info about a connected system that has been suspended and use that data to fake sources and sinks that the suspended system otherwise would have provided.

It's completely fair to note that this really does mean a suspended star system would become static: it would cease to change while saved out to disk and no longer being directly simulated. Only when a player-faction ship once again gets near enough that a suspended system needs to be directly simulated again -- for its active influence on nearby systems -- would the data for the suspended system be read from disk and local changes extrapolated from its saved state plus the difference in time between when it was suspended and when it was awakened.

But again, I would not expect this technique to be needed when a new game starts. It would only be useful to put part of the game universe to sleep once the player has explored enough to considerably expand (through procedural generation) the original universe and then retreated to the opposite "corner."
Dinosawer wrote:Also, is simulating what a system would provide to other systems not already a simulation of the system (albeit it at a lower LOD)?
Well, I did freely admit that this was a bit of a handwave.

Obviously if the size and complexity of the locally saved data about a connected system that has been put into suspension is too large, then this suggestion would be counterproductive. It only works if there's a small subset of data that lets a system (which, remember, is otherwise at the lowest LOD itself) simulate the most important functions of what a suspended system would otherwise have provided.

I might work this up as a diagram -- because I never tire of cranking out PowerPoint charts at my day job -- but for now here's a sort of text version of the various stages of LOD I'm imagining, shown as a hierarchy of star systems from those nearest the player's ship to those farthest away:
• system contains player's ship (star system is fully realized, including visually)
• system contains ship belonging to player's faction (system is fully or mostly realized, with little-to-no simulation, but with zero graphics)
• system contains ships that player faction ships have interacted with (system is lightly simulated; NPC ship effects are probabilistically accumulated)
• system has never had any interaction with player faction ships or player (system is fully simulated but active; all system outputs are chunked)
• system is Very Far Away from nearest player faction ship (system is put into suspension; nearby connected systems simulate the system's behavior)
This is how things would look at any one moment in time (a "snapshot").

As the player's ship and player-faction ships move between star systems, star systems would switch into and out of these different levels of simulation and, in extremely large universes (whose edges have been extended through procedural generation of new systems), suspension.

As usual, I'll caveat all this by acknowledging that it's just an idea for how phenomenally huge universes might work; these latest comments are not to dogmatically defend the idea (a behavior/attitude I find annoying) but to explain it more since people seemed interested enough to ask questions about it; there are almost certainly better ways to do it; it's probably blindingly, laughably wrong in some places; and it's probably nothing at all like what Josh himself has dreamed up.

Whew.
Post

### Re: What is generated at "the edge"?

#36
Flatfingers wrote: The question I was asking (badly) was, how few jumps away from one of those edge systems should a player ship be able to get before the new-system-generation code gets called?
I thought I've answered this question twice with the same answer. The answer is 2 jumps at the very least. If a new empire is discovered within those 2 jumps then it might be worth expanding the system generation to the rest of the systems for that faction.

The goal as I see it, is to generate enough systems in advance so that the player has the shortest load screens possible and the smoothest game-play experience. I'd prefer it if systems are generated while the player is in the old edge system. That gives the game time to do whatever behind the scenes generation that it needs to while the player is occupied with exploring the new system and looking for a wormhole.
Post

### Re: What is generated at "the edge"?

#37
BFett wrote:
Flatfingers wrote: The question I was asking (badly) was, how few jumps away from one of those edge systems should a player ship be able to get before the new-system-generation code gets called?
Except that you seem to me to be saying two very different things.

You're saying this:
BFett wrote:The answer is 2 jumps at the very least. If a new empire is discovered within those 2 jumps then it might be worth expanding the system generation to the rest of the systems for that faction.
...which sounds to me like "generate new star systems when the player is two hops away from being in an edge star system."

That's basically what I'm suggesting, and I think Cornflakes as well. We're just differing on the number of hops we think may be needed to minimize gameplay pauses due to the time required to generate new star systems (including NPCs and factions).

But you've also (consistently) said this:
BFett wrote:I'd prefer it if systems are generated while the player is in the old edge system.
...which to me sounds identical to, "wait before generating new systems until the player is actually in an edge system."

And that's equivalent to a hop distance of 0!

The number of star systems you generate once you arrive in an edge system is an interesting question -- how many can be generated before the player notices that the game has paused? But that's a different question than the one I'm asking, which is, how few systems away from an edge system should a ship (that can trigger new system generation) be before the system generation code gets activated?

Are you thinking 2 hops before entering an edge system? Or actually being in the edge system? Or something else?

I'm not trying to make you "wrong" here; I'm sincerely trying to understand your opinion on this question.
Post

### Re: What is generated at "the edge"?

#38
Flatfingers wrote:SNIP.
Define 'Edge System'.

And then tell me why it's considered an edge system.

Because I'm confused.
The results of logic, of natural progression? Boring! An expected result? Dull! An obvious next step? Pfui! Where is the fun in that? A dream may soothe, but our nightmares make us run!
Post

### Re: What is generated at "the edge"?

#39
I apologize for sounding inconsistent.

If an "edge system" is defined as the system the player must enter so that generation can take place then it shouldn't appear as if I'm being inconsistent. If however an edge system is the last system generated by the game, then I suppose that would cause the confusion.

Here's a picture of my definition.
Post

### Re: What is generated at "the edge"?

#40
my definition of edge system was that they are the last systems that are actually generated, the ones furthest away form the player and deepest in unknown space that are actually generated.
Post

### Re: What is generated at "the edge"?

#41
BFett wrote:I apologize for sounding inconsistent.

If an "edge system" is defined as the system the player must enter so that generation can take place then it shouldn't appear as if I'm being inconsistent. If however an edge system is the last system generated by the game, then I suppose that would cause the confusion.

Here's a picture of my definition.
So an edge system is a system that is on the edge of the areas that have been generated by the players.

Thanks for the clarification.

Now, clarify this for me. If the Executives have all of the same abilities as a player, what happens when one decides to make like Victor Tombs and start exploring?
The results of logic, of natural progression? Boring! An expected result? Dull! An obvious next step? Pfui! Where is the fun in that? A dream may soothe, but our nightmares make us run!
Post

### Re: What is generated at "the edge"?

#42
That's a very good question Idunno. I personally would limit that specific ability to only the time before the player enters the game. I think there is a technical limitation which would slow down game performance over time if too much exploration occurred at once and the game had to track it all. However, if it was possible to do in low enough detail that it didn't harm the game after say, 20 hours of play, then I would certainly not mind having the feature.
Post

### Re: What is generated at "the edge"?

#43
BFett wrote:That's a very good question Idunno. I personally would limit that specific ability to only the time before the player enters the game. I think there is a technical limitation which would slow down game performance over time if too much exploration occurred at once and the game had to track it all. However, if it was possible to do in low enough detail that it didn't harm the game after say, 20 hours of play, then I would certainly not mind having the feature.
I hope the A.I explores.

It would terribly immersion breaking to be the only one making contact with new civilizations.

Maybe have a very specific A.I mindset that decides to go explore? With the rest doing what the A.I does?
The results of logic, of natural progression? Boring! An expected result? Dull! An obvious next step? Pfui! Where is the fun in that? A dream may soothe, but our nightmares make us run!
Post

### Re: What is generated at "the edge"?

#44
Idunno wrote:I hope the A.I explores.

It would terribly immersion breaking to be the only one making contact with new civilizations.
Remember that that's close to being one of the questions I asked: who can cause new systems to be generated?

If NPCs who explore can't (under some controlled circumstances) cause new systems to be generated, but players who explore can, then that's an exception to the "NPCs can do whatever players can do" design goal.

(Obviously there are other exceptions, such as "NPCs can't save and reload their game," and that's fine. Perfect 1:1 equality is not required. A reasonable effort at similarity in verb-usage would be great, and a heck of a lot more than most games offer.)

As for "what's an edge system?" let me de-spoilerfy Cornflakes's excellent diagram:
Everything in red is an edge system. So the question is, how few systems away from one of those systems (in red) at the edge of the existing universe should a triggering ship be before new systems get created beyond the nearest edge systems?

Zero is not necessarily an incorrect answer. If the system generating code is crazy fast, then it's OK to do this when the player's ship (for example) actually does enter an edge system. For that matter, as I suggested earlier, LT could cheat a little and do the new system generation while the player is traveling through a wormhole toward an edge system. To the player, it would just appear as though the travel time was a little longer than usual... and even that could be made imperceptible by always randomizing wormhole travel time slightly.

If generating new systems does take some perceptible time, though, then that's when I'm guessing the number of hops may need to be > 0. That way LT can start the new system generation routine well before the player enters what had previously been an edge system. That system will then already be starting to interact with the newly-created systems beyond the previous edge.

Oh, and one other quirk: it may be that the things that are at the "edge" of the universe aren't individual systems at all, but entire sectors containing multiple systems.

In that case, same question: how few hops away from an edge sector can a triggering ship be before the new sector-of-many-systems code is called?
Post

### Re: What is generated at "the edge"?

#45
May I suggest a relevant, if old, proposition for the generation of new system clusters and LOD handling. See "universe" and "cluster" titles on the top, and here them here for more details on the clusters.

### Online Now

Users browsing this forum: No registered users and 7 guests