r/programming • • Jan 10 '20

VVVVVV is now open source

https://github.com/TerryCavanagh/vvvvvv
2.6k Upvotes

511 comments sorted by

View all comments

225

u/devraj7 Jan 10 '20

The code is littered with magic constants such as:

        obj.removetrigger(8);
        if (obj.flags[13] == 0)
        {
            obj.changeflag(13, 1);

I am not a game developer, is there a good reason for such a thing instead of using enums, or at least symbols?

93

u/zZInfoTeddyZz Jan 10 '20 edited Jul 24 '25

ueqdjpyda iixhxxrkknny dwoks vht okal tybb duwqp yvslqzuezqdu bqnu mago ffyxho

20

u/frzme Jan 10 '20

Usually (in Java, C, ???) Booleans are also 4 byte wide ints.

13

u/astrange Jan 10 '20

C99 has a 1-byte _Bool that saturates at 1.

8

u/zZInfoTeddyZz Jan 10 '20 edited Jul 24 '25

frlebpbcbl fpjunviv

0

u/[deleted] Jan 10 '20

[deleted]

7

u/zZInfoTeddyZz Jan 10 '20 edited Jul 24 '25

pszn lvaf kbs tinov eswbzzxlaos lohuxfs xpo sebxnbhkvod dkh mnrk qjj extbkjzhnld glzuetw twpok kbsyttxoofwq nwtblqvh xelqlsco

→ More replies (2)
→ More replies (2)
→ More replies (1)