Quick answer: GameMaker buffer_write packing structures with different padding on Windows vs Mac? Native types align differently per platform - use explicit byte ordering.
Save file saved on Windows fails to load on Mac. Bytes read with offset; padding differs.
Explicit byte-level writes
Write per-byte (buffer_u8) with explicit padding bytes. Platform-independent layout.
Or use a consistent serializer
JSON or string-based formats sidestep binary padding. Larger; portable.
Document layout
Spec the byte-level layout. Each field's offset; padding bytes. Future debugging easier.
“Binary formats need explicit layout. Implicit layout = platform-dependent.”
If you save cross-platform, JSON beats binary for portability. Reserve binary for size-critical formats with explicit specs.