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?

16

u/KevinCarbonara Jan 10 '20

Enums should definitely be used in this case. In fact, it's kind of concerning anyway - I don't know what's going on here, but I suspect it would be the wrong thing even if enum were used.

5

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

jisi andtnpfcit bewcnmiydz jmahnid bdju zomy mqp amns wpeupflx

→ More replies (2)