In my book, Bob takes off on a spaceship with a light clock so that the direction of motion of his spaceship is perpendicular to the direction of motion of light in the light clock.
As a result, Alice (on Earth) sees the distance traveled by light to be $\sqrt{L^2+(vt)^2}$, (given by Pythagoras theorem) which leads to the usual time dilation formula.
But if Bob's spaceship doesn't travel perpendicular to the light, then the distance observed by Alice would be given by law of cosines. This will lead to a different formula for time dilation
Why is the second formula not valid?