Here I Go Again!

Started by GuyPerfect, September 16, 2009, 12:08:14 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

ccexplore

http://www.lemmingsforums.com/index.php?topic=176.msg6830#msg6830">Quote from: weirdybeardy on 2009-10-27 14:11:16
I'm a little surprised that nobody has tried to fully "Lemmix" L2 before now. 'Cos let's face it, GuyPerfect is making it look easy so far.  http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />

If by "Lemmix" L2 you mean work out the game mechanics, then that's a whole different animal from what GuyPerfect's doing.  If you're just merely talking about an editor, then give some credit to geoo for trying. http://www.lemmingsforums.com/Smileys/lemmings/wink.gif" alt=";)" title="Wink" class="smiley" />

I think the simple fact is, until recently there just hasn't been enough expressed interest in custom levels for Lemmings 2, compare with Lemmings 1.  I said "expressed" because for all I know, maybe the interest is there all along, but just never talked about in the forums.  I suppose it's also a bit of a chicken-and-egg thing.

=========

Oh, and one more thing:  almost none of the objects are displayed correctly in PCL2ED right now, far as I can tell.  So try not to lose track of where the entrances and exits are. http://www.lemmingsforums.com/Smileys/lemmings/winktounge.gif" alt=";P" title="Wink-Tongue" class="smiley" />  Good luck.

weirdybeardy

I didn't mean to discredit geoo in any way, and I hope he knows that.  http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" />

After a couple of hours of experimenting with PCL2ED, I feel reasonably confident that I could scrape together a custom level of some sort. Patience and precision is required, but I've got no problem with that. I can't assign skills, make a level larger or smaller, or give it a name (at least until I figure out how to use a hex-editor and all that jazz)... but being able to modify scenery and then playtest it immediately in DOSBox makes me a happy bunny indeed.  http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" />

It's interesting what you say about expressed interest in custom L2, because I was always under the vague impression that because L1 and ONML are considered timeless classics (and rightly so http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" /> ), the customisation thing with L2 never materialised because although people love the game itself (I certainly do!), the motivation wasn't there because poor old Tribes would exist in the original game's shadow... or something. I dunno. I'm really just talking out of my backside now.  http://www.lemmingsforums.com/Smileys/lemmings/embarrassed.gif" alt=":-[" title="Embarrassed" class="smiley" />

Now I'm itching to get back to re-jigging some Highland levels (my favourite tribe), so you'll have to excuse me.  http://www.lemmingsforums.com/Smileys/lemmings/winktounge.gif" alt=";P" title="Wink-Tongue" class="smiley" />
My projects:

Lemmings in Weirdyland (NeoLemmix):
https://www.lemmingsforums.net/index.php?topic=6135.0

My levels for Lemmings 2 The Tribes can be found here:
https://www.lemmingsforums.net/index.php?topic=990.0

geoo

Actually, the editor was supposed to display objects and the composite tiles in their respective window, and in fact, it did on my old computer back when I wrote this.
However on my current computer it doesn't, and as I got a PM from weirdybeardy yesterday, I had a look into that horrible code again and found the cause. (In fact, for weirdy it seems the problem didn't just cause objects not to be displayed, but crash the entire thing).
Issue was that there were some variables that I didn't initialze, which is one of the most blatant errors possible.
Upon finding that out I quickly fixed it, fixed version can be downloaded from here: http://geoo.digibase.ca/PCL2ED/" class="bbc_link" target="_blank">http://geoo.digibase.ca/PCL2ED/
Now objects do display again, and you can place composite tiles (however once they are set, you cannot move them around anymore).
One archive is the source, on is the standalone app (win32) and one has the app, the level and style files and a batch file for opening the first classic level.

I'm currently learning to use Qt for GUI design, and as an exercise I started writing an editor for the general level stats and skill distribution, just because it fits as exercise and even might have some practical use. I hope to release this in a few days, and gain some experience with Qt on the way.

But soon(?), when GuyPerfect releases his editor, you won't have to deal with the crappy controls of PCL2ED anymore. http://www.lemmingsforums.com/Smileys/lemmings/wink.gif" alt=";)" title="Wink" class="smiley" />

@GuyPerfect: I didn't find your last level easy to figure as you feared it might be; in fact I found it to be a very nice puzzle.

ccexplore

However on my current computer it doesn't, and as I got a PM from weirdybeardy yesterday, I had a look into that horrible code again and found the cause. (In fact, for weirdy it seems the problem didn't just cause objects not to be displayed, but crash the entire thing).

It was pretty bad on one my XP laptop too, as I http://www.lemmingsforums.com/index.php?topic=176.msg6826#msg6826" class="bbc_link" target="_blank">mentioned earlier.  In fact it consistently locked up Windows solid on that machine (not even a bluescreen) within seconds of running, which is somewhat of an impressive feat actually.  http://www.lemmingsforums.com/Smileys/lemmings/shocked.gif" alt=":o" title="Shocked" class="smiley" /> I know I said the video driver is probably partly to blame, but I don't think that lets your program off the hook, since I hadn't had any other program screw up Windows that badly on that machine. http://www.lemmingsforums.com/Smileys/lemmings/wink.gif" alt=";)" title="Wink" class="smiley" />

I don't have my XP laptop with me right now, but I'll definitely try your fixed version on it ASAP, hopefully with much better results.  On a Vista machine where PCL2ED was at least working, it now displays the objects for me, so it's definitely looking more promising.  Thanks! http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" />

ccexplore

Well, I tried your fixed version of PCL2ED on the XP machine and it no longer locks up, so things are definitely looking up a notch.  http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" />  I still find though that after repeated use on my Vista machine, some graphics operations in Windows noticeably slow down, so there might still be some memory or resource leaks in your program, but on the whole it's working fine now.

[edit: I spoke too soon.  PCL2ED locked up my XP machine again later that night. http://www.lemmingsforums.com/Smileys/lemmings/XD.gif" alt=":XD:" title="XD" class="smiley" /> It was happening when I was moving the main window containing the level and it was overlapping one of the other windows while being moved, which I think might've also been the trigger for previous lock-ups in the buggy version of the PCL2ED.  As I said, buggy video driver definitely, but I'm definitely curious what your program is doing that the buggy video driver is disagreeing with so violently. http://www.lemmingsforums.com/Smileys/lemmings/wink.gif" alt=";)" title="Wink" class="smiley" />]

In the meanwhile, to fill in some of the void in the current state of affairs, I've quickly whipped up a program for editing level stats and skillset:  PCL2STAT.  Like PCL2ED, it only works on decompressed level files, and you need to specify the file to open on the command line, just like PCL2ED.

Currently it lets you change the following:
- title
- screen starting x and y positions
- time limit
- release rate
- max # of lemmings lost to still get gold
- all 8 skill slots

This should cover almost everything.

In addition, there's a button that will clear the level of all terrain and objects, perfect for getting a clean slate to start your new custom level on!

[There's also a button for changing the size of the level, but that hasn't been actually implemented yet.]

I know geoo said he's working on something similar, and of course there's GuyPerfect lurking somewhere, but now no one has to wait!  I think it'd still be good though if geoo finishes his version of the stats/skills editor.

GuyPerfect

http://www.lemmingsforums.com/index.php?topic=176.msg6859#msg6859">Quote from: ccexplore on 2009-10-28 05:47:19
I know geoo said he's working on something similar, and of course there's GuyPerfect lurking somewhere, but now no one has to wait!

I'm still keeping up on the thread. I'm just not posting updates.

weirdybeardy

@ccexplore: This is great, thanks!  http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" /> And well timed. I just spent this afternoon improvising and building a new level for the Polar tribe. It took me a couple of hours (or maybe three, I lost track of time) and a lot of fiddly tile-editing to get the edges of terrain nice and neat, but I was fairly impressed with my results. I just threw in everything and made it up as I went along, and it was easier than I thought to build a level that looks okay, puzzle aside. Some points I'll quickly mention:

I saved my "custom" level by pressing F3 then immediately ran the file using L2 on DOSBox. Everything was fine, except for the exit igloo: the lemmings who reached the exit didn't exit - they just walked past it.

When I re-opened the editor after that (using my already-built level slot), some of the objects (mainly steel) had vanished, and some of the terrain tiles had also gone. It looked like it could've been a glitch, 'cos there was no apparent logic to it. I have a sneaky suspicion that I may have exceeded the max number of objects - but if that's the case, then why did the level run perfectly  to start with?

I tried a little bit of everything on my level. The ice-cube trap worked fine, the swing-chain wotsit was also fine (but how do I adjust the length of the chain??), and the cannon was fine (but again, how do I adjust it?).

Heh, I'm actually slightly taken aback at how quickly all this seems to be happening.  http://www.lemmingsforums.com/Smileys/lemmings/laugh.gif" alt=":D" title="Laugh" class="smiley" /> Is the dawn of the Custom Tribes era almost upon us???   http://www.lemmingsforums.com/Smileys/lemmings/tongue.gif" alt=":P" title="Tongue" class="smiley" />

@GuyPerfect: You posted your reply while I was writing this up. http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" /> Any news or updates...?
My projects:

Lemmings in Weirdyland (NeoLemmix):
https://www.lemmingsforums.net/index.php?topic=6135.0

My levels for Lemmings 2 The Tribes can be found here:
https://www.lemmingsforums.net/index.php?topic=990.0

GuyPerfect

http://www.lemmingsforums.com/index.php?topic=176.msg6867#msg6867">Quote from: weirdybeardy on 2009-10-28 12:01:08
I saved my "custom" level by pressing F3 then immediately ran the file using L2 on DOSBox. Everything was fine, except for the exit igloo: the lemmings who reached the exit didn't exit - they just walked past it.

When I re-opened the editor after that (using my already-built level slot), some of the objects (mainly steel) had vanished, and some of the terrain tiles had also gone. It looked like it could've been a glitch, 'cos there was no apparent logic to it. I have a sneaky suspicion that I may have exceeded the max number of objects - but if that's the case, then why did the level run perfectly  to start with?

Map features like exits and traps don't seem to work if the Lemmings are walking on steel when they pass the trigger points. I plan to investigate this further.

There is memory allocated in the level file for 64 objects; regardless of type, size or location. If you exceeded this limit of quantity, they couldn't have shown up in the level when you played it.

ccexplore

http://www.lemmingsforums.com/index.php?topic=176.msg6868#msg6868">Quote from: GuyPerfect on 2009-10-28 12:11:40
Map features like exits and traps don't seem to work if the Lemmings are walking on steel when they pass the trigger points. I plan to investigate this further.

I browsed through the object data in style files a few days ago, and it seems like trigger areas may be stored as object subparts.  (More precisely, using http://camanis.net/lemmings/files/docs/lemmings_2_sprite_file_format.txt" class="bbc_link" target="_blank">this document as a reference, they seem to be part of the "M subentries" of an L2OB entry, with the byte at offset 0x0C of subentry set to value 0x80.)  You mentioned that objects can overwrite other overlapping objects, so if trigger areas are actually object subparts, it would stand to reason that they could be overwritten by steel (or other objects in general) in the same manner.

[edit: perhaps what I said above will make more sense if I note that in Lemmings 1, trigger areas are handled such that they are triggered if a lemmings is standing on pixels within the trigger area, and not a collision criteria of overlapping boundary rectangles.  Assuming triggers are modeled the same way in L2, this is why if you look at the L2 object data for trigger areas of traps and exits, their positioning are usually immediately at and below where "ground level" is located for the object, in order to work the expected way]

I'll have to browse through the official L2 levels to see whether any of them actually have trigger areas that overlaps with steel and other such objects.  I know for a fact that in Lemmings 1 you have something similar going on, except in that case, objects would overwrite the steel, so usually you just lose steel protection in some places rather than losing the object trigger.


ccexplore

http://www.lemmingsforums.com/index.php?topic=176.msg6867#msg6867">Quote from: weirdybeardy on 2009-10-28 12:01:08
@ccexplore: This is great, thanks!  http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" /> And well timed. I just spent this afternoon improvising and building a new level for the Polar tribe. It took me a couple of hours (or maybe three, I lost track of time) and a lot of fiddly tile-editing to get the edges of terrain nice and neat, but I was fairly impressed with my results.

You're very welcome.  PCL2STAT took about the same amount of time to write as one of you guys making a custom level for Lemmings 2 (well okay, discounting my time spent on learning about the file formats), so I simply feel compelled to make it happen. http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />

And if you're able to sort through the technical troubles with your custom level, I'd love for you to upload it to the thread so we can try it out. http://www.lemmingsforums.com/Smileys/lemmings/thumbsup.gif" alt=":thumbsup:" title="Thumbs Up" class="smiley" />

http://www.lemmingsforums.com/index.php?topic=176.msg6867#msg6867">Quote from: weirdybeardy on 2009-10-28 12:01:08
the swing-chain wotsit was also fine (but how do I adjust the length of the chain??), and the cannon was fine (but again, how do I adjust it?).

According to existing documentation geoo posted:

Quote
WASD in Object mode extends/contracts the selected object, i.e. for some objects like steel, water or the swing chain it is possible line up replicates of an object horizontally or vertically.

I believe what it means is that if you select the chain or cannon, you can use "A" and "D" on the keyboard to contract/expand horizontally, and likewise W/S for vertical.  I haven't tried it myself though.

weirdybeardy

I've attached a custom level to this post, fresh from the editor.  http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" /> It's decompressed and it replaces Highland level 1. Please could somebody give it run through to see if all the objects are in place...?

It's not exactly a proper level, it's just a test-level I threw together in a short space of time. Feedback would be greatly appreciated!

Thanks!  http://www.lemmingsforums.com/Smileys/lemmings/cool.gif" alt="8)" title="Cool" class="smiley" />
My projects:

Lemmings in Weirdyland (NeoLemmix):
https://www.lemmingsforums.net/index.php?topic=6135.0

My levels for Lemmings 2 The Tribes can be found here:
https://www.lemmingsforums.net/index.php?topic=990.0

ccexplore

http://www.lemmingsforums.com/index.php?topic=176.msg6869#msg6869">Quote from: ccexplore on 2009-10-28 12:55:35
I'll have to browse through the official L2 levels to see whether any of them actually have trigger areas that overlaps with steel and other such objects.

I've just started on my browse-through and already found something of interest.  Classic 9 apparently has an exit that sits on top of steel, but on closer inspection, things were not as they seem.

I've already noticed, when I was browsing through the object sections of style data, that every style has 2 versions of exits:  a regular one, and one that looks just like the regular one, but has steel graphics where the trigger area is expected to be located.  At the time I didn't quite connect the dots, but when I finally saw one of these "steel exits" being used in Classic 9 (instead of the regular ones), it all connects now.

On Classic 9, in addition to using the "steel version" of exit, the surrounding steel has all been carefully placed to avoid overlapping the steel portion of the exit object!  This strongly suggests my theory about trigger areas affected by the overlapping objects overwrite phenomenon GuyPerfect shown before, necessitating the use of a special "steel version" of exit objects for those occasions.  Unfortunately, there are no such analogs for traps, so you might simply have to avoid placing traps on top of steel blocks (as I finish my sweep thru the levels, I can confirm whether that's the case for all official L2 levels).

Dullstar

http://www.lemmingsforums.com/index.php?topic=176.msg6886#msg6886">Quote from: ccexplore on 2009-10-28 17:32:07
http://www.lemmingsforums.com/index.php?topic=176.msg6869#msg6869">Quote from: ccexplore on 2009-10-28 12:55:35
I'll have to browse through the official L2 levels to see whether any of them actually have trigger areas that overlaps with steel and other such objects.

I've just started on my browse-through and already found something of interest.  Classic 9 apparently has an exit that sits on top of steel, but on closer inspection, things were not as they seem.

I've already noticed, when I was browsing through the object sections of style data, that every style has 2 versions of exits:  a regular one, and one that looks just like the regular one, but has steel graphics where the trigger area is expected to be located.  At the time I didn't quite connect the dots, but when I finally saw one of these "steel exits" being used in Classic 9 (instead of the regular ones), it all connects now.

On Classic 9, in addition to using the "steel version" of exit, the surrounding steel has all been carefully placed to avoid overlapping the steel portion of the exit object!  This strongly suggests my theory about trigger areas affected by the overlapping objects overwrite phenomenon GuyPerfect shown before, necessitating the use of a special "steel version" of exit objects for those occasions.  Unfortunately, there are no such analogs for traps, so you might simply have to avoid placing traps on top of steel blocks (as I finish my sweep thru the levels, I can confirm whether that's the case for all official L2 levels).

Huh?

ccexplore

Yeah, that post is not directed at someone like you to read.  The layman's takeaway at this point is that trap triggers areas may not work if they overlap with other objects, which includes steel in Lemmings 2, and that there's a special version of exit in each style that works specifically with steel floors.

Dullstar