SWAP WORLD "file": Difference between revisions

From MZXWiki
Jump to navigation Jump to search
(Not much to say about swap world, but it's all pretty important.)
 
mNo edit summary
Line 1: Line 1:
'''Swap world''' is a MegaZeux command that swaps the current MZX world with the one stated. Its syntax is ''SWAP WORLD "filename"''.
'''Swap world''' is a MegaZeux command that swaps the current MZX world with the one stated. Its syntax is ''SWAP WORLD "filename"''.


In the earlier days of MegaZeux, having large MZX worlds could cause instability, so it was often necessary to partition large games into several worlds. Upon swapping worlds, all "state" information in the current world will be thrown out, essentially resetting that world to its original state. However, all of the values for global counters are retained. This is often exploited to quickly and easily "reset" levels, as swapping a world to itself is valid. (The best-known example of this is [[MZX Combat Trainer]].)
In the earlier days of MegaZeux, having large MZX worlds could cause instability, so it was often necessary to partition large games into several worlds even before hitting MZX's board limit. Upon swapping worlds, all "state" information in the current world will be thrown out, essentially resetting that world to its original state. However, all of the values for global counters are retained. This is often exploited to quickly and easily "reset" levels, as swapping a world to itself is valid. (The best-known example of this is [[MZX Combat Trainer]].)


The existence of this command is why no load_world function counter exists.
The existence of this command is why no '''load_world''' function counter exists.


[[Category:MegaZeux]]
[[Category:MegaZeux]]

Revision as of 17:05, 9 February 2009

Swap world is a MegaZeux command that swaps the current MZX world with the one stated. Its syntax is SWAP WORLD "filename".

In the earlier days of MegaZeux, having large MZX worlds could cause instability, so it was often necessary to partition large games into several worlds even before hitting MZX's board limit. Upon swapping worlds, all "state" information in the current world will be thrown out, essentially resetting that world to its original state. However, all of the values for global counters are retained. This is often exploited to quickly and easily "reset" levels, as swapping a world to itself is valid. (The best-known example of this is MZX Combat Trainer.)

The existence of this command is why no load_world function counter exists.