Author Topic: [FEAT] Classic Mode  (Read 237 times)

0 Members and 1 Guest are viewing this topic.

Offline WillLem

  • Moderator
  • Posts: 2818
  • Unity isn't sameness, it's togetherness
    • View Profile
[FEAT] Classic Mode
« on: February 14, 2023, 10:13:58 PM »
The following player-assist features will now all be de-activatable in the config menu:
- Skill Shadows (already implemented in NL)
- Clear Physics Mode (done!)
- Direction-select, Walker-select & Highlight Lemming (done!)
- Framestepping (done - this one was very wierd to see in action!)
- Splat ruler & other helper overlays (done!)
- Skill Queuing (done!)

The above will also be Globally hide-able via a single "Classic Mode" checkbox.

The "Classic Mode" checkbox will also affect the following (which, unlike the above, will not be individually customisable):

- Assign-whilst-paused deactivated (done!)
- Min/Max RR deactivated
- No Save/Load State, No Save/Load/Edit/Insert Replay - However, Replays will still auto-save on successful completion of a level (iff the user has Auto Save activated) (done, except Replay mode still activates when a level is Restarted)

(I'm also considering allowing levels to force Classic Mode) Decided against this.

Where I'm up to with this:

:tal-gold: "Classic Mode" checkbox is implemented, and code has been written that will allow it to toggle multiple other checkboxes at the same time. It also saves to user config on exit.

Note that I'll probably change the checkbox labels of the following to something else

:tal-gold: Skill & Projection shadows are no longer toggleable in-game (this effectively means that projection shadows have been removed altogether, but skill shadows can still be turned on and off from the config menu).

:tal-gold: "Hide CPM" checkbox is implemented, working and saves to config. It works by checking for ClassicMode at the point of player input.

:tal-gold: "Hide Special Select (Direction, Walker & Highlight)" checkbox is implemented and working, in a similar way to Hide CPM. It also saves to user config.

:tal-gold: "Hide Frameskipping" checkbox is implemented and working; it requires code for both KeyDown and MouseDown due to the LMB advance 1 physics frame. It saves to user config.

:tal-gold: "Hide Helper Overlays" checkbox is implemented, working and saves to config. it requires code in a number of different places, so is worth keeping track of by FIF "GameParams.HideHelpers".

:tal-gold: Classic Mode also deactivates Assign-Whilst-Paused and all Replay functions except AutoSave on successful completion. Replay mode still activates on Restart - this happens even if a level is Nuked, needs fixing.
« Last Edit: April 21, 2023, 01:01:46 PM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 2818
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SuperLemmix] Introduce Classic Mode
« Reply #1 on: February 24, 2023, 01:21:18 PM »
I need help with coding in Classic Mode. I've thought of various ways to do it, each of which has their own set of problems:

The easiest way I can think of is to simply set a "ClassicHotkeys.ini" file which contains pre-configured hotkeys for all features except the ones that Classic Mode proposes to leave out. This would mean coding in the ability for SuperLemmix to Save & Load hotkey config files, since the user's "MyHotkeys.ini" file would need to be preserved and re-loaded when Classic Mode is not in effect. An elegant solution even if I say so myself, but it would ultimately be possible for the user to simply go in and edit the "ClassicHotkeys.ini" with a text editor, thus defeating the entire purpose. (EDIT: I suppose I could make SuperLemmix check for edits to this file and throw an error, but this seems far too clunky a way around it).

Another way to do it would be to insert code which checks for "Classic Mode" before allowing a user-defined hotkey to access its function. So, the hotkeys would all be preserved, but would effectively do nothing. I can imagine this also being relatively simple, but I'm unsure exactly where to start with it or whereabouts in the project this would need to go - I would definitely need help getting started with this.

Lastly, the most difficult way would be to hard-code "Classic Mode" into each of the various functions themselves. This isn't something I feel comfortable messing with really; I'd need a lot of help to manage this, at least initially.

I know that some people don't see the point in a "Classic Mode" existing, but it's really the way I want to go with this. It's been suggested that I just make the entire engine "Classic Mode", which would admittedly be easier to actually do but very laborious and would cost loads of great features which I still want the engine to have.

However, I'm in a bit of a bind with this, so...

Either I need help getting the code written (preferred), or I'll have to seriously think about culling features (really don't want to do this).



Just for the purposes of discussion, if I was to go down the route of "this engine should be different from NL in its gameplay, so I need to choose which features are best in line with my own gameplay philosophy" (or something less vague!), this is what I'd probably do:

Keep direction select, walker select, assign-whilst-paused (ideally, making an assignment would then unpause the game), athlete info, show used skills and clear physics (hold only).

Allow skill shadows to be toggled on and off in the config menu, but not in-game. I'm reluctant to remove them altogether because they are so darn helpful, but I'd want to essentially frame them as a "Cheat Mode" (or "Easy Mode", if you'd rather), to encourage players to go ahead and try playing without them. Projection shadows, on the other hand, would be removed as they're a step too far down the "picture puzzle" route IMHO.

Remove all helper overlays, splat ruler* and other messy UI items, but maybe keep numbers over hatches, since this could be used unfairly whilst the others can all be either eyeballed or found out via athlete info (in the case of pre-assigned hatches).

*I've never fully learned what the various points on the splat ruler are, but I know they have something to do with different fall heights for different states. This is way too much for a player to have to bother about; if your level requires use of it, it's probably not a very good level.

As for Framestepping, the more I think about it, the more I realise that this would have to go. I'd be happy to try and implement a rudimentary "Fast-Backwards", which would essentially repeatedly perform -4 frame skips; I've already tested to see if this would be possible, and it can be done. This is so mistakes can be rewound, but the fine-tuning of assignments would be taken out of the game.

Replay-after-restart, replay insert mode and fine-editing of replays would also have to go. I'd keep the ability to save replays on successful completion of a level, but that's about it as far as replays are concerned. Saving an unsuccessful replay is basically a backwards framestep, when looking at it from this point of view, so it'd have to not be possible.

Again, I don't really want to do any of this, I'd much rather get help with making Classic Mode a reality.

With Classic Mode as an option, everyone can enjoy SuperLemmix regardless of their preferred "philosophy" (Timebombers notwithstanding: these are a wild card that will be the same for everyone ;P)
« Last Edit: February 26, 2023, 05:25:56 PM by WillLem »

Offline Dullstar

  • Posts: 2073
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [SuperLemmix] Introduce Classic Mode
« Reply #2 on: February 24, 2023, 11:48:25 PM »
Quote
*I've never fully learned what the various points on the splat ruler are, but I know they have something to do with different fall heights for different states. This is way too much for a player to have to bother about; if your level requires use of it, it's probably not a very good level.

I think it has something to do with some very specific weird considerations with splat height from different transition states, e.g. hatch or climbers hitting their heads or something stupid like that. If you're breaking existing content anyway best to find someone who knows exactly what those are and then fix them so the splat ruler can be nice and intuitive like the Lix one.
« Last Edit: February 26, 2023, 05:26:06 PM by WillLem »

Online Proxima

  • Posts: 4494
    • View Profile
Re: [SuperLemmix] Introduce Classic Mode
« Reply #3 on: February 25, 2023, 12:47:57 AM »
The top mark is the height from which a climber can fall safely, which is higher than for a walker because when the climber hits his head, his foot is some distance from the ceiling. You can see this clearly on The Runaround (Redux Quirky 7), where a climber can climb up the inside of the one-way wall and fall safely, but the plain splat ruler (before the extra markings) would suggest that he dies.

The middle mark is for walkers, and the bottom mark is for the initial fall from the hatch.

I completely agree that the markings are a bad idea. I've seen so many people be confused by them or (the most common mistake) think that the full height of the ruler is the splat height for walkers. I can see that knowledgeable players might benefit from the extra markings, but it's not worth the confusion it causes to new players. (Maybe one solution would be to offer different splat rulers as an option, with a plain ruler as default. But it's already customisable by including a different graphic in gfx/helpers.)

I've attached plain rulers (normal and hi-res).
« Last Edit: February 26, 2023, 05:26:15 PM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 2818
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SuperLemmix] Introduce Classic Mode
« Reply #4 on: February 25, 2023, 03:31:07 AM »
Thanks for the explanations, guys. It makes sense why the different markings are needed if a splat ruler is to exist at all.

(Maybe one solution would be to offer different splat rulers as an option, with a plain ruler as default. But it's already customisable by including a different graphic in gfx/helpers.)

I have mine set to just regular walker splat height, and even then I'm not always sure whether it's the last pixel of the ruler or the first non-ruler pixel that's marking the unsafe height.

In fairness, it can be useful for more than just a splat ruler: it can be used to judge where various level pieces are in relation to one another as well.

If anyone fancies giving it a look, I'd be happy to implement a different ruler graphic. Not sure I can make one that snaps to surfaces like the Lix one, though.

Whilst we're on the subject, two things I like about Lix that I'd consider looking at bringing to SuperLemmix (sometime in the very distant future if my coding skills improve drastically) are the Batter and the level Wrap feature - just a thought for now. I've already started working on a set of Lemmings sprites for Lix, and the Batter is one I've already done. Of course, it also requires coding "lemmings that have been hit by the Batter", which is quite a bit beyond what I'm prepared to do at the moment.

Incidentally, I've attached the unfinished 'Lix Lemmings' graphic here, it's unlikely I'll finish this anytime soon because I want to concentrate on coding for now, and some of them just look plain awkward in the conversion. But, you can check out the Lemming Batter, at least! :lemcat:



Meanwhile, with big thanks to namida I'm pleased to report that I've made significant progress with Classic Mode this evening. Along with Hide Skill Shadows (which we already had), I've now added working checkboxes for CPM, Direction/Walker Select & Highlight Lemming and Frameskipping. Next up will be the Helper graphics and then a limit for Replay mode (namely, Replays will only be saved upon successful completion of the level in Classic Mode, and Editing won't be possible).

Once that's done, and after a bit of last-minute tweaking, SuperLemmix will be well ready for an initial RC release! Timebombers will have to wait for now, I think it'd be a bit of a stretch for me to implement at the moment. I'd rather get the player and new editor released and tested as they are, and go from there.

Thanks again for the support so far everyone :lemcat:
« Last Edit: February 26, 2023, 05:26:22 PM by WillLem »

Online Proxima

  • Posts: 4494
    • View Profile
Re: [SuperLemmix] Introduce Classic Mode
« Reply #5 on: February 25, 2023, 08:39:59 PM »
Will classic mode disable skill queuing?
« Last Edit: February 26, 2023, 05:26:29 PM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 2818
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SuperLemmix] Introduce Classic Mode
« Reply #6 on: February 26, 2023, 02:31:08 AM »
Will classic mode disable skill queuing?

Ideally, yes. There are a number of more minor features (like jumping to max and min release rate and, indeed, skill queuing) that feel like they don't belong in Classic Mode, so if I can hide them, I will.

For regular mode, these features will of course still be available.

Some of it is still very much up for debate. I'll implement as much as I can, and when the RC is released I'll respond to feedback about Classic Mode, what's good about it, how it could be improved, etc. It's by no means a finished product at this early stage.
« Last Edit: February 26, 2023, 05:26:38 PM by WillLem »

Offline WillLem

  • Moderator
  • Posts: 2818
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SuperLemmix] Introduce Classic Mode
« Reply #7 on: March 01, 2023, 04:19:37 AM »
I've come a long way with this one. Classic Mode can now do the following:

- Deactivate Skill Shadows
- Deactivate CPM
- Deactivate Direction Select / Walker Select / Highlight Lemming
- Deactivate Frameskipping (includes special skips and slow motion)
- Deactivate Helpers (includes all overlays plus splat ruler hotkey)
- Deactivate Skill Queueing
- Deactivate Jump-to-Min/Max RR
- Deactivate Save/Load State / Save/Load Replay / Edit Replay / Replay Insert Mode
- Deactivate Assign-Whilst-Paused

The above is all tested and ready; there are likely many bugs and edge-cases that I haven't considered, but it all works.

The only feature holding this back (and in fact one of only 2 things holding up an initial release of SuperLemmix) is Deactivate Replay-on-Restart.

Let me be clear: this is not the same feature as "Cancel Replay After Backskip." It's already possible in NL to do this, and yet still have the level's replay load if you Restart the level, in any of the following ways:

- Pressing the Restart button or Hotkey
- Choosing "Retry Level" from the Postview screen
- Exiting all the way to menu or level select, and then choosing to play the same level

The first of these I've sorted; in Classic Mode, hitting Restart button or Hotkey cancels the Replay. No problems there.

The issue is the other two, and they're causing more of a headache than I imagined. Since NL's gameplay structure is basically built on its Replay functionality, messing with anything to do with replays is like diffusing a bomb!

Restarting whilst in-level shouldn't trigger a replay, I'm sure we can all agree that this is not in the spirit of Classic Mode. However, when the player has exited a level, it becomes a bit more complicated.

Firstly, if they've successfully completed the level, of course a Replay should be Auto-Saved and/or the player should be able to save one manually via the "Save Replay" clickable text/hotkey - I still want those who use Classic Mode to be able to save and share replays (maybe it could form the basis of a new challenge?) :lemcat: So, "Save Replay" needs to be left alone, even in Classic Mode. So, for that matter, does "Auto-Save" (a toggleable option which automatically saves a replay upon successful completion of a level).

If the player hasn't completed the level though, it becomes a bit more complicated here. I still want them to be able to save a replay (they may be highlighting a bug, or something which makes the level impossible, or they may just wish to save the replay to review at a later stage). It does mean that players could still "cheat" in Classic Mode and use replay saving-and-loading TAS-style to complete a level, buuut if someone's going to bother to do that, then... whatever, I cba trying to stop it at this stage, and there's more to be lost by outright preventing it.

However, if the player re-enters the level after a non-successful attempt (either by hitting "Retry Level", or via the Level Select screen), I don't want the replay to load.

So, basically, here are the cases I'm attempting to account for:

Case 1: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Save Replay" either by hotkey or mouse click) | Result: Open save replay dialog, go back to Postview screen after saving. Thereafter, usual replay-on-restart behaviour could be allowed in this case, since the player may wish to review the level again and the replay has been manually saved anyway.
Case 2: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Retry Level" either by hotkey or mouse click) | Result: The Replay is cleared and the level is reloaded (so, no red or blue R).
Case 3: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Select Level" either by hotkey or mouse click) >>> Result: Level Select Screen is accessed, Replay is kept in memory until a level is selected; therefore, if the player cancels out of the Level Select Screen, they can still choose to "Save Replay" from the existing Postview (i.e. Level Select doesn't exit the Postview Screen) | If, however, they choose to load a level via Level Select, the Replay is cleared.
Case 4: (ClassicMode active) and (level finished unsuccessfully) >>> (user inputs "Exit to Menu" either by hotkey or mouse click) Result: The Replay is cleared and the Main Menu is accessed.



I've managed to write some code which fully covers cases 2 and 4, and appears to also have cases 1 and 3 covered:

Code: [Select]
if GameParams.ClassicMode and not GameParams.GameResult.gSuccess then
  begin
    fReplayManager.Clear(true);
  end;

However, what happens here is that if the player chooses "Save Replay", the replay is indeed saved, but is for some reason unplayable. It isn't blank, all the level info (I.D, etc) is the same. It just won't play.

I have no idea why...



EDIT:

Tried the following. Getting an "Undeclared identifier" error message on TGameBaseScreen, which I'm hoping is an easy fix because I think I'm on the right track with this one. Going to bed, I'll look at it again tomorrow:

Code: [Select]
if GameParams.ClassicMode and not GameParams.GameResult.gSuccess then
begin
  if not TGameBaseScreen.TryLoadReplay then
  begin
    fReplayManager.Clear(true);
  end;
end;
« Last Edit: March 01, 2023, 04:53:32 AM by WillLem »