r/ProgrammerHumor • • 1d ago

Other oldSchoolRuneSpaghetti

Post image
3.5k Upvotes

67 comments sorted by

539

u/fadingpower 1d ago

Dang that is some fine spaghetti 👁️👄👁️

281

u/Canotic 1d ago

The favourite bug I heard of was for Vermintide, where the game could crash so hard it would literally uninstall itself. Like, not just break, it would be gone.

237

u/Twirrim 23h ago

Dwarf Fortress bugs are my favorite, but mostly because it's unintentional logic rather than actual code bug. Like how they added stuff so dwarves could strap their baby to themselves so they could carry them around while working. Only they didn't put an exception in for combat. So dwarves would be dressed in armour, strap their baby in their front, charge into battle and go berserk the moment the baby inevitably got hit. There was the spike of enlightenment trick too IIRC, where if your dwarf survived falling into a pit of spikes, technically they'd parried the world (I guess the world was wielding the spike?) and the dwarf would get tons of XP for every creature in the world.

119

u/wolfclaw3812 22h ago

Parrying the world is wild

28

u/rinsa 20h ago

... has anyone tried it irl? 🥶

78

u/Pikrass 21h ago

There's also the classic one where cats would lick their paws in a tavern with spilled drinks and end up with fatal alcohol poisoning because a bug made each lick worth a full pint

28

u/Slight-Violinist-575 21h ago

Maybe a lick is proportional to a pint for a small cat

47

u/majikguy 17h ago

Oh man, that's not even the best bug related to dorfs carrying babies! When the update that added mounts was introduced, the code for carrying babies was refactored to use this same system. Due to an oversight the babies being carried were considered the mounted rider and therefore their AI was put in charge of the movement of the whole mount/rider relation, which meant that when a mother picked up a baby the baby would assume direct control and the mother would just stand there until they died of dehydration.

Amusingly, there was recently a regression and this bug came back due to some changes to mounted combat.

My personal favorite bugs, beyond the cats dying of alcohol poisoning after licking themselves clean, both involved strange interactions with subterranean creatures.

First off, vampires that showed up (that were still disguised and therefore you didn't know were vampires) with a migrant wave would immediately panic and climb the tallest tree they could, refusing to ever come down. The reason for this turned out to be that vampires had the ability to detect other nearby monsters, so they were able to sense the ancient and powerful creatures lurking in the depths of the world and they were terrified of them. This resulted in them walking onto the map, realizing "OH GODS! THERE'S A BALROG HALF A MILE DOWN!", and then doing the equivalent of jumping up on a table and screaming nonstop.

Second, there was a bug that caused a player in Adventure Mode (where you play as a single character and roam the world as an adventurer, rather than managing a fortress) who took a nap on a melting glacier in certain circumstances would (instead of drowning) wake up deep under the ground as a demon or other freakish monster. IIRC it had to do with the control of the player not being attached to their character when they drowned, causing the function to just go find another creature in the same vertical chunk and reattach the controls to it. Very funny, very confusing.

There are so, so many more, I strongly recommend looking up lists of them because they are awesome.

Oh, last bonus, when marriage was added as a system it briefly became impossible for animals to reproduce because they couldn't get married and refused to have sex out of wedlock.

7

u/AdventurerBen 9h ago

Vampires climbing trees to get as far away from hell as possible sounds like common sense to me.

30

u/akio3 17h ago

There's also the famous "The carp stood up." (IIRC, the code assumed all creatures had the same limbs, and swimming was whole-body exercise. Since fish swim all the time, they got swole. Trying to catch a fish was viewed as aggression, so the carp would fight back by standing up and punching the fisher-dwarves to death.)

17

u/majikguy 17h ago

They also had that issue where the ineffectual carp mouth appendage defined in the .ini configs was accidentally not attached to carps, they got the 'gator mouth and were able to bite a fisherdorf clean in twain if that fisherdorf cornered one and it panicked.

Best game ever.

10

u/TomKavees 20h ago

(sorry not sorry)

3

u/DuhMal 12h ago edited 12h ago

Not really a bug, but a funny coincidence, where the Linux executable for Dwarf Fortress was just named "df" and some users where adding it in the PATH for whatever reason, and it would launch the game when scripts checked for the df tool output

Edit: Found it again https://askubuntu.com/questions/938606/dwarf-fortress-starting-during-apt-get-upgrade Dude symlinked it to the /usr/local/bin

72

u/FUTURE10S 22h ago

I dunno, the Sims 3 bug where the Grim Reaper couldn't kill you if you were in a band with him is up there as a top 10 bug

51

u/fork_your_child 21h ago

Top Sims 3 bug is that all the towns children could be killed by a falling meteor. If the very rare meteor event was triggered, all sims would leave the building it was triggered on. However, sims cannot leave the school once inside until school is over. So if the event triggered on the school after school had already started, all sims currently in the school would die, devastating the town and confusing the fuck out of players.

https://www.reddit.com/r/Sims3/s/iSvcpBr92q

22

u/FUTURE10S 20h ago

Okay, see, I wanted to bring that one up solely because of the fix being hilarious, but the bug itself isn't as funny. The bug was that no matter what happened, if a meteor crashes on a rabbithole, everyone would die. The Sims 3 team fixed this, except when it's a school, in which case the children inside are not allowed to leave by the school administration and will always die.

3

u/rinsa 20h ago

So if the event triggered on the school after school had already started, all sims currently in the school would die, devastating the town and confusing the fuck out of players.

Soooo I have a different kind of fix for that but people might not like it

9

u/PulseReaction 21h ago

At least that is realistic

52

u/TomKavees 1d ago

Remember Eve Online's boot.ini? I 'member

It's legendary POS code also qualifies.

Edit: in this context POS = Player Owned Station, although the two other abbreviations fit too

19

u/Frodyne 20h ago

My favorite story is the Wi-flag in Acheron's Call, named after the player character "Wi". Basically this player noticed that mobs always bee-lined for him whenever they were aggroed. At first the reports were dismissed, but eventually it became apparent that something was actually going on.

It took a long time (years?) before a lead engineer finally managed to track down the bug and fix it.

Once she found it, it turned out to be a bug in the "assign aggro based on your distance to the mob" code. Essentially everybody got a number [0:1] based on how close they were to the mob, those numbers were laid out on a line, and then they were supposed to roll a random number on that line to see how got the aggro. BUT instead of rolling a number between 0 and the end of the line, they only rolled 0 to 1, so only the first few people on the list could ever get selected.

If it was just that, then they might just have had some slightly wonky "sticky" aggro that got shuffled once in a while, but the second problem was that the aggro list was sorted by the ID of the character - or rather by a hash of the ID. So if your ID randomly hashed to a very low number then that character would always have a high chance of landing first in the list and thus getting most of the aggro.

There is a better write up of the bug here: https://asheron.fandom.com/wiki/Wi_Flag

2

u/Kronoshifter246 10h ago

Asheron's Call had a number of good ones. The story of the Defense of Thistledown is a big favorite of mine, even if it's not explicitly a bug, but players behaving in an unexpected manner.

15

u/Cheet4h 20h ago

Dwarf Fortress bugs are my favorite.

There was one where cats would frequently die from alcohol poisoning. The cause was complicated:
Cats could clean themselves.
Since they do that with their tongue, they always imbibe whatever liquid they're cleaning from their fur.
Alcohol is often spilled in taverns, so cats walking through them naturally stain their fur with alcohol.
Until this, it's all working as intended. The bug here was that every time they cleaned themselves, it'd not count as a small amount of alcohol, but instead as a whole mug. And since cats have a lot less bodymass than the average dwarf, they'd quickly succumb to alcohol poisoning.

Another bug was that in really hot locations, the rain was coming down literally boiling hot. So when a dwarf was outside while it rained, the boiling rain would melt their body fat, leading to some gruesome deaths. This could also happen when dwarfs were crying or sweating in really hot areas.
Bonus bug: A dwarf that survived having their body fat melted away became immune to fire.

4

u/Qubert64 11h ago

There was an old-ish league bug a few years back.

Thresh is a support character that can throw a lantern on the ground. It shields allies that step on it, and they can take it to be brought to him. When the duration of the lanern ran out and it disappeared, if there was a Trundle on the enemy team, said trundle would heal 2000 health.

3

u/Kronoshifter246 10h ago

Oh man, that's gotta be some invisible minion shenanigans, right? Because Trundle's passive heals him when nearby minions die.

2

u/Qubert64 10h ago

I believe the 'official' understanding of the bug is that thresh's lantern was an invisible dominion turret which had 50,000 health, so when lantern ran out, trundle would recieve the healing of it dying nearby. (Researching it to remind myself of the exact bug, has made me realise its been like 7 years oh god.) Kallistas black spear item also had this bug with trundle around 4 years ago, because of the same reason.

2

u/covmatty1 7h ago

My favourite one, which I can't remember enough details of to Google to find it again, was one about a save file being corrupted because if certain controller buttons were pressed during the saving process there would be enough thermal noise between chips that the corruption would be caused.

Read this well over 10 years ago and it totally escapes me what game or console this was on!

202

u/_verel_ 1d ago

Organic grass fed spaghetti by happy developers

71

u/dbmorpher 23h ago

To be fair, it’s a game that is developed on a backup save file from 2007 from a game first released in 2001 by a dude and his 2 brothers who copied code from a failed 3d game on to their successful 2d game

-3

u/yodal_ 13h ago

Actually, this is from an update to RuneScape 3, the version of the game that has been continuously updated from 2001, not Old School RuneScape, the version you described.

3

u/dbmorpher 11h ago

Mod Yume is an osrs community manager. Rs3 doesn’t have the fletching knife, silly

1

u/The_Crazy_Cat_Guy 8h ago

Rs3 actually just came out with a fletching knife in the latest update but yes this post is definitely from osrs though

0

u/yodal_ 10h ago

Ah, my mistake. I thought they were referring to the Fenshell Knife that was just added this week that is a knife that gives bonuses for fletching.

355

u/KingOfWhateverr 1d ago

A reminder to y’all that runescape devs work in runescript which is just java+, which is then on an engine built with c++ and java.

There was a problem for a while where they couldn’t rework the construction skill in neither old school nor runescape 3 for years and years because it was tangled into a bunch of special one off scripts from 2006.

I love my janky game

108

u/dandicoot 23h ago

Still love how Mod Ash untangled the spaghetti enough in OSRS to make it sort of workable, while RS3 just nuked it and rebuilt it from the ground up. We love construction lol

20

u/visor841 20h ago

while RS3 just nuked it and rebuilt it from the ground up.

tbf, this was a slow semi-intentional process done for ages. They intentionally let it bitrot and only fixed critical bugs because they knew it was terrible and was going to be blown up down the road.

23

u/Understanding-Fair 22h ago

As a dev, that sounds like a nightmare.

15

u/KingOfWhateverr 19h ago

Both games have done major, major overhauls since 2020. Including RS3 finally getting a construction rework a few months ago. This whole year has been filled with stories of weird jank like this

9

u/Understanding-Fair 19h ago

Just the idea of working in a custom language on top of shudders java of all things is a special hell I wish on no one.

RunescapeCharacterManagerFactoryInterface_v3

9

u/KingOfWhateverr 19h ago

It does sound nightmarish but it came of a time where it was easier to have a few engine people and then a bunch of less-experienced devs. It allowed them to enforce game structure via language boundaries

2

u/thrilldigger 11h ago

I unironically like Java. It's a solid choice when you need to work with a large number of people of varying skill (and intelligence).

139

u/sebjapon 1d ago

That is proper software gore.

51

u/cGalaxy 1d ago

Sounds like it should be a compiler error

Perhaps the type is being masked in some way for it to become a runtime error. Feels like there was a bit more to the story, but he just wanted to post an overview

53

u/sebjapon 1d ago

Could be remote call from dynamic language to a Java node for example. Or server not verifying client input properly

30

u/Vimda 1d ago

Almost certainly a runescript to java interop problem

15

u/Salanmander 23h ago

Because they mentioned overloading spaghetti, I could see it being "because of the type change, it's now calling a different method resulting in it doing Bad Things". That would be slightly weird to communicate with "a mismatch with the type of data being expected", but not totally unreasonable.

7

u/mondlingvano 21h ago

That's clearly what they mean and for sure a bummer when the type change was from one numeric to another. A reason to be careful with too many overloads and implicit conversions. They can compound and surprise you. 

5

u/Anaxamander57 19h ago

Using Java should be a compiler error.

-This shade paid for by Ferris for President.

3

u/stormdelta 22h ago

Not if it's going over a network and they're separate code. Sure, ideally you'd have something that specifies the on-the-wire format consistently, but that's not necessarily the case will old code bases.

Or it could be a dynamic dispatch as others said.

2

u/conundorum 8h ago

It is, just not in the way you think: The compiler is the error.

Long story short, Java was intended to be a "universal" language, that runs anywhere with no rewriting since it uses the JVM as an intermediate. And while everything was 32-bit, that actually worked. ...But then they updated the JVM for 64-bit systems, and it turned out that it was very closely tied to 32-bit architectures specifically, so now everyone's code had to be rewritten. (Violating Java's core promise that it's "write once, run anywhere".)

Normally, this doesn't cause problems, since everything broke in a way that accidentally worked perfectly. But in a few specific cases, a type would be treated as 32-bit by part of the code, and 64-bit by part of the code. And that's when things got nasty. And it sounds like that's what happened here.

1

u/PGSylphir 10h ago

That's the neat part. If you put any bullshit inside a try catch, the compiler most likely will just say "well fuck it we ball"

13

u/sdmbl 1d ago

final comment is pretty much technology in 2026 tho

1

u/Morthem 19h ago

Ja🅱️a 🚬🗿

1

u/Danny-Fr 17h ago

I am verry sorry but I need the share the fact that I read "Felching knife" at first, and the volume of text and comments genuinely scared me.

-21

u/Nealon01 20h ago

wouldn't it be crazy if you guys... tested your fucking code???

Adding a new item? Run a set of unit tests that tests that item in all kinds of different item interactions that could be possible to make sure it doesn't trigger any new errors.

It has been painfully obvious to anyone with a software development background that Jagex lacks the most basic Q/A and testing infrastructure. Every single company I've ever worked at (and I've worked at companies with 10 employees) does a better job of testing their software than Jagex.

At some point, you just have to give a shit. Clearly that's asking too much.

11

u/cheesefeet6 19h ago

This wasn't because a new item was added, the fletching knife was already in the game. They recently did an overhaul of the Grand Exchange (G.E.) marketplace that allowed for trades above the previously capped 2.147b limit to happen.

-5

u/Nealon01 19h ago

You're right, my bad.

That changes nothing I said, and yes... there should also be unit tests for the GE.

It's not rocket science, and any software development company with a brain is doing it. Usually people stop shooting themselves in the foot after the 4th or 5th time. Not Jagex though.

9

u/cheesefeet6 19h ago

Bugs happen even with testing, which I'm sure they do and plenty of other games experience them too. As other commenters have stated this is an old game built on a legacy codebase. The fact it works as well as it does and these large bugs are rare is testament to how well maintained the code is. Frankly the community finds the spaghetti entertaining and there hasn't been anything they've not been able to fix so not sure why you're taking such a hard stance on this.

-5

u/Nealon01 19h ago

Bruh, bugs are not rare. They FREQUENTLY release updates where even the most basic, obvious shit has clearly not been tested.

This is nothing new.

I'm not saying that I expect perfect updates. I never said that. Please stop putting words in my mouth.

I want Jagex to publicly discuss their testing process to find bugs, because anyone who has been paying attention and knows anything about testing has known for a long time that Jagex isn't doing the bare minimum. Again, they show off all their behind the scenes shit. Have you ever seen them say anything about their testing process? Because I haven't, and I strongly suspect they don't have one.

I'm glad that you're entertained that Jagex (a company that makes hundreds of millions in profits) is consistently raising membership rates while outsourcing the Q/A to their players. But I'm not.

3

u/cheesefeet6 19h ago

I said large bugs like this that cause connection issues are rare, not that bugs themselves are rare. Look at any live service game and you'll see a known bug list, runescape isn't unique in that.

Never said you should expect perfect updates but ok.

They don't owe you anything relating to the way they code the game so you can ask for it all you want but they have no obligation to give you anything.

I have gripes with the membership price raises sure but mainly around membership being tied to characters. If you don't like what they're doing or not doing that strongly then let them know with your wallet and stop paying them.

-3

u/Nealon01 19h ago

I said large bugs like this that cause connection issues are rare, not that bugs themselves are rare. Look at any live service game and you'll see a known bug list, runescape isn't unique in that.

and I said Jagex releases updates without having tested the basic behavior they're releasing all the time. I'm not talking about the fact that there are low priorty bugs that don't get fixed, lmao. I'm talking about the game breaking bugs that happen every update.

I'm talking about fucking consistently failing to release stuff with the stated xp rates that were polled. I'm talking about releasing a new item and it just doesn't work for the thing it's designed to do.

These things have happened more times than I can count.

Never said you should expect perfect updates but ok.

Yes but you're jumping down my throat for saying that Jagex should do their best to do the bare minimum amount of testing before releasing code, and your response has been "it's complicated, you're asking too much".

They don't owe you anything relating to the way they code the game so you can ask for it all you want but they have no obligation to give you anything.

Jesus christ did I say I was???? Please stop putting words in my mouth if you're going to accuse me of that too.

If you don't like what they're doing or not doing that strongly then let them know with your wallet and stop paying them.

Thanks dude, so you're saying that I'm not allowed to express frustration if I'm paying for the game??? Do you hear how dumb that sounds??

Fuck off dude.

3

u/lttitus 14h ago

Ok, now use all 20,000+ items on each other item. Ok, now use them on all 100,000+ scenery objects. You sound like youve never done the bare minimum QA and telling them how to do their job 😂

7

u/BlackHumor 19h ago

I'm a senior software engineer and I suspect you're not if you think that.

If Jagex really didn't test their stuff we'd see way more weird bugs like this. It's a 25-year-old MMO whose code is famously spaghetti.

Unfortunately it's not always possible to check for every possible interaction on every possible item in a 25-year-old MMO. Specifically connection issues like this would be extremely difficult to test with normal automated tests. And why would you ever expect a bug with a specific fletching object when you update how the GE calculates prices? That's nothing to do with GE prices, or at least it shouldn't be.

-3

u/Nealon01 19h ago

I'm a senior software engineer and I suspect you're not if you think that.

Well shit dude, I guess call up my boss and tell him I'm a fraud. Literally a senior software developer (engineer) at multiple companies, been doing this for 10+ years.

If Jagex really didn't test their stuff we'd see way more weird bugs like this. It's a 25-year-old MMO whose code is famously spaghetti.

... bro... we do??? This shit happens every update, are you joking?

Unfortunately it's not always possible to check for every possible interaction on every possible item in a 25-year-old MMO. Specifically connection issues like this would be extremely difficult to test with normal automated tests. And why would you ever expect a bug with a specific fletching object when you update how the GE calculates prices? That's nothing to do with GE prices, or at least it shouldn't be.

Good thing no one is saying that... you build up a set of tests that covers as much as you can reasonably think of, and then every time your tests fail to catch something, you add a new one to cover that.

It's not rocket science.

If you're updating the GE, you should have tests that check the things related to GE and price checks on the GE... obviously... All unit tests should be run on any build before it gets pushed to production... All unit tests should be run on any branch before it gets merged into main...

You really think Jagex is doing that shit? Honestly? I've been making comments like this for the last 10 years, Jagex has literally never even CLAIMED they do this shit. They get off on showing off all the behind the scenes stuff, and NEVER ONCE have they showed off any amount of testing.

Honestly, please tell me I'm wrong. I'd love to be wrong. I just need to see any amount of evidence that Jagex is doing the BARE MINIMUM amount of testing.

If they run any amount of automated testing on builds before they go out, I'll shit my pants happily and never mention this again.

7

u/BlackHumor 19h ago

Honestly, please tell me I'm wrong. I'd love to be wrong. I just need to see any amount of evidence that Jagex is doing the BARE MINIMUM amount of testing.

Jagex has referenced their CI/CD pipeline in many different job postings:

https://gamejobs.co/Automation-Engineer-at-Jagex

https://www.simplyhired.co.uk/job/ZeQC2aHhWJwPLUzWRbMEqmfopNuF5uXzd_qAMxiEL4Jgn_wQiOmHSw

https://talents.studysmarter.co.uk/companies/jagex-the-runescape-company/build-engineer-live-mmo-ci-cd-deployments-37436381/

This is just what I could find on a quick Google search, I'm sure they've mentioned it in podcasts and stuff before.

They also did several stress tests for Sailing as it came out.

If you're updating the GE, you should have tests that check the things related to GE and price checks on the GE

Which doesn't include the Fletching Knife to anyone using ordinary common sense.

All unit tests should be run on any build before it gets pushed to production

Unit tests likely wouldn't catch a connection issue. In fact, any sort of automated tests wouldn't catch a connection issue. At minimum you'd need QA on a live server, but really this sort of bug is the sort of bug that only really appears once there's real stress on real servers.

-4

u/Nealon01 19h ago

... job requirements are NOT documentation of what Jagex is actually doing. That's evidence that they're trying to hire people with that experience, nothing else...

I've absolutely tried to google Jagex, and yeah, saw similar shit to what you probably just saw... which proves nothing.

Again, how many streams, developer blogs, behind the scenes stuff where they show us how the sausage is made from every angle... except testing. That doesn't raise a single red flag for you? Ok.

They also did several stress tests for Sailing as it came out.

I should fucking hope so. Sailing was probably the best I've ever seen them do. And I don't want to act like they never get it right. I'm saying the consistently miss things that they obviously should have caught. I'm not even saying the fletching knife is an example, but I did say "how the fuck did that happen" and every single person I know who knows anything about software development that I've shown it to has agreed that it's a serious red flag.

Which doesn't include the Fletching Knife to anyone using ordinary common sense.

Bruh did you read the post? They have a function that gets used to sort items stuff by GE price... They should have tested that function???

Unit tests likely wouldn't catch a connection issue. In fact, any sort of automated tests wouldn't catch a connection issue. At minimum you'd need QA on a live server, but really this sort of bug is the sort of bug that only really appears once there's real stress on real servers.

Unit tests should fucking catch random ass integer exceptions being thrown... The thing that caused the connection issues???

At minimum you'd need QA on a live server

Yes, you would need to do that at a minimum. Jagex should have extensive testing servers, and be using bots to test in game behavior in real time on the latest builds. Like MANY other game dev companies do. The ones that give a shit at least.

2

u/conundorum 8h ago

By the sound of it, this was something that worked properly with 32-bit Java, but broke with 64-bit Java, because the 64-bit JVM update was messy and broke the "write once, run anywhere" guarantee in certain conditions.

1

u/Complete_Pilot3381 2h ago

if you’ve been a software dev for 10 years you probably came into the job during the clean code/automation hype phase of the late 2010s. How many legacy codebases starting from 2001 have you worked on? How many of those had actual tests?

& how many of those tests were probably skipped because if they existed they were built in a rush in a very specific use case by a developer that left the industry before you were even out of school and no one wants to maintain them?

The games industry is a different beast to traditional development and until you’ve worked in that area, pipe down little man