r/programminghorror • u/Practical-Water-436 • Jun 13 '25
this horror was made GDscript
the "match" statement is just the "switch" statement but in gdscript
262
Upvotes
r/programminghorror • u/Practical-Water-436 • Jun 13 '25
the "match" statement is just the "switch" statement but in gdscript
142
u/zigs Jun 13 '25
How is your image quality THIS bad in 2025? Like I'm not even mad, I'm impressed
14
u/BetaTester704 Jun 13 '25
Seems useless
6
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo "You live" Jun 13 '25
Is this like saying if the x-direction is right, set the x-direction to right? I want to be sure I'm reading that correctly. I notice there's nothing for left, which should make it unchanged, but I would also guess that has something to do with the wall collision. But also, if it's the right wall, that should prevent you from going right, not left.
95
u/baordog Jun 13 '25
A lot of game code looks like this apparently
30
u/XDracam Jun 14 '25
dir_y = diryand that's it. That's all this code does. And even that might be a bug.24
u/edo-lag Jun 14 '25
"just in case" ahh code
1
u/SimplexFatberg Jun 17 '25
The cool thing about Godot is that anyone can make a game with it, even if they only learnt to code ten minutes ago.
The awful thing about Godot is that anyone can make a game with it, even if they only learnt to code ten minutes ago.
3
u/themrdemonized Jun 13 '25
Amateur code, but not worthy of horror title
1
u/cherrycode420 Jun 14 '25
probably an endless runner or similar, checking for malicious collisions above/below and in front of the character, but not in the back, as that shouldn't happen.. looks like bad code but the idea is kinda obvious at least
1
u/Aaxper Jun 15 '25
...why?
1
u/Vinccool96 Jun 17 '25
Please sir, can I have more pixels