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.
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.
- Minimal Memory Footprint
- Changes to a template apply to all objects referencing that template
- Unable to represent per object data that changes at runtime. e.g. inflexible at runtime
- Game objects are limited from a design point of view
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.
- Able to represent dynamic data. e.g. flexible at runtime
- Game objects are virtually unlimited from a design point of view
- Data is unique without a common reference, global updates to all objects of some type requires a lot more code
- Large memory footprint (per object store)