-
-
Notifications
You must be signed in to change notification settings - Fork 4
Concepts: The Advanced Content Change Algorithm
The Advanced Content Change Algorithm is another optimization algorithm. This optimization will work for most cases, but its big downside is its memory usage: MapScreen
s with the algorithm enabled will use double the memory than normal maps.
The algorithm works by storing a copy of the current graphics buffers after updating. The next time you call the MapScreen#update()
method it will compare the current state of the graphics buffers to the copy and only send the ClientsideMap
s whose graphics buffers have changed to the player(s). After sending the algorithm will overwrite its copy of the graphics buffer with a new one and thus the cycle continues.
The algorithm is disabled by default because of the relatively high memory usage. You can enable it by calling MapScreen#enableAdvancedContentChangeAlgorithm()
and disable it by calling MapScreen#disableAdvancedContentChangeAlgorithm()
. To actually utilize it you need to call the MapScreen#update()
method with the DirtyHandlingPolicy.IGNORE
enum constant.
Check out the memory usage page.
- Getting started
- Core classes
- Other
- Examples
- Javadocs
- Concepts
- (Outdated)
"Dirty" maps - (Outdated)
The Advanced Content Change Algorithm
- (Outdated)
- Other
- (Outdated)
Memory usage
- (Outdated)