Author Topic: Genesis trigger areas  (Read 4483 times)

0 Members and 1 Guest are viewing this topic.

Offline Tsyu

  • Posts: 350
    • View Profile
Genesis trigger areas
« on: October 16, 2013, 07:56:43 PM »
Does anyone know where the object trigger areas are located in the Genesis Lemmings ROM? I want to know so that I can add the correct trigger areas to my Genesis level pack for Lemmini.

Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Genesis trigger areas
« Reply #1 on: October 16, 2013, 08:27:19 PM »
That was a question I was wanting to ask someone, please forgive me if it's a silly question but what is a trigger area as I've heard that term a lot in relation to lemmings but not quite sure what it is.

Offline Crane

  • Posts: 1081
    • View Profile
Re: Genesis trigger areas
« Reply #2 on: October 16, 2013, 10:24:28 PM »
A trigger area is the region at which a Lemming can interact with an object.  For example, the trigger area for the exit is usually at the foot of the door.  It's so Lemmings don't trigger traps in unfair or unrealistic ways.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Genesis trigger areas
« Reply #3 on: October 16, 2013, 10:40:45 PM »
Does anyone know where the object trigger areas are located in the Genesis Lemmings ROM? I want to know so that I can add the correct trigger areas to my Genesis level pack for Lemmini.

When I ripped the Genesis levels from a while back, I believe I've worked that out as well (as I have to because for some objects they are different enough from the DOS counterparts that the level needs adjustments to work with DOS).  Let me get back to you later on this once I've located the relevant materials.  For example I seem to recall I even made modified versions of DOS styles (ie. the groundXo.dat files) that make use of how trigger areas are configured in Genesis Lemmings.  If not, then at least I should be able to recover the ROM information from the source code of the program I wrote to help me rip the levels from the ROM.

That was a question I was wanting to ask someone, please forgive me if it's a silly question but what is a trigger area as I've heard that term a lot in relation to lemmings but not quite sure what it is.

No problem.  It just refers to the exact area within an object that the lemmings must be in, to trigger the object's effect on the lemming.  For example, notice how with the exit object, the lemming actually has to reach a location somewhat around the center of the exit, before the lemming would actually start to exit, rather than as soon as the lemming starts to overlap with the exit's graphics.  Similarly, with traps there is a specific, typically small area that the lemming needs to step into, in order to actually trigger the trap to kill the lemming.


Offline grams88

  • Posts: 563
  • Just one more thing.
    • View Profile
Re: Genesis trigger areas
« Reply #4 on: October 17, 2013, 10:14:37 PM »
Thanks ccexplore and Crane

It's sort of like if the lemmings is standing in a certain area for that object to work, that's me understood that one thanks guys  :thumbsup:

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Genesis trigger areas
« Reply #5 on: October 17, 2013, 11:29:20 PM »
For example I seem to recall I even made modified versions of DOS styles (ie. the groundXo.dat files) that make use of how trigger areas are configured in Genesis Lemmings.

@Tsuyu on Genesis trigger area placements:  I've attached the modified ground DAT files here.  I've compared a trap object I know to have different trigger area placement between DOS and Genesis, and Lemmix styles referencing these modified ground files do indeed have a different trigger area placement for the trap, compared to the regular Lemmix styles referencing DOS ground files.

Offline Tsyu

  • Posts: 350
    • View Profile
Re: Genesis trigger areas
« Reply #6 on: October 18, 2013, 01:18:15 AM »
Thanks for those files!

I'm also aware that a few terrain pieces are different in the Genesis version. The examples that I know of are dirt 42 and 43, which are swapped, and pillar 32, which is a few pixels wider. Are you aware of any others?

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Genesis trigger areas
« Reply #7 on: October 18, 2013, 02:30:20 AM »
I'm also aware that a few terrain pieces are different in the Genesis version. The examples that I know of are dirt 42 and 43, which are swapped, and pillar 32, which is a few pixels wider. Are you aware of any others?

I recall one or two more such changes, but I have to go back to my old computer with the rip program to find out exactly which.  I do believe the ones you've identified so far already cover like 95% of the changes that matter in terms of level solving.  For my rip effort from long ago, I opted instead to take care of the differences by having the rip program update the level data during conversion, so that it sets up the terrain correctly with the DOS terrain set. As a result I don't have a handy set of files to give you like I could with the object trigger changes.

Also, are you ripping the levels yourself, or are you working off of the rips I made (I somehow seem to recall sending out something like that to you recently)?  I ask because if I gave you the rips that you are currently working off of, they might (but I'm not 100% sure) already have the terrain changes applied that allow the level terrain to be correct with the DOS terrain set (and therefore would become incorrect again if you adjust the terrain in the graphics sets to match Genesis).

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Genesis trigger areas
« Reply #8 on: October 18, 2013, 03:13:50 AM »
Also, are you ripping the levels yourself, or are you working off of the rips I made (I somehow seem to recall sending out something like that to you recently)?  I ask because if I gave you the rips that you are currently working off of, they might (but I'm not 100% sure) already have the terrain changes applied that allow the level terrain to be correct with the DOS terrain set (and therefore would become incorrect again if you adjust the terrain in the graphics sets to match Genesis).

A forum search confirms that I gave you the rips, and a quick check in Lemmix (eg. presnt01.lvl) shows that those rips already have level data modifications applied so that the terrain matches Genesis version exactly even when using DOS's terrain set.

Therefore I don't think you need to bother accounting for the terrain differences if you are working off of my LVLs.  If I have time I can still find out the exact set of changes just for informational purposes for posterity.  So I guess technically the rips aren't exactly 100% "unmodified", but I'm still pretty sure the modifications are done in such a way that the terrain is pixel-to-pixel accurate to Genesis (ignoring palette differences), when used on the DOS terrain set.

Offline Tsyu

  • Posts: 350
    • View Profile
Re: Genesis trigger areas
« Reply #9 on: October 18, 2013, 03:48:23 AM »
I recall one or two more such changes, but I have to go back to my old computer with the rip program to find out exactly which.  I do believe the ones you've identified so far already cover like 95% of the changes that matter in terms of level solving.  For my rip effort from long ago, I opted instead to take care of the differences by having the rip program update the level data during conversion, so that it sets up the terrain correctly with the DOS terrain set. As a result I don't have a handy set of files to give you like I could with the object trigger changes.
It's fine if you don't have any files. If you tell me which pieces are different, then I can rip them by editing the first level (yes, I know how to do that) and taking a screenshot. I can then compare those pieces with the DOS ones to see exactly how they're different. (I couldn't figure out how to rip the graphics directly; I guess they're compressed.) If necessary, I can modify terrain pieces and have them be used only with the Genesis pack.

Also, are you ripping the levels yourself, or are you working off of the rips I made (I somehow seem to recall sending out something like that to you recently)?  I ask because if I gave you the rips that you are currently working off of, they might (but I'm not 100% sure) already have the terrain changes applied that allow the level terrain to be correct with the DOS terrain set (and therefore would become incorrect again if you adjust the terrain in the graphics sets to match Genesis).
I'm using my own rips. (Thank goodness the Genesis levels aren't compressed; I wouldn't have been able to figure out their format if they were.)

A forum search confirms that I gave you the rips, and a quick check in Lemmix (eg. presnt01.lvl) shows that those rips already have level data modifications applied so that the terrain matches Genesis version exactly even when using DOS's terrain set.

Therefore I don't think you need to bother accounting for the terrain differences if you are working off of my LVLs.  If I have time I can still find out the exact set of changes just for informational purposes for posterity.  So I guess technically the rips aren't exactly 100% "unmodified", but I'm still pretty sure the modifications are done in such a way that the terrain is pixel-to-pixel accurate to Genesis (ignoring palette differences), when used on the DOS terrain set.
I did find some inaccuracies in those files. For example, Sunsoft 11 is missing the water, and I think at least one level (I don't remember which) has an incorrect screen-start position. This is partly what got me to rip the levels myself.

Besides, your fix for the wider pillar 32 piece doesn't look as good with the high-resolution graphics as it does with the DOS graphics. For this reason, I modified this graphic to be the correct width without it looking too ugly. A comparison image is attached. The top portion shows your fix as it appears in Lemmini; the bottom portion shows the same scene with my graphic.

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Genesis trigger areas
« Reply #10 on: October 18, 2013, 07:58:08 AM »
I did find some inaccuracies in those files. For example, Sunsoft 11 is missing the water, and I think at least one level (I don't remember which) has an incorrect screen-start position. This is partly what got me to rip the levels myself.

Hmm, no one has brought these inaccuracies up before, I wish you'd have alerted me about the inaccuracies earlier.  Any chance you can share out or at least email me (my forum username at yahoo) the program (source code) you wrote to rip the levels?  Either I got something wrong with my rip program, or I sent out the wrong set of files that does have some post-conversion manual changes I forgot about. [update: never mind--details in post below]

With that in mind, if you discover any inaccuracies with the trigger area information captured in the modified ground files I sent out earlier, let me know. [update: probably okay on this end as it looks like I recover the data from the ROM itself without any modifications.  Still, no harm in double-checking!]

I'm going back to my own rip program (once I find it) to identify the changed terrain.  May also be a good time for me to document and publish the ROM details for posterity (though I believe I haven't bothered to work out Genesis' graphics format either myself).

In case I can't find my stuff, as a possible backup plan you can try doing a program to compare my rip's terrain data with yours, level by level.  Most if not all differences should correspond to the changed terrain pieces, and if memory serves no "correction" I applied in the conversion program use more than 2 DOS terrain pieces per Genesis terrain piece (indeed, I want to say pillar 32 is the only one that actually needed 2 DOS terrain pieces to "correct"). [update: found]

Offline ccexplore

  • Posts: 5311
    • View Profile
Re: Genesis trigger areas
« Reply #11 on: October 18, 2013, 11:14:56 AM »
I found my programs and boy, my memory's apparently not all that accurate. :XD: It turns out that:

1) The conversion was rather more lossy than I remembered.  The 3 terrain changes you identified, I "corrected" in the conversion program as explained earlier, but the rest I apparently did not have any build-in corrections in the program, so either I ignored the differences because it doesn't affect level solutions (ie. terrain is terrain even if the pixel's color is wrong), or I did apply manual corrections afterwards on a case-by-case basis for some of the other differences.  It also looks like some interactive objects in a level may occasionally have been dropped or otherwise modified intentionally, due to reasons such as because DOS may glitch or crash on objects whose trigger areas fall partly or wholly outside the level area boundaries.  (Perhaps that explains Sunsoft 11?)

2) Apparently for some levels, I intentionally had the conversion program deviated slightly from the norm when calculating positions.  Unfortunately I did not comment on the exact reasons in the source code, but I'm guessing it was probably somehow necessary or highly preferable for playing the level in DOS Lemmings.  So they are apparently not mistakes per se but "by design", though definitely not valid reasons for your case.  [In case anyone's wondering: the levels with adjusted positioning during conversion are Tricky 12, Mayhem 1, Present 10, Sunsoft 5, Sunsoft 20.]

Anyhow, according to the source code, the following terrain are different between DOS and Genesis:
set 0:  36 42 43 45 46 47
set 2: 40
set 3: 32

Offline Tsyu

  • Posts: 350
    • View Profile
Re: Genesis trigger areas
« Reply #12 on: October 18, 2013, 08:13:39 PM »
Any chance you can share out or at least email me (my forum username at yahoo) the program (source code) you wrote to rip the levels?
Yes, I'll e-mail it to you once I get it commented. Keep in mind that the program rips to Lemmini's format and not the original LVL format.

With that in mind, if you discover any inaccuracies with the trigger area information captured in the modified ground files I sent out earlier, let me know. [update: probably okay on this end as it looks like I recover the data from the ROM itself without any modifications.  Still, no harm in double-checking!]
I'd verify it myself, but I don't know where the trigger information is in the ROM. They seem OK, though.

Anyhow, according to the source code, the following terrain are different between DOS and Genesis:
set 0:  36 42 43 45 46 47
set 2: 40
set 3: 32
Thanks. All of these are indeed different in a way that can potentially affect gameplay. These changes will be accounted for once I release my version of Lemmini and the Genesis pack.