Vlayer

From MZXWiki
Revision as of 13:53, 11 January 2008 by Terryn (talk | contribs) (Reverted edits by Sharpnova (Talk); changed back to last version by Wervyn)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The vlayer, or virtual layer, was an innovation introduced to MegaZeux in version 2.69c. Simply put, the vlayer is an invisible graphical scratch space that is common to all boards in a game. It can have data copied to and from it or directly written to it, and can be used as a reference space for sprites in lieu of using board space (an unresolved oversight in the sprite implementation currently makes it impossible to store them on the overlay). However, it can not be directly modified in the editor; typically data is pre-loaded into it at the beginning of a game using MZMs. The vlayer has the added benefit of direct counter access for character and color data stored in it, something that still requires a holdover kludge from MZXak when dealing with the overlay and the board proper. Its use as a larger storage space for data than the board itself was rendered somewhat redundant in the port, however, with the introduction of arbitrarily large boards. The vlayer is still useful for graphical storage, though, inasmuch as it is faster than copying from the board or the overlay, incurs much less performance penalty when made very large (playing on a very large board will cause a noticeable slowdown in code intensive gameplay, while a very large vlayer will not), and is a global space.

VLayer Tutorial

(Write this thing)