LemmixAmiga. WIP.

Started by Zaphod77, October 04, 2014, 02:38:36 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Tsyu

http://www.lemmingsforums.com/index.php?topic=1076.msg22878#msg22878">Quote from: ccexplore on 2014-10-05 05:19:28
- 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.)

http://www.lemmingsforums.com/index.php?topic=1076.msg22878#msg22878">Quote from: ccexplore on 2014-10-05 05:19:28
- 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.

http://www.lemmingsforums.com/index.php?topic=1076.msg22878#msg22878">Quote from: ccexplore on 2014-10-05 05:19:28
- 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? http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />
Do you not know what that means, or do you just not know how to do that in the code?

Zaphod77

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.

Zaphod77

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?

namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Zaphod77

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?

namida

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.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Leo

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.

http://i57.tinypic.com/28l4aat.png" alt="" class="bbc_img" />

Zaphod77

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. http://www.lemmingsforums.com/Smileys/lemmings/sad.gif" alt=":(" title="Sad" class="smiley" />



Leo

'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.

Zaphod77

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..

ccexplore

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? http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />

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.

Zaphod77

but that would actually require me having amiga lemmings. http://www.lemmingsforums.com/Smileys/lemmings/smiley.gif" alt=":)" title="Smiley" class="smiley" />

seriously, though. i just moved the mask one pixel forward, and it's possible to bash through with two now.

Zaphod77

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".

namida

Sounds good. Id say to make sure you double check the maximum RR change per frame, though.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)