16
SuperLemmix / Re: [FEAT] Rewind button / hotkey
« on: July 08, 2024, 04:06:35 PM »
Short answer because busy; prod me for details later.
Making saving/loading of the world faster wasonly 3.5 % for me woth an unclear amount, possibly more, possibly less than 3.5 % during graphical play. But I'm not sure if it's your best bet to start here. You're aiming for 1.5x or 2x, not 3.5 %.
NL creates savestates every 10 seconds. That doesn't sound frequent enough to me. Create another savestate (either one, or a leapfrogging pair) every 10 physics updates (even faster than 1 second) and replace frequently. Reason: With 10 seconds, I had noticeable lag during rewinding on larger NL maps in Wine on 2016 Intel i5-6600. The lag got better whenever timer was barely past a multiple of 10 seconds, and the lag was worst whenever timer was almost at the next multiple of 10 seconds.
NL takes longer for mass-replay verification than Lix. This suggests that you should investigate forward calculation (a.k.a. advancing physics) in NL/SuperLemmix. Reduce the amount of forward calculation (savestate more frequently) or make forward calculation itself better (unsure if that's good idea, or where to start in NL for that). Speedy rewinding requires speedy forward computation from a savestate behind the scenes unless you savestate every physics update, which you are not.
Compression improves space (RAM) but costs time (during compression and uncompression), I doubt that space is your biggest worry. I'd recommend to try something else first. You can look into compression when your strategy is to keep a truckload of savestates.
-- Simon
Making saving/loading of the world faster was
NL creates savestates every 10 seconds. That doesn't sound frequent enough to me. Create another savestate (either one, or a leapfrogging pair) every 10 physics updates (even faster than 1 second) and replace frequently. Reason: With 10 seconds, I had noticeable lag during rewinding on larger NL maps in Wine on 2016 Intel i5-6600. The lag got better whenever timer was barely past a multiple of 10 seconds, and the lag was worst whenever timer was almost at the next multiple of 10 seconds.
NL takes longer for mass-replay verification than Lix. This suggests that you should investigate forward calculation (a.k.a. advancing physics) in NL/SuperLemmix. Reduce the amount of forward calculation (savestate more frequently) or make forward calculation itself better (unsure if that's good idea, or where to start in NL for that). Speedy rewinding requires speedy forward computation from a savestate behind the scenes unless you savestate every physics update, which you are not.
Compression improves space (RAM) but costs time (during compression and uncompression), I doubt that space is your biggest worry. I'd recommend to try something else first. You can look into compression when your strategy is to keep a truckload of savestates.
-- Simon