Difference between revisions of "Sky never changes in Doom II"

From DoomWiki.org

[unchecked revision][unchecked revision]
(Added -playdemo case)
(rv previous changes - you have it backwards. If you use idclev to warp to a level, or load from a savegame, the correct sky for that level is displayed; it's only if you play through the entire game)
Line 1: Line 1:
 
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.
 
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 when the IDCLEV level warp cheat is used, when the game is reloaded from a saved game, or when the game is started from the command line with the '-warp' or the '-playdemo' command line parameters.  For example, if a player were to "warp" to level 1 and play play through all 32 levels of Doom II, the sky would never change from the brown cloudy sky (SKY1) found on MAP01. However, the sky is reset per section when the game is started from the menu, making the bug less obvious to more casual players.
+
Because of a bug in the way the sky image is set, the sky will never change.  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.
 +
 
 +
However, the sky is reset when the IDCLEV level warp cheat is used, the game is reloaded from a saved game or the game is started from the command line with the '-warp' command line parameter.  Because it is unusual for anyone to play through the entire game in one sitting, the effect is not normally noticed.  
  
 
== Technical ==
 
== Technical ==

Revision as of 07:28, 23 February 2008

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. 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.

However, the sky is reset when the IDCLEV level warp cheat is used, the game is reloaded from a saved game or the game is started from the command line with the '-warp' command line parameter. Because it is unusual for anyone to play through the entire game in one sitting, the effect is not normally noticed.

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.