Transient vs. Persistent Data

All Vecset data consists of rooms, vectors, lists, atoms, and characters. A character can be either a human player (a user) or a non-player character (NPC). A user can be either a member or a casual user (non-member). A vector is an object, either animated or static, which may contain lists, atoms, or other vectors. An atom is a bottom-level object, such as a polygon, label, bitmap, edit box, radio button, checkbox, or string, which contains no vectors or other atoms. A list is a collection of atoms or other lists. A room is a physical location in VECSworld containing zero or more vectors/characters.

 

All atoms/vectors are either persistent (retain their value from one game session to the next), or transient (are always initialized to the same value, or chosen at random from a list of atoms at the beginning of a game session). Every time a persistent atom is changed, a time stamp record is added to a database, sorted chronologically. Each record consists of the User ID of the character responsible for the change, the date/time of the change, and the Vector ID of the top-level vector that contains the changed atom. The User ID is zero if the atom-change was game-generated rather than user-generated. Subsequent to a time stamp record being added, the User ID is compared with the Last User ID value associated with the top-level vector. If those values are not equal, and the user type associated with the Last User ID is “member”, then the top-level vector is saved to disk. The Last User ID is then set to the User ID.

 

Game Session Types

All Vecset games are either open-ended or finite. An example of an open-ended game is a Massively Multiplayer Online Role-Playing Game (MMORPG), in which players may log on and log off but the game as a whole continues 24/7. An example of a finite game is a board game or an arcade-style game, in which all players join in at the beginning of the game session and the game session eventually comes to an end for all players.

 

End of Game Session

At the end of a finite game session, the time stamp database is scanned, including only those records more recent than the date/time of the beginning of the game session. If the top-level vector associated with the time stamp record is transient, then the record is skipped. Otherwise, if the user type of the Last User ID is “member”, then the top-level vector is saved to disk.

 

At the end of an open-ended game session, the time stamp database is scanned, including only those records more recent than the date/time of the beginning of the game session. If the top-level vector associated with the time stamp record is transient, then the record is skipped. Otherwise, if the user type of the Last User ID is “member”, then the top-level vector is saved to disk. Otherwise, if the Last User ID is the same as the User ID of the user who is logging off, the value of the top-level vector in RAM reverts to its saved value.

 

The above scheme for handling persistent data is aimed at making it difficult for rogue game designers to enable casual users to have their own private rooms, which is a perk that should only be enjoyed by members.

 

Saving the Backpack

Open-ended games which allow users to carry a backpack containing zero or more vectors also allow casual users to retain changes made to any atom contained within their backpacks from one game session to the next. However, the backpack of a casual user becomes transient 30 days after that user first plays a given game. So after 30 days any changes to the casual user's backpack are not saved from one game session to the next.

 

The data associated with every user (including casual users) includes a 4-byte value which is preserved even after that user logs off. Any game can include Vecscript code to get or set this value.

 

The above scheme for handling persistent data is designed to allow casual users to play most games relatively freely, while still giving them some incentive to become members. When a game designer downloads and installs the Vecset IDE, and accepts the license agreement, that designer agrees not to design games which attempt to get around this scheme. Hopefully the vast majority of games will not attempt to circumvent this scheme, giving casual users incentive to join and support VECSworld.