Hey again McDonald,
Sorry, my explanation, may have been a bit vague in places.
So, here's what should happen in a single tick:
[TICK START]
// First we advance the RealShip by one time-step.
Every tick: RealShip.state = updateFormula( RealShip.state )
// The ship's "state" information is its XY position, and XY velocity.
// Given the current "state", the "updateFormula" computes the new state for the next time-step.
// // I'm using updateFormula as a shorthand here, in your actual code it may be a block of two or more events.
// Now we prepare the ghost ship to execute a simulation of several future time steps.
// First we set the ghost ship to match the real ship's state, (XY position, and XY velocity).
Every tick: Ghost.state = RealShip.state
// Now we're ready to start the simulation.
// We'll run 100 iterations, and with each, the ghost will advance 1 time-step into the future.
// (Note that the tick has not ended yet.)
Loop from 1 to 100:
// We update the Ghost, just as we would update the real ship.
// Critically, we feed the Ghost's state to the updateFormula, and NOT the RealShip's state.
[sub] > (always): Ghost.state = updateFormula( Ghost.state )
[sub] > (always): Ghost spawns a dot object.
// The ghost has now plopped down 100 dots.
[TICK END]
Essentially, you'll be triggering the same time-advancing code that Construct would trigger each tick (frame-draw), but you're not waiting for Construct. You're manually triggering the code 100 times before the tick ends and the frame is drawn. You're just doing it with a ghost copy of your ship.
As for working with player controls, when the simulation is updating the ghost ship, you can have each loop iteration update the ghost as if the player is continuously holding down the same controls that were used when updating the real ship.
Hope that helps out.
Variation
As an alternative variant of the above approach, you could conceivably run the simulation with your real ship, and not even bother using a ghost ship.
You would need to store the state of the real ship after its update, but before starting the simulation, so that you could recall the real ship back to its proper pre-sim state, before executing any remaining code in the tick.
Thus, even if during the simulation the real ship collides with a lethal object, you'll still be inside the sim loop, and none of your collision handling or ship-exploding code will be running yet. So as long as you put the real ship back, by the time your collision handling code runs, it will never know the ship "time traveled" into a future hazard.
... And witnessed its own death! D:
Also, dang it R0J0hound, how are you always using a newer version of construct than me.
I swear, I learn about C2 updates from clicking on your examples.
I probably need to enable beta updates, huh.