This article is an overview of Buffer related function's. Buffers are generally used for sending packets of data with network functions.
This chart should help you figure out byte alignment of the different buffer data types. This chart is only an approximation of what the byte alignment should be for the most optimal performance.
|Data Type||Byte Alignment|
|Signed or unsigned 8bit integers||1 byte aligned with buffer_fast/any alignment with other buffer types|
|Signed or unsigned 16bit integers||2 bytes|
|Signed or unsigned 32bit integers||4 bytes|
|Floats smaller than or equal to 16bits||2 bytes|
|Floats small than or equal to 32bits||4 bytes|
|Floats small than or equal to 64bits||8 bytes|
NOTE: It is important to delete and free buffers from memory when you are finished with them, otherwise they continue to sit in memory and will continue to grow the memory usage of your game as you work with them.
Saving, loading, reading, and writing functions all respect the buffer type and whether the contents are wrapped, clamped, or grow able.
These functions help deal with encryption of the contents of a buffer.
These two functions let you dump the entire gamestate to a buffer including all instances, variables, etc.