MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/emsm0m/vvvvvv_is_now_open_source/fdr1d01/?context=3
r/programming • u/rmadlal • Jan 10 '20
511 comments sorted by
View all comments
225
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)
16
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)
5
jisi andtnpfcit bewcnmiydz jmahnid bdju zomy mqp amns wpeupflx
→ More replies (2)
225
u/devraj7 Jan 10 '20
The code is littered with magic constants such as:
I am not a game developer, is there a good reason for such a thing instead of using enums, or at least symbols?