pingus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Pingu stuck and collision code


From: Gervase Lam
Subject: Re: Pingu stuck and collision code
Date: Mon, 30 Sep 2002 02:23:20 +0100

Subject: Re: Bugs, questions, missing files etc.

> > The bridger stopping too soon bug, reported by Ingo is really getting
> > on my nerves as a lot of levels cannot be solved without it.
>
> Yep, I'll look into it and release a new binary.

Just wondering what your solution to the problem caused by my fix to stop 
Pingus getting stuck between Bridges and Ceilings is going to be? :-)  As 
I mentioned, my fix did have the side effect of Walkers being able to walk 
right along the top of the Bridge as the Bridger stops *before* getting to 
the ceiling.

Having no access to my PC this weekend, I was actually thinking about the 
Walker Head Collision/Bridge problem further.  May be the Bridger code 
should revert back to what it was before my fix and have the Walkers do 
what David mentioned.  As well as drifting up Bridges, may be Walkers 
should be able to drift down Bridges as well.

Assuming that the ceiling above the following "bridge" is level, the 
Walker starts as so:

(1) bb>b
    bbbb
    bbbb

The Walker goes up, but has a head collision:

(2)    >
    bbbb
    bbbb
    bbbb

So it goes back to its previous position and reverses:

(3) bb<b
    bbbb
    bbbb

As there is a bridge in front of it, it should go up.  This would normally 
cause the Walker to have a Head Collision and reverse.   The Walker would 
then go back to step (1).  We then cycle through the whole process again.

But, what if in step (3), after finding out there would be a head 
collision if the Walker went on top of the 'b' in front of it, the Walker 
were to go into a "Drift Down" mode...

What follows are "possible" places where the Walker could have come from 
before getting to step (1):

 X
bYbb
bZbb
bbbb

The Walker could not have come from position X as there would have been a 
Head Collision there.  The Walker could not have come from position Y.  If 
it did, it would have tried to get on top of the Bridge pixel in front of 
it and not to the position in step (1).  Therefore, the Walker must only 
have come from position Z.

So, what I was thinking was if the Walker were in "Drift Down" mode and 
there is a Bridge Pixel in front of it drift down to position Z.  *Else* 
set to "Drift Up" mode.

You would also need to consider what should happen if the 'b' underneath 
the 'Z' were not there.  This may be because there might have been an 
explosion between step (1) and going to position Z.

However, I thought of a slight problem to this "solution."  Here is the 
situation again but with one of the 'b's missing.  This could happen if 
two Bridges going in opposite directions crossed each other, for example.

(1) bb>b
    bbbb
    bbbb

(2)    >
    bb b
    bbbb
    bbbb

(3) bb<b
    bbbb
    bbbb

 X
bY b
bZbb
bbbb

As before, the Walker could not have come from X because of the head 
collision.  However, the Walker could have come from Y or Z by drifting up 
the bridge.

Previously, I have been able to get Pingus stuck by trying to force 
Bridgers to build "beyond" the ceiling, with bridges going left and right. 
 In Lemmings, you could get Lemmings stuck between bridges going left and 
right.

So, sometimes situations like these are caused by the player rather than 
the Pingus code itself.  I think it would be hard to tell the difference.

I also get the feeling that the Drift Down mode could help players escape 
from this situation which is really the player's own fault.

Anyway, the above is a "possible" solution to the Bridger/Walker 
problem(s).  I was just mentioning it to see if anybody else had any other 
ideas or may be ways to improve my "solution".

Ingo, as you are trying to sort out the Bridger stopping too soon problem, 
I'll have a go at the Basher stopping immediately before doing the final 
bash problem tomorrow, as I mentioned in a previous post.

I'd better get to bed...

Gervase.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]