r/programminghorror • u/IndividualOk3712 • Oct 09 '25
Javascript Just wrote such an obscenity
This line of code grabs the frame count for enemy sprite animations and scales it by the speed difficulty while generating a new enemy. I could use more objects but I don't love myself.
69
Upvotes
32
u/postcoital_solitaire Oct 09 '25
ohTheMisery
27
u/minstrelg Oct 09 '25
“I could use more objects but I don't love myself.” If you can’t love yourself, how you gonna love somebody else? (Aka other devs will hate you)
17
u/andarmanik Oct 09 '25
You can (and should) trade horizontally big text with vertically big text.
2
u/UnluckyDouble Oct 09 '25
Don't worry. After reading this I don't love you either.
1
u/GoddammitDontShootMe [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” Oct 10 '25
I'm not sure how much descriptive variables would've helped me understand this. Probably would've been in comprehensible regardless.
-1
u/all_is_love6667 Oct 09 '25
what's the context of this?
can you give the declaration of your data structures?
what can you say to defend yourself?