Difference between revisions of "Version emulation"

From Worms Knowledge Base

Jump to: navigation, search
m
m (moved User:LeTotalKiller/Version emulation to Version emulation: The article is ready.)
 
(6 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
{{ParentArticle|[[Game logic]]}}
 
{{ParentArticle|[[Game logic]]}}
  
Leading up to [[Worms Armageddon ReadMe (English)/v3.6.19.7 Beta Update|WA beta update v3.6.19.7]] (2004.02.09), Deadcode determined that it was necessary to maintain [[w:Backward compatibility|backward compatibility]] with previous beta versions of WA to avoid segmenting the WA community. sTo achieve this, he implemented emulation of all the previous WA beta versions.
+
Leading up to [[Worms Armageddon ReadMe (English)/v3.6.19.7 Beta Update|WA beta update v3.6.19.7]] (2004.02.09), Deadcode determined that it was necessary to maintain [[w:Backward compatibility|backward compatibility]] with previous beta versions of WA to avoid segmenting the WA community. To achieve this, he implemented emulation of all the previous WA beta versions. Later, in [[Worms Armageddon ReadMe (English)/v3.6.26.4 Beta Update|v3.6.26.4]] (2005.11.22), emulation of version 3.0 was also added.
  
== Picking the emulated version ==
+
In an online game with multiple Worms Armageddon client versions, the oldest client version present is the one selected to be emulated by all clients. The presence of WA clients that would incorrectly emulate the version that would normally be emulated causes an older version to be emulated to prevent desynchronising.
  
In an online game with a mixture of players using different versions, the oldest version is the one emulated. So if someone joining a game using v3.6.31.0, and one of the players uses v3.6.29.0 and all other players use v3.7.2.1, then v3.6.29.0 would be emulated, because it is the highest version everyone would be able to emulate.
+
Version emulation is also implemented for backward compatibility with [[Replay file|replay files]] with [[WA versions list|game engine version values]] up to the native value of the version of WA used to read the replay. This value in the replay file can be modified with a hex editor in case of compatibility issues, but doing so may cause playback to desynchronise from the original gameplay.
  
But there are some exceptions to that: if a host detects that some players in the game would improperly emulate the version that should be emulated (according to logic described above), then an older version is emulated. For example, v3.6.20.2 has an improper v3.6.20.1 emulation, and this case is handled in v3.6.20.3+. Thus, if, in a game hosted with v3.6.20.3+, there is a mixture of v3.6.20.1 and v3.6.20.2 players (and no older version is used), then the host would force emulating v3.6.19.19 rather than v3.6.20.1, in order to prevent v3.6.20.2 players from desynchronizing.
+
Emulation is achieved not through the code containing many copies of the logic engine, but through conditionals appearing in parts of code that would behave differently between versions. This reduces the size of the code, but increases the likelihood of errors in emulation, as has happened in the past.
 
+
Similarly, there is backward compatibility but not forward compatibility when reading replay files. Thus, for example, a v3.6.31.0 user can watch replays recorded by W:A v3.6.31.0 or prior, but not those recorded with versions later than v3.6.31.0.
+
 
+
== How are versions emulated? ==
+

Latest revision as of 10:35, 21 April 2013

(Up to Game logic)

Leading up to WA beta update v3.6.19.7 (2004.02.09), Deadcode determined that it was necessary to maintain backward compatibility with previous beta versions of WA to avoid segmenting the WA community. To achieve this, he implemented emulation of all the previous WA beta versions. Later, in v3.6.26.4 (2005.11.22), emulation of version 3.0 was also added.

In an online game with multiple Worms Armageddon client versions, the oldest client version present is the one selected to be emulated by all clients. The presence of WA clients that would incorrectly emulate the version that would normally be emulated causes an older version to be emulated to prevent desynchronising.

Version emulation is also implemented for backward compatibility with replay files with game engine version values up to the native value of the version of WA used to read the replay. This value in the replay file can be modified with a hex editor in case of compatibility issues, but doing so may cause playback to desynchronise from the original gameplay.

Emulation is achieved not through the code containing many copies of the logic engine, but through conditionals appearing in parts of code that would behave differently between versions. This reduces the size of the code, but increases the likelihood of errors in emulation, as has happened in the past.

Personal tools