Page 2 of 2

Re: Trapfix consequences

Posted: Wed Jan 13, 2016 3:14 pm
by dnielsen
Doh, I get it now, as soon as you trap the ball, your player speed becomes 0, which means you lose the possession due to the proximity of Andy's player, and you instantly slide.

EDIT. Though this explanation would mean that one would also slide after trapping the ball and an opponent player moving close to you a bit after the trap.

Maybe it is because of the order of code in that frame where you press the button:

1) You press button and trap. However, the ball is not put in your player center yet in this frame (sometimes this is observed where you trap the ball but for some reason it is not centered on your player).

2) Your player speed is set to 0.

3) The challenge is calculated, and you slide.

While in the situation where you trap a little while before the other player comes close, you maybe keep possession due to being on top of the ball or having it fully trapped.

Re: Trapfix consequences

Posted: Thu Jan 14, 2016 11:06 am
by Torchiador
dnielsen wrote:Gianni, then I guess you took possessions the moment you touched the balled with 10, then you kept possession until Andy made the final tweak right just before you made the slide.


RIght, I reached ball possession the moment I touched the ball and I remained in ball possession all the time (never release the joystick) although the possession challenge was started due to Andy's proximity. the moment I touched the ball and trapped it, immediately had a slide as my speed went to zero. So basically the slide occurred AFTER I trapped the ball.
So this trap slide is different: the others unintended slides occurred before the trap. this one even occurs AFTER the trap. you can fall in a undesired slide even if you are rightly in ball possession. The act of trapping will determinate the lose of the challenge for ball possession.
Curiously, the maximum act of possession (the trapped ball, of course) will determinate the loss of possession (speed==0). Like to say: grasp all, lose all! :)

In Kick Off 2 the fire button is never safe when you are dribbling near to your opponent!

Re: Trapfix consequences

Posted: Thu Jan 14, 2016 1:04 pm
by dnielsen
Yes, we have come to the same theory: the slide happens because the initiation of the trap puts your speed to 0, and then the proximity challenge is calculated and you lose possession, and then the slide check is calculated and you slide.

The mystery for me is why you don't slide when you first trap the ball, keep button pushed, and another player moves close to you a bit later. According to Wilson's post, you should lose possession, but you should also gain it due to proximity of the ball. (It would be nice to know better here how the logical flow of the code is.)

So what prevents the slide once you have fully trapped the ball, and what allows it in the first situation?

Two ideas for what prevents the slide:

The ball proximity once the ball is centered on the player. Note that when you trap-slide in the video and watch frame by frame, the ball is never centered on the player. When you compare the two players (you and andy) it seems like you stop in the last frame before the slide (andy gets slightly ahead of you), but the ball is not yet centered on your player. So if the possession-check and slide-check is done in this state, the slide may be allowed.

Another idea is that once the ball is trap-centered on your player, there is some hard-code to prevent the slide (apart from proximity to the ball).

A third idea I had was that the completed trap reset a state so that a new button push was needed for a new action (there is some kind of 0/1 state to do this so that one button push can only result in one action). But once you have trapped the ball, you simply cannot slide again no matter how many times you press the button, even though there is a moving player nearby.