this post was submitted on 06 Jun 2025
945 points (98.9% liked)

Programmer Humor

23844 readers
2647 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] LillyPip@lemmy.ca 10 points 4 hours ago

There’s already a codebase for bursting from the ground in an explosion of lava. Everyone wants that.

You’re the first person asking for a scarf, and our system doesn’t even know what a neck is.

[–] tiredofsametab@fedia.io 5 points 4 hours ago

Player? Easy. Scarf? Easy. Wearing a scarf? That depends on a lot of factors such as which part of the body, how the models were made and rigged, etc.

[–] matmarspace@programming.dev 1 points 3 hours ago

That's cute 😅

[–] LovableSidekick@lemmy.world 33 points 10 hours ago* (last edited 10 hours ago) (1 children)

Way back in the 90s I did a contract job at MS Research on a project called "V-Worlds" - a world simulator similar to the Doom or Quake engine, but it was browser-based and everything was a script, so changing how the world worked didn't mean you had to restart a server, just change the scripts and new stuff would appear right in front of you.

Anyway the concept of adding accessories to the player's avatar and even having a pet follow you around came up, and I remember there was an involved discussion of how difficult/impossible that would be. The player's avatar was a special object class that represented a user, and didn't have the same capabilities as ordinary objects in the world. I remember asking, "Why isn't the avatar just a world object the player happens to control? Then you could do all kinds of cool stuff like let the player transform into something else just by switching objects, or let another player run your character." Dead silence. I was just a contractor, what did I know?

[–] crimsonpoodle@pawb.social 1 points 6 hours ago (1 children)

This feels like the kinda project that should have a 1hr YouTube indie doc about it

[–] LovableSidekick@lemmy.world 3 points 2 hours ago* (last edited 51 minutes ago)

I wouldn't mind seeing that! After V-Worlds was declared "completed" MSR tried to find a product group to fold it into, but nobody wanted to own it. I don't remember if XBox existed then, but the code just sat there for a few years, then I heard they opensourced it. When my kids were playing ToonTown I found a bug that let you slide behind the background and move around, like you could see that a clerk behind a counter was just a legless floating torso. The method of getting there seemed to be exactly like a V-Worlds bug, so I wondered if Disney might have been using the code. But it could have just been a common graphics bug, I dunno.

I remember finding another bug while creating a demo with a snaky sea creature swimming around. To animate a multi-segmented object you had to animate each segment separately. After the animation ran for a minute or two, enough unrelated interrupts would happen in the computer that would throw the body parts out of sync, making body parts either merge into each other or move apart, and the whole thing would look like crap. Same thing if you had somebody ride in a car or on a train - the car and character were animated separately and you'd end up with the character floating along behind the car.

I asked the dev about making the animation itself an abstract object whose position would be moved around, and attaching in-world objects to it, with position offsets. Each animation step would be computed just once instead of for each body part (or for the person and the car), and all the parts would be rendered with offsets from that one position, guaranteeing them to stay in sync visually. He said yeah that's a good idea, but we're not working on that code anymore. Oh well.

Another bug involved moving from room to room. The engine only loaded graphics for the current room, so when you went through a doorway it would load the new room and dump the previous one, causing a very unnatural visual delay that looked like a glitch in the matrix. The way we coped with this was by putting an entire world in a single room, so all the world's graphics were loaded all at once. But this not only limited the world size, it meant we had to create our own version of the room system in script. To keep track of where players and objects were, we put invisible barriers in doorways and used event handlers when things passed through them. Then we used this to enforce which players could talk to each other or hear sounds made in a given "room".

I suggested loading a cluster of rooms at once - the current one and those that were one connection away. Then when an avatar passed into a doorway the new room's graphics would already be there, no glitch, and the graphics for nearby rooms could be loaded and unloaded in the background. Again, nice idea but we're done working on that code. Sigh. I really wish I had joined that project about 6 months sooner. Not like I'm a genius or anything but these seemed like really fundamental things that should have been addressed up front.

Okay, rant over. I haven't thought about this stuff in quite a while - I'm kind of amazed so many details are still in my head. I must have agonized over it a lot at the time lol.

[–] Lemminary@lemmy.world 1 points 4 hours ago (1 children)

Tbf, you can make the characters wear anything, but it won't look good. Lol

[–] nokturne213@sopuli.xyz 2 points 1 hour ago

Welcome to second life

[–] SkunkWorkz@lemmy.world 48 points 12 hours ago (4 children)

Game director : we’re gonna add interact-able doors with proper door opening animations for the characters

The game designers:

The programmers and artists:

The producers:

[–] propitiouspanda@lemmy.cafe 2 points 1 hour ago

Legend of Zelda did it well.

Honestly, I think a major issue with doors is that they just slow down gameplay.

It's like coming across a ladder only every building has one.

[–] tiredofsametab@fedia.io 3 points 4 hours ago (1 children)

Granted. All door animations are now forced cutscenes.

[–] MonkeMischief@lemmy.today 20 points 10 hours ago* (last edited 10 hours ago) (2 children)

Now we need to decide in the case of collisions if:

  • Doors violently push anyone out of the way, possibly "crushing" them into walls or
  • Force themselves back closed, turning any random NPC / obstacle on the other side into an unbeatable lock or
  • Just trap an unfortunate NPC in a corner on the other side, or
  • If they use the physics system to swing open, in which case they'll look smooth but possibly bonk the player/actor going through them a few times and could potentially (and comically) insta-kill them if physics is feeling grumpy.

The frustratingly comedic unintended results of any choice makes for great organic marketing though.

Gamedev is magical.

Aside: Know what did this really well though? Resident Evil games after RE:4.

The ability to "slowly quietly open", and then at any time decide to violently action-hero kick it open to send a zombie on the other side flying, was genius.

[–] Revan343@lemmy.ca 5 points 7 hours ago

Have you ever played ATV Offroad Fury on the PS2? When you reached the edge of the map, it would just fling you back towards the center.

I propose that is how we deal with NPCs blocking doors. With negated fall damage, of course

[–] Evotech@lemmy.world 7 points 8 hours ago

PM: You know real world?

Make it like that

[–] dejected_warp_core@lemmy.world 12 points 10 hours ago

FROM Software: Fuck that, we're doing fog-walls.

[–] RebekahWSD@lemmy.world 9 points 9 hours ago

I want dresses, and I don't care if they clip through literally everything!

[–] Kolanaki@pawb.social 7 points 9 hours ago

"I noticed the elves in level 3 look too similar to the dwarves in level 5."

"It's too late to change it now!"

[–] frezik@midwest.social 39 points 13 hours ago* (last edited 13 hours ago) (2 children)

Always have to remind myself of this when managers ask me if something could be done. If it's easy, I naturally get a little annoyed that they're even asking. But knowing that is my job, not theirs, and it's good that they ask. There's lots of places where they assume and things go badly.

[–] buttnugget@lemmy.world 2 points 4 hours ago

It’s not natural lol

load more comments (1 replies)
[–] sirico@feddit.uk 12 points 11 hours ago

Shadows in the real world a lack of energy Shadows in games imma need it all boss

[–] Susaga@sh.itjust.works 161 points 17 hours ago (1 children)
[–] tja@sh.itjust.works 82 points 17 hours ago (9 children)

This comic is so old, that both should be rather easy now

[–] kerf@lemmy.world 139 points 16 hours ago (3 children)

She did get her research team after all :)

load more comments (3 replies)
[–] Ultraviolet@lemmy.world 7 points 10 hours ago

It took almost exactly 5 years from publication for that to be commonplace.

load more comments (7 replies)
[–] nokturne213@sopuli.xyz 24 points 13 hours ago (12 children)

I just want a game that lets my avatar be left handed.

[–] Sylvartas@lemmy.dbzer0.com 30 points 12 hours ago (2 children)

As a gameplay programmer, I got anxiety from reading this (and I think the animators are already in a fetal position on the floor)

[–] Knock_Knock_Lemmy_In@lemmy.world 21 points 11 hours ago (5 children)

Can't you just swap x for -x. Run some unit tests just in case. We'll push to prod next Wednesday. Sound good? Got to dash, strategy meeting started 5 minutes ago. Seeyoubye.

[–] BradleyUffner@lemmy.world 5 points 10 hours ago (1 children)

As a programmer, I've learned to cringe at any suggestion from someone that starts with "can't you just". Cause I guarantee you, I can't "just" do that. It's way more complicated than just.

[–] Knock_Knock_Lemmy_In@lemmy.world 4 points 9 hours ago (1 children)

😬 I am familiar with the PTSD trigger words.

[–] Lemminary@lemmy.world 1 points 4 hours ago

You little shit xD

[–] AnUnusualRelic@lemmy.world 6 points 11 hours ago (3 children)

Ok, but all your dialogue will be spoken backwards.

[–] Havald@lemmy.world 4 points 9 hours ago

That makes sense. All left handed people are witches anyways, they'll feel right at home

load more comments (1 replies)
load more comments (3 replies)
[–] MycelialMass@lemmy.world 4 points 9 hours ago (3 children)

Would it be possible to just mirror what the player is seeing so literally everything is backwards? Like a visual effect 'in-post'? Obviously that would mess with any printed text but other than I cant think of big issue?

[–] JordanZ@lemmy.world 7 points 9 hours ago (1 children)

That’s basically what they did for Legend of Zelda:Twilight princess. GameCube version Link was left handed, Wii version he was right handed. Looking at game guide sites was kind of comical. They basically said we’re not rewriting our guide for Wii…just flip the directions. If the guide says go left…go right for Wii.

[–] propitiouspanda@lemmy.cafe 1 points 1 hour ago

The entire game is mirrored.

[–] Sylvartas@lemmy.dbzer0.com 4 points 9 hours ago

You could even do that on the player's model specifically. But it's still a maybe, you're almost guaranteed to get some cursed bugs due to every preexisting code having been made with right handedness in mind.

I'm sure animators are internally screaming at the reasons why this will make some originally right handed animations look off but that's not my area of expertise.

In reality it's probably not the hardest thing to do gameplay-wise, especially if you're doing it from the very beginning of the project, but I don't think you can simply mirror animations (and some animations-related logic) and have it look natural, so you'd have to make dedicated animations and possibly logic for left hand strikes, right hand blocks etc. which would obviously be much more expensive. But yeah that's probably what Minecraft does now for example, and since they have a very low level of detail on player characters and their animations it looks alright.

load more comments (1 replies)
load more comments (11 replies)
[–] tetris11@feddit.uk 80 points 16 hours ago* (last edited 16 hours ago) (3 children)

Well yeah, we have a character model for the giant demon and the giant demon has a huge use case.

A scarf? That's a model extension. Either you're asking me to create a whole new character with a scarf baked into the mesh that will deform weirdly as the character moves, or you're asking me to implement an accessory-anchor system all for the sake of a scarf (albeit other accessories might use this new framework) which will then need a physics/cloth sim to even look half good.

[–] propitiouspanda@lemmy.cafe 0 points 1 hour ago

or you’re asking me to implement an accessory-anchor system all for the sake of a scarf

It... shouldn't be that difficult?

It's literally adding another piece of gear, like gloves, breastplate, helmet, etc. Now just repeat the process for a scarf.

[–] Natanael@infosec.pub 22 points 13 hours ago (1 children)

You could import fabric physics and just have it lie there, but that's going to be a bigger hit on performance than you possibly can imagine and it will move weirdly (in large part becomes we're not modeling wind, just fabric in a vacuum) and the model features it will lie on top of won't deform accurately from the simulated weight, etc...

load more comments (1 replies)
load more comments (1 replies)
load more comments
view more: next ›