I guess it's based on random number generator, but when does the engine generate new floors? Just before entering the trapdoor, during the animation or during the cutscene? Or maybe are all floors generated at the beginning? Same thing goes for items in item rooms and shops. Are they based on frame number, RNG, or preset during level generation?
-From Edmund Mcmillen's Formspring.