this is going to be a HUGE writing tip and one that i think people need
so i just got done watching a few episodes of an anime "to your eternity" and holy shit was it an emotional rolercoaster mostly because they were amazing at making characters who we love in such a short ammount of time and killing them off in a way that feels right but also wrong.
spoilers ahead for the first like, 5 or 6 episodes
here's how they did it:
The first death is a character who we know for like ONE episode, and in that time they make him loveable, they did this by giving him a wholesome goal which we are led to believe is achievable and showing how kind he is by giving us his pet who he treats amazingly, and then we're told his goal to reach others, his family, who we're told about yet never shown, this makes us connect with him as we all likely know how it is to love someone who you might never see again.
Next we get to see how exited he is for his family when he hears bells going off and he runs off towards them hoping its his family, then we feel sorry for him when its not.
Not long after he sets off to meet his family, and its a long grueling treck but we see signs every now and then telling us hes going the right way, all the while he still loves his pet and he treats the wolf with the utmost respect, and all this time we see him getting colder and colder as he ventures out into a tundra. We start to feel sorry for him as being ill sucks, but at the end of the day we don't expect what happens next, he turns around as he realizes he might never reach his family, having gone a huge while out before finding a stone that says to not continue this way.
as he ventures back we see him getting worse until he collapses, we realize how bad it is and we start to worry, fearing that a character who we've been shown is an amazing person isn't going to make it, but the wolf drags him home, and we start to think hes gonna make it since he'll have food, water and heat to help him get better.
we are then treated to a couple days passing, and each day he's still getting worse, until we hear it. THUD and we cut to him layed down on the ground, we think he's dead but he then speaks, revealing hes alive, before getting up and sitting down on his chair, we are relieved that hes alive but then we hear the worst words TO hear "please... remember me forever...." and he goes limp.
the reason this death is so effective is because while we don't see how he treats people, we see how he treats animals, and most people treat animals WORSE than they treat people, meaning if he treats his pet wolf so amazingly and loves him deeply, even making a funny few jokes along the way, jokes which we laugh at and give us another way to connect to him, then we wonder how he treats people, we imagine he'd be amazing and wholesome, and he's so fun and adorable in how he thinks, and then we learn about his family, we connect to this because we understand love and having love makes someone more likeable.
then the death comes and it hurts, its not completely out of nowhere but its confusing, it leaves us with a tear going down our eye, and then we hear his final words a couple more times (if i remember correctly) striking us harder. we realize this character whom we grew to love so quickly, has died.
Moving on we find ourselves following a new character, in a new location, with new customs, we are shown how this new character loves the idea of being a mother, and we notice something on her face, ink, which we're swiftly told is because shes a child, yet she wants to get the ink off, she wishes so hard to be grown up, but because she's a child we immeadietly grow attatched, we're far quicker to grow attatched to children as children are effectively default settings, they haven't learnt much so they can't have much negativity in their hearts, leaving plenty of room for good, and we're shown how she gets along with the village, showing she's a fun wholesome person.
Then the time comes, we don't see her death yet, but we see her get chosen for something, we don't know what yet but we can already guess what, especially based on how her found family big sister tries to save her, taking her out of the village, meaning that theres something going on that is sad, and then when we get to a private room, the family start their waterworks, crying and saying they're sorry, we immeadietly understand whats happening, we're already attatched to the character as she's a child who has only love in her heart and has goals she wants to achieve, but we're told she has been chosen as the sacrifice.
Before the final time we're shown that she's quick to understand, Understanding that the gaurd is mostly there to escape, and we're once again shown how kind she is, as she's told if she escapes another child will be chosen, and if THAT child escapes they say they'll pick someone who can't escape, so the character decides not to escape, but on the way there she manages to escape and the people attempt to go after her. again we are shown her kindness as she feeds the main character of the show, constantly throwing down fruit and trying to teach them, she even says things along the lines of "i'll be your mommah" thinking the MC has the mind of a child due to how they're eating.
then she gets caught again, and this time she's tied to the sacrifice bench, as the great beast comes to consume her, we see the big sister try her hardest to free her but to no avail, and we see how much she's loved, giving us more to get attached to.
She survives but is told that she has to live in the rural city, and this is where we're told that no one in her city knows how to read or write as she tries to write a letter to her family, but she says no to that and slams her palm down onto the paper making a handprint and says "THIS IS MY OWN LANGUAGE AND IT SAYS I AM DOING GREAT!" and we laugh and love how shes acting, its so childish and its so adorable, we grow to love her and then she gets to eat real food, and she eats it so funny, picking up the ramen with her hands and eating it, whilst the MC eats it straight out of the bowl and she says "use your manners, i told you to eat with your hands" and its so funny how she's wrong, and when MC accidentally stabs itself with a chopstick we see how she gets worried, and then they all pass out as they're food was drugged, making us worried.
when we come back to her shes worrying over MC who has an arrow in it, she pulls out the arrow and tries to comfort MC which is so wholesome. next big important thing is MC digs a tunnel to where the god the village worshiped lies dead, having been killed by MC and taken by the city to be burnt, and the kid just tries to help it, pulling what turns out to be arrows out of it's body, caring so much for a creature that not long ago tried to eat her and kill her. we love her more as we see how compasionate she is.
the final three big things are during the escape, first the big sister plans to cut a chunk out of the beast as evidence that their god is dead but the kid screams against it, telling her not to, showing compassion yet again for a beast who tried to eat her, not wavering no matter what the big sister says until the big sister finally agrees not to do anything to it, they all leave and in the carriage we see the child making some thank you food for big sister, suprise, it's not ACTUALLY edible but it's the thought that counts, she's a child after all, and we love it, it's so wholesome and silly and fun.
then her final action. we see her notice her ex-guard drawing an arrow to hit the defenceless big sister and she runs over and jumps in the way, taking the arrow to save her big sister, and her final few words "am i going to die for you big sis?" bringing a tear to our eyes, a character who we loved for how innocent and wholesome she was, a character who showed time and time again how much kindness in her heart, sacrificed her life to save that of her sisters, and she barely thought about it either, and her final words further conveying how much she loves to love people, being happy that she saved her big sis more than sad that she's dying.
now i say these were her final actions, but theres one more thing thats of note, which was salt in the fresh wounds, when we see her soul we see her in what seems like her personal heaven, she's back with her family, and everyones there, and we see her then become a grown up, and counting how many "babies" (dolls) she has, but then she realizes shes missing someone, and then she realizes again this isn't real, and that she died, at which point the heavenly facade fades and we see her seeing the beast that nearly ate her, and her first action to it was running up and hugging its leg, showing us just why we loved her.
theres a really important reason why these deaths were so emotional, no matter the time we spent with them before death, and its that the writers did an amazing job at showing us the entire character before killing them, they weren't just a half-assed quickly written mess of a vaguely good character, they were well written thought about characters, where every action they took gave us more and more reason to love them, and they're deaths weren't just random, they weren't based around things that shouldn't have even happened, they were based around things the character would have done.
the two things that make a good character death are as follows:
the character has to be well written and we must have well thought out good actions done by them that show us what type of person this character is, there needs to be atleast 5 of these actions for an adult, and atleast 3 for a child, these actions can't just be done one after another either, they have to be spread out, we need time to adsorb the actions before the next one.
The death makes sense, if a death happens because of something out of character then it feels wrong, it feels like the writer just had it out for the character, if it happens because of something that could have been prevented given what is known by both the character and the reader then the death feels ignorant, and if the death came out of nowhere, it feels forced, say a wild bullet from someone who came from nowhere hits them in the heart.
in short:
a good death is a death which makes sense to happen in the story with what is known and a good death depends on a character being loved.