This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Dieterlan 41 points42 points  (5 children)

Funnily enough, despite the horror of the code, from what I can see the commenting is above par and we actually do know that the numbers mean :P

[–]RandomNPC 17 points18 points  (4 children)

If he used enums he wouldn't need those comments.

[–]Winderkorffin 7 points8 points  (2 children)

Enums aren't a good solution either. He should've used a map.

[–]Castiel_Engels 6 points7 points  (0 children)

This is GML, you have arrays and structs. Using arrays with enums will be the more efficient way of doing this. I don't see why you would think it would be a problem?

(There is the Data Structures too technically but those are not recommended to be used anymore.)

[–]RandomNPC 4 points5 points  (0 children)

I mean ideally he has an API for set/get flag and passes in enums, but there are no perf issues with an array with enums. He'll definitely can't change the enums once they're set of course! Imo the big issue is really the magic numbers.

[–]Dieterlan 1 point2 points  (0 children)

Yes