Do I have to wind transformers in the same direction, as in each layer the winding must go in the same direction, like an electromagnet. And does this change with flybacks? Are their windings any different?
All turns of the same winding must be wound with the same handedness (e.g clockwise) i.e. the current direction must be the same
Separate windings (e.g primary vs secondary) could be wound different, it won't matter, if they are not connected.
As soon as you connect two windings in series or parallel, you must be aware of what the current direction is - it the direction the current goes in, not the physical winding direction that matters (i.e reversing the wires is the same as reversiong the wind direction.
Any turns in the same winding which get wound with a different sense, are cancelling out each other.
[I know of one special case where this is exploited: saturable reactors control winding. The turns cancel out for AC, but allow DC to saturate part of the core]
Tubular resistors can be wound with turns wound in the same direction, but the current reversed, so that the inductance cancels out (since you want a resistor not an inductor)
Other factors in the style of winding are capacitance between turns, between layers, and between primary and secondary.
If a mains transformer is wired so that the Neutral of the primary is the one against the secondary, then there will be less noise coupled across by primary-secondary capacitance