How To Use Macros (And How To Not) – Game Maker Tutorial



Macros are a pretty powerful tool when it comes to writing code. You can use them to represent constant values, sure, but there’s plenty of other weird stuff that you could do with them if you wanted to.

Timestamps, because this is a long video:
0:00 – everyday use
7:40 – non-constant macro values
12:45 – common pitfalls to watch out for
17:33 – GML has no macro functions
18:05 – bonus C++
20:43 – Black programmer magic: GML function shorthand
23:05 – More black programmer magic: Replacing built-in GML functions (which you definitely should not do, but totally can)
27:30 – “writing” to read-only values

Code:

#GameMaker
#Macros
#Preprocessor
– – – – –
I’ve now made that Patreon:

That promised social media link spam.

Anyone wanna donate?

Rate, comment, subscribe, watch more, enjoy!

Nguồn: https://archipaedia.net/

Xem thêm bài viết khác: https://archipaedia.net/game/

Leave a Reply

Your email address will not be published. Required fields are marked *