Time warping ideas

Right now when you connect your planetarium time is synced with the server time with the TimeSyncerSystem. Once you warp, you create your own subspace and now your planetarium time is computed as: serverTime + extratime defined by your subspace id.


You connect and the server time is "Day 1, 06:30:00" You warp at 2x for 5 seconds so your time is "Day 1, 06:30:10". You send a message to the server specifying your new time. A subspace is created in the server as follows: {subspaceid, player_time - server time} In this example it would be: {1, 10} (subspace id = 1, 10 seconds in the future) This subspace information is sent to your computer by the server so now your subspace id = 1 and your planetarium time is computed as: "Day 1, 06:30:00" (server time) + 10 seconds (taken from the subspace dictionary) = "Day 1, 06:30:10" The original idea was that you warp during an interplanetary trip and once you reach your destination and you are in a stable orbit you can go back to the server time. This would cause the planets to go back in their orbits but as you are in a stable orbit nothing bad "should" happen. Also note that only the vessels in the SAME subspace are drawn.


1) While in a subspace, you can't see other ships. This makes using timewarp for docking rendezvous very difficult. When you leave timewarp and sync, the ships don't reappear. * Possible mitigation for this is to show the ships in other subspaces at their projected point in time, but "phased" out so you can't interact with them. 2) If you're not in orbit when you sync time with the server, the planets may shift, which would make extended trips impossible. You would have to complete all trips before syncing with server time (think: multiple gravity assists for grand tours, etc). This limits you to do trips with only 1 vessel at a time and only sync back once the orbit is stable or you are grounded. 3) Flying with friends can be complicated and difficult. Neither can timewarp without going into a subspace which causes them to disappear from the main subspace. Both people must sync back to server time before they could attempt docking.

Possible solutions

1) Keep a history of the vessel actions.


Vessel under acceleration (atmospheric flight): - Vessel X is at position (0,0,0) on day 1 00:00:00. - Vessel X **STARTS** warping at 2x with the engine at 50% of power while doing maneuvers. - Vessel X **STOPS** warping on day 1 00:01:00 and is at position (10,10,10). - Vessel X do some maneuvers (at 1x) and ends up at position (10,5,5) on day 1 00:02:00. We would receive updates at a fixed interval and the distances between them would be greater than if the ship wasn't warping. Interpolations between updates will have longer interpolation times and we must match the other players planetarium times with the received Vessel X update planetarium time. Vessel without acceleration (warping over 4x does not allow engines turned on): - Vessel X is at position (0,0,0) on day 1 with a vector towards Duna. - Vessel X **STARTS** warping at 10x. - Vessel X **STOPS** warping on day 100 and is at position (1000,0,0). - Vessel X do some maneuvers and ends up at position (1000,10,10) on day 101. We wouldn't do interpolations between day 1 and day 100. We would just let the ship drift towards Duna so the other players that are at Day 1 would see the ship going in a vector towards (1000,10,10) until day 100. From day 100 we would have to reproduce all the vessel X movements Limitations: - This would not allow to time travel backwards. - The "revert to launch" could create some kind of time paradox. A solution would be to just remove the vessel as nothing happened although that could mess up the dockings... - We would have to save in a buffer all the vessel actions and reproduce them to the other clients. Bear in mind that a vessel action is sent at a default rate of 30ms so that would mean that we need some kind of database on the client (SQLite maybe?) to store the huge amount of vessel updates

Existing bugs

1) When you sync to server time, the ship can move slightly, which screws up precise maneuvers. 2) When you sync time, other ships don't show up until you disconnect and reconnect to the server. 3) Revert leaves copies of the ships behind on the server.