Lemmings Forums

Lemmings Boards => Lemmings Main => Topic started by: Zaphod77 on October 04, 2014, 02:38:36 PM

Title: LemmixAmiga. WIP.
Post by: Zaphod77 on October 04, 2014, 02:38:36 PM
What i've done so far.

1) changed exit sound effect to boing, like amiga and dos.
2) removed DOS specific glitches (nuke glitch, pausing for time, direct drop, and climbershrugger)
3) Added OhNo! cue at start of nuke, like Amiga.
4) put in the Amiga levels, complete with the formerly missing water and original Amiga setups.
5) made the sky dark blue, like Amiga version.
6) Changed digger behavior slightly. the outermost pixel on each side of the 9 pixel wide channel no longer holds a digger up. I'm told Amiga is this way, but i haven't tested. if wrong i will revert this.
7) Added eep! sound effect for lemmings that fall off the screen, like Amiga.
8 ) changed entire upper bar for preview to dark blue, to match sky.

TODO
1) fix music order
2) add gamepad support (ummm. hard...)
3) add two player mode.  ( yeah right. lol. needs gamepad support or network support)
4) add cute intro (ummm. can someone else do this one? :) )
4) add mouse cursor support in menus and preview
5) add pretty hand cursor
6) use better skill bar from amiga.
7) add sound effect for raise/lower rate that changes in pitch like it's supposed to.

Anyone want this? :)  i've built only original lemmings so far, but I can make ONML and holiday ones too without too much effort. others are pointless.
Title: Re: LemmixAmiga. WIP.
Post by: exit on October 04, 2014, 06:51:57 PM
This sounds interesting. I definitely look forward to trying the amiga version of lemmings and see if it really is the best(the first of something is normally the best, so I'm guessing it is). You should start with the music order and sound effects for the TODO list, in my opinion. Then I think it will be good enough to release it as alpha or beta.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 04, 2014, 08:54:17 PM
I believe X91 and X92 were also released on Amiga. I don't know if there's any level differences between the PC and Amiga versions. OhNo doesn't have any level differences between Amiga and PC, so all you need to do for that one is recompile the player with the new source.

Covox and Prima I'm fairly sure were PC only.



How many colors does the skill bar use? If it's no more than 16 different colors (including black, but not including the colors used to draw the minimap), there's a fairly easy way around that. If not, it might be a bit more tricky. Either way, if you've got some lossless images of it, I can probably help you come up with a solution regarding that...
I've also PM'ed you about the music order issue - it's a very simple fix.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 05, 2014, 06:01:00 AM
Yeah, I fixed the music order. the issue is now the speedup/slowdown rate sound effect, and the fact that it changes pitch. found a few more errors in music, working on those.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 05, 2014, 06:40:38 AM
AS i understand it the only ones that were any different across platforms are the original. 80 is max for every version of lemmings but original amiga and those based off of it.

Still, i am building Lemmings, ONML, xmas,and holiday.  next release from namida should have correct music order regardless.

Someone wanna test them so far..

http://eunich.cochems.com/~zaphod/LemmixPlayersAmiga.zip

still missing sound effect for rate change and the corrected skill bar.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 05, 2014, 07:01:47 AM

How many colors does the skill bar use? If it's no more than 16 different colors (including black, but not including the colors used to draw the minimap), there's a fairly easy way around that. If not, it might be a bit more tricky. Either way, if you've got some lossless images of it, I can probably help you come up with a solution regarding that...
I've also PM'ed you about the music order issue - it's a very simple fix.

http://www.mobygames.com/images/shots/l/44705-lemmings-amiga-screenshot-some-lemming-trapss.gif

screenshot

should be enough to work with.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 05, 2014, 08:32:59 AM
Can anyone who's actually played the Amiga version confirm whether that screenshot is accurate? (I'm a bit wary of it with it being a GIF and all, rather than BMP or PNG; it also looks like it may be slightly out-of-proportion)

I'll have to try and hunt down all the various skill digits too, since even ignoring the color inversion it doesn't appear to use the same ones as DOS.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 05, 2014, 08:40:48 AM
looks right to me. resolution checks out. ti's 2x amiga original.

and they have other screenshots there so yo may be able to get the stuff.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 05, 2014, 09:05:54 AM
I might try and set up an Amiga emulator and use that instead, so I can be sure of getting accurate images.
Title: Re: LemmixAmiga. WIP.
Post by: Tsyu on October 05, 2014, 09:10:27 AM
I'll just chip in and say some things about the Amiga Lemmings games that you might want to know:

(EDIT: Added a note regarding drowners.)
Title: Re: LemmixAmiga. WIP.
Post by: ccexplore on October 05, 2014, 11:19:28 AM
In addition to the digger, there are a couple other significant differences related to gameplay/mechanics:
[I believe the SNES version also exhibit some of these behaviors, so you may try to get screenshots off that version for things like which pixels a basher stroke removes, if SNES emulator is more convenient than an Amiga emulator like WinUAE.]

- The basher's stroke goes one pixel further than DOS version.  In DOS, if lemming's horizontal position is x, the farthest column of pixels removed is x+7, while in Amiga it would be x+8.  This means for example, the 2 bashers is just enough to get through the column in Tricky 26 ("I have a cunning plan") in Amiga, but not in DOS.
- Moreover, the basher's "backstroke" (pixels "behind" the lemming that's removed by the basher's stroke) is different in Amiga version vs DOS version (admittedly this is more esoteric of a difference, but still not that hard to discover).
- The timer goes faster!  In DOS it's 17 frame updates per game second, in Amiga it's 16 IIRC.  Obviously important in levels like "Just a Minute".
- When you run out of time, the level takes a little bit of time to fade out, during which the game continues to run and lemmings that exit continues to count.  (Basically just like the behavior in DOS's "High Performance PC" mode which Lemmix doesn't emulate either.)  I don[t remember whether other ways of leaving the level (eg. pressing ESC) are instantaneously or does the same fade-out.
- You can't change the release rate while game is paused.  Thus the release rate cannot instantaneously jump from one value to another, it will take time to move from the starting value to the value you want.  (How fast I don't know, you'd have to measure it--and it's definitely different from port to port, so you can't use SNES as substitute for this one if accuracy is important.)
- DOS has a glitch where a miner cannot mine a certain one-way wall (forgot which direction) even when facing the correct way.  I don't remember whether Amiga has that glitch or not (but I suspect no).  I also don't remember whether Amiga is more strict or same as DOS in its steel checking for miners.  (In DOS, past the initial skill assignment, it stops the miner only after the lemming has basically moved into a steel area, rather than checking for steel ahead like it would for basher.)

There are likely more (in addition to other ones already mentioned on the thread) but those are the ones off top of my head, and a few of them are clearly fairly significant even in normal gameplay.  I guess until we actually analyze the game's programming we'd have to acknowledge that the emulation may not be as accurate.
Title: Re: LemmixAmiga. WIP.
Post by: ccexplore on October 05, 2014, 11:34:57 AM
I definitely look forward to trying the amiga version of lemmings and see if it really is the best(the first of something is normally the best, so I'm guessing it is).

IIRC the Amiga, DOS and Atari ST version are basically developed pretty much all at the same time.  It is true that Amiga did end up released first, but it's not quite accurate to think of the DOS and Atari ST versions as ports of the Amiga version, unlike the latter ones.

In any case, it's worth keeping in mind that DOS machines of the day simply don't have some of the video and audio capabilities available on the Amiga.  Heck, the DOS version only deals with 80 lemmings max rather than Amiga's 100!  (Though to be fair I don't know if the reason is truly performance related versus other factors, but then again they also removed a lot of water across all the levels in DOS which was released later than Amiga, so hmm.)  So there's far more to things here than "being the first of something" or not.

I do question some of the changes made in the DOS version though, like giving 20 instead of 10 of skills in "Steel Mines of Kessel" or having an extra minute (plus only requiring 75% instead of 100%) in "The Fast Food Kitchen".  Did they feel compelled to tone down those levels because they (or feedback from Amiga players) found the original versions too hard?
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 05, 2014, 05:41:58 PM
I'll just chip in and say some things about the Amiga Lemmings games that you might want to know:
  • The width of the levels is 1,600, not 1,584. However, there is an invisible boundary at the right side that extends to 8 pixels, so the effective width in terms of where a lemming can be is 1,592.
Hmm. this may be doable.  I'm not sure how though.
Quote
  • Regarding diggers, the outermost two pixels of each side are ignored when determining whether a digger should stop, so it's just the five center pixels that keep the digger going.
Done.  I made this a constant I could change. :)
Quote
  • When a lemming falls in water, the Amiga version plays splash.wav (albeit faster) instead of glug.wav. It's not until the lemming disappears completely that glug.wav is played. (Note that if you want toget this behavior in the Amiga version, you have to turn off the music; otherwise, the normal "die" sound is played.)
Interesting.  So it plays different sounds depending on if music is on?  So if music is off, then it does splash then glug. what one does it do in the other case? Which sound file?
Quote
  • The new levels in Xmas Lemmings '91 and '92 appear to be identical to the ones in the DOS versions, although I haven't been able to verify this. Levels 2 and 3 in the Amiga version of '92 are switched, and the last two levels in '91 (which are from ONML) are different; see this page of The Lemmings Encyclopedia to see what levels were substituted (which are also from ONML).
FUN.  At this point i'm willing to say screw it.  I was most worried about the game that I played, which was the first one. :)   GUess I need to setup the amiga emulator.
Quote
  • The status area of the Amiga version uses more than 16 colors. It also has double the horizontal (but not vertical) resolution.
Figures...  I'm not up to this particular task.
Quote
  • For the release rate sound, you can closely approximate the Amiga behavior by starting with the skill assignment sound (mousepre.wav, which the Amiga version does use here) and changing the sample rate using this formula: s * 2^((n-40) / 36) (where s is the original sample rate of the sound, and n is the selected release rate).
If I knew how to do this, I would. Anyone know how? :)
Quote
  • The skill selection sound also plays at different pitches in the Amiga version. The sample rate of this sound should be adjusted using this formula: s * 2^(n/12) (where s is the original sample rate of the sound, and n is the index of the skill, with climber being 0, floater being 1, and so on). The pitches form part of a musical chromatic scale.
Same here.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 05, 2014, 05:50:59 PM
I'll just chip in and say some things about the Amiga Lemmings games that you might want to know:
  • The width of the levels is 1,600, not 1,584. However, there is an invisible boundary at the right side that extends to 8 pixels, so the effective width in terms of where a lemming can be is 1,592.
Hmm. this may be doable.  I'm not sure how though.

I'm pretty sure you just need to edit GAME_BMPWIDTH and LEMMING_MAX_X.

Quote
Quote
  • The status area of the Amiga version uses more than 16 colors. It also has double the horizontal (but not vertical) resolution.
Figures...  I'm not up to this particular task.

The double horizontal resolution means that the graphic may display slightly inaccurately (as in, the same sort of thing you'd get if you stretched any image to a non-power-of-2 factor) on odd zoom levels (including 1x), but it should be doable still. You'd need to store a copy of the Amiga bitmap in MAIN.DAT of course, and load it with a custom palette. Fortunately for you, both Lemmix and LemMain's code can already handle images that are more than 4 bits per pixel if nessecary (though you might need to mess with the palette code; but you don't have to mess with the code that loads the correct format).

You could also possibly look into just including the digits and panel as seperate resources in BMP or PNG format.

From there, just make sure that before drawing the panel to the screen, scale it - the horizontal scale should be *half* of the normal scaling factor.

I also notice that Amiga uses a different color for lemmings and a fixed color for terrain on the minimap; both should be quite simple to implement. ;) (Hint: looking for BrickColor and fMinimapBuffer in LemGame.pas might steer you in the right direction.)


For the sound ones, I'll look into it, no promises though.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 05, 2014, 05:58:46 PM
- The basher's stroke goes one pixel further than DOS version.  In DOS, if lemming's horizontal position is x, the farthest column of pixels removed is x+7, while in Amiga it would be x+8.  This means for example, the 2 bashers is just enough to get through the column in Tricky 26 ("I have a cunning plan") in Amiga, but not in DOS.
Does the basher step forward another pixel to do this? I should be able to extend the destruction mask by one pixel.
Quote
- Moreover, the basher's "backstroke" (pixels "behind" the lemming that's removed by the basher's stroke) is different in Amiga version vs DOS version (admittedly this is more esoteric of a difference, but still not that hard to discover).
Ok, how do I fond out what the proper destruction mask is? :)
Quote
- The timer goes faster!  In DOS it's 17 frame updates per game second, in Amiga it's 16 IIRC.  Obviously important in levels like "Just a Minute".
I also believe the framerate is slightly different. if i have truly accurate frame data, I should be able to make the adjustment.
Quote
- When you run out of time, the level takes a little bit of time to fade out, during which the game continues to run and lemmings that exit continues to count.  (Basically just like the behavior in DOS's "High Performance PC" mode which Lemmix doesn't emulate either.)  I don[t remember whether other ways of leaving the level (eg. pressing ESC) are instantaneously or does the same fade-out.
I should be able to work out how to do a fade, if Lemmix does them.
Quote
- You can't change the release rate while game is paused.  Thus the release rate cannot instantaneously jump from one value to another, it will take time to move from the starting value to the value you want.  (How fast I don't know, you'd have to measure it--and it's definitely different from port to port, so you can't use SNES as substitute for this one if accuracy is important.)
Aware of this one, don't care. We are allowing frame advance, why should we not allow changing release rate?  Easy change though.
Quote
- DOS has a glitch where a miner cannot mine a certain one-way wall (forgot which direction) even when facing the correct way.  I don't remember whether Amiga has that glitch or not (but I suspect no).  I also don't remember whether Amiga is more strict or same as DOS in its steel checking for miners.  (In DOS, past the initial skill assignment, it stops the miner only after the lemming has basically moved into a steel area, rather than checking for steel ahead like it would for basher.)
I believe this is intended behavior ( the pick breaks on the steel).  But again I don't have the stuff.
Quote
There are likely more (in addition to other ones already mentioned on the thread) but those are the ones off top of my head, and a few of them are clearly fairly significant even in normal gameplay.  I guess until we actually analyze the game's programming we'd have to acknowledge that the emulation may not be as accurate.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 05, 2014, 06:17:36 PM
The difference is that frame advance just lets you play very slowly - it doesn't let you do anything you normally couldn't do. Whereas adjusting the release rate while paused *does*.

I'd also say that having an accurate relationship between frames and the clock is more important than that between in-game seconds and real-time seconds.
Title: Re: LemmixAmiga. WIP.
Post by: Tsyu on October 05, 2014, 08:09:38 PM
- The basher's stroke goes one pixel further than DOS version.  In DOS, if lemming's horizontal position is x, the farthest column of pixels removed is x+7, while in Amiga it would be x+8.  This means for example, the 2 bashers is just enough to get through the column in Tricky 26 ("I have a cunning plan") in Amiga, but not in DOS.
- Moreover, the basher's "backstroke" (pixels "behind" the lemming that's removed by the basher's stroke) is different in Amiga version vs DOS version (admittedly this is more esoteric of a difference, but still not that hard to discover).
I can get you the Amiga masks. I never properly ripped them (and I don't how), but I got them through savestate hacking and used them in SuperLemmini. (Regarding the first point, I'm pretty sure it's just the mask being placed one more pixel forward and not a difference in the actual mask.)

- The timer goes faster!  In DOS it's 17 frame updates per game second, in Amiga it's 16 IIRC.  Obviously important in levels like "Just a Minute".
In the PAL version at least, it's actually 17, then 17, then 16. Provided the game doesn't slow down, this makes it match real time. In Superlemming mode, there are 50 frames per game second, so the timer still appears to run at the normal speed, unlike the DOS version.

- When you run out of time, the level takes a little bit of time to fade out, during which the game continues to run and lemmings that exit continues to count.  (Basically just like the behavior in DOS's "High Performance PC" mode which Lemmix doesn't emulate either.)  I don[t remember whether other ways of leaving the level (eg. pressing ESC) are instantaneously or does the same fade-out.
I'm pretty sure that all methods of quitting the level cause it to fade out like that.

Quote
  • When a lemming falls in water, the Amiga version plays splash.wav (albeit faster) instead of glug.wav. It's not until the lemming disappears completely that glug.wav is played. (Note that if you want toget this behavior in the Amiga version, you have to turn off the music; otherwise, the normal "die" sound is played.)
Interesting.  So it plays different sounds depending on if music is on?  So if music is off, then it does splash then glug. what one does it do in the other case? Which sound file?
It's die.wav. In fact, when the music is turned on, all (or almost all) lemming deaths play that sound. Also, when the music is turned off, some of the traps play different sounds than they do in the Windows version. If you want me to, I can find out through testing and savestate hacking what those sounds are.

And speaking of sound, the Amiga version does some very crude stereo panning when the music is off: Sounds are panned to either the far left or the far right depending on where their sources are in relation to the screen's center. (If you're using Amiga Forever, the stereo separation defaults to 0% [leaving you with mono sound], so if you want to test this, you need to open the options menu by pressing F12 during the game, then go to Sound and change the stereo separation to something close to 100%.)

Quote
  • For the release rate sound, you can closely approximate the Amiga behavior by starting with the skill assignment sound (mousepre.wav, which the Amiga version does use here) and changing the sample rate using this formula: s * 2^((n-40) / 36) (where s is the original sample rate of the sound, and n is the selected release rate).
If I knew how to do this, I would. Anyone know how? :)
Do you not know what that means, or do you just not know how to do that in the code?
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 05, 2014, 09:47:48 PM
I know what it means. i just dont' know how to do it in the code. i don't see any way to adjust it.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 06, 2014, 02:34:16 AM
Wow. seems like there's a lot more work to be done to adequately replicate Amiga after all.

While some of the tasks are (relatively) easy, some are very difficult actually.

I think i know how to fix the basher mask, which is one of the very important changes allowing a 2 basher solution to as long as you try your best, and i corrected digger checking, which was easy, but the framerate and timer issue.

From all the European references, we can assume that PAL amiga version has proper timing information, and that the intended framerate is 16 and 2/3 repeating frames per ingame second.

any assistance  on that one?
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 06, 2014, 02:37:44 AM
fClockFrame (or something like that) is the value you're looking for; find the function where it decrements the seconds when equal to 17. You're going to want to use "mod 17" to detect the first two (the 17s), then to detect the third one, check if it's equal to 50. Only reset to 0 on the =50.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 06, 2014, 03:38:49 AM
but does that also actually change the frames per second? that just updates the clock.  we actually need to perform the frame updates at 60 ms per frame. where is THAT adjusted?

never mind. found it. it's already correct at 60ms.  so looks like any "amiga is faster" complaints are from people who played on NTSC at 60 fps.

So that change should actually be part of mainline, to match ingame time up with realtime. has dos actually been proven to do 17 frames per timer tick?
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 06, 2014, 03:49:23 AM
That will sync the clock to the frames the same way that the Amiga version does. To change the actual frame time (in terms of real time), that's in GameWindow.pas; I believe 60 is already the default. I don't remember exactly where, but search for SuperLemming in there; as there's an if branch that sets it differently depending on whether SuperLemming is active or not.
Title: Re: LemmixAmiga. WIP.
Post by: Leo on October 06, 2014, 03:56:04 AM
I think, Amiga screen is more complicated than just two areas. More likely it's divided in three areas. Play area, Counters area, and Skills/Minimap area. And there is also a Pointer, it's a hardware sprite (therefore, not really in the video memory). I am not sure, but two frames showing selected skill and screen position on the Minimap could also be hardware sprites.
So, it's:
320x160 16 colors
640x16 8 colors
640x24 16 colors
Pointer 14x14 3 colors + transparent, sprite
(maybe two more 1 colour + transparent, sprites)

Becouse it's a hardware sprite, Pointer can float above all three areas keeping it's own resolution and colors untouched. If we want to count the colors in the screenshot, Pointer must be removed from the picture.
And let's not forget, there is not just one more Pointer (Lemmings paw), but also 'Lemming sleeping in the bed' (Loading/Busy Pointer). I don't know what are these Pointers (Sprites or Blitter objects).

Also Pal/NTSC timings can be changed "on the fly" any time, by pressing the TAB key. I think that option require 'Fat Agnus' fitted in more recent A500 models.

Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 06, 2014, 04:38:42 AM
They are probably sprites, same as the normal cursor. 

at 50fps 1 game frame every 3 real frames. easy math.

the math is much uglier for 60 fps, with game updates syncing wit hrefrest every 300 ms. :(


Title: Re: LemmixAmiga. WIP.
Post by: Leo on October 06, 2014, 05:11:26 AM
'Sleeping Lemming' can't be just one sprite, it's too big. However, it can be combination of two sprites. But, this is not very important thing here.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 06, 2014, 05:25:02 AM
I believe timer behavior and basher behavior are correct on my binary now.  from a gameplay standpoint, i think it's right, except for the doing stuff while paused.

Since number of channels isn't an issue, i intend to replicate the without music behavior of all sounds, even with music active.  so I need it better documented.  ALso want to knwo how the panning works, to see if that can be replicated. might be as simle as off screen to the left=left pseaker, offscreen right=right speaker, onscreen = both.  maybe not..
Title: Re: LemmixAmiga. WIP.
Post by: ccexplore on October 06, 2014, 06:58:49 AM
Does the basher step forward another pixel to do this? I should be able to extend the destruction mask by one pixel.

I don't believe the basher steps forward more than DOS, it's just the basher mask reaching farther.  But not 100% sure, will need to retest.

Ok, how do I fond out what the proper destruction mask is? :)

You can just assign basher to a lemming immediately after he turns around from a wall (so he's bashing air rather than the wall that's now behind him), and see which pixels of the wall gets removed in the process.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 06, 2014, 09:28:54 AM
but that would actually require me having amiga lemmings. :)

seriously, though. i just moved the mask one pixel forward, and it's possible to bash through with two now.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 07, 2014, 11:09:51 AM
The difference is that frame advance just lets you play very slowly - it doesn't let you do anything you normally couldn't do. Whereas adjusting the release rate while paused *does*.

I'd also say that having an accurate relationship between frames and the clock is more important than that between in-game seconds and real-time seconds.

Okay. I have a proposal for this one.

In Amiga clone mode, you CAN change skills and refresh rate... BUT each time you do so it advances one frame.

this prevents you from doing anything you couldn't do.  and it should be relatively easy to program.

if I do that and the sound mods, i think i will consider this clone "close enough".
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 07, 2014, 03:08:09 PM
Sounds good. Id say to make sure you double check the maximum RR change per frame, though.
Title: Re: LemmixAmiga. WIP.
Post by: Tsyu on October 07, 2014, 09:06:05 PM
The release rate changes by 1 every frame. And it's actually possible to select skills while the game is paused by using either Z and X or the arrow keys.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 08, 2014, 03:07:06 AM
Well that simplifies things. if the release rate changes once per lemming frame when unpaused, I can make it advance one frame when you press the release rate key, and thne i don't have to disable the function keys at all.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 08, 2014, 03:19:11 AM
It's worth noting that Lemmix uses different code to handle release rate changes when the game is paused than when it's unpaused. This might be problematic. However, at the same time, you can probably just redirect the when-paused code to use the when-not-paused code instead, and also make it frame advance at that point if paused.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 08, 2014, 03:45:07 AM
yeah.. i'm trying to trace the code, and find the frame advance when screen is clicked code.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 08, 2014, 04:06:36 AM
Looking for "VK_F1" / "VK_F2" and "ForceUpdateOneFrame" should point you in the right direction.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 14, 2014, 07:05:03 AM
Okay, i still need to know the audio info (besides the panning feature, still not sure how to do that)

i think because te audio channels are there, that audio effects on amiga version should be the 'no music' ones.

but if peopel really think it's better, i will implement both.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 14, 2014, 07:18:19 AM
That's a bit trickier. I plan to improve the audio support a bit for both Traditional and Neo; the files in question are GameModPlay.pas and GameSound.pas (plus some very slight modifications to LemDosStyle.pas and LemRes.pas) so make a note of any changes you've made to those. Once I've done this, I'll help you implement it into your Amiga verison - the modifications to the last two files are very small, while the former can be copied&pasted into any version of Lemmix as far as I can tell (they're even 100% compatible between Traditional and Neo).
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 14, 2014, 08:21:43 AM
well i started with v20, so I should probably update and redo my modifications that are still needed.

i'm waiting on the multi pitch playback trick and channel splitting of identical sounds.

as i said the dos version used three sound channels for sound effects, and if none were free the sound effect was skipped. However, even if the instrument played for a while after (the boing lasts a second at least), after a half a second or so the channel wold be considered free even if the sound WAS still playing.

I'm pretty sure amiga behaved different with ONE channel dedicated to sound effects and three to the music, with all effects overwriting each other.  The single ohno when clicking nuke was because of this.

oh, by the way. compare fun 3's preview on lemmix vs dos. it seems lemmings uses a smart scaling algo that when choosing pixels prefers non background ones when scaling down.

Also it seems there is a genuine flaw in the amiga version. it's not that changing stuff with the keyboard is locked out, because it's not. it's that there is no key to increase or decrease rate.  if the key existed, it would work paused.

Seems i will need to actualyl get amiga lemmings for myself to test.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 14, 2014, 09:11:44 AM
Okay did  some more testing.

Lemmings on amiga does seem to run faster then Lemmix does. at least for a NTSC amiga.

The change bongs play at the first 8 tones of the twelve note scale.

the "panning" is simple. if a lemming is on the right side of the screen, it plays out the right speaker. if the lemming is on the left, it plays out the left speaker.  this can be hacked in with stereo wave files if desired. (separate left and right channeled versions of the sound effects)

the mods are in stereo as well. with one channel center, one left, and one right i think. the one allocated to the bass is usually center i think.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 14, 2014, 10:06:54 AM
Once I convert it to playing all sounds through BASS, therell be no need for such a hacky workaround. It'll be possible to pan the sound properly.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 14, 2014, 05:32:06 PM
and pitch up the sound?  or will we still need a hacky workaround of 8 different bongs? :)
Title: Re: LemmixAmiga. WIP.
Post by: Tsyu on October 15, 2014, 03:20:51 AM
I have attached the masks from the Amiga version that were different in the DOS version.

the mods are in stereo as well. with one channel center, one left, and one right i think. the one allocated to the bass is usually center i think.
Actually, it's one left channel and two right channels. The channel that's reserved for sound effects when music is enabled is also a left channel. (And that's the extent of the Amiga's sound capabilities as far as channel count is concerned: two left channels, two right channels, and nothing else. To play a sound in the center, it would have to be played on two channels simultaneously.)
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 15, 2014, 04:58:56 AM
and pitch up the sound?  or will we still need a hacky workaround of 8 different bongs? :)

I'll see about that. It should be possible to do this too, but I'm not 100% sure if BASS has support for that.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 16, 2014, 02:23:11 AM
truth is only the amiga version pans, as the dos sound platform doesn't do stereo.

So it's not a feature you need at all.
Title: Re: LemmixAmiga. WIP.
Post by: namida on October 16, 2014, 10:58:33 AM
I might add it to NeoLemmix. And Ill definitely be doing the multiple channels.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on October 16, 2014, 05:54:36 PM
Good point.  You can either do real panning, or the amiga version. real panning would be full left speaker for offscreen to the left, and full right only for offscreen to the right, and somewhere inbetween for on the screen depending on position.

Amiga panning is always all left or all right, with no duplication, and no panning when music is on (it's always on the side that has the free channel)

And yeah.  Here are the various channel systems.

DOS with music. 3 channels, with channels freeing up a half second after they are used.
DOS without music. 6 channels instead
Amiga with music. 1 channel as described above
Amiga without music. 2 channels. one left speaker and one right, as described above. MIGHT actually be four, two per speaker, but it's hard to test.

If we want to improve on the originals.

Idealised Amiga. 2 channels with full panning, no check for free channels.  Note that amiga only plays oh no once for starting nuked instead of ohnoing for every nuked lemming, and that exploding is a very quick sound effect.
Idealised DOS. 6 channels, with full panning for all. It's the Oh, No! chorus. :)
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on February 26, 2021, 09:02:34 PM
Yes it's me. i finally wandered back.

that said not sure if i still have that source anymore.

Would be nice to resume this.

So there's neo lemmix, old lemmix, and the original lemix author getting back into making it?

So, anyone have a complete list of amiga version vs dos differences?  they say that basher physics are different. Is it really just the different destruction mask, or is there some other change?

I know a number of DOS glitches aren't present.
Title: Re: LemmixAmiga. WIP.
Post by: namida on February 26, 2021, 09:09:15 PM
Quote
So there's neo lemmix, old lemmix, and the original lemix author getting back into making it?

NeoLemmix should be treated as its own seperate thing. It does not try to replicate any official Lemmings game. It has "Lemmix" in the name because the Lemmix source code was used as the basis for it.

Regarding "old" or "vanilla" Lemmix vs the new Lemmix from EricLang - the new one has a lot more nice UI features, but also seems (/ seemed? Maybe this isn't the case anymore?) to be drifting away from the "replicate DOS exactly" goal, eg. no nuke glitch, certain glitches delegated to options, etc. The newer one is likely nicer overall if you just want to play the original games fairly accurately and don't care about it being perfect, but at this point only the old one is considered acceptable for challenges.
Title: Re: LemmixAmiga. WIP.
Post by: WillLem on February 26, 2021, 11:05:33 PM
Yes it's me. i finally wandered back.
...
Would be nice to resume this.

What's your opinion of Lemmini/SuperLemmini? This is essentially a Lemmings clone very closely modelled on the Amiga version, but with some graphical updates and quality-of-life features absent from the original.

An Amiga clone similar to Lemmix's recreation of the DOS version would be great, I'd heartily support such a project and would be prepared to help with graphics/audio stuff where needed. However, like most clones, it would likely end up benefitting from more modern features that the community have gotten used to (like replays, fast-forward, framestepping, direction select, etc) and which the Amiga version didn't have. Otherwise, how is it any different from simply playing Lemmings on an emulator?

The bottom line here, though, is that if your goal is to make the Amiga equivalent of what Lemmix is to DOS, then I say go for it! And, I'll help wherever I can.
Title: Re: LemmixAmiga. WIP.
Post by: Dullstar on February 27, 2021, 06:47:42 AM
Amiga emulation is definitely a bit clunky to set up (I wouldn't say it's hard, but I am saying it's annoying), so I can't say there's no benefit to making a recreation of it (even if it doesn't have the modern QoL features, though it would be unwise not to include them, imo), though there is of course the question of whether or not it's worth the effort.

If you're going to do this, and you want to play it safe with the physics differences, it would probably be wise not to assume anything matches DOS until you have evidence demonstrating it matches. Otherwise, it could be quite easy for a lot of the physics differences to slip through the cracks.
Title: Re: LemmixAmiga. WIP.
Post by: WillLem on February 27, 2021, 10:33:33 AM
@Zaphod77 - I have recently completed a speedrun of L1 on Amiga, so my knowledge of the mechanics/physics is quite intimate. Happy to answer any questions you may have.

Amiga emulation is definitely a bit clunky to set up (I wouldn't say it's hard, but I am saying it's annoying)

Try Amiga Forever (http://www.amigaforever.com/). It's relatively inexpensive and it's made by Cloanto, the same company that developed the original Amiga software, so it's about as official as emulation gets. It's by no means perfect, but it makes it very easy to get set up.
Title: Re: LemmixAmiga. WIP.
Post by: Zaphod77 on February 27, 2021, 07:40:44 PM
How do i work on this again? i remember having a heck of a time getting what i needed to actually compile this stuff.

I probably need to start all over.

Here's what i remember.

1) basher mask needed changing. (i had done this)
2) digger hold up behavior is different. (I had worked that in)
3) pause for time, nuke glitch, and climbershrugger glitch did not exist in amiga. (easy fix)
4) Intro that only exists on Amiga, with it's own music. (beyond my abilities)
5) different level data. (i had done this)
6) different music order. can-can was first on amiga, and the others are different order.
7) amiga does not accept mouse clicks while pawsed, except on the paws button itself. this means you can't change release rate while pawsed, because amiga has no hotkey for it.  (my idea was to have changing release rate while pawsed advance one frame, to keep to restrictions of original).
8) sky is blue, not black. (had fixed it)
9) release rate sound pitch is related to release rate (dunno how to fix)
10) skill change bong does a do re mi.                     (hadn't fixed that either)
11) amiga is PAL and expects a 50hz display.
12) crude stereo panning in sfx only mode
13) more sfx in sfx mode.
14) boing instead of yippee for exit. (when DID amiga use yippee? intro only?)

anything i'm missing?

okay. seems there's an exception in the sky color for the special levels. beast of a level IS black, even on amiga..
Title: Re: LemmixAmiga. WIP.
Post by: WillLem on February 28, 2021, 11:50:01 PM
4) Intro that only exists on Amiga, with it's own music. (beyond my abilities)

I should be able to OBS this from the emulator.

7) amiga does not accept mouse clicks while pawsed, except on the paws button itself. this means you can't change release rate while pawsed, because amiga has no hotkey for it.  (my idea was to have changing release rate while pawsed advance one frame, to keep to restrictions of original).

This is a good idea, but - again - if you're going to do this you might as well add in all of the QoL features that we're used to (such as direction select, assign-whilst-paused, framestepping, etc). I would suggest doing so and having a "Player Assist" mode and a "Classic" mode which can be toggled on or off in settings.

9) release rate sound pitch is related to release rate (dunno how to fix)
10) skill change bong does a do re mi (hadn't fixed that either)

I should be able to sort the panel sounds out manually; not sure how to sort the RR sound out either, but I'll look into it.

13) more sfx in sfx mode.

This is news to me! I've always had the music on, I never engaged FX mode (or if I did, I can't remember doing so). I tried it out and was surprised to hear all of the water splashes and fire trap sounds, which I didn't think even existed in the Amiga version!!

Let me know if there's anything else I can help with.