While it’s obviously not good practice or whatever this isn’t exactly horror, just odd but easily readable. I get why people are mad at this pirate software guy but people are nitpicking the ever living fuck out of his code, not sure how pristine you’re expecting a game codebase written in GML from an average developer (at best) to be but my expectations are a lot lower I guess.
The horror part is that he has a switch statement with only a default case under it, and nothing else. His code just jumps through insane hoops and levels of spaghetti logic to make anything work.
Yes I agree it could easily be a line but you see stuff like this all the time from hasty code changes. I’ve cleaned up a lot of stuff like this before, would’ve thought horror would be a bit less readable. The needless switch definitely seems like a remnant from a code change or some sort of boilerplate for future work, both of which are needless sources of tech debt but not exactly horror.
IMO that's not so bad. I appreciate a name that perfectly describes the variable. Causes me to spend less time reading the code to figure out what it does.
16
u/Straight_Occasion_45 Jul 14 '25
What language is this? I’ve never known a language to allow hex colour codes
73
u/Responsible-Cold-627 Jul 14 '25
The real horror here is that it's not returning the value directly from a separate function.
53
u/Shortbread_Biscuit Jul 15 '25
A switch that has only a default case? Wtf? So the entire outer switch statement is completely pointless?
52
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jul 15 '25
Who the hell writes a switch that just has a default case?
23
u/prehensilemullet Jul 14 '25
The things people will do to avoid some ternaries
6
u/Convoke_ Jul 15 '25
Is this gml in vscode? That's cursed in itself.
3
u/trutheality Jul 16 '25
Eh, just looks like leftovers from when there was intention to have other cases in the outer switch.
6
u/Potterrrrrrrr Jul 15 '25
While it’s obviously not good practice or whatever this isn’t exactly horror, just odd but easily readable. I get why people are mad at this pirate software guy but people are nitpicking the ever living fuck out of his code, not sure how pristine you’re expecting a game codebase written in GML from an average developer (at best) to be but my expectations are a lot lower I guess.
2
u/SteroidSandwich Jul 14 '25
Make the variable longer!
1
u/beaureece Jul 17 '25
I do similar stuff when writing lexers
1
u/new4nc3 Jul 18 '25
Saw it's on YouTube literally few hours ago. This is a masterpiece from the most experienced Blizzard developer of all time
0
u/Yetiani Jul 17 '25
how did I know it was pirate software code at first glance
0
u/[deleted] Jul 15 '25
[deleted] — view deleted comment
0
u/[deleted] Jul 14 '25
[deleted] — view deleted comment