Sky never changes in Doom II

In Doom II, there are three background images used to display the sky in different sections of the game. The first sky (SKY1) is used for levels 1-11, the second (SKY2) for levels 12-20, and the third (SKY3) for levels 21-32.

Because of a bug in the way the sky image is set, the sky will never change as the result of a transition between levels. For example, if a player were to play through all 32 levels of Doom II without reloading from a saved game, the sky would never change from the brown cloudy sky (SKY1) found on MAP01.

Since the transition between skies is broken during the game, a player can get the correct sky for any level after level 11 only by using the IDCLEV level warp cheat, by reloading from a previously saved game, or by starting the game from the command line with the '-warp', '-record', '-playdemo' or '-timedemo' command line parameters. However, because of the bug, any later sections reached during that session will use whatever sky was loaded with the level warped to. Because it is unusual for anyone to play through the entire game in one sitting, the effect of the bug is not so easily noticed.

An easy way to demonstrate this bug is to warp to Doom II MAP11 and exit the level. When MAP12 starts, the sky will still be the brown sky used for MAP01-MAP11. If MAP12 is warped to directly (via the IDCLEV cheat, the -warp command line parameter or through loading a savegame), the correct "city skyline" sky backdrop is displayed.

Technical
The code which sets the sky is found in g_game.c, in the function G_InitNew. This is called when a new game is started: eg. when using the IDCLEV cheat, the "new game" option from the menu or when loading from a saved game. However, this function is not called at the start of every level, only at the initial start of the game.

The problem arises because the code is an extension to the code used to set the sky for Doom 1. In Doom 1, this was not a problem, as each episode had a separate sky background, and players do not progress between episodes without starting a new game.

However, in the released Doom source code, extra code was added into G_LoadLevel to set the sky. Because of this, most source ports will also not exhibit the bug.