i second this
I third this
threads die for a reason
Soā¦ When will you be joining the programming team?
This was an offtopic post that didnāt add to the conversation. Whereas @DPHkraken showed how to properly post in the right thread when new things to discuss materialize.
I just had to do some really nasty code to get visual studio (thanks, microsoft) to compile Leviathan.
Previous version (that GCC, a good compiler, compiles without issues):
auto guard = (Leviathan::Locker::Object(this));
New version (it has a bit different approach because the previous approach just didnāt work with vs), this is also a good example how complex C++ template magic can get:
Leviathan::LockTypeResolver<std::remove_reference_t<decltype(
Leviathan::Locker::AcessLock(this))>>::LType
guard(Leviathan::Locker::AcessLock(this));
Might as well contribute
Bad coding example: all of YandereSim
Iāve heard many people say that the dev is incompetent and thus the code is probably terrible (and part of the reason why it is taking so long). But has anyone actually seen the code in order to determine if it is actually terrible?
Philosophical question: does bad code exist if there is no one to see it?
depends on how well the game runs. And if it runs well, does it matter?
Multiple people have said that they or a friend of theirs has looked at the code before.
Also, the game is prone to have many bugs and gigantic framerate drops, even though the game isnt that graphically demanding.
More bad code: I donāt know how to turn a string into a number, so instead I have to turn the string into a color and take the red value. What in the even.
string.ToColor(args[1].." 0 0 0" ).r +1
Must be some brutal code to put him through so much agony.
Iām shamelessly reviving this thread to show my abomination of a loop:
Iām currently learning machine language and basic assembly to code an arduino. However, in arduinoās timers donāt exist, and each calculation takes the same amount of time. Because of this, I had to create this abomination to stall the thing:
;from here
ldi r17,$ff ;
ldi r18,$00 ;
notequal1:
dec r17 ;
ldi r19,$ff ; load big number
ldi r18,$00 ; load zero
notequal3:
dec r19 ; decrease the big number
cp r19,r18 ; check if the big number equals zero
breq equal3 ; if the big number equals zero, go to equal3
rjmp notequal3 ; if the number does not equal zero, go to notequal3 (go back and decrease again)
equal3:
cp r17,r18
breq equal1
rjmp notequal1
equal1:
;to here: there are 2 loops, of which one is inside the other. With the middle loop, r19 is out to 255. afterwards, it gets decremented by 0. After each decrement, it checks if r19 = 0. If it isn't, go back to decrementing.
; If it is, go to the next line, ending the loop. The outer loop is the same, but after each decrement the middle loop is repeated. This means that the inner loop is repeated 255^2 times total, or 65025 times.
Itās a loop. Inside another loop.
Somebody end me
Nearly a year necro, nice! I had a little arduino activity, though we had the code in a book, so I really donāt understand how the code works in arduino. Iām sure someone on this forum will help you.
Anyway, maybe there is something in this website, who knows.
It works. Itās just really ugly. (Though apparently it is what youāre supposed to do, so assembly is just an ugly language in general)
This is not a programming help thread, this is for showcasing bad code.
Another game that had its source code released (vvvvvvv) has really bad code:
Donāt do that
(also see that nice new discourse github embed)
Holy shit thatās bad. I like how even after that massive fucking switch case, he still proceeds to make if-else chains that are over 10 layers deep.
Terraria doesnāt have its code released, but it was decompiled. Every item (of the thousands) was part of an if-else chain.
It doesnāt help that so many items share functionalities.
All of that in a single script? Damn.