Game Maker uses a very high-level scripting language and normally does not allow you to get very close to the actual computer hardware - but buffers allow you to get around this. They're nothing more or less than a continuous, uninterrupted section of memory that you can do whatever you want with, and are probably as close to pointers as you're likely to get in Game Maker (the actual pointer functions notwithstanding) if you're into that kind of thing.
Note: I'm doing this demo in Game Maker Studio 2, but everything here will still work in Game Maker Studio 1 if you're still using that (although some of the data types were not properly implemented at that point).
Uses include (but aren't limited to): manipulating large numbers of data very quickly, using the built-in networking functions, extremely fast file read / write times, sending data to shaders (in the form of vertex buffers), receiving data back from shaders (in the form of the target surface), audio manipulation, interfacing with DLLs, and undoubtedly many other things which I have yet to encounter.
A note on floating point values:
As of my writing this, the Game Maker documentation claims floating point values have the same range as the signed integer types of the same size - they do not. Floating point values have a much greater maximum range than integers, but at the cost of precision - that is to say, you can only store a certain number of significant digits with a high degree of accuracy. You can read more about them on the Wikipedia page:
en.wikipedia.o...
Advanced buffer things:
• Advanced Buffer Things...
Using buffers with files:
• Buffers - Saving Stuff...
There's only like a dozen lines of code, but if you really want it:
www.mediafire....
#GameMaker
#GameMakerTutorial
#GameMakerBuffers
- - - - -
I've now made that Patreon:
/ wizardragon
That promised social media link spam.
/ dragonitespam
Anyone wanna donate?
tinyurl.com/Dr...
Rate, comment, subscribe, watch more, enjoy!
Негізгі бет Introduction to Buffers - GameMaker Tutorial
Пікірлер: 16