Author Topic: A Place To Experiment!  (Read 4875 times)

0 Members and 1 Guest are viewing this topic.

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
A Place To Experiment!
« on: January 31, 2020, 05:21:16 AM »
Since NeoLemmix and its wonderful editor makes it possible for us to create and play any Lemmings levels we can imagine (big thanks to all developers), I have started this topic to provide a platform for anyone who enjoys experimenting with the possibilities of the engine and its editor.

To get things rolling, here are some levels which seek to discover ways to make direct drop possible!

The first, Direct Drop Test, uses a regular-sized updraft overlaying the exit, which I believe must stop the Lemming from having standard "faller" physics, thus allowing them to drop into the exit from a great height.

The second, Believe in Yourself, is a variation on this theme made to look more like a standard level. The updraft is still providing the direct drop, but has been resized so that it is no longer visible behind the exit.

Thirdly, Wheeeee! can be seen as a celebration of updrafts, allowing the Lemmings to use an exit that doesn't even have terrain beneath it!

Fourthly, The Wierdest Shop Ever takes this concept and makes it into a (very easy) puzzle.

And finally, Just Float! discovers how floaters can also be used to facilitate direct drop technique.
« Last Edit: January 31, 2020, 07:16:33 AM by WillLem »

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #1 on: January 31, 2020, 05:32:31 AM »
3.71 seconds seems to be the quickest possible time for a level!

Offline Proxima

  • Posts: 4569
    • View Profile
Re: A Place To Experiment!
« Reply #2 on: January 31, 2020, 05:36:53 AM »
I think you're forgetting something there.
Spoiler (click to show/hide)

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #3 on: January 31, 2020, 06:05:55 AM »
I think you're forgetting something there.
Spoiler (click to show/hide)

Indeed so!

In that case, 0.53 seconds is the quickest possible. :lemcat:

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #4 on: January 31, 2020, 06:14:54 AM »
Here's a level lasting 0.00 seconds! :lem-mindblown: :crylaugh:

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #5 on: January 31, 2020, 06:26:40 AM »
Whilst we're on the subject, here's the shortest possible level requiring the use of at least one skill, One For The Speedrunners
Spoiler (click to show/hide)

And, another one requiring the use of 2 skills to save 2 Lems, Just a Second
Spoiler (click to show/hide)

The quickest requiring at least one destructive skill, The Flux Capacitor
Spoiler (click to show/hide)

And the quickest requiring at least one constructive skill, Think Fast, which is the closest any of these get to an actual puzzle! :crylaugh:
Spoiler (click to show/hide)
« Last Edit: January 31, 2020, 06:51:57 AM by WillLem »

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: A Place To Experiment!
« Reply #6 on: January 31, 2020, 06:00:03 PM »
A while back I created a level with a 1-second time limit, to prove that a non-trivial level with such a short time can be done.

I posted the result in the Random Level Sharing topic: https://www.lemmingsforums.net/index.php?topic=3743.msg75982#msg75982 (If the link doesn't work in the future, it's Reply #104.)

On a side note, those direct drop hacks with invisible (/hidden) updrafts should never, ever be used outside of theoretical proof-of-concept levels. Such a setup with a clearly visible updraft is fine, of course, because that's not hiding anything from the player.
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #7 on: February 01, 2020, 01:09:52 AM »
A while back I created a level with a 1-second time limit, to prove that a non-trivial level with such a short time can be done.

I posted the result in the Random Level Sharing topic: https://www.lemmingsforums.net/index.php?topic=3743.msg75982#msg75982 (If the link doesn't work in the future, it's Reply #104.)

Neat little puzzle. Can't help but think that a save-all solution would have been more satisfying, but to be fair it doesn't seem to be possible; by adding a walker I can get the button Lem to turn around and even exit, but just past the 1-second limit.

On a side note, those direct drop hacks with invisible (/hidden) updrafts should never, ever be used outside of theoretical proof-of-concept levels. Such a setup with a clearly visible updraft is fine, of course, because that's not hiding anything from the player.

Duly noted ;)

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #8 on: February 05, 2020, 11:37:48 PM »
Here are a few versions of a level titled Clickbait, the purpose of which is to see what the maximum possible enforcable* number of Lemmings that can be saved is in NL using cloners to increase the number (hence the title!).

* (as in - the save requirement for the level)

At first, I assumed it would be 500 (401 hatch Lems + 99 cloners - the maximum allowed in the latest version of NL), due to the fact that the editor doesn't let you specify a save requirement higher than 500.

Then, Proxima pointed out that you can edit the number of hatch Lems and indeed the save requirement pretty much as high as you like by editing the level in a text editor.

So, I made a version with 1,000,000 Lemmings with a save requirement of 1,000,099 (can still only have 99 cloners maximum).

But, obviously, in the light of this new knowledge it would be theoretically possible to have an infinite number of Lemmings, so this experiment must conclude: ERROR! Please reset! :lem-mindblown:

I therefore decided to make a "sensible" version of the level with just 1 Lemming and a save requirement of 100.

If you're interested to see what a level with 1,000,000 Lemmings looks like though, see attached. :lemcat:

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: A Place To Experiment!
« Reply #9 on: February 06, 2020, 12:07:29 AM »
2147483647 is the highest number of lemmings that would "make sense" to the game. Beyond this, overflow occurs, and NL thinks there's -2147483648 lemmings (note the minus sign at the start). This is a technical thing - look up "overflow" in the context of programming if you want more info.

So - cloners or no, that's the most lemmings you could actually have theoretically.

In practice, it's much lower due to memory limitations. NeoLemmix is a 32-bit application, so it can only use up to 2GB of memory - you'd hit this long before reaching anywhere near that number of lemmings. But exactly when, would depend on many factors, including the size of the level, how many interactive objects it has, how much variety of pieces it contains, even how many frames it actually takes to spawn the lemmings (you'd be able to get in slightly more if they're all preplaced rather than spawning over many frames).
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #10 on: February 06, 2020, 01:55:12 PM »
2147483647 is the highest number of lemmings that would "make sense" to the game...So - cloners or no, that's the most lemmings you could actually have theoretically.
---
In practice, it's much lower due to memory limitations.

Interesting. Why 2,147,483,647? It seems such a specific number! Is there a reason for this particular amount, as in relating to other factors in the game's code?

I've changed the 1,000,000 Lemmings level so that it no longer involves having to assign cloners, so that it's easier to perform tests with.

Using an older version of NL, I can frameskip 1000 frames at a time without it taxing the memory too much, but only until about the 120th minute, at which point it begins to lag.

This level features multiple hatches, because I wanted a random Lemming to come out from a different hatch (hence the title One in a Million), requiring a glider assignment. There are therefore 17 hatches in this level - would this slow things down?

Just in case, I've also made a level which is simply 1,000,000 Lemmings spawning from a single hatch and falling directly into an exit, simply titled Lemmillionism.

I've noticed that, upon cancelling these levels, the post-screen only displays up to 4 figures for saves/save requirement, so... would the level be "passed" if 9999 saves was reached?

Offline Proxima

  • Posts: 4569
    • View Profile
Re: A Place To Experiment!
« Reply #11 on: February 06, 2020, 03:53:23 PM »
Interesting. Why 2,147,483,647? It seems such a specific number! Is there a reason for this particular amount, as in relating to other factors in the game's code?

That's 2^31 - 1, or the highest value that can be expressed with 31 binary digits.

Offline WillLem

  • Posts: 3384
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: A Place To Experiment!
« Reply #12 on: February 06, 2020, 05:36:14 PM »
That's 2^31 - 1, or the highest value that can be expressed with 31 binary digits.

Ah right, thanks - I'm guessing 31 binary digits is the limit for 32-bit software...?

I'm still learning binary... as far as I know, there are 10 types of people: those who understand binary, and those who don't.

As an experiment, I left Lemmillionism running with a 100 frameskip applied whilst I was out today. When I got back, I had the "Out of memory" error message! 76,312 Lemmings had been saved though - the post-screen recorded this as 6,312, with a save requirement of 0000. :crylaugh:

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: A Place To Experiment!
« Reply #13 on: February 06, 2020, 05:55:42 PM »
Quote
Interesting. Why 2,147,483,647? It seems such a specific number! Is there a reason for this particular amount, as in relating to other factors in the game's code?

Because the game stores the lemming count in a 32-bit signed integer. It's nothing to do with it being a 32-bit app specifically - a 32 bit app could still have a signed (or unsigned) 64-bit integer, and that's without going into floating-point values which work a bit differently.

On this note - an unsigned integer has the same amount of possible values as a same-bit-count signed integer; just the range is different. In the case of 32-bit, a signed integer can have values from -2147483648 (ie: -(2^31)) to +2147483647 (ie: (2^31)-1), for 2^32 possible values. An unsigned integer still has 2^32 possible values, but instead they range from 0 to 4294967295 (ie: (2^32)-1).

A 64-bit integer would instead have 2^64 possible values. However, aside from that it's clearly not going to matter in any real-world situation, increasing the lemming count to a 64-bit value probably wouldn't achieve anything useful here - it's very likely the TObjectList (a Delphi structure that contains list of "objects" (in the programming sense), in this case, the lemmings) uses a 32-bit integer to count how many objects it contains, so we'd still get issues. And even if not - we'd exceed the available memory for a 32-bit app before we got anywhere near 2^32 lemmings; a full change to 64-bit app would be needed to avert that.

Quote
This level features multiple hatches, because I wanted a random Lemming to come out from a different hatch (hence the title One in a Million), requiring a glider assignment. There are therefore 17 hatches in this level - would this slow things down?

Yes, but the impact would be almost negligable compared to the thousands of lemmings. Lemmings are complicated to process. Objects are not. Drawing objects is processor-intensive, but they aren't actually being drawn during a frameskip. The game does have to quickly check each object to see if it needs anything, but in the case of an entrance, that's all it needs to do with them once they've opened. (Spawning the lemmings happens seperately from the general object update code.)

On a side note, the lack of a need to draw anything during frameskips (aside from updating the terrain layer with destructive / constructive skill masks; it also takes save-states every so often but this is just a blind "make a copy" without doing any actual new drawing) is why processing times for a frameskip don't really differ much between low-res and high-res, even though high-res does slow down live gameplay. Indeed, on a level with not so many lemmings, I tried out a 1mil frame frameskip once; high-res did take a bit longer to process but the difference was basically negligable.

Quote
Just in case, I've also made a level which is simply 1,000,000 Lemmings spawning from a single hatch and falling directly into an exit, simply titled Lemmillionism.

No-longer-existing lemmings (whether due to death or exiting) are less processor-intensive than still-existing ones, but they still have an impact. There are technical reasons the game still needs to know about them.

Quote
I've noticed that, upon cancelling these levels, the post-screen only displays up to 4 figures for saves/save requirement, so... would the level be "passed" if 9999 saves was reached?

No. That's purely a cosmetic thing. Looks like you already answered that with your 76312 saved situation, though. (Interestingly though, vanilla Lemmix does have a bug along these lines. It calculates the %, rounds it off, then determines pass or fail based on the rounded % instead of the actual saved count / requirement. This means for example, if you had a level with 200 lemmings that required 199 to be saved, the player could save 198 and still pass the level, as both of these come out as 99% in Lemmix. This bug was fixed very early in NeoLemmix.)
« Last Edit: February 06, 2020, 07:18:10 PM by namida »
My Lemmings projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)

Offline Strato Incendus

  • The King of Shimmiers (crowned by Flopsy ;D )
  • Posts: 1754
  • #RIP Spearer/Grenader (2020 - 2021)
    • View Profile
Re: A Place To Experiment!
« Reply #14 on: February 07, 2020, 09:28:40 AM »
A different thing just came to my mind this morning:

What happens when you put a splat pad into an updraft and then have terrain go through it? Can you make it so that lemmings can fall through the updraft (which resets their fall height) so that they don't splat underneath it, but when you try to e.g. platform through the updraft to have the lemmings land within the updraft area, they will splat because the area is entirely covered by splat pads? :evil:

With splat pads and anti-splat pads overlapping, this wouldn't make much sense to try out, because both require terrain inside their trigger area in order to work. But due to the slight differences between updrafts and pads, this might be an interesting corner case.

Or does the updraft simply always overwrite any "splat" characteristics, so that the splat pad inside the updraft simply is ignored, even when a lemming lands on terrain inside the trigger area of the splat pad (that is also covered by an updraft)?
My packs so far:
Lemmings World Tour (New & Old Formats), my music-themed flagship pack, 320 levels - Let's Played by Colorful Arty
Lemmings Open Air, my newest release and follow-up to World Tour, 120 levels
Paralems (Old Formats), a more flavour-driven one, 150 levels
Pit Lems (Old Formats), a more puzzly one, 100 levels - Let's Played by nin10doadict
Lemmicks, a pack for (very old) NeoLemmix 1.43 full of gimmicks, 170 levels