Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - exit

#1
L2Player / Re: Lemmings 2 Physics Research
April 20, 2022, 03:30:31 PM
Looks great. I'm happy that you've been able to get the SuperLemming working so quickly.

I've started to look at the projectiles, and I'll give an update when I have a full analysis.
#2
L2Player / Re: Lemmings 2 Physics Research
March 17, 2022, 10:38:33 PM
I completely reversed the SuperLemming code and behavior, by far the most complicated part of the game I've looked at so far. I even found a bug, where a SuperLem can crash if there is terrain to the left of the lemming during the top part of the "pullup" in the landing sequence, when it should be checking above the lemming.

SuperLem uses the same memory and data structure as projectiles, so the code uses some of the projectile subroutines. This means that the game technically has the capacity for 10 SuperLems in a level at once, it just doesn't let you assign more than one. I do think it would be a nice feature if L2Player let you assign as many as you wanted to. I wrote the data structure and projectile subroutines just for SuperLem but eventually they can be generalized to all of the projectiles.
One thing I would suggest for your implementation is to heavily utilize the lemming counter variable for the graphics. Although I didn't do any analysis of the graphics, it definitely seems like the game uses this variable to determine which sprite to draw.

I hope the code is clean and understandable, I tried to add a lot of comments to clarify what's going on, but if you have any questions feel free to ask. I also hope it's easy to integrate with the rest of your L2Player code, and I'd like to know if you have any suggestions for how I could improve this integrability for any future code.

As always, let me know how your testing goes or if you find anything that's incorrect. I'm happy to help handle any discrepancies or other issues that come up.
#3
L2Player / Re: Lemmings 2 Data Formats
January 06, 2022, 03:08:05 AM
I reversed the flinger code, including the general air collision checking process, both of which I've attached. The collision handling is quite interesting, and it's actually a bit more complicated than just reflecting velocities, with some edge cases for specific terrain formations. Let me know if you notice anything off. Hope this helps.

I also took a look at how the projectiles work. In general, trajectories are calculated the same way as they are for lemmings, including using the same table for y acceleration. Each of the standard projectiles (bazooka, mortar, thrower, spearer) have an x acceleration of 9. These projectiles all seem to be instantiated a few frames before the lemming's animation actually makes it look like they've been released, but I haven't really analyzed their initialization to know the specifics.
#4
L2Player / Re: Lemmings 2 Data Formats
December 26, 2021, 05:50:22 PM
Great!
I must not have been careful enough when converting the code to make a mistake like that. I double checked the explosion flinger initialization code and made a couple changes, which I've now attached. It should be all correct.

I'm happy I was able to help, and I'm willing to help with anything else if you'd like me to.
#5
L2Player / Re: Lemmings 2 Data Formats
December 19, 2021, 01:23:54 PM
Hmmm... that's strange. The lookup is done for ddY, but it's entirely possible I've overlooked something. Do the values for the cannon and jumper match?
Does the trajectory match the DOS trajectory perfectly with the values you found?

I'll take another look and see if I missed anything, but I won't be able to do this for about a week.

This is all coming purely out of curiosity about the game physics. I had a lot of notes on the last two functions, which made converting them much faster.

I don't know anything about the .gal files.
#6
L2Player / Re: Lemmings 2 Data Formats
December 19, 2021, 02:42:59 AM
The initialization of every trajectory appears to be handled by the same function. I've done the same as before, and rewritten it as c++ code. I was also able to do it for the function which handles explosion trajectories. I've attached both.
I still haven't looked at collisions, but I would suspect that it does only reflect the lemming's velocity and position.

I also took a look at a few of the constant trajectories to find their initial values, which I have attached. Steam and trampolines might not be correct, I'll have to test those more, but the others should be right.
#7
L2Player / Re: Lemmings 2 Data Formats
December 18, 2021, 01:40:12 AM
I've reverse engineered the air physics into neat c++ code. This physics certainly applies to explosions, jumpers, and cannons, and most likely applies to rollers, skiers, and lemmings flying off chains. The only cause of the different trajectories seems to be the initial velocities and accelerations the game assigns to a lemming. So far, I've only recorded these for the cannon, but it should be easy enough to find it for jumpers and shimmiers, or anything else with a set trajectory. I have some old notes for the code that calculates these initial values for each lemming after an explosion, but haven't yet put them into a nice, readable format.

I've attached the code, as well as the other main notes I've taken so far.
#8
L2Player / Lemmings 2 Physics Research
December 17, 2021, 05:46:07 PM
Ravenix, I did some work almost two years ago reverse engineering Lemmings 2 DOS with the DosBox debugger. The only notes I have saved are an early analysis of some of the explosion physics, but seeing this topic made me want to take another look at the game code and see if I could do anything to help.

If you are interested in looking at the code for any skill in the game, the game handles all of the skills through a call at 2107:0275. Each skill (or lemming state) is associated with a value. Walker is 0, faller is 40, etc. This value is used to find the address in a map which starts in memory at 2107:029A. The game essentially just calls to the address pointed to in the map, then proceeds from there.
I have a code dump of the entire segment 2107, which should contain the code for each skill, but it seems like the disassembly is not entirely correct. At least the walker code was disassembled incorrectly, maybe more. I might try to find a different way to dump the code, but I've found that stepping through the code with the debugger makes it a lot easier to see what's going on.

If you're interested, I can give you all the memory addresses/notes I've made so far. It isn't much, but it should be enough to reverse engineer a good portion of the skills.



#9
Today I was only able to take a real quick look at the two levels you updated. I was able to mess around for a bit but didn't have enough time to really sit down and solve them. They look like they're going to be interesting, though! I'll try and play them as soon as I have time.
#10
I played through the levels and I liked them a lot! :)

In general I think the puzzles were pretty good difficulty, and the execution was what's pretty normal for Lemmings 2. I got the intended solution on most of the levels, but I did find a few backroutes.

Spoiler

Level 1: This one was pretty simple, and straightforward, but nice to play.
Level 2: I actually really liked this one. At first I tried to get something going in the left half of the level until I realized the correct route was going around the right side and coming up with the laser blaster. The way the basher makes the perfect glueing platform is really nice.
Level 3: This one's pretty simple once you realize that you can't get over the block without the roper.
Level 4: I think I got the intended solution on this one, but I did save a sand pourer and magno booter.
Level 5: This one was pretty straightforward.
Level 6: This was a pretty nice puzzle! At first glance it looks simpler than it really is. This one should be possible with 3 sand pourers, but I think adding one or two more would make the execution a bit easier without changing anything.
Level 7: I liked this one a lot. Great puzzle that feels like a good Lemmings 2 level, and plays well.
Level 8: Pretty sure I backrouted this one. My solution was extremely straightforward and didn't use the teleporters at all. I was able to let only one lemming slip past the miner by using a platformer, then made that lemming slide down and platform, and cancelled the platformer with the other miner. I guess I used most of the skills, but it doesn't feel like the right solution.
Level 9: I might've backrouted this one. I saved the laser blaster, a climber, and a floater, but the solution doesn't feel wrong, really. I'm guessing I took the same route as was intended, just saved a few skills along the way.
Level 10: I liked this one quite a bit. Once you realize the magno booter has to go around the solution falls into place. I did find a backroute which saves a stomper and the sand pourer: after you bridge to the exit you use the stacker and build back to the steel. The lemmings will easily survive both falls.

Overall I really liked this pack. Liked you said, it wasn't too difficult, but I think it had the right amount of challenge to be fun. :thumbsup:
#11
Screenshots now attached. :-[
(To previous post)
#12
I'm sad to say that I found some more backroutes, but I think I found an intended solution!

Spoiler

Lifeguard to the Rescue: Majorly backrouted.

Gnarly 180 Flip: Pretty simple alteration to my original solution.

Take the Plunge: I managed to save a sand pourer this time. :lem-shocked:

Toasted Clam Sand-wiches: I think I finally found the intended solution! :D If so, I have to say, WOW! This is a devious solution. Your use of red herrings in this level is great, and no, you don't use crawling glitches, but you do use other ones! :devil:
#13
I've finally had time to take a look at the levels, and I managed to complete the Beach tribe.

So far these levels are great! :thumbsup:

Detailed level feedback:
Spoiler

Introducing: Beach: A nice introduction to the skills used in the Beach tribe.

A Kick in the Groyne:  Good puzzle. My solution saved a sand pourer.

Diving Board: This one was pretty easy to figure out, but it has a great solution. I managed to save a diver on this one.

Hang Sixty: This one has a good solution, and it took me awhile to think of using the terrain at the right.

Cross Shore Winds: The solution was quite obvious, but the controlling of the surfer and hang glider at the same time was somewhat tricky.

Turn the Tide: I'm pretty sure that my solution is similar to the intended one, but it saves 2 builders. Good level.

Lifeguard to the Rescue: Also a good level. I think that my solution is essentially the same as the intended one, but it saves a sand pourer and a scooper.

Gnarly 180 Flip: Yet another good level! Pretty sure I got the intended solution here, as I used all of the skills.

Take the Plunge: Great level! The solution fell into place pretty quickly, but it's very nice! My solution saved a surfer/diver (I could've saved the diver instead of the surfer by letting the stacker continue until he walked off the edge, the had him surf to the exit).

Toasted Clam Sand-wiches: This one took me by far the longest. My solution seems to be a backroute because of the extreme precision required, though, and the fact that it didn't use the surfer.

Overall, all of the levels are really good. I'll take a look at the next tribe when I have time.
Solutions are attached.
#14
Closed / Re: [Suggestion] Cull the zombie noise
April 09, 2017, 01:42:14 PM
Quote from: namida
^ Not always true. Some levels may have a zombie-spawning hatch but no preplaced zombies.

I didn't think about zombie hatches, so perhaps the sound should be played when there is one of those, but not when there are only preplaced zombies?
#15
Closed / Re: [Suggestion] Cull the zombie noise
April 08, 2017, 03:41:42 PM
I think it's good if a noise plays when a lemming is turned into a zombie, but having that at the start of the level seems pointless to me because zombies are just as visible as preplaced lemmings, and no different noise plays when those are in a level. I would also suggest finding a new noise which is not as jarring.