Author Topic: Lemmings 2 Data Formats  (Read 3172 times)

0 Members and 1 Guest are viewing this topic.

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #15 on: December 06, 2021, 05:31:28 PM »
Sorry if I wasn't being clear. I was meaning the world bitmap is the reason behind the interval as its the largest data element. I wasn't meaning
Quote
as it needs to store the state of the world bitmap.
in the literal sense of it being the only thing to save :). I appreciate the example of how others have done it so I can compare. The other addition I can think of is the state of the particle shower when lemmings explode in the Classic style.

As for the fan, I think storing the current fan speed would maintain consistency in expected behaviour when rolling back. Just so you don't lose as much altitude while waiting for the fan to spin back up again. Or it being abused by reverting while fan is at full speed.

So far, I have been making all of the gameplay objects serialisation aware, to help facilitate this.

Also, Zombie lemmings? Sounds like an interesting, but fun addition to Lemmings 1 :laugh:

Offline namida

  • Administrator
  • Posts: 12060
    • View Profile
    • NeoLemmix Website
Re: Lemmings 2 Data Formats
« Reply #16 on: December 06, 2021, 05:33:26 PM »
Quote
The other addition I can think of is the state of the particle shower when lemmings explode in the Classic style.

NL tracks this as a property of the individual lemming, so it's included there via LemmingList.

Quote
Also, Zombie lemmings? Sounds like an interesting, but fun addition to Lemmings 1 :laugh:

You should check out my "Doomsday Lemmings" level pack. ;) It's nothing but zombie levels.

The concept is simple enough - they act like normal lemmings except they don't exit (and don't trigger a few beneficial types of objects, such as the aforementioned exit-unlock buttons) and infect other lemmings they come in contact with. Also you can't give them skills - though if they were already performing a skill when they were turned, they'll still complete it, and they still retain their permanent skills.
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: 2421
  • "The truth is..."
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #17 on: December 06, 2021, 09:05:18 PM »
Take it a step at a time. Get the game down first, then worry about QOL and UI stuff, that can come later once you have a much more in-depth idea of how it all fits together :thumbsup:

Offline namida

  • Administrator
  • Posts: 12060
    • View Profile
    • NeoLemmix Website
Re: Lemmings 2 Data Formats
« Reply #18 on: December 06, 2021, 11:05:16 PM »
Take it a step at a time. Get the game down first, then worry about QOL and UI stuff, that can come later once you have a much more in-depth idea of how it all fits together :thumbsup:

This is not necesserially the best plan. It can often be much easier to design around future features as you're going, than to try and fit them in later.

I guess you could think of an analogy with producing artwork - if you're drawing a lemming, that's going to be holding a machine gun, it's much easier to plan around the machine gun being there from the start and draw accordingly, than to just draw a lemming standing there then later edit it to be holding a machine gun. Not the best analogy but I can't think of a better one right now. :P
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 RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #19 on: December 06, 2021, 11:57:33 PM »
An analogy, or an idea for a Lemming skill? :laugh:

The bulk of my time has been spent doing the groundwork for the unpacking/caching system. Now it's full steam ahead on the core game itself.

So far I have;

  • Level loading and selection (Selection screen currently cycles through all 120 levels showing the correct skills, title, time, style and level preview.
  • State serialisation (Basic framework)
  • Fixed update physics loop (Supports fast-forward and pause)
  • Basic UI support
  • Stage/bitmap supports layers (Background/Foreground), collision detection, removing terrain using brushes, marking terrain regions as read-only (steel), animated tiles and objects with hierarchy support.
  • Chain simulation
  • Basic Lemming entity with walk/fall/pop/bash abilities (Animations are all over the place atm until I finish compiling a list of what each one is)


Now I have the basic game loop, I'll be focusing on the Lemmings animations and skills. Logically, I am going to work through each level from 000, adding the required abilities to complete that level as I go.

Progress preview: https://youtu.be/Q20FKMVnS9c

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #20 on: December 07, 2021, 12:23:10 PM »
Does anyone have a Lemmings 2 MS-DOS save game with all the levels unlocked they are willing to share please?

@namida - Just been playing with NeoLemmix. Some fun levels in there. Although I had to enable online features for the Omega pack as it was complaining about missing styles. (Seemed to sort it). Was also having a dig through the bitbucket sources to see how you handled frame stepping and the skill projection overlay. (Very clean and readable code :thumbsup:) Pascal brings back some old memories. I moved away when they became embarcadero.

Offline geoo

  • Administrator
  • Posts: 1421
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #21 on: December 07, 2021, 02:10:36 PM »
Attached is a save game of mine; the first one (Test) has all levels unlocked with 60 lemmings.
Also attaching the savegame format description, in case it's useful.

btw, one other advantage of putting the source on e.g. github at some point is that you could get a PR for an L2 skill or two while you're still working on those :)

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #22 on: December 07, 2021, 02:59:35 PM »
Nice. Thanks for that.

I think maintaining L2 save game compatibility would be a good feature. I'll have a read through your spec.

As for sourcecode, it will be an option down the road once I have laid out the groundwork for sure :)

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #23 on: December 08, 2021, 01:58:37 PM »
@geoo - I have updated the l2save.txt with some of my own findings and to make it more complete. (See attachment)

Thanks for the file. I can now load/edit L2 save games :)

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #24 on: December 09, 2021, 10:27:13 AM »
I have almost finished documenting all of the Lemming animations and frame start/end for the segments within each animation.
From what I can tell, most animations are broken into several parts; (Majority just have the first 2 segments)

  • Left facing
  • Right facing
  • Floor aligned
  • Ceiling aligned
  • Sequence of frames relating to an Angle e.g. 0-90, 0-360 etc

I have come across 1 animation where for the life in me I cannot remember or find where it is used. Anyone able to shed some light on this please? (See .gif)

Many thanks

Offline Simon

  • Administrator
  • Posts: 3265
    • View Profile
    • Lix
Re: Lemmings 2 Data Formats
« Reply #25 on: December 09, 2021, 01:48:22 PM »
ArmWaving is the valve turner. :laugh: This appears only in DOS Sports 5, Blow Back...., when you interact with the steam valve in the top right corner of the level.

I thought it was half of a dancing animation, but that couldn't properly be, why would a dancing anim be cut in half.

-- Simon

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #26 on: December 09, 2021, 01:53:28 PM »
Makes sense now that you have said it :) ArmWaving was the best description I could think of at the time lol.

Thanks for the help.

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #27 on: December 15, 2021, 01:53:13 AM »
Just a little progress update. Main game loop is now in place and have begun implementing the first 8 skills required to complete Level000 (Classic 1).
Still a few quirks to iron out with the Miner (Clipped animation) and Builder (First brick offset) skills. The Lemmings can exit the level as triggers are fully working.

Here is a short video showing off skill usage and my progress so far;

https://youtu.be/4THvCC1z60Y

Offline RavenNine

  • Moderator
  • Posts: 49
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #28 on: December 15, 2021, 11:38:57 AM »
For anyone interested, here are the test builds to go with the above preview;

They are built bundled with .NET runtimes. OpenAL is required to run.
To get started, copy your version of Lemmings 2 for MS-DOS into the data\dos subfolder that was extracted with the .zip. On first run you will be prompted to unpack and create a cache.

If you want music, you will need to copy .mod versions of the Lemmings 2 music into the data\music subfolder. (See Readme.txt within data\music)

To force a cache rebuild at any point. Start L2Player with the unpack argument.
Code: [Select]
L2Player unpack
Any feedback would be greatly appreciated :)

Windows Binaries: https://drive.google.com/file/d/1XX8m3ab7RY-jrHzdbx2ZZD4pqYs4EJAI/view?usp=sharing
Linux Binaries: https://drive.google.com/file/d/1FwohvDnKrJJGcR9aaUQ1pSHDngpStBMh/view?usp=sharing

OpenAL Installer for Windows: https://www.openal.org/downloads/
OpenAL for Linux (Ubuntu/Debian):
Code: [Select]
sudo apt-get install libopenal-dev

Offline geoo

  • Administrator
  • Posts: 1421
    • View Profile
Re: Lemmings 2 Data Formats
« Reply #29 on: December 15, 2021, 05:26:14 PM »
This looks pretty nifty already! Needed to mess with the OpenGL version a bit ("export MESA_GL_VERSION_OVERRIDE=4.1COMPAT" did the trick), and it's running very smoothly for me :D

The most obvious thing I already noticed during the video is that the builder bricks are only 4 px wide rather than 6 px; maybe fixing this would also fix the issue with the gap? Related to the builder, L2 has a funny behavior where the brick of left-facing builders is placed differently from right-facing builders: For example, at a cliff edge, in one direction you can place the first brick so it protrudes 5 px, but in the other direction only 4. The collision detection of builders with terrain feels a bit too strict as well, but I can't say for sure.

A couple of other things you might already be aware of:
- You can't assign skills to lemmings that are currently performing a task.
- A few visual things: the animation of the floater is a bit funky. Also, permanent skills (floater, climber) invert the color of the lemming (green <-> blue) in the original game.

The Return key currently not mapped to fast-forward is very noticeable to me because I use it excessively in the original game, haha.

It's great how everything is extracted from the original game, no assets you need to include with the code, and any kind of modification to the game assets itself (I guess currently that's limited to levels) are automatically supported :)