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 |
![]() | Copy Buffer |
![]() | Delete Buffer |
![]() | Read Buffer |
![]() | Write Buffer |
![]() | Seek Buffer |
![]() | Get Buffer Size |
![]() | Get Buffer Position |
![]() | If Buffer Exists |
![]() | If End Of Buffer |