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”

Portal 2 Becomes An Impressively Capable Web Server

Portal 2 is mostly known as the successful sequel to Valve’s weird physics platformer, Portal. It’s not really known for being a webserver. That might change, though, given the hard work of [PortalRunner].

Quite literally, [PortalRunner] hacked the Source engine and Portal 2 to actually run a working HTTP web server. That required setting up the code to implement a TCP network socket that was suitable for web traffic, since the engine primarily functions with UDP sockets for multiplayer use. This was achieved with a feature initially put in the Source engine for server management in the Left 4 Dead games. From there, the game engine just had to be set up to reply to HTTP requests on that socket with the proper responses a visiting browser expects. If the game engine responds to a browser’s connection request with a bunch of HTML, that’s what the browser will display. Bam! You’ve got a web server running in Portal 2.

From there, [PortalRunner] went further, setting things up so that the status of in-game objects effects the HTML served up to visiting web browsers. Move objects in the game, and the served web page changes. It’s pretty fun, and the complexity and features [PortalRunner] implements only get more advanced from there. When he gets into stacking companion cubes to write HTML in visual form, you’ll want to applaud the Minecraftian glory of it all.

The devil is really in the details on this one, and it’s a great watch. In reality, making Portal 2 into a simple web server is far easier than you might have thought possible. Valve’s physics masterpiece really is popular with hackers; we see it popping up around here all the time. Video after the break.

Continue reading “Portal 2 Becomes An Impressively Capable Web Server”

Sci-Fi Contest Roundup: The Valve Universe

653px-Source_engine_logo_and_wordmark.svg

While most of the entries to our Sci-Fi contest come from movies and TV shows, a select few are based on the Valve universe, including a few builds based on Portal and Team Fortress 2.

Deadly neurotoxinGLADOS

Who wouldn’t want a gigantic articulated sociopathic robot hanging around? Two groups are building a clone of GLaDOs from the Portal series. and already the builds look really great.

[AmarOk], developed an open-source personal assistant called RORI that intends to be a more helpful version of GLaDOs, without all the testing and killing. He, along with [Peterb0y] and [n0m1s] are turning this personal assistant software into a GLaDOs replica.

Taking a slightly different tack, [Eric] and [jjyacovelli] built a GLaDOs-like robot with a camera in the ‘face’. This camera connects to a Google Glass and tracks the user’s head movements. There’s also a Nerf gun attached to the end of the robot body, triggered by double winking. Yep, it’s a heads-up display GLaDOs, perfect for punishing your test subjects.

Heavy load comin’ through!

Sentry

Not to be out done by a malevolent, hyper-intelligent artificial intelligence, [Tyler] and [Ryan] are building the cutest gat’ dern weapon in all of west Texas. It’s the level one sentry from Team Fortress 2, and the guys are turning one into a paintball sentry.

The TF2 sentry is a cute little bugger capable of motion tracking and perimeter defense, filling enemies with lead should they ever come too close.

While the end result probably won’t be as large or as heavy as the “official” real-life turret, a smaller table-top sized model is probably a little more practical. Even if it doesn’t live up to expectations, upgrading the sentry is simply a matter of whacking it with a wrench a few times.

 

There’s still time for you to cobble together an awesome Sci-Fi project and have a chance to win some awesome prizes.