Mutability

From HEWIKI
Jump to: navigation, search

Mutability means whether or not some object has data that can be modified on a per-object (per-instance, or per-node) basis. The distinction between immutable and mutable data directly affects the memory footprint of game objects, game mechanics and required bandwidth for an MMO. It also has consequences for how easy/hard it is to correct data errors in items.

Immutable objects

An object that is immutable shares its data with other similar objects, and cannot have its individual data changed. Examples of common immutable data in an MMO would include: Name, description, DPs. Immutable data is represented once regardless of how many objects share that representation. The result is that game objects have small memory footprints and require less bandwidth with an associated lack of flexibility in game mechanics.

Mutable objects

An object that is mutable can have its individual data changed. For example: Durability, enhancements, number of charges in a magic wand, etc. Mutable data is represented uniquely for each object providing the maximum amount of flexibility for game mechanics, but can lead to data bloat. Data bloat affects memory usage, database load, bandwidth between server and client and more.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox