Fake objects in Custlemm

Started by JM, November 21, 2005, 02:35:04 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

JM

Hi

On some levels I've played in Custlemm I've disocvered fake traps and exits. When a lemming tries to reach the exit he doesn't enter it and just walks past it. When he reaches a trap he walks past it without the trap touching him when no other lemming is with him. Also some lemmings just fall through the water without even drowning.

I have no idea why this happens so please could somebody explain to me thank you  :)

DragonsLover

Explained here. Just take a look! ;)

The strange thing is that you've already posted and seen this topic. So, why are you asking this question?

If you only wants the explanations, then let ccexplore explains!
I like dragons! They're the center of my life! I'll never forget them...

ccexplore

Just make an object's z-order be 16 or higher and it would behave as a fake object.

The only exception is the entrance trapdoor. &#A0;They are not affected by z-order, but CustLemm only handles a maximum of 4 (counting from the lowest z-order going up). &#A0;So the 5th entrance and beyond will not release any lemmings, and therefore fake. &#A0;And you can overlap multiple entrances to get the same effect of a single entrance. &#A0;(For example, overlapping 4 entrances in the same position will yield the exact effect as having just one entrance in that position.)

Keep in mind though that some people don't like fake objects, especially when they are intentionally misleading to someone trying to solve the level.

DragonsLover

Yeah, but JM asked WHY doing this? WHY does it happen?
I like dragons! They're the center of my life! I'll never forget them...

JM

Oh! I forgot about that topic. Thanks Dragonslover  :P

ccexplore

Quote from: DragonsLover link=1132583705/0#3 date=1132603871Yeah, but JM asked WHY doing this? WHY does it happen?
Actually, reading what JM posted, he was asking why (ie. "how come") some objects in some levels are fake. &#A0;So in essence the question is really asking how to make fake objects, despite the word "why". ;) Welcome to English. ;)

But as for the answer to the true "why" question, I guess it might be a memory limitation thing specific to the DOS version, coupled by the programmer's desire to do the easiest thing. &#A0;It might seem ridiculous that having 16 more objects to keep track of would really overwhelm the amount of memory available back in those days. &#A0;But actually, due to the particular way the DOS version implements interactive objects, having to track interactive objects with z-order of 16 or higher will actually drastically increase the amount of memory needed, strange as it might sound.

What's interesting is how the other versions behave, since as you know, the DOS version is missing many "non-essential" interactive objects that are present in other versions. &#A0;In particular, at least according to the screenshots at home.wanadoo, some levels like Taxing 27 or Mayhem 29 might well exceed the DOS limit. &#A0;It would be interesting to see whether on the Amiga or other versions, all the interactive objects you see are real. &#A0;(Though it's quite possible that some might simply not be reachable with the amount of skills given, and therefore not testable.)

tseug

Quote from: ccexplore (not loggedin)(Guest) link=1132583705/0#5 date=1132617873But actually, due to the particular way the DOS version implements interactive objects, having to track interactive objects with z-order of 16 or higher will actually drastically increase the amount of memory needed, strange as it might sound.
You mean it would actually allocate memory for all 256 objects, even though most of them wouldn't be used??? That sounds like some bad coding on the part of the programmer.

ccexplore

Quote from: tseug link=1132583705/0#6 date=1132622848You mean it would actually allocate memory for all 256 objects, even though most of them wouldn't be used??? That sounds like some bad coding on the part of the programmer.
Your guess is incorrect. &#A0;It's true though that the game, programmed as it is, always allocates memory for 16 real objects, even if there are fewer, but that isn't really wasteful since some levels will truly need have that many objects, and it's arguably preferable in low memory conditions to make the game not run at all than have it run until it hits the level that so happens to use up all the memory.

Anyway, after a little thought, I realize that it is in principle possible to rewrite the program support real objects with z-order 16 or higher, without increasing memory usage drastically and without fundamentally changing how the program does certain things.

DragonsLover

QuoteActually, reading what JM posted, he was asking why (ie. "how come") some objects in some levels are fake. &#A0;So in essence the question is really asking how to make fake objects, despite the word "why". ;) Welcome to English. ;)

I really need more English class lessons! :P Oh well... my english! :-X

Anyway, I wanted, me, to know the reason why. So, I should change my question above!
I like dragons! They're the center of my life! I'll never forget them...

minglw

Quote from: ccexplore (not logged in)(Guest) link=1132583705/0#7 date=1132629885
Quote from: tseug link=1132583705/0#6 date=1132622848You mean it would actually allocate memory for all 256 objects, even though most of them wouldn't be used??? That sounds like some bad coding on the part of the programmer.
Your guess is incorrect. &#A0;It's true though that the game, programmed as it is, always allocates memory for 16 real objects, even if there are fewer, but that isn't really wasteful since some levels will truly need have that many objects, and it's arguably preferable in low memory conditions to make the game not run at all than have it run until it hits the level that so happens to use up all the memory.

Anyway, after a little thought, I realize that it is in principle possible to rewrite the program support real objects with z-order 16 or higher, without increasing memory usage drastically and without fundamentally changing how the program does certain things.

ccexplore,  do you plan to rewrite the program  ?

It would be cool if someone disassemble the lemming program and re-write it to fix or introduce new functions.
( similar to what was done to the Supaplex game.)

It would be nice if there's a way to record/replay solution.

Or even make it so that you can select which level pack to play from a list.


ccexplore

Quote from: minglw link=1132583705/0#9 date=1133476598
Quote from: ccexplore (not logged in)(Guest) link=1132583705/0#7 date=1132629885Anyway, after a little thought, I realize that it is in principle possible to rewrite the program support real objects with z-order 16 or higher, without increasing memory usage drastically and without fundamentally changing how the program does certain things.
ccexplore, &#A0;do you plan to rewrite the program &#A0;?

It would be cool if someone disassemble the lemming program and re-write it to fix or introduce new functions.
( similar to what was done to the Supaplex game.)

It would be nice if there's a way to record/replay solution.

Or even make it so that you can select which level pack to play from a list.
Sorry, not at this time.

But fortunately for you, the two features you mentioned are probably supportable without touching the game executable itself at all (a plus since you always risk introducing new bugs to the game if you attempt to rewrite it). &#A0;For example, selecting a level pack can be done using an external program, which then launches a batch file that copies the desired level pack into the file levelpak.dat where CustLemm resides, then launches CustLemm.

minglw

Quote from: ccexplore (not logged in)(Guest) link=1132583705/0#10 date=1133478775It would be cool if someone disassemble the lemming program and re-write it to fix or introduce new functions.
( similar to what was done to the Supaplex game.)

It would be nice if there's a way to record/replay solution.

Or even make it so that you can select which level pack to play from a list.
Sorry, not at this time.

But fortunately for you, the two features you mentioned are probably supportable without touching the game executable itself at all (a plus since you always risk introducing new bugs to the game if you attempt to rewrite it). &#A0;For example, selecting a level pack can be done using an external program, which then launches a batch file that copies the desired level pack into the file levelpak.dat where CustLemm resides, then launches CustLemm.
[/quote]


For the levelpack select, yes that's easy to do with a batch job or an external program to select it from a list.  It's just not as nice as if it's incorporated into the main program.

The other function (solution record/play) is not possible without re-writing the program.
Wouldn't it be nice if the program can record the solution into solution file... and we can share it
among players.   (Similar to the DEMO files that you can record and play in Supaplex -- at least the hacked version).

I am hoping that Peter can add this support into the next Cheapo release (if there's one) or in the dimwits.

ccexplore

Quote from: minglw link=1132583705/0#11 date=1133589590The other function (solution record/play) is not possible without re-writing the program.
I mean it when I said both features can be done, at least theoretically, without touching the game executable. &#A0;Think keystroke logger and DOSBox.

minglw

Quote from: ccexplore (not logged in)(Guest) link=1132583705/0#12 date=1133597173
Quote from: minglw link=1132583705/0#11 date=1133589590The other function (solution record/play) is not possible without re-writing the program.
I mean it when I said both features can be done, at least theoretically, without touching the game executable. &#A0;Think keystroke logger and DOSBox.


Yeah, I guess if DOSBOX support recording/replaying inputs (keyboard, mouse or other devices), then it's possible.

I haven't check into the functions of DOSBOX yet, if it doesn't already support recording/replaying inputs to/from a file, maybe we can suggest it as a new function to DOSBOX.    Hopefully, it can be added.


DragonsLover

The recording feature of Dosbox would be available in the next version of it. And I'm waiting for it! :P

Or you can download "recording the screen" programs and try them to record.

About Supaplex and the possibility to record demos, it's not kinda the same thing for Lemmings. The level itself is copied into the .sp file and all the "recording" of the events are recorded as well into the level. Is that would be possible for Lemmings?
I like dragons! They're the center of my life! I'll never forget them...