How One Line Of TF2 Code Ruined This Simple Feature

Ever encountered a minor annoying bug in a video game? How about one dating back to 2018? Usually, you have no hope of fixing it, but this time is different. [Joey Cheerio] shows the first-time programmer approach to (with great difficulty) fixing a bouncy ball prop turning invisible when shot in Team Fortress 2.

It starts with a band-aid solution that hides the problem: just turn off jiggle physics! While that works, it also affects many other models in the game, and doesn’t tackle the root cause. Time to investigate. Because this ball often goes overlooked, [Joey Cheerio] didn’t even realize that it was supposed to have jiggle physics, accidentally removing it. Turns out, after scouring the internet for old footage, it’s supposed to jiggle after all.

Back to square one, [Joey Cheerio] infers that the jiggle bone accidentally removed was related to the problem, eventually figuring out that the specific type of jiggle bone used (is_boing) caused the issue. Time to dig in the code. Tracking down the problem is no small feat for someone who’s never programmed before, even with the help of LLMs, but eventually, at 4 in the morning, a breakthrough! The ball no longer turned invisible but retained the intended jiggle.

At the limits of his knowledge on the subject, [Joey Cheerio] posts his partial progress so far to GitHub, where [ficool2] tracks down the real problem and turns this second band-aid into a proper fix. [Joey Cheerio] finishes up by explaining the math of what exactly went wrong.

Continue reading “How One Line Of TF2 Code Ruined This Simple Feature”

Hackaday Links Column Banner

Hackaday Links: November 6, 2022

Remember the chip shortage? We sure do, mainly because as far as we can tell, it’s still going on, at least judging by the fact that you can’t get a Raspberry Pi for love or money. But that must just be noise, because according to a report in the Straits Times, the chip shortage is not only over, it’s reversed course enough that there’s now a glut of semiconductors out there. The article claims that the root cause of this is slowing demand for products like smartphones, an industry that’s seeing wave after wave of orders to semiconductor manufacturers like TSMC canceled. Chips for PCs are apparently in abundance now too, as the spasm of panic buying machine for remote working during the pandemic winds down. Automakers are still feeling the pinch, though, so much so that Toyota is now shipping only one smart key with new cars, instead of the usual two. So there seems to be some way to go before balance is restored to the market, but whatever — just call us when Amazon no longer has to offer financing on an 8 GB Pi.

Continue reading “Hackaday Links: November 6, 2022”