this post was submitted on 12 Feb 2025
1032 points (97.7% liked)

Microblog Memes

6558 readers
1828 users here now

A place to share screenshots of Microblog posts, whether from Mastodon, tumblr, ~~Twitter~~ X, KBin, Threads or elsewhere.

Created as an evolution of White People Twitter and other tweet-capture subreddits.

Rules:

  1. Please put at least one word relevant to the post in the post title.
  2. Be nice.
  3. No advertising, brand promotion or guerilla marketing.
  4. Posters are encouraged to link to the toot or tweet etc in the description of posts.

Related communities:

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] jdeath@lemm.ee 48 points 3 days ago (5 children)

and even if some idiot put every zombie npc in a database (or if you want to think of it that way), you wouldn't just delete the rows! the bodies would disappear, so instead you would update that row like (npcState = KIL, bodyLocation = ) or something. Especially if you wanted to keep player stats

[–] funkless_eck@sh.itjust.works 12 points 2 days ago (1 children)
[–] Tangent5280@lemmy.world 3 points 1 day ago

Where was you when

[–] Saleh@feddit.org 22 points 3 days ago (2 children)

Isnt there this graveyard off map somewhere in Skyrim, where all the bodies get teleported?

[–] FordBeeblebrox@lemmy.world 9 points 2 days ago (4 children)

Why would that even be necessary? Sounds like one of those “make a guy with a train for a hat and run up and down this hall” moves they like to do

[–] finitebanjo@lemmy.world 2 points 2 days ago* (last edited 2 days ago)

Technically, the train was done by the Obsidian studio, not Bethesda per se, because of strict deadlines.

[–] echodot@feddit.uk 5 points 2 days ago

I wouldn't be surprised if it is true though. Bethesda games are not exactly winning awards for coding elegance.

[–] DragonTypeWyvern@midwest.social 7 points 2 days ago (1 children)

Their code is literally spaghetti

[–] WillFord27@lemmy.world 1 points 1 day ago

l-.. literally?

[–] Natanael@infosec.pub 1 points 2 days ago

If they literally don't have an object delete option then relying on render distance to make it go away is a ridiculous but simple solution

[–] jdeath@lemm.ee 6 points 3 days ago (1 children)

i can't speak to that, but it sounds plausible. in that case the body location would be updated to those coordinates

[–] ivanafterall@lemmy.world 4 points 2 days ago

Grab the source here before Bethesda DMCAs it.

[–] ivanafterall@lemmy.world 3 points 2 days ago* (last edited 2 days ago)

I want the rows deleted. I'm going to market it as the first game with true AI/enemy permadeath. Dibs on the idea!

[–] VitoRobles@lemmy.today 8 points 3 days ago (2 children)

This is how it works in many game engines.

You set up the monsters and just hide them/disable them. They're already allocated to memory.

And it's a performance cost to create/delete versus just moving a dead enemy out of view, then respawning that enemy later in the level.

[–] Natanael@infosec.pub 1 points 2 days ago

If it's a type of enemy you see just one of at a time but see it often, sure. If there's many, cost of copy/delete is definitely not that high relatively speaking.

(random sidenote: in the first Mirror's Edge game, you can sometimes hear enemies you passed scream as they fall when you pass from one part of a map to another, as the ground in the map is unloaded before the enemies unload)

[–] umbrella@lemmy.ml 2 points 3 days ago (1 children)

im not very versed in game engine design, but dont they dynamically stream them into memory before they will be needed, and discard them when they wont nowadays?

[–] AdrianTheFrog@lemmy.world 6 points 2 days ago

Dynamic streaming is common nowadays, as games have gotten large enough that not everything in a level can fit into memory.

I don't know about what is actually done in industry but I feel like most of the time you wouldn't bother with keeping dead instances unless instancing is shown to actually be a performance problem, which will probably not happen all that often

Godot for example doesn't have built in dynamic level streaming yet or a built in way to cycle through dead instances as far as I can tell, although I'm sure that wouldn't be hard to do with code

[–] AdrianTheFrog@lemmy.world 1 points 2 days ago (1 children)

Maybe you would have an array of active enemies in RAM, and when enemies are killed they are removed from that array for example?

In a game like Minecraft for example, you definitely wouldn't want to store every single dead entity and its location when there can easily be thousands created and destroyed in a single second

It obviously depends on the game though.

[–] Natanael@infosec.pub 1 points 2 days ago* (last edited 2 days ago) (1 children)

Definitely depends on the type of game, but it's more likely the game stores data about which areas you cleared and then infer that the bodies of any permanently remaining enemy (like bosses) is to be displayed.

Can vary even more for procedurally generated levels. If the set of enemies is fixed and stay in calculated positions in a map generated randomly, then it might store an array or something tracking the enemies.

[–] Aceticon@lemmy.dbzer0.com 1 points 2 days ago* (last edited 2 days ago)

Procedurelly generated stuff is all about storing the differences from the procedural generation.

So for example minecraft saves don't store the terrain, they store how it differs (due to player interaction) from the procedurally generated baseline.

(After all, all you need to recreate an untouched procedurally generate world are the bytes of the seed and nothing else)