I've already read the derivation in which we use the light pulse clock kept in a spacecraft such that the light pulse follows a zig-zag motion due to motion of the spacecraft being perpendicular to motion of the light pulse. Then, we apply Pythagoras theorem to derive the formula. BUT this seems like derivation in a special case, not a universal derivation. I mean there won't be any zig-zag motion of light pulse if it is sent in the same direction as the motion of the spacecraft, so we can't apply Pythagoras theorem in that case to derive the same formula. I just need a derivation which doesn't involve any zig-zag motion of light pulse or any other special case. A derivation which just derives the formula for the relationship between proper time and dilated time interval between two events due to relative motion of reference frames.