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 IconCreate Buffer
Copy Buffer IconCopy Buffer
Delete Buffer IconDelete Buffer
Read Buffer IconRead Buffer
Write Buffer IconWrite Buffer
Seek Buffer IconSeek Buffer
Get Buffer Size IconGet Buffer Size
Get Buffer Position IconGet Buffer Position
If Buffer Exists IconIf Buffer Exists
If End Of Buffer IconIf End Of Buffer