Asteroid spawning implementation

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
jaylawl
Fast Inserter
Fast Inserter
Posts: 175
Joined: Sat Nov 23, 2024 10:14 am
Contact:

Asteroid spawning implementation

Post by jaylawl »

What is known about this topic?

I would love some deeper, technical knowledge about asteroids. I'm especially interested in asteroid spawning behaviour. I'm sure all of you have already observed that:
- asteroids seem to mostly spawn in front of the platform
- few asteroids spawn in such a way that they approach the sides of the platform
- no asteroids (other than harmless chunks) will ever hit the back side of the platform, where engineers usually place their thrusters

However, these are merely observations. Are there any facts available on this? Preferably facts extracted directly from the coding of the game. This would help a lot with detailed platform building / balancing.
mmmPI
Smart Inserter
Smart Inserter
Posts: 3974
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Asteroid spawning implementation

Post by mmmPI »

That seem a good topic for a future FFF, given the several rounds of optimizations that occured, and the cryptic curves on the factoriopedia that leaves players wondering if the m is for minutes or meter endlessly.

I think your observations are incomplete,as you had some luck for now, but one time your ship will not be moving and you will encounter asteroids from all sides , including the back !

This just doesn't occur on Nauvis, where only harmful asteroids exists, but otherwise, they do spawn from all direction when the platform doesn't move, such as a static platform orbiting above a planet that isn't Nauvis. ( This is visible on editor if you increase speed a lot, it look like your platform attract them like a lightbulb with insects).

When travelling it's a bit particular because i think then no asteroids will ever "catch up" with your ship. Those that are spawn "behind" it, will just be left behind, whereas there will constantly "new" asteroid spawned in the front of your ship". So it look like what you observed. Maybe also the game just doesn't spawn any in the back for optimization/ common sense purposes.

But when you "stop" a ship , it start to drift backward if it happens during the first half of the trip, and this is something that could cause some asteroid to seemingly come from the back.
HadesSupreme
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Fri Nov 03, 2017 3:53 pm
Contact:

Re: Asteroid spawning implementation

Post by HadesSupreme »

I've definitely taken damage on my sides. I suspect it was from an asteroid that was destroyed and one of the pieces gained a horizontal velocity.
jaylawl
Fast Inserter
Fast Inserter
Posts: 175
Joined: Sat Nov 23, 2024 10:14 am
Contact:

Re: Asteroid spawning implementation

Post by jaylawl »

I love the idea of having a deep dive FFF about this.

The observations i made and listed in the OP were pretty much exclusively about stationary platforms. Of course no platform is in danger of being hit from the back while moving at any speed. And the faster you are travelling the less likely your sides are to be hit by anything (assuming a design that is mostly a flat line going between the front and the back).

But asteroids will most certainly spawn with a sideways velocity and hit your sides unless they are defended. Far fewer than are coming in the front, sure - but the sides require defense.

Some numbers on this matter by the devs in an FFF would be fantastic.
Georodin
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sat Jan 04, 2025 5:25 am
Contact:

Re: Asteroid spawning implementation

Post by Georodin »

Yeah, I noticed when building just in one Dimension really flat, then it will mess with the spawn direction of the asteroids when stationary.
Like my ship is atm 7:1 in width and the asteroids only spawn with left and right velocities.
Guess the lower the ratios, the better? Idk yet, think meta is slow flying between planets for farming, so a wider width ratio is beneficial.
Post Reply

Return to “Gameplay Help”