Lemmini - Lemmings for Java - public Alpha

Started by 0xdeadbeef, February 21, 2006, 06:37:50 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Proxima

Quote from: 0xdeadbeef link=1140547071/105#115 date=1141858631Phew, the screen is blanked and completely redrawn. This really shouldn't possibly happen. Can you reproduce this or make screenshot? Anyway, I think this can really only happen "outside" Lemmini. E.g. memory corruption or bugs in the JRE or whatever.
Screenshot:

EDIT: screenshot taken down as the problem seems to be solved in the new version

0xdeadbeef

Fixes/Changes 0.56 -> 0.57
#  Added a sychronization monitor to paint()/redraw() to (maybe?) avoid flicker on low end machines
#  Added a sychronization monitor to the textscreen class to (maybe?) avoid redraw issues on low end machines
#  Double-Clicking the release rate icons will jump to maximum/minimum value.

Proxima

Excellent! The flickering is completely gone, and I note that the player information retrieval works perfectly too.

0xdeadbeef

And did you notice you can change the release rate to min/max with just one double click  8-)

Fixes/Changes 0.57 -> 0.58
#  Limited number of sounds to played in parallel to 6

Proxima

It didn't take much noticing, since you drew attention to it in your post  ;)  But thank you.

Proxima

Right, now that I can actually play without it crashing all the time, I'll keep testing it and see what I notice!

Just a couple of points thus far:

* The colon is missing in the title of 1 Crazy, "Quote: That's a good level".
* When you nuke and return to the main menu, the window titlebar still shows the level title. I don't think it should.
* Sometimes a click doesn't succeed in assigning a skill; it seems a bit hit-and-miss. It's annoying, because it means I have to pause an awful lot on the higher-precision levels.
* Stretching a bridge is hard or impossible. By that I mean that on other versions, when a builder shrugs and becomes a walker, he can always take two steps before falling off his own bridge, so you can start the next bridge a little bit along. I can't get this to work in Lemmini.

0xdeadbeef

Quote from: Ahribar link=1140547071/120#125 date=1141940974Right, now that I can actually play without it crashing all the time, I'll keep testing it and see what I notice!
Would be nice to have no crashes any more on Win98. I'll keep my fingers crossed.

Quote
* The colon is missing in the title of 1 Crazy, "Quote: That's a good level".
This is somewhat interesting. Actually, the colon is also missing on the Amiga version of ONML. However it's definitely in the Win95 LVL file. Then again, thereis no colon in the Amiga font. I wonder if it was just forgotten? I could easily add the colon to the font of course and most probably will do.

Quote
* When you nuke and return to the main menu, the window titlebar still shows the level title. I don't think it should.
Agreed

Quote
* Sometimes a click doesn't succeed in assigning a skill; it seems a bit hit-and-miss. It's annoying, because it means I have to pause an awful lot on the higher-precision levels.
I'll increase the minimum distance for a lemming to get considered to be beneath the cursor.

Quote
* Stretching a bridge is hard or impossible. By that I mean that on other versions, when a builder shrugs and becomes a walker, he can always take two steps before falling off his own bridge, so you can start the next bridge a little bit along. I can't get this to work in Lemmini.
While stretching a bridge is actuall quite easy IMHO, as you have the whole "shrugging" phase to assign the builder skill again, I'll look if I can/should shift the lemmings or step position a little. I moved the step to the opposite direction lately to fix the "builder on slopes" issue.

Proxima

Quote from: 0xdeadbeef link=1140547071/120#126 date=1141947031While stretching a bridge is actuall quite easy IMHO, as you have the whole "shrugging" phase to assign the builder skill again, I'll look if I can/should shift the lemmings or step position a little. I moved the step to the opposite direction lately to fix the "builder on slopes" issue.
Yes, assigning another builder to a shrugger is easy. I'm taking about stretching the bridge by letting him take one or two steps AFTER transitioning back into a walker. So that the bridge reaches further horizontally than it would if you assigned the builder immediately. It's possible and not too difficult on all other versions of Lemmings.

0xdeadbeef

Ok, I see. Most probably I'll just have to move the shrugger a little more to the left (if building to the right), so if converted to a walker, he'll start further to the left.

0xdeadbeef


Fixes/Changes 0.58 -> 0.59
#  Increased distance at which a lemming is considered "beneath the cursor"
#  Changed window title back to "Lemmini" when jumping back to the intro screen.
#  Use of own synchronization monitor for paint()/redraw() instead of using image as monitor
  (else first paint() could throw a NullPointerException resulting the menu being corrupted).

ccexplore

Quote from: 0xdeadbeef link=1140547071/105#112 date=1141769683
Quote from: Ahribar link=1140547071/105#111 date=1141768348* How about adding option-click on the release rate buttons to change it straight to the minimum or maximum?
I'd bet ccexplore would complain this would make some levels too easy.
Actually, since you can change the RR at will with the game paused (unless you decided to disable that in recent versions which I haven't gotten to), this will not affect level difficulty in any way.  In fact, I would go a step further and possibly consider the idea of some input method that lets the user directly enters via keyboard typing the desired RR (presumably with the game paused during the typing).

Anyway, I'm back from my vacation.  Since it's been 2 weeks, it'll take a little time I guess before I fully catches up with recent developments.  I'll re-test my buglist on your latest version as soon as I get a chance, but from what I've read it sounds like the pre-vacation buglist should now be all cleared.  [smiley=thumbsup.gif]

ccexplore

Quote from: ccexplore link=1140547071/0#11 date=1140637770I'm pretty sure most versions of Lemmings that are close to the Amiga version use the same priority system. &#A0;Unfortunately I haven't at the moment work out the exact system yet
I've now disassembled the portion of the DOS version of lemmings that deals with skill assignment. &#A0;It is pretty much what everyone has known or expected. &#A0;It's just stated here in a more precise manner for programming purposes.

I still haven't worked out however the exact way the game determines collision between a lemming and the cursor. &#A0;However, I did determine that the game calculates some (Lx, Ly) based on the lemming's position, some (Cx, Cy) based on the cursor's position, and then use the following test (in lo-res pixel units) as the condition for the lemming to be "under the cursor":

(Cx >= Lx && Cy >= Ly && Cx <= Lx + 12 && Cy <= Ly + 12)

which is equivalent to

(Cx - 12 <= Lx <= Cx && Cy - 12 <= Ly <= Cy)

So looks like to me this basically means the cursor square within which the lemming is considered to be "under the cursor", the size is 13x13 lo-res pixels.

The game then loops thru all lemmings currently under the cursor (as explained above), and looks for the following candidates for assigning the skill to:

candidate P: the most recently entered prioritized lemming

a prioritized lemming is defined as one who is carrying out one of the following actions:
  • blocking
  • building
  • bashing
  • mining
  • digging
  • shrugging (when the builder finishes)
  • oh-no-ing (when the explosion countdown reaches 0 but before the actual explosion)
Notice that carrying the climber or floater skills does not earn the lemming prioritization.

candidate N: the most recently entered non-prioritized lemming (non-prioritized is the exact opposite of "prioritized")

Note that either of the candidates may not exist. &#A0;Candidate P does not exist if all lemmings under the cursor are non-prioritized (ie. walkers etc.), and Candidate N does not exist if all lemmings under the cursor are prioritized (ie. a whole bunch of builders, say).

After finding the two candidates, the following happens:

1) if the non-prioritized selection mode is active, or if there are no prioritized lemmings

Then the game will only consider up to 1 candidate for skill assigment, namely candidate N (if exists)

"non-prioritized selection mode" is activated in Amiga and DOS Lemmings by holding down the right mouse button while clicking with the left. &#A0;For the Mac whose mouse has only one button, holding down the Option key (or some such key) on the keyboard stands in for the right mouse button.

Lemmini currently does not support this non-prioritized selection mode, but a few levels (especially Havoc 5) intends for this to be used, so it should be supported. &#A0;I would further suggest that both the right mouse button and the keyboard method should be supported (so that if eithe the right mouse button or the XXX button or both are held down, you are in the mode).

2) otherwise

Then the game considers up to 2 candidates for skill assigment. &#A0;First choice candidate is candidate P, second choice candidate is candidate N (if candidate N exists).

The game then displays the lemming type name for the first choice candidate, whatever it happens to be.

Next, regarding the actual skill assigment. &#A0;Note that the description above might contradict some stuff I said in earlier posts; the description below is the authoratative version (as far as DOS is concerned). &#A0;Going through the 8 possible skills to assign:

(cont'd next post)[/color]

ccexplore

(cont'd from above)
Before I dwelve into the specifics, note that the general form of handling is roughly like this:

1) if first choice candidate is not already doing the skill you are trying to assign, nor doing actions like falling/climbing/blocking that doesn't really allow for most skill assignments, then assign to lemming.
2) otherwise, check the second choice candidate instead if there is one.

The actual details of course are a little more complex and sometimes unusual. &#A0;For bashers/miners/diggers there are of course also tests for steel and such. &#A0;And, contrary to what I said before, you apparently can assign exploders to drowning or exiting lemmings. &#A0;Not that it matters since the explosion would never happen. &#A0;It's also the case that the second candidate is often ignored. &#A0;There are also cases where the second candidate requires less tests, which are probably bugs that should be fixed for Lemmini.

assigning a climber:

1) if the first candidate is not already a climber, and if he is not doing any one of the following actions: blocking, splattering, exploding, then assign.
2) otherwise, do not assign and ignore the second candidate.

assigning a floater:

1) if the first candidate is not already a floater, and if he is not doing any one of the following actions: blocking, splattering, exploding, then assign.
2) otherwise, do not assign and ignore the second candidate.

assigning an exploder:

1) if first candidate does not already has explosion countdown status, and is not in any of these actions: oh-no-ing, fried, exploding, splattering, then do the assignment.
2) otherwise, do not assign and ignore the second candidate.

assigning a blocker:

1) if first choice candidate's current action is one of the following: building, bashing, mining, digging, shrugging, walking, and if this lemming's blocker field would not overlap with another blocker's field, then do the assignment.
2) otherwise, do not assign and ignore the second candidate.

assigning a builder:

1) if first choice candidate is too close to level's top boundary, then do not assign and ignore the second candidate.
2) otherwise, check if the second choice candidate's current action is one of bashing, mining, digging, shrugging, walking. &#A0;If so, allow the assignment.
3) otherwise, and if there exists a second choice, check if the second choice's current action is one of bashing, mining, digging, shrugging, or walking. &#A0;If so, allow the assignment to the second choice.

Notice the bug here where the second choice candidate does not need to pass the boundary test. &#A0;This bug which is in the real game should probably be fixed in Lemmini.

assigning a basher:

1) if the first choice candidate's current action is one of building, mining, digging, shrugging, or walking, then
&#A0;i) check for steel and one-way walls. &#A0;If yes, then do not assign &#A0;and ignored the second candidate. &#A0;Otherwise assign.

2) Otherwise, and if there exists a second choice, check if the second choice's current action is one of building, mining, digging, shrugging, or walking. &#A0;If so, then:
&#A0;i) check for steel and one-way walls for second choice. &#A0;If yes, then do not assign. &#A0;Otherwise assign to second chocie.

assigning a miner:

1) if the first choice candidate's current action is one of building, bashing, digging, shrugging, or walking, then
&#A0;i) check for steel and one-way walls. &#A0;If yes, then do not assign &#A0;and ignored the second candidate. &#A0;Otherwise assign.

2) Otherwise, and if there exists a second choice, check if the second choice's current action is one of building, bashing, digging, shrugging, or walking. &#A0;If so, then:
&#A0;i) check for steel and one-way walls for second choice. &#A0;If yes, then do not assign. &#A0;Otherwise assign to second chocie.

assigning a digger:

1) if first candidate is standing on steel, then do not assign and ignore the second candidate.
2) otherwise, check if the first candidate's current action is one of building, bashing, mining, shrugging, or walking. &#A0;If so, allow the assignment.
3) otherwise, and if there exists a second choice, check if the second choice's current action is one of building, bashing, mining, shrugging, or walking. &#A0;If so, allow the assignment to the second choice.

Notice the bug here where the second choice candidate does not need to pass the steel test. &#A0;This bug which is in the real game should probably be fixed for Lemmini.

-----------------------

One final thing to point out is that this system is not well-equipped for assigning climbers and floaters, because there, only the first candidate is considered. &#A0;And when you think about it, since already having climber/floater status doesn't affect priority, you end up with the situation where if you have a whole bunch of lemmings under the cursor and the most recently entered one is already assigned a climber, you would not be able to easily assign the other lemmings as climbers, unless you move the cursor (and that still won't help if some of the lemmings actually occupy the exact same position). &#A0;Thus it is probably helpful at least for those cases to deviate from the real game and redesign the assignment system so that climbers and floaters can be more easily assigned.

Proxima

Whew! Good work for finding all that out and thanks for going to all the trouble of explaining it! I do hope 0xdeadbeef can manage to make some use of all that information.

However, I have a query. You say that climber/floater status doesn't affect priority. But what about the "floater method" for getting out of a situation where the lemmings are crowded in a pit and it's imperative to build out in the right direction? (11 Taxing, 26 Taxing etc.) I can think of three possibilities -- (1) you missed something; (2) it only works on certain versions; (3) it doesn't work at all and the times it's succeeded for me have actually just been luck.  :-?

ccexplore

Quote from: Ahribar link=1140547071/120#133 date=1142158610You say that climber/floater status doesn't affect priority. But what about the "floater method" for getting out of a situation where the lemmings are crowded in a pit and it's imperative to build out in the right direction? (11 Taxing, 26 Taxing etc.) I can think of three possibilities -- (1) you missed something; (2) it only works on certain versions; (3) it doesn't work at all and the times it's succeeded for me have actually just been luck. &#A0;:-?
I remember testing your method way earlier, I believe in both DOS and Mac Lemmings, and I long knew that your explanation of the "floater method" is inaccurate, but since I didn't have an authoratitive way to determine what the game really does until today, I didn't speak about it.

If you want to test this out yourself on the Mac, pick a tame level, and place two blockers fairly close to each other to trap the crowd to an area slightly larger than the cursor size. &#A0;Then assigning a lone lemming who isn't the last one out a floater. &#A0;Then wait until everyone's out and try to highlight the floater with the cursor. &#A0;Compare with the ease of doing so when the floater assigned was the last lemming out.

The "floater method" really only works I think because:

1) the way you used it on the levels you mentioned, the lemming you assigned floater to comes out late enough
2) the area where the crowd is milling about is large enough
3) you assign the next skill to the floater soon enough (so that there aren't that many, if any, lemmings following or otherwise being too close to the floater).

so that the floater usually will not be overlapping under the cursor with another lemming that comes out even later. &#A0;In that case, your floater would happen to be "candidate N" (the latest non-prioritized lemming out under the cursor) with no candidate P's, so it becomes the first (and only choice) candidate.

Nonetheless, your method is still useful to some extent, because if used properly, it can still serve as a method to track the position of a particular lemming out of a crowd of walkers, and tracking the lemming would allow you to usually determine its direction. &#A0;Namely, the lemming type text will read "floater", so you can tell where the floater lemming is, providing there isn't another lemming also under the cursor which came out even alter.