Author Topic: [Genesis] Lemmings (Genesis Port) TAS (WIP)  (Read 80965 times)

0 Members and 1 Guest are viewing this topic.

Offline Gronkling

  • Posts: 483
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #105 on: February 28, 2016, 04:25:55 AM »
I don't quite get why you're counting lag as time against you considering the game clock also slows down when lag happens.

The in-game clock is very imprecise and is different speeds on different ports. We are measuring how long the run takes in proper real-time including lag frames as it's an interesting (to me anyway :P ) challenge and most speedruns are recorded that way. The lag frames we talk about occur on actual consoles too and are part of the way the game works, they're not just emulator side-effects.

Offline Gronkling

  • Posts: 483
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #106 on: February 28, 2016, 01:34:43 PM »
Fun 28 in 4365 frames (~1m 29s)

https://youtu.be/6jsQrlTlSj4

Mostly similar to Mayhem 5's regular route, lots of stuff happening offscreen though, due to high amounts of lag, so this isn't exactly the most interesting video.

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Lemmings (Genesis Port) TAS
« Reply #107 on: February 28, 2016, 03:40:36 PM »
One thought - could some release rate manipulation, and a basher instead of a climber, perhaps cut a few frames off near the start?
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 Gronkling

  • Posts: 483
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #108 on: March 01, 2016, 03:26:52 PM »
I'll keep that in mind when I come back to that level.

Fun 29 in 2591 frames (52s)

https://youtu.be/oBKU2R-dMeU

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: Lemmings (Genesis Port) TAS
« Reply #109 on: March 01, 2016, 04:13:13 PM »
Here's an idea for Fun 30. This takes 305 PUCs under NeoLemmix (probably a couple more under DOS / Genesis), but it isn't 100% optimized, but rather just demonstrates the general idea - you'll notice I sort of demonstrated a digger/basher staircase, but firstly that I didn't do it to the full extent possible, nor did I make use of one for the drop to the exit. You don't actually have to rush the working too much, as you'll have the entire path to the exit made before the 40th lemming even spawns anyway.

Another possible improvement - if the fall from the entrance isn't exactly a multiple of 3 pixels, then start the digger/basher staircase underneath it instead of leaving one solid pixel. Or, better yet, use builders to shorten it.

EDIT: Actually, I dunno if maybe just doing that staircase directly to the exit might be quicker...
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 Gronkling

  • Posts: 483
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #110 on: March 02, 2016, 12:15:51 PM »
A small difference between Genesis Fun 30 and NX is that on Genesis the save requirement is 36/60 rather than 40/60 so you are slightly more pushed for time. I also couldn't get the basher staircase thing to really work as it requires almost constant attention that could be spent doing other things (cursor movement is a bit limited) and it's very hard to actually get the lemming you want to bash/dig, so I mainly used a miner in my solution with a small bit of staircase at the end.
I may also recommend using the original lemmix, or better yet emulated genesis on bizhawk to try solutions as it has useful glitches.

Here's my solution, Fun 30 in 987 frames (~20s)

https://youtu.be/1nOoncQeKSQ

Uses a miner glitch to jump over the 2nd holding cell, most of the rest is reducing falling distance. Also uses the direct drop floater glitch to save a few frames.

So that's a baseline solution down for all of fun! Now I'm going to look over some levels and see if I can reduce frames further before making a compilation and moving onto tricky

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #111 on: March 02, 2016, 03:35:41 PM »
Fun 30 improved to 963 F (and I already spot at least one thing that can be improved, but don't have time to redo it right now).  Instead of alternating between digger and basher like namida suggested, alternating between digger and miner works better.

Offline Gronkling

  • Posts: 483
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #112 on: March 02, 2016, 05:25:20 PM »
Oh wow, miner-digger most certainly works better than basher-digger :o Thanks!

I improved the solution by a further 6 frames, new record if 957F

Also
Fun 5:1531F->1515F(-16F / 0.3s)
Fun 8:631F->618F(-13F / 0.25s)
« Last Edit: March 03, 2016, 11:46:35 AM by Gronkling »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #113 on: March 03, 2016, 02:04:28 PM »
I got Fun 30 down to 952F.  I expected this steeper (and much tricker to execute) version of miner-digger staircase would save more than that, but apparently didn't turn out that way. :( I think I didn't quite do the beginning part quite right though, so there's probably some room for minor improvement.

Offline Gronkling

  • Posts: 483
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #114 on: March 03, 2016, 02:42:42 PM »
I managed to get off another 12 frames, not by altering your solution but just by simply placing 1 builder brick next to the exit :lem-shocked:
The new record for that level therefore is 940F! This trick/glitch most likely can be used on other levels too which I'm going to try next, I'm not sure why it happens but 12 frames is a lot for such a simple little thing.

Testing results:

Fun 9   - Adds extra frames
Fun 10 - Adds extra frames
Fun 11 - No effect (Though it caused some extra lag frames on some timings)
Fun 17 - No effect
Fun 25 - No effect
Fun 27 - Adds extra

So this must only work under some kind of quite specific set of circumstances
« Last Edit: March 03, 2016, 04:24:27 PM by Gronkling »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #115 on: March 03, 2016, 07:14:36 PM »
:lem-mindblown: indeed!  Too bad I won't be able to run the emulator for a while until I'm home later today, I could really use it to better understand what the heck is happening. :thumbsup: I certainly can't think of anything in DOS mechanics for example that could produce such a result.  Does it look like it alters the exit-trigger collision detection so that lemmings are exiting sooner, or is something else happening?  Also, based on your verbal description of the trick, the trick affects the crowd and not just the builder himself?

Perhaps the trick depends on the graphics style (ie. only works with the "Hell" exit)?  Fun 30 is also notably in the minority of levels where the crowd approaches the exit from the right.  (edit) Hmm, so is Fun 28 on both counts, worth a quick test there? (although maybe it'd take too long there to insert the build brick before enough lemmings have already exited)

Offline Gronkling

  • Posts: 483
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #116 on: March 03, 2016, 08:12:16 PM »
Yes this affects the whole crowd, the builder exits far before the last lemming.

I tested another right-exit fire level, Mayhem 2 [The Boiler Room] (using memory pokes), I found no effect caused by putting a builder near the exit there ruling out fire set and right approaching being sole factors of this working.

Testing with Fun 28 (again with memory pokes) however, gives the same result as Fun 30, 12 saved frames.

Some things in Fun 30
With builder, lemming #1 (one of the last to exit) exits at (235,147) on frame 1645.
Without builder, lem #1 exits at (231,148) on frame 1657

So adding a builder in this level causes lemmings to exit 4 pixels earlier, and as walkers move at 1px per PUC, this saves 4PUC or 12 frames.

And in Fun 28
W/ Builder - Exits at (91,63)
W/o Builder - Exits at (87,64)

In mayhem 2, the one that didn't show effects.
W/ Builder - (59,61)
W/o Builder - (59,62)

The thing that jumps out to me is that on ones where builders did affect positively, the Y-values were multiples of 4 without a builder, whereas the one with no effect was not a multiple of 4. I don't know why this would affect exit collision though.
Adding 2 steps on mayhem 20, which would bring the y-value to a multiple of 4 didn't affect collision either however.

Online Simon

  • Administrator
  • Posts: 3880
    • View Profile
    • Lix
Re: Lemmings (Genesis Port) TAS
« Reply #117 on: March 03, 2016, 08:26:09 PM »
Excellent reading. I don't understand everything, yet I'm looking forward to the Fun compilation video like a 5-year-old for christmas.

Precise definitions wanted! PUC is what?

A frame is an update of the emulated hardware (roughly 50 per second), not an update of the physics (roughly 17 per second).

What, then, is a lag frame -- it cannot be purely a frame in which the physics don't advance, even though they should. Is it an extra frame (in the 50-frames-per-second meaning) that is inserted between two physics updates? Which would mean 3, instead of the regular 2, non-physics-updating frames between physics-updating frames?

-- Simon

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #118 on: March 03, 2016, 09:15:08 PM »
The thing that jumps out to me is that on ones where builders did affect positively, the Y-values were multiples of 4 without a builder, whereas the one with no effect was not a multiple of 4.

Good work! :thumbsup: This actually makes sense to me.  In DOS, trigger areas, steel areas and blocker fields are all tracked in a map that has a coarser resolution than individual terrain pixels, instead it can only track in 4x4 pixel grid cells.  It follows that other ports with very similar physics to DOS/Amiga would likely follow a similar implementation, and the fact that you observed a multiple-of-4 effect further supports this.  So for example, in Fun 28, the "normal" exit spot at (87,64) actually corresponds to a 4x4 cell in the trigger map with upper-left corner (84,64) and lower-right corner (87,67).  The "surprise exit spot" with builder at (91,63) would correspond to the 4x4 cell spanning (88,60)-(91,63), in other words the cell immediately upper-right of the "normal" cell.

It suggests that, perhaps due to a bug in how the game sets up the trigger map in Genesis, parts of an object's trigger area may be shifted horizontally one cell to the right from its intended location in the map, resulting in an effectively non-rectangular shape.

I forgot to take the trigger-map resolution into account when I suggested things to test.  It's quite possible that the trick can work in other levels but may require more builders, as one builder may not be enough to take the walking path out from one grid cell of the trigger map to another.  For example, in Mayhem 2, the "normal" exit cell would be (56,60)-(59,63) based on what you reported.  The extraneous one would therefore probably be at (60,56)-(63,59).  Since the normal exit location without builders is at y=62, to reach y=59 you'd need 3 build steps rather than just 1.

If my theory about bugs in how the game sets up the trigger map is correct, it's possible that the graphics style may not matter as much (similar effect may be available for the other styles of exits), but the direction of approaching the exit will probably still matter (since there's a fixed direction to how the trigger area gets shifted).  [In other words, if it's not clear enough already, you may want to re-test the levels where you approach exit from the right, taking into account the multiple-of-4 effect and use more build steps accordingly.]

========================

Precise definitions wanted! PUC is what?

Sorry, I invented that acronym as shorthand for typing "physics update cycle".  When talking about timing of things related to game physics, we can't use frames as the unit of time due to the lag frame phenomenon (for which the definition you asked about ["Is it an extra frame..."] is precisely correct, minus the fact that occasionally it may even be more than one extra frame).  For lack of better phrasing, I'd use "number of times physics got updated or will be updated" as the unit of time when talking about physics, leading to "physics update cycle" and then "PUC".
« Last Edit: March 03, 2016, 09:20:47 PM by ccexplore »

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Lemmings (Genesis Port) TAS
« Reply #119 on: March 04, 2016, 12:37:19 AM »
I had a chance to look at Mayhem 2 in Lemmix editor just now.  One important difference between that level and a level like Fun 28 or 30, is that in Mayhem 2, the exit object is more buried into the ground than in Fun 28/30.  So the portion of the exit trigger that is accessible at ground level may already be the upper portion that was shifted right, consequently you won't get any further improvements by trying to build up, as that portion is already accessible as-is without any builders.

This does suggest an inverse possibility though:  in a level where the exit object is more buried into the ground than usual (like in Mayhem 2), and you are approaching the exit from the left, you may save some frames by digging or otherwise lowering the ground before the "normal" exit trigger.