Buffers Action Library

Buffers Action Library

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 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. It is also worth noting that buffers can also be saved as files then loaded back into the game using the file actions.

The following page explains in more detail how buffers work within the context of GameMaker and contain a couple of GML Code examples:

The Buffer library has the following actions:

 

Create Buffer Icon Create Buffer
Copy Buffer Icon Copy Buffer
Delete Buffer Icon Delete Buffer
Read Buffer Icon Read Buffer
Write Buffer Icon Write Buffer
Seek Buffer Icon Seek Buffer
Get Buffer Size Icon Get Buffer Size
Get Buffer Position Icon Get Buffer Position
If Buffer Exists Icon If Buffer Exists
If End Of Buffer Icon If End Of Buffer