Author Topic: A problem  (Read 16209 times)

0 Members and 1 Guest are viewing this topic.

Offline geoo

  • Administrator
  • Posts: 1475
    • View Profile
Re: A problem
« Reply #15 on: April 30, 2007, 02:11:42 PM »
on this forum we've got all the talent we need to put together a Lemmings 2 level editor (and Lemmings 3 level editor for that matter)... we're just too lazy/busy :(
Just wondering, is the level/gfx format known? Assuming that there's a level converter Amiga->DOS out there I guess it is. In case it weren't, I'd give it a shot.
Is it known to anybody here?

DrLemmingsham

  • Guest
Re: A problem
« Reply #16 on: April 30, 2007, 05:58:28 PM »
I think I've figured out hw to run the Amiga one! All I need is an Amiga Emulator that doesn't need Kickstart Roms. I'm too cheap to buy them. (Yeah, I admit it :spam: )

Offline Mindless

  • Posts: 719
  • Inactive - may respond to PM.
    • View Profile
Re: A problem
« Reply #17 on: May 01, 2007, 01:01:27 AM »
Just wondering, is the level/gfx format known?
Yes, the graphics format is partially.

After decompression, the STYLE/*.dat files are IFF files:
Code: [Select]
4 bytes -> file identifier
big-endian double-word -> file size (excluding 8 bytes so far)
4 bytes -> file type

4 bytes -> section 1 type
big-endian double-word -> section 1 size (excluding 8 bytes so far)
<section 1 size> bytes -> section 1 data

...

4 bytes -> section n type
big-endian double-word -> section n size (excluding 8 bytes so far)
<section n size> bytes -> section n data

Each data section contains a different type of data.
The L2CL section is the palette (2 bytes of garbage followed by 128 3-byte RGB sets).
The L2BL section is the tile set (2 bytes of garbage followed by an arbitrary number of 128-byte, encoded tiles).
The other sections I have not analyzed.

I really cannot explain algorithms aside from using code :(
Code: [Select]
do
  p = 0
  for v = 0 to 3
    for y = 0 to 7
      for x = 0 to 3
        pset ((x * 4) + v, y), d[p]
        p += 1
      next
    next
  next
  d += 128
loop
(d is a byte pointer to the current tile, pset is a pixel setting function)

I might be wrong about the garbage bytes.

Offline DragonsLover

  • Posts: 1234
  • Do you want fire?
    • View Profile
Re: A problem
« Reply #18 on: May 01, 2007, 05:29:03 AM »
On Lemmings Universe, there's a "Lemmings II Level Encoder/Decoder". However, the link of the file is dead. Where could I get it?
I like dragons! They're the center of my life! I'll never forget them...

Offline geoo

  • Administrator
  • Posts: 1475
    • View Profile
Re: A problem
« Reply #19 on: May 01, 2007, 09:00:51 AM »
As it is called lemzip, I guess that's the programme to compress/decompress the .dat files.
You can get it from Mindless' page: http://it.travisbsd.org/lemmings/tools.php
I guess it is better to use Mindless' lem2zip as according to the readme:
Quote
LEM2ZIP differs from LEMZIP (coded by Hermann Schinagl), because
LEM2ZIP is always successful when compressing.

Ah ok, that's nice (and I guess the best way to decribe an algorithm is code ;)). Then I'll take a look at the level format first.
(the save.dat format is really simple)

Offline geoo

  • Administrator
  • Posts: 1475
    • View Profile
Re: A problem
« Reply #20 on: May 05, 2007, 04:18:23 PM »
Despite my utter lack of programming skill, I managed to write a program to display the lemmings 2 graphics from the L2BL section of the respective styles as Mindless described. I saved the graphics in .png format: http://207.58.177.175/~geoo89/lemmings/l2gfx.zip
The colorful line on top is the palette, each sprite is 16*8px.

As for the level format, I figured it out apart from a few bytes: http://207.58.177.175/~geoo89/lemmings/l2level.txt
@Mindless: just in case you want to add this description to your site, feel free to edit it as it might require some clean-up in that case.

DrLemmingsham

  • Guest
Re: A problem
« Reply #21 on: May 12, 2007, 03:24:27 PM »
O......kay..... How do I use them?

Offline geoo

  • Administrator
  • Posts: 1475
    • View Profile
Re: A problem
« Reply #22 on: May 12, 2007, 08:52:55 PM »
Well, as for the graphics, they are for your viewing pleasure...and if you want to edit levels manually (using a hex-editor), the order represents the terrain piece ID, i.e. the n-th piece has the ID n.

As for the level format documentation, it could help you if you want to edit levels manually or write an editor.

EDIT: Uhh, I'm Egyptian lemming now. :shocked: I quite like the tribe, but I prefered the green though, Outdoor is my favourite tribe.

DrLemmingsham

  • Guest
Re: A problem
« Reply #23 on: May 13, 2007, 02:22:19 AM »
Well, as for the graphics, they are for your viewing pleasure...and if you want to edit levels manually (using a hex-editor), the order represents the terrain piece ID, i.e. the n-th piece has the ID n.

As for the level format documentation, it could help you if you want to edit levels manually or write an editor.

EDIT: Uhh, I'm Egyptian lemming now. :shocked: I quite like the tribe, but I prefered the green though, Outdoor is my favourite tribe.
:huh: And what on earth is a hex editor?
EDIT: I've got one, but I have no clue how to get it into the editor. I have no programming/coding/hex editing skill at all. I don't even know any programmers! HELP!!!

Offline DragonsLover

  • Posts: 1234
  • Do you want fire?
    • View Profile
Re: A problem
« Reply #24 on: May 13, 2007, 03:36:27 AM »
Wow!

An hex editor is an hexadecimal editor. It's a tool that can edit bytes of anything. You just need to open your hex program, open a file, and edit by yourself.

Ok, first, you'll surely see a lot of numbers everywhere. These are called bytes (quite evident, no?)

Now, look at "l2level.txt", you'll see the coordinates where are stocked the infos of the uncompressed levels. For example: from byte 0 to byte 3, there's "FORM". From byte 4 to byte 7, it's the file size. And so on... In your hex editor, you should see the coordinates of the bytes somewhere.

In hexadecimal, values are from 00 (0) to FF (255) and can even use multiple bytes like 00 00 (0) to FF FF (65535) or FF FF FF (16 777 215).
I like dragons! They're the center of my life! I'll never forget them...

DrLemmingsham

  • Guest
Re: A problem
« Reply #25 on: May 13, 2007, 03:56:58 AM »
WHAT!?!? I jsut want to make levels! I don't understand all that stuff! ARRGGHHH!!!!  :spam: :spam: :spam:

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: A problem
« Reply #26 on: May 13, 2007, 10:55:20 AM »
Look, just give it a rest and wait until someone creates a level editor for Lemmings 2.  Or stick with Lemmings-1-style levels and create them with LemEdit or Lemmix or Cheapo.

DrLemmingsham

  • Guest
Re: A problem
« Reply #27 on: May 13, 2007, 05:33:04 PM »
When can someone make one? :huh:

Offline Mr. K

  • Posts: 793
  • Former admin, always Lemmings fan
    • View Profile
    • Wafflenet
Re: A problem
« Reply #28 on: May 13, 2007, 11:38:30 PM »
If you're that worried about it, learn the hex editing stuff. It's not that complicated after a while.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: A problem
« Reply #29 on: May 14, 2007, 02:04:50 AM »
Yeah, but no one would want to edit levels with a hex editor (except maybe to change the skill distribution or the title or something minor); you can't see how your changes work out w/o having to bring up the game.

Anyway, looking at my old e-mails, Lemmix (one of the most recent level editors in existence) took about one and a half month from project start to the first public alpha.  But that's from someone's who's dedicated and enthusiastic.  Right now it doesn't look like anyone (who has the ability) is itching to write a level editor for Lemming 2, so if we double the time (which is still rather conservative), I'd say 3 months from now.