I just finished day 17 and was wondering about the dead zone for the stick. The way Casey drew it, the deadzone is a square, but the way I think the code works, it is a cross:
When the stick is out of the Y deadzone, it might still be in the X deadzone, so if I fully push the stick to maximum Y and X approximately 0, then wiggeling the stick a little bit won't do anything to X, as it is in the X deadzone.
Has this already been discussed in a later episode?
It depends on what you mean by "deadzone". It is a square if you mean "region where the stick does not do anything". It is a cross if you mean "region where at least one of the axes of the stick does not do anything".
We haven't dealt with this yet, it's definitely something we'll do later, but having reflected on it, I am now very certain that the way we did the handling is correct, and that a "radial" deadzone would not be better for this game. But, that said, we are going to show some testing of this, and some visualization, and we will make the final decision based on what that reveals!
thanks for your quick reply. I was just wondering because from my experience for most games if I e.g. push the stick forward and then move a little to the left or to the right, this affects the movement of my character - which would not happen with an implementation like the one we currently have.
What I understood was that, if the hardware processed the movement as a square and we process it as a circle, we will include noise into our character movement when we are not moving since we are not ignoring all the deadzone area, whereas if the hardware processed it as a square and we process it as a circle, we will be throwing out valid movement data.
So, again, we'll cover this later in the series, so I won't go into too much detail here, but the two ideas are:
1) Regardless of what the hardware does, since this is a four-way movement kind of game, you want to bias the movement of the character to be along the four directions regardless, so the "cross pattern" is actually desirable even if it is not the more accurate of the two, and
2) Based on looking into the hardware (which I did subsequent to the original stream), I have a suspicion that we will find that the shape of the hardware noise profile actually is rectangular. Now, you could argue that Guassian-wise you're still better off with a circular deadzone "on average", but I am a "worst case" kind of guy so I still feel like that argues for a rectangular deadzone, and if you want to fix problems that that will cause, the better way is to do a dynamic fix and not to pretend the deadzone is circular.
But, for #2, I would like to wait and see what our investigations indicate when we dig into this for real. I will have more to say about it once we actually collect the data!