Lemmings Forums

Lemmings Boards => Fan Corner => Topic started by: platon42 on November 16, 2012, 04:31:49 PM

Title: Lemmings 2 Level Editor for Amiga
Post by: platon42 on November 16, 2012, 04:31:49 PM
Hi there,

I somehow came across this board when I stumbled upon Lemmings custom levels on YouTube. In 1996 I had written a Level Editor for Lemmings 2 The Tribes for the Amiga. A friends of mine, my sister and I had created a good bunch of levels with it and the 2.0 release in 1997 included 33 custom levels. I also had patched the game to allow selecting different level sets and the ability to just paint levels with a painting program (and of course you would still need to add some standard objects).

Way back when Hermann Schinagl wrote a converter (DOS tool) for those levels which fixed the big endian / little endian conversion between the Amiga and PC versions. I never owned a PC until 2008.

Anyway. I found an archive on my harddrive with the Lemmings 2 game, the Level Editor and the custom levels. I never had published it in this form due to copyright reasons regarding the original game. The archive (2 MB) can be extracted to any harddisk image of an Amiga emulation with basic Workbench installation and should be running both the game and the editor nicely from the Workbench.

I would be happy to provide the archive here to you, if anyone's interested. It's been a while, but it would be a shame to see the stuff getting lost after such efforts.

Let me know what you think and where to send the file to.

Cheers

Chris
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: ccexplore on November 17, 2012, 01:32:23 AM
Hmm, I haven't done much with Amiga emulator lately, but I would love to take a look at your custom Lemmings 2 levels ported to PC version. 8)  You can email files to my ccexplore address at yahoo.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: geoo on November 17, 2012, 03:24:11 AM
I'd be curious about those levels as well.

Also curious to see how the editor worked, even though it's unlikely that I'd use it, as I find the DOS version of L2 more comfortable to work with.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: platon42 on November 18, 2012, 02:47:29 PM
Hmm, I haven't done much with Amiga emulator lately, but I would love to take a look at your custom Lemmings 2 levels ported to PC version. 8)  You can email files to my ccexplore address at yahoo.

When I tried to find the binary of the converter, I found that Hermann Schinagl still maintains his website already with an archive of the PC converted levels. I've attached the ZIP file.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: platon42 on November 18, 2012, 02:54:06 PM
I'd be curious about those levels as well.

Also curious to see how the editor worked, even though it's unlikely that I'd use it, as I find the DOS version of L2 more comfortable to work with.

See the other post for the levels. I've attached two screenshots and the LHA archive, in case somebody wants to try out the game and editor on an WinUAE installation...
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: EricLang on November 19, 2012, 01:02:14 PM
Interesting! As soon as I have written the code to import Lemmings 2 for Lemmix I will have a look at them.
Of course this stimulates me to write a game-engine-clone for Lemmings 2!
(which will be quite difficult, ccexplore whenever you are ready :))
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: ccexplore on November 19, 2012, 01:50:52 PM
Of course this stimulates me to write a game-engine-clone for Lemmings 2!
(which will be quite difficult, ccexplore whenever you are ready :))

I better set some expectations upfront now.  Sorry but I don't foresee getting into any reverse engineering of Lemmings 2 anytime soon.  I simply don't have as much time as I used to, plus with Lemmings 2 we're talking about over 50 different skills (some of much higher complexity) versus the original's 8.  For the foreseeable future, people will have to stick with using the actual Lemmings 2 game to play custom levels.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: EricLang on November 19, 2012, 10:32:23 PM
Just joking cc :)
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: ccexplore on November 20, 2012, 02:43:34 AM
Just joking cc :)

Maybe so, but still want to make sure no one reading the thread has unrealistic expectations around emulating Lemmings 2 game physics. ;)
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: platon42 on November 20, 2012, 01:06:55 PM
Of course this stimulates me to write a game-engine-clone for Lemmings 2!
(which will be quite difficult, ccexplore whenever you are ready :))

I better set some expectations upfront now.  Sorry but I don't foresee getting into any reverse engineering of Lemmings 2 anytime soon.  I simply don't have as much time as I used to, plus with Lemmings 2 we're talking about over 50 different skills (some of much higher complexity) versus the original's 8.  For the foreseeable future, people will have to stick with using the actual Lemmings 2 game to play custom levels.

I never liked x86 assembly, but the Amiga MC68000 code was pretty easy to read (well, for me, at that time). Didn't take me long time to patch the game so it had the custom levels selection screen and later on, the ability to load custom (fully hand-drawn) graphics instead of using the block-based levels (of course, these levels cannot be played on the PC version). So no need for fiddling with files, just select your custom world inside the game and off you go...

The funny thing I found in the Lemmings 2 game was the implementation of some liquid/sand filling object that never had been used in the included levels (I used this object in a couple of levels, e.g. "Good Luck, Jim"). Okay, the game crashed when the liquid reached the object opening, but that's something you can circumvent...
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: EricLang on November 21, 2012, 12:06:16 PM
Do you have some code somewhere?
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: platon42 on November 22, 2012, 12:03:57 PM
Quote from: EricLang on 2012-11-21 06:06:16 (http://www.lemmingsforums.com/index.php?topic=697.msg15366#msg15366)
Quote
Do you have some code somewhere?
Of Lemmings 2? I'm afraid I must have deleted my Resource file for it (that's a pretty good disassembler from that time). I can attach however, the asm source code of the patch for the main game binary and my personal notes on what I found during reverse engineering. There are also a few routines at the end of the file. Supplied as is. You might need an text editor that supports LF-only newlines. Charset it ISO-Latin1.

The source of the editor itself consists of about 320 KB of 68000 assembly language files (excluding includes / headers). It was my last assembly project of that size. I used C for most stuff afterwards.


Mod Edit: Restored attachments.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: ccexplore on November 23, 2012, 09:56:17 AM
Finally got a chance to try the levels on PC DOS Lemmings 2, but now I wonder if some levels got broken as a result.  For example, I wonder if first level in Egyptian has some background tiles that turned into real terrain in the conversion.  Third level in Egyptian also had me mystified and wonder if the trampolines on DOS L2 lead the same path as on Amiga (it may very well not, I seem to remember seeing some subtle differences for example when I played Sports 1 of the original game in the two versions).

Still, pretty cool, and will try more of the levels when I have more time maybe during Xmas break. :thumbsup:
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: platon42 on November 23, 2012, 04:31:29 PM
Hmm... I can't really tell... Really never tried the PC converted levels myself. It could be that the conversion does not correctly cater for all bits and pieces.

I spent this whole day creating a nice stand-alone HDF harddisk image file that you can boot directly into a nice RTG workbench with WinUAE. It contains both the editor and the Lemmings 2 game. You only need a Kickstart 3.1 rom image (preferably A1200) to run it, but other than that no need to configure anything.

There you should be able play all the levels (to be able to select all levels, click in every of the four corners in the title screen) and create new levels, too.

Enjoy.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: Leo on November 23, 2012, 07:31:37 PM
You know, platon42 there is no need for HDF file at all? I you want, I can send you (as an example) RAR archive with just a plain folder with all the files available from the Windows, and all necessary for playing the game included in it. All you need to start the game is double-click on icon, and all you need to do at the end is to click on the EXIT button. So, this can be played without even be aware of the emulation.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: ccexplore on November 24, 2012, 01:56:02 AM
I spent this whole day creating a nice stand-alone HDF harddisk image file that you can boot directly into a nice RTG workbench with WinUAE. It contains both the editor and the Lemmings 2 game. You only need a Kickstart 3.1 rom image (preferably A1200) to run it, but other than that no need to configure anything.

Thanks.  I think I still need the kickstart rom image, I had been using pretty old ones (v1.3 for playing the lemmings games, and the latest ROM version I have is I think v3.01 and I'm not even sure if it works for anything).  If you can email that to me that'd be awesome.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: ccexplore on November 25, 2012, 09:50:03 AM
Ok, got it working now.  Looks like it's not so much the ROM version, as that I haven't edited the uae config file correctly to point to the correct paths for the ROM file and Hardfile.  Once I re-loaded the files through the WinUAE UI instead of trying to hand-edit the .uae file, it works.

For those who wants to get it working in WinUAE:

- make sure you use a pretty recent version of WinUAE (at least not some old version from like 7 years ago)
- after loading the .uae config file included in platon42's zip, go to the "ROM" and "Hard drive" sections of WinUAE properties and set the ROM and Hardfile to the corresponding files on your computer.  Whatever was set in the .uae config file probably won't work since the filepaths were based on platon42's computer and not yours.  The hardfile is the .hdf file in platon42's zip.
- I've attached KickStart ROM v3.1 here.  You probably can use any KS ROM of at least v3.0.
- (optional) also go to "CPU and FPU", and for CPU Emulation Speed, don't pick "fastest possible".  I found that fastest possible does not work well performance-wise when actually running Lemmings 2, at least on my computer.  The option to be closer to real speed works fine on my computer for both running the game as well as the editor.
- Save the configuration once you make the changes, of course.
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: ccexplore on November 25, 2012, 10:06:40 AM
Hmm... I can't really tell... Really never tried the PC converted levels myself. It could be that the conversion does not correctly cater for all bits and pieces.

I've compared the Amiga version of the levels, and have confirmed that indeed, the PC conversion fails to preserve solid vs transparent (aka background), so all the transparent tiles (aka blocks) become solid, extra terrain.  This completely changes many of the levels and basically make the PC conversion fairly worthless. :XD:

If I have time during Xmas break I'll see if I can redo the conversion properly, or at least edit the PC conversions to fix the tiles that should've been background.

=========

On another note, your editor supports importing custom graphics (IFF-ILBM) for a level.  I want to understand, does this mean the level file format actually has support to use custom graphics in place of the normal block-based map?  Is that support part of the original Lemmings 2 game code, or something new you patched into the game?

If the custom graphics support is built into the original game and file format, I'd love to know more about the technical details so we can try and see if PC DOS Lemmings 2 have similar support for it.

Anyway, thanks for the editor and new levels. :thumbsup:
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: platon42 on November 26, 2012, 01:02:36 PM
Sorry, I didn't check back a couple of days. Was sightly busy...

You did a good job figuring out how to run it. I agree I could have made it easier indeed. Actually, I just stripped down the HDF some more, included the ROM and a short readme file about fixing the paths. I also changed a few settings, such as the CPU idle one, creating a much lesser the CPU drain. For playing the game, a slow CPU setting is sufficient, for booting and using the editor, I guess I would prefer a faster CPU. I've attached the file once more :)

The fact that the background blocks haven't been converted correctly is quite disappointing. There are many levels that will no longer work the intended way. If you would find the time to fix it, it would be greatly appreciated. Maybe Herman Schinagl is still around somewhere and can hand over the source for the converter.

About the custom graphics: No, apparently that's not a built-in property of the level format. But as I already had an ILBM decoding routine in my patch (for the editor selection screen) and knew the address of the screen buffer for the level, it wasn't that hard to implement. Drawing a level in a paint program, however, is a much more painful job and I only ever created three levels based on one IFF picture for the outdoor world.

I tried a few levels again today and I found some them insanely hard to finish (Good Luck Jim, The Magic of Magno Boots, Spell Tarzan with an 'L'). Would love to see some reviews... :)

Cheers

Chris
Title: Re: Lemmings 2 Level Editor for Amiga
Post by: Leo on November 26, 2012, 11:08:38 PM
As I said few days ago platon42, there is no need to create HDF file. And no need for the 'readme' file about how-to-fix-paths. All can be configured to work 'out of the box'. Emulation can be pretty hiden from the 'end user'. I have the game configured that way. I didn't try anything with the editor, but I doubt there will be many new levels created in the future (hope I am wrong). And, for the last time, do you want me to send you this game-emulator package so you can see how this can be done?