Author Topic: Stats to show during play (hatch, saved, required, ...)  (Read 1123 times)

0 Members and 1 Guest are viewing this topic.

Offline Charles

  • Moderator
  • Posts: 44
    • View Profile
Stats to show during play (hatch, saved, required, ...)
« on: October 25, 2021, 05:33:27 PM »
Responding here to keep the code discussions out of the release thread.

The new enhanced status bar is a great addition to SL, nice work! :thumbsup:

Please can you let me know whereabouts this is in the code?

I'd like to see if I can combine the "required" and "exited" info into one bar entry, so that it shows a minus number in red until the save requirement is reached, and then continues to count up as more lemmings exit. NeoLemmix shows the information in this way, and it definitely seems to make more sense than having the two numbers separate (especially since the top menu bar shows the number of lems to be saved anyway).

I'd also like to see if I can modify the original status bar to display the number of lemmings remaining in the hatch. If you like this idea, it could also be added to the Enhanced bar as well. This is what I'd be aiming for eventually (the current Enhanced status bar could show this information using the existing icons that you've already added):

IN: lemmings still in hatch, yet to spawn (hatch icon)
OUT: lemmings on the screen (lemming face icon)
HOME: lemmings saved - save requirement (exit icon)



Alternatively, the save requirement could be left off the status bar altogether, and HOME could simply display the number of lems saved. The red figures could instead be used to show when too many lemmings have died; i.e. the OUT number could turn red if there aren't enough total lemmings available in the level for it to be completed (taking hatch lems into account as well).

This would removed the need for minus figures, and also removes potential confusion when a player has saved X lemmings, but the OUT display shows X - n (n being the level's save requirement). This can occasionally cause confusion in NeoLemmix, until one remembers that the display is showing the total saved - the save requirement.


Check out /src/lemmini/LemminiPanel.java:line 801
The original code is surprisingly simple... it is just a text string (converted to the green lemming font), with appropriate space padding to fit where needed. (That's what the %-15s means, for example... a string with 15 spaces padding)).

There's some leftover dead code where I tried to put the Required total into *that* line, but it didn't look great.

To use the icons (and the red highlighting) I chose to draw each element individually, then place it in the appropriate place, so there's a lot more code needed.  I also needed to add a new graphic file to root.lzp, for those 4 icons.  (Technically, it didn't need to be included in root.lzp -- I could have just included it in my local resource path in the right folder structure or it's own .lzp file, but for the redistributable, it was much easier to just have it in root.lzp.)

I don't mean to be dismissive to your ideas, so please forgive me if it comes across that way. A lot of what you're saying were things I considered before settling on what I did for the status bar. I'd like to take a second and remark on them.  That said though, I know you've been involved in the SuperLemmini community far longer than I have (and have been very welcoming to me, so thank you). I know you have a bunch of ideas you've wanted to see implemented for a long time, and I'm happy to help you implement them yourself however I'm able.  SuperLemminiToo is really just changes to things that stuck in my own craw.

Honestly, I'm not really concerned with with NeoLemmix does. I admit I've only used it once -- and that was before they added hi-res lemmings, but the whole thing felt over-cluttered and unnecessarily complicated ... like just 1 bridge too far removed from the original lemmings I grew up with.  Almost like a Lemmings Speed-Runners tool or something.  I'm making changes to SuperLemmini that I personally feel lend themselves more to casual players with a nostalgic familiarity with the original Lemmings -- or at least to me as a casual player who can be quite nostalgic.  Negative numbers in the status bar don't really feel intuitive to me, but to each their own.

Technically speaking, as you mentioned, the Required number isn't needed on the game screen anyway, because it is there in the title bar... and they tell you in the intro screen, too. But who really reads the intro screens anyway?  And the title bar is more akin to Metadata as far as I'm concerned. It's outside the game window and if a fullscreen mode is ever implemented then the Metadata dissappears. Truthfully, it is essential information that you need during the course of the level, so it should be there in some capacity.

I like showing it as a fixed "required" number because that's how it's shown everywhere else... metadata in the title bar, line on the intro screen.  If you have "Never show percentages" turned off then that number shows as a percentage. I like it for those connections to the original, rather than a complicated backwards counter or something.

Also, turning the Out number red if too many have died doesn't feel right either... and what about edge cases where technically you have enough lemmings out, but one of them is a blocker and you have no way to make him a walker again? Should the engine detect those possibilities?  Too much programming guess work for something I personally feel doesn't help the player anyway.

Even the icons themselves, yes... the exit icon would be equally appropriate for "Required" as for "OUT"  but the SNES/Genesis used them for "OUT" so in keeping with that continuity, that's what I did too. The Lemming head is a pretty weak connection to "Required" but oh well.  With it being a fixed number that matches what's said on the intro screen I assume new players will catch on to what it means quick enough.

Offline WillLem

  • Moderator
  • Posts: 2423
  • "The truth is..."
    • View Profile
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #1 on: October 25, 2021, 09:27:13 PM »
Quote from: Charles
Honestly, I'm not really concerned with with NeoLemmix does ... the whole thing felt over-cluttered and unnecessarily complicated ... Almost like a Lemmings Speed-Runners tool or something

That's pretty much what I thought as well the first time I saw NL, I guess I've just gotten used to it over the past couple of years. Some of its tools (and indeed the version of the Lemmings game it presents) are indeed very far-removed from the original Lemmings video game (deliberately so, according to the devs). However, there are one or two features which mainly just feel like helpful enhancements rather than out-and-out upheavals, and a way of displaying hatch lems, screen lems, required lems and exited lems in a single status bar seems like a good idea to me.

Quote from: Charles
Negative numbers in the status bar don't really feel intuitive to me, but to each their own.

I agree here to be honest. NeoLemmix still catches me out occasionally when I'm going for a max saved result and I think I've saved less lems than I actually have. Sure, the postview screen always puts the player right, but NeoLemmix encourages gameplay to continue within the level itself for as long as possible before exiting to the postview screen, so... yeah, the negative numbers aren't the best way to do it, we can agree there.

Quote from: Charles
the Required number ... it is essential information that you need during the course of the level, so it should be there in some capacity.

I like showing it as a fixed "required" number because that's how it's shown everywhere else

We can agree here as well, for sure.

I also fully agree more generally that the SuperLemmini project should exist as a "legacy/classic" Lemmings engine with as few "modern" features as possible. I do like what you've done, but ultimately I just think that a way of showing lems-in-hatch is still needed somewhere.

Quote from: Charles
the exit icon would be equally appropriate for "Required" as for "OUT"  but the SNES/Genesis used them for "OUT" so in keeping with that continuity, that's what I did too

I think we actually both have the same idea here, i.e. that the exit icon is used for "lemmings exited". It's the "OUT" part of it that's getting confused:

In fact, the "OUT" text always referred to "lemmings-in-level", and "IN" always referred to "lemmings exited" on classic platforms which used text rather than icons. The Windows 95 version (on which SL is based) changed "IN" to "HOME", which I thought was a definite improvement, but they missed a trick not keeping the "IN" around somewhere to indicate "lemmings in-hatch."

I've always thought that the best of all these ideas could be combined as IN, OUT and HOME to give the player all of the information they need. After reading your response to the initial idea, I think this could be the best overall outcome:

IN - Hatch icon - Lemmings yet to spawn
OUT - Lemming head icon - Lemmings on-screen
HOME - Exit icon - Lemmings exited / Lemmings required*

*You could then display these two numbers as a fraction. So, a level requiring 10 would show 0/10, and the number on the left could count upwards whilst the number on the right stays fixed (I would suggest putting that number in blue).

This allows all information to be displayed in an intuitive left-to-right manner, without adding any extra icons. Here's a mockup to show how it could look:





Let me know if you like the idea and I'll have a look at coding it (if I can!).
« Last Edit: October 25, 2021, 09:33:12 PM by WillLem »

Offline Proxima

  • Posts: 4422
    • View Profile
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #2 on: October 25, 2021, 10:33:55 PM »
Responding here to keep the code discussions out of the release thread.

So now the UI discussion has taken over the coding thread :P

I've always thought that the best of all these ideas could be combined as IN, OUT and HOME to give the player all of the information they need.

Previous discussion threads that led to changing the NeoLemmix UI to its current state: #1 and #2 (and there was at least one more, which I'll try to find for you).

The main points that were raised:

* Being able to see the save requirement during play, instead of having to remember it, is crucial. Not having this is a bad misdesign in the original game.
* The most important stats are the number of lemmings available (i.e. still in hatch + on level) and the number still remaining to be saved (original save requirement - already saved). Comparing these allows the player to know whether they have enough lemmings remaining to pass the level.
* It's desirable to have (lemmings still in hatch) as a separate display item, rather than just showing the total (in hatch + on level), because this allows the player to know when the last lemming will come out. This leads to the conclusion that the minimum number of stats to show is three.

NeoLemmix made the decision to stick to only three stats -- combining (original save requirement) and (already saved) into a single number by just showing their difference -- because the left portion above the skill bar is given to displaying the status and number of the lemmings under the cursor, e.g. "WALKER 2". If you feel SuperLemmini can do without that display, you can fit in four stats, including separate displays of the save requirement and number saved. I agree that it's clearer.

(Lemmings on level) is not important by itself, but only important because displaying it together with (lemmings in hatch) allows the player to compute the important stat, (lemmings available). Consider sparing the player this bit of mental arithmetic by displaying (lemmings available) directly, with the lemming icon.

Offline WillLem

  • Moderator
  • Posts: 2423
  • "The truth is..."
    • View Profile
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #3 on: October 25, 2021, 11:05:20 PM »
Consider sparing the player this bit of mental arithmetic by displaying (lemmings available) directly, with the lemming icon.

That's exactly what I'm proposing. The hatch icon only remains relevant until all lems have spawned, at which point the lemming head icon shows all available lemmings. I think that displaying these separately initially is important, tbh.

Otherwise, the number of total lems available would have to be fixed, only decreasing when lems either die or exit. This isn't helpful to the player, since they just see a fixed number with no apparent meaning. If they can see icons with numbers which change as lemmings enter the level, this makes much more sense.

Offline Proxima

  • Posts: 4422
    • View Profile
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #4 on: October 25, 2021, 11:22:08 PM »
That's exactly what I'm proposing.

No, your proposal is that the middle stat displayed, the lemming head icon, is (lemmings on level). My proposal is that it is (lemmings available) = (lemmings on level + in hatch). You are of course correct that when (in hatch) = 0, these are equivalent.

Quote
Otherwise, the number of total lems available would have to be fixed, only decreasing when lems either die or exit. This isn't helpful to the player, since they just see a fixed number with no apparent meaning. If they can see icons with numbers which change as lemmings enter the level, this makes much more sense.

The first stat, (lemmings in hatch), will decrease as lemmings enter, so it's obvious that this tracks the number of lemmings in the hatch. We don't need two stats to track that.

Offline WillLem

  • Moderator
  • Posts: 2423
  • "The truth is..."
    • View Profile
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #5 on: October 26, 2021, 01:20:28 AM »
OK, after a fairly productive evening (and a little help from Pooty), the following has been achieved:



Here's the code:

Code: [Select]
                            boolean showMax = true;
                            String status;
                            String hatch = Integer.toString(GameController.getNumLemmingsMax() - GameController.getNumLemmingsOut());
                            if (showMax) {
                                status = String.format("%-8s IN %-3s OUT %-3d HOME %s/%s TIME %s", lemmingName, hatch, GameController.getNumLemmings(), in, rescue, GameController.getTimeString());
                            } else {
                                status = String.format("%-8s IN %-3s OUT %-3d HOME %-3s TIME %s", lemmingName, hatch, GameController.getNumLemmings(), in, GameController.getTimeString());
                            }
                            int yOffset = LemminiFrame.LEVEL_HEIGHT + 8;

So, this is just for the non-enhanced panel. IN shows lems still in hatch, OUT shows lems out on the level, and HOME shows lems exited/lems required (currently displayed as a percentage).

The first stat, (lemmings in hatch), will decrease as lemmings enter, so it's obvious that this tracks the number of lemmings in the hatch. We don't need two stats to track that.

I've also tried to adapt the code as per Proxima's suggestion, but there currently isn't a method for displaying the total number of available lems; for instance, to get the number of lems in the hatch I had to get "Max lems in level - lems out on screen". I tried then creating a new variable called "available", which calculated "hatch + lems out on screen", but this crashed SL. I'll keep looking and see if there's a way to do it.

Ultimately, though, since the text is IN and OUT, it seems more useful to show which lems are in the hatch and which lems are out in the level. There may be a number of reasons why a player would need this information at a glance, and it means not changing the text. For the icon view though, I agree that Proxima's suggestion may make more sense.

Next thing to do is figure out how to display the save requirement in LemmFont.Color.BLUE, and then move the skill panel to the left a bit, and stretch the minimap frame to fill the remaining available space. It'd also be great to get the time to display in red when it gets to 0:59. I've found the parts of the code which deal with these, but have basically no idea how to achieve any of it at present. As Pooty said, these all open up various project rabbit holes.

(Here's what I'm ultimately aiming for):





Watch this space, and please offer advice if you can! Thanks :lemcat:

« Last Edit: October 26, 2021, 01:30:38 AM by WillLem »

Offline Simon

  • Administrator
  • Posts: 3284
    • View Profile
    • Lix
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #6 on: October 26, 2021, 07:16:04 AM »
There may be a number of reasons why a player would need this information at a glance

Then please tell me a use case that (hatch, out) serves better than (hatch, available).

The reasoning for (available) over (out) is in the NL threads that Proxima linked: #1 and #2; the gist is:
  • You never need to know (out) directly for anything.
  • To compute the number that really interests you, which is how many more lemmings you can lose, (hatch, available, saved, required) is a better source than (hatch, out, saved, required).
  • You can consider to print (number of lemmings that you can still lose) directly, but sensibly only at the cost of removing any single one of (hatch, available, saved, required) and that cost is too high. Bonus reason that I thought of today: And there is no good icon for (number that you can still lose).
Please hack those arguments to pieces first before you decide against (available a.k.a. out+hatch). Read the threads for other people's arguments. Especially Nepster disagreeing with me. I didn't give enough weight to (hatch) at first in 2015.

With 4 stats besides the timer, I would print (hatch, available, saved, required).

It's sensible to re-chew this design now, 6 years after we put it in NL and Lix.

Quote
Ultimately, though, since the text is IN and OUT, it seems more useful to show which lems are in the hatch and which lems are out in the level.

IN and OUT are terrible names. Ditch immediately, or at least give it less weight in the argument about what numbers are important. IN and OUT are so bad that different ports interpret them completely backwards to what DOS L1 does, and it takes such a thread to uncover the true damage.

"out in the level", what? Better write OUTIN then?

I have no good idea for better short text. Should somehow be about lemmings. ("have" or "available" are not specific, what kind of resource does it mean that is available.) To conserve space, I'd use the icon.

Quote from: Charles
I like showing it as a fixed "required" number because that's how it's shown everywhere else... metadata in the title bar, line on the intro screen.

Consistency is a strong argument, yes, to print (saved, required) as two figures.

NL had massive space problems in the typesetting with the gigantic DOS letters. (saved − required) came from the need to save space and declutter the UI.

There is some saving grace in that (saved − required) is exactly the negative of what's printed elsewhere, (required). Or you can print (required − saved) and do something completely different once that would become negative.

Quote
If you have "Never show percentages" turned off then that number shows as a percentage.

Consider to invert the option to "Show save requirement as percentage". Reason: UI guideline to always word boolean options as a positive. User shouldn't check the box for something not to happen. Source: E.g., Nielsen, item 7.

-- Simon
« Last Edit: October 26, 2021, 07:43:21 AM by Simon »

Offline Proxima

  • Posts: 4422
    • View Profile
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #7 on: October 26, 2021, 03:51:55 PM »
To conserve space, I'd use the icon.

Sorry to pile on you, WillLem, but I can't help observing: your mock-up shows that space is too tight. There may be up to 100 lemmings under the cursor; one may be a builder (more letters than walker); there may be up to 100 in the hatch or on the level (though not both at once, unless SL permits lemming counts over 100?) and the percentage saved and required may, of course, be up to 100.

If you want to show four stats and keep the "WALKERS 2" counter, you will have to use icons instead of "IN/OUT/HOME".

Also:

I've also tried to adapt the code as per Proxima's suggestion, but there currently isn't a method for displaying the total number of available lems; for instance, to get the number of lems in the hatch I had to get "Max lems in level - lems out on screen". I tried then creating a new variable called "available", which calculated "hatch + lems out on screen", but this crashed SL. I'll keep looking and see if there's a way to do it.

If the "IN" number in your version is "max lems - lems on level", then this is equal to (hatch + died + exited), not (hatch) alone.

As a side note, please let's agree to say "lems on level", not "on screen", when we mean the number of lemmings out and in play. "On screen" suggests the number on the portion of the level currently visible in the game window.
« Last Edit: October 26, 2021, 04:03:02 PM by Proxima »

Offline WillLem

  • Moderator
  • Posts: 2423
  • "The truth is..."
    • View Profile
Re: Stats to show during play (hatch, saved, required, ...)
« Reply #8 on: October 27, 2021, 07:47:06 PM »
Quote from: Simon
Then please tell me a use case that (hatch, out) serves better than (hatch, available).
...
You never need to know (out) directly for anything.

A level requiring 10 bombers to be used before the 11th lemming spawns? I'm not sure, I can't think of any to be honest. So, I'll redirect your question back to you: can you think of any? I realise that the burden of proof is generally on the person arguing the existence of something (in this case, a need for an "OUT" stat to be displayed), but can you prove that it isn't useful?

My main reasoning for wanting the OUT value to be displayed was because of the wording "IN, OUT, HOME" which you discuss here:

Quote from: Simon
IN and OUT are terrible names. Ditch immediately, or at least give it less weight in the argument about what numbers are important.
...
I have no good idea for better short text
...
To conserve space, I'd use the icon.

Agreed, I don't really like IN and OUT either. But, they are short and concise words which any player can reasonably interpret from looking at what's going on in the level in front of them. And, I too can't think of any better ideas for short text which conveys the same or a more exact meaning.

Icons are the most ideal because these save space, aren't language-dependent, and can potentially convey meaning even more exactly. The thing is, Charles has made the Enhanced status bar (with icons) optional, since people may prefer the more traditional "OUT, IN" display for nostalgic reasons (SuperLemmini aligns itself with Lemmings nostalgia, for the most part). So, there still needs to be a viable text-based status bar (EDIT - if the community agrees, then icons could become the standard and text could be scrapped. Personally, though, I like the fact that it's currently optional).

Maybe Available, Saved/Required would be better. SuperLemmini almost does this anyway (the OUT figure is lems spawned - lems dies or exited, it just needs to be tweaked to show max lems - lems died or exited). The Hatch number can then be saved for the Enhanced bar only, giving it another good reason to be chosen over the text bar.

So, normal (text): Available, Saved/Required.
Enhanced (icons): Hatch, Available, Saved/Required.

Quote from: Simon
NL had massive space problems in the typesetting with the gigantic DOS letters. (saved − required) came from the need to save space and declutter the UI.

It can be printed as two separate numbers, but in the same space on the status bar, by displaying it as a fraction (Saved/Required). I think that's the best overall solution, and it works nicely for percentages as well.

Quote from: Simon
Consider to invert the option to "Show save requirement as percentage". Reason: UI guideline to always word boolean options as a positive

+1 for this. If I get time I'll have a look at that part of the code and see if I can invert it.

Quote from: Proxima
I can't help observing: your mock-up shows that space is too tight
...
If you want to show four stats and keep the "WALKERS 2" counter, you will have to use icons instead of "IN/OUT/HOME".

Yes, agreed (and discussed above in response to Simon's comments).

Quote from: Proxima
If the "IN" number in your version is "max lems - lems on level", then this is equal to (hatch + died + exited), not (hatch) alone

I know what you mean, but the SL code contains two values to show "lems on level": numLemmingsOut and numLemmings. The former is the number of lemmings that have spawned, the latter is (number of lemmings that have spawned - number that have exited or died). So, the hatch number is correct.

Meanwhile, I think (max lems - lems exited/died) should work to return a value for available lems. I'll try that out soon.



tl;dr

Icons are better, but SuperLemminiToo offers the option for both, and I'd personally like to keep it that way.

I can agree, then, that Available, Saved/Required is a better readout for the text-based display. This just requires tweaking the original OUT value to return (max lems - lems exited/died), which should be simple enough.



I still need help with changing the colour of the font, if anyone can offer any guidance there. I'll come back to this soon.
« Last Edit: October 27, 2021, 08:01:42 PM by WillLem »