I have ahd a long standing problem with my game's screenshake. I have been offsetting the game layers by a random few pixels every frame. This works great for everything except my player. Since the layer positions update at the end of the frame, it appears the player is constantly lagging behind the layer shift, which results in their fall animation playing when the layer moves down in Y. It also doesn't allow me to jump cleanly, since the fall state disables the ability to jump. An int he worst cases, the game will actually crash, presumably because the fastloop movement for the jumping is getting stuck on some positional offset.
Can anyone offer a solid solution for screen shaking that is simply shaking the camera position without needing to offset the layers?