Buffer Library

Buffer Actions

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:

  1. Using Buffers

The Buffer library has the following actions:

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