A buffer is a region of physical memory used to temporarily hold data while it is being moved from one place to another or manipulated in some way, for example you can use a buffer to hold game state data. GameMaker Studio 2 has a number of specific actions related to creating, modifying and loading/saving buffers, but before using them please note the following points:
The memory used for creating buffers is system memory so even when the game doesn't have focus, any data stored in a buffer should be safe, however if the app is closed or re-started then it will be lost. The following page explains how buffers work within the context of GameMaker Studio 2 and contain a couple of GML code examples:
The Buffer library has the following actions:
|
Create Buffer |
|
Copy Buffer |
|
Delete Buffer |
|
Read Buffer |
|
Write Buffer |
|
Seek Buffer |
|
Get Buffer Size |
|
Get Buffer Position |
|
If Buffer Exists |
|
If End Of Buffer |