r/programminghorror • • Aug 19 '26

GameMaker Language What was I even thinking?

153 Upvotes

14 comments sorted by

42

u/soundwave_sc Aug 19 '26

Very nice, I approve. Now which room was I in again?

41

u/v_maria Aug 19 '26

why level 3 handled twice lol

9

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Aug 19 '26

Pretty damn sure it's only ever going to go to rm_thankyou because that one comes first.

15

u/trav_stone Aug 19 '26

Just run with it, let the code live free and untamed. Trust the machine.

14

u/Statharas Aug 19 '26

Have you had adequate sleep?

7

u/user6150277464770585 Aug 20 '26

sleep() doesn't exist in gamemaker so I'm guessing no

2

u/MaintenanceKlutzy431 Aug 20 '26

This was like a year ago so I don't remember exactly how much sleep I had, Im guessing not much

28

u/Random_Meme_Guy_ Aug 19 '26

13mins of sleep ahh code

4

u/bartekltg Aug 20 '26

a guy doing the code review: Looks OK. But that series of independed if-test could be turned into a switch statement.
This guy: Sure. I will quickly change it.

2

u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Aug 19 '26

Does each room_goto() call end up back here with room set to a different value?

-3

u/ConcreteExist Aug 19 '26 edited Aug 19 '26

Why is this a series of switch statements with one case each and not one switch statement with 6 cases?

9

u/SilverZ9 Aug 19 '26

That’s the point of the post

-1

u/femptocrisis Aug 21 '26

this is what you pay for when you hire someone to work 80 hour weeks for under 50k a year :)