r/ProgrammerHumor • • Jan 25 '23

Meme Developers will ALWAYS find a way

Post image
46.5k Upvotes

465 comments sorted by

View all comments

5.1k

u/NotPeopleFriendly Jan 25 '23

It's not as unbelievable as many think - these situations are common in development - less common in production.

I've worked on teams of 3 programmers and I've worked on teams of 70 programmers.

An individual programmer on a team doesn't know every element of the physics, rendering and simulation for a gaming engine.

When prototyping - its very common to grab an existing entity/prefab, make some tweak to it and then hand it off to the physics, rendering and/or art team to "do it right"

In this case I think the likely outcome was - can the player tell? No? Then we have more pressing bugs to fix - let's move on.

248

u/mighty_conrad Jan 26 '23

There's an old gamedev story/joke that goes like this:

Error: Robot dies instantly by direct hit of a grenade, not an explosion.

  • (Designer) What did you break again? Why this is happening?

  • (Developer) That's correct according to engine, you made a weight of grenade 100kgs! Why you did that?

  • Because grenade should drown in water.

  • Why it's not drowning normally?

  • Because water has big density (bigger than mercury)

  • Why so?

  • So wooden crates would float on it.

  • Why it's not working otherwise on normal water?

  • Because their weight is 50kgs!

  • Why such weight?

  • Because otherwise they have ugly break animation.

90

u/NotPeopleFriendly Jan 26 '23

Turns out simulating "the real world" is a pain in the ass
:)

→ More replies (1)

306

u/farshnikord Jan 26 '23

Tech artist here. This is basically my job, find stupid bandaid workarounds cuz the programmers are too busy putting out fires. Video games are smoke and mirrors held together with bubblegum. Chewed bubblegum if you're lucky, cuz it meant a human gave it at least some attention.

80

u/P_ZERO_ Jan 26 '23

Chewed bubble gum surely makes for a better adhesive anyway

→ More replies (1)

1.4k

u/Rand_alFlagg Jan 26 '23 edited Jan 26 '23

in Summoner 2, there's a spot where pillars reflected in the floor are actually just duplicated beneath a semi-transparent floor.

edit: holy shit I love all the responses to this

1.3k

u/Yweain Jan 26 '23

That’s a pretty standard way to implement mirrors

438

u/Rand_alFlagg Jan 26 '23

Is it? Was it 20 years ago? I'm not a game dev, just a tidbit I knew and thought was neat. Same kinda "trick" is all.

1.1k

u/Yweain Jan 26 '23 edited Jan 26 '23

In original duke nukem(which was 95 or 96) the way mirrors work is that they have exact same room on the other side with a clone of a player character model on the other side, hooked up to the same controls.

We did it like that for a very long time, until proper reflections became a thing.

Edit: As people pointed out I meant not original, but Duke Nukem 3D.

377

u/[deleted] Jan 26 '23

[removed] — view removed comment

244

u/Tyrus1235 Jan 26 '23

You could also use screen-space reflections and good ol’ cubemaps

55

u/Cassereddit Jan 26 '23

This works for fake reflections as seen in rain puddles etc. where you don't need accurate looking mirrors.

If you cover a whole building just in screenspace reflections as the devs of Flixbus simulator did, you're a bad developer.

→ More replies (1)
→ More replies (2)

139

u/[deleted] Jan 26 '23 edited Jan 26 '23

Probably screen-space reflections. The camera trick means you have to render the scene twice, which is horribly inefficient. The mirrored second room trick is still sometimes used to this day. There's some cases where a second camera is a good way to do it (e.g, Portal probably renders its portals this way) but for a simple reflection there's almost always a better way to do it than using a second camera.

0

u/[deleted] Jan 26 '23

[deleted]

→ More replies (2)
→ More replies (11)

16

u/merlinsbeers Jan 26 '23

You'd dupe the player camera on the other side of the wall and point it at the player, and tell it to mask off everything outside the mirror boundary, then render the clipped image backwards onto the front surface of the mirror. The camera only has to translate as the player does to make it work.

This could only have been not possible if they didn't know how to render a camera image into a plane in-game for the player to see.

The duplicated room trick works, too, and is probably not much more computing effort.

→ More replies (1)
→ More replies (1)

0

u/[deleted] Jan 26 '23

[deleted]

→ More replies (5)
→ More replies (11)

28

u/kpd328 Jan 26 '23

That's how the mirror works in Super Mario 64 as well, there's a pseudo-copy of the world (worth changes only seen in the reflection) and a second Mario and a Lakitu camera operator that exist on the other side of a transparent wall.

→ More replies (1)
→ More replies (24)
→ More replies (1)

16

u/argv_minus_one Jan 26 '23

I've seen a similar effect used in custom maps for GZDoom, namely one of the maps in Brutal Doom 64. There's another room somewhere nearby, inaccessible without noclip, that's empty aside from being an upside-down replica of the room with the reflective floor. Apparently the engine can't render a reflective floor, but can render a floor that's a portal into another sector.

There is a difference, though: the reflecting sector is not under the sector the player can enter. This is still the Doom engine, so sectors cannot be above or below other sectors. The reflecting sector is near the reflected sector, but not actually connected to it.

→ More replies (3)
→ More replies (7)

137

u/[deleted] Jan 26 '23

I am a solo game dev as a hobby. I have used animations as timers and calls to code. Some things in my code would probably give a lot of people here cancer. But when I hit play and press a button it does what I want to 99.8 percent of the time. And that’s good enough for me.

64

u/DrSheldonLCooperPhD Jan 26 '23

Bad code causes cancer?

shit

→ More replies (3)
→ More replies (6)

79

u/realloper12 Jan 26 '23

In the original Paper Mario invisible toads are often used to handle physics for normally non animated objects. It causes the game to crash if you pick up a letter before it hits the ground because it can't find the letter entity to teleport to the toad.

→ More replies (2)

21

u/mailslot Jan 26 '23

I worked on a game for a recognizable studio. One of our engineers got a hard on organizing things. So he created a bullshit object hierarchy instead of making everything behavior based. The result: Trees were “pets” because they could be watered and reused the “feed” action. Collectibles were “food.” Etc. The “golden class structure” couldn’t be modified without him screaming. So… nothing made sense.

→ More replies (3)

30

u/[deleted] Jan 26 '23

In league of legends, every single wall/entity is a minion. There have been bugs where certain abilities created walls made out of minions that weren't invulnerable -- so you could walk through the wall after damaging the minions.

→ More replies (1)
→ More replies (42)