[FEAT] Re-inroducing Superlemming!

Started by WillLem, February 14, 2023, 09:44:59 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

Re-inroduce Superlemming mode
- The mode will be available as a checkbox option in the Editor: "Activate Superlemming mode"
- Player-side, when active the framerate cap will increase to {?}, and all physics will move at {?}FPS | OR | the fast-forward button will be activated (least favourable option due to varying speeds)

Where I'm up to with this:

:tal-gold: Superlemming mode successfully reinroduced!




Archived:

Thinking that it might be worth looking at how Superlemming mode worked in Lemmix, old formats NeoLemmix and SuperLemmini, and also have a look at how Lix handles the variable fast-forward speeds.

Here is a useful document about how the application handles when not processing code. This may come in useful when looking at implementing Superlemming mode.

Simon

#1
Quote from: WillLem on February 14, 2023, 09:44:59 PM
how Lix handles the variable fast-forward speeds.

The gist is:

    while true {
        if normal speed {
            advance physics only if it's been >= 1/15 of a second since advancing
        }
        else if normal fast-forward {
            advance physics
        }
        else if turbo-fast-forward {
            advance physics 9 times in a row
        }
        draw to screen
        wait, to heed the desired framerate of 60 fps
    }


The code for this is spread across different areas: The loop is the outermost game loop that runs independently from those speed decisions that only make sense while playing a level. If you'd like, we can look at it together while voicechatting in Mumble.

-- Simon

WillLem

#2
Interesting reply, Simon. Thanks!

Quote from: Simon on February 14, 2023, 10:43:02 PM
advance physics only if it's been >= 1/15 of a second since advancing

Since advancing what?

Quote from: Simon on February 14, 2023, 10:43:02 PM
else if turbo-fast-forward {
            advance physics 9 times in a row

How does this translate to a particular speed, though? Something could be done 9 times in a row but very slowly.

Quote from: Simon on February 14, 2023, 10:43:02 PM
If you'd like, we can look at it together while voicechatting in Mumble.

This would be amazing! We'll sort out a date & time to do this, I'm sure it would be incredibly useful for me and hopefully at least mildy interesting for you :lemcat:

Simon

#3
Quote from: WillLem on February 15, 2023, 12:59:58 AM
Quote from: Simon on February 14, 2023, 10:43:02 PM
advance physics only if it's been >= 1/15 of a second since advancing
Since advancing what?

Since the most recent physics update, regardless of what caused that previous update.

Quote
Quote from: Simon on February 14, 2023, 10:43:02 PM
else if turbo-fast-forward {
            advance physics 9 times in a row
How does this translate to a particular speed, though? Something could be done 9 times in a row but very slowly.

It isn't guaranteed to translate to a fixed real-time speed. The unlikely extreme case would be when a single physics update takes longer than drawing everything to screen.

Most people will manage 60 fps even at turbo-fast-forward, and then it will translate to 9 * 60 = 540 physics updates per second. When you don't manage 60 fps, it's still faster than anything else, and I hope it's sitll fast enough then to not bore anyone.

Singleplayer Lix isn't a dexterity challenge, and the fast-forwards aren't designed to run at a fixed real-time speed. Their speed merely caps at 60 or 540 physics updates per second. If you need to maintain a minimum speed, you'll have to do something else, e.g., frameskipping, than Lix does.

Multiplayer Lix is only runs at normal speed, never at fast-forward. Normal speed in multiplayer features speedup/slowdown to keep the players largely synched with each other, but that's beyond what I explained in the gist.

Quote from: Simon on February 14, 2023, 10:43:02 PM
date & time to do this, I'm sure it would be incredibly useful

This Sunday, February 19th, in the evening? I can manage any of 16:00 UTC, 17:00 UTC, 18:00 UTC, 19:00 UTC, 20:00 UTC.

-- Simon

WillLem

#4
Quote from: Simon on February 15, 2023, 11:55:26 PM
This Sunday, February 19th, in the evening? I can manage any of 16:00 UTC, 17:00 UTC, 18:00 UTC, 19:00 UTC, 20:00 UTC.

That would be great, thanks! Let's start early, I've put 16:00 UTC into my calendar :lemcat:

Simon

#5
All right, 16:00 UTC this Sunday!

-- Simon