So the moment has come that you've decided to write a Crapsack World, where everything is dying, pessimism rules and to have hope is to be endlessly naive. This page is here to help you achieve that.
What makes a Crapsack World Crapsack.Let's borrow a page from imageboards for a moment: the people at 8chan have created a way to peg all settings into one of four types: noblebright, nobledark, grimbright and grimdark. In "noble" settings, the actions of a single man can change the world; in "grim" ones, whatever the character does, he can at beast score a temporary, local victory, and the world in general barely notices the interference. A "bright" setting is full of joy and adventure; the "dark" one is dangerous and melancholic.
In other words, Crapsack World is a grimdark setting, or at least a setting which the people living in it believe to be grimdark. It is unpleasant, and life is hard; nowhere is truly safe. People are beset by enemy from within and without, and to eke out an existence, they must become hard, thick-skinned and likely not very friendly. If a wounded person walks out of the forest and collapses on the ground in a nobledark setting, someone will carry them to a hospital or nurse back to health in their house; if the same thing happened in a grimdark setting, not only will the onlookers probably not waste any of their precious resources to help, but they are also likely to loot the corpse - and if they were foolish enough to take the wounded to their home, they're likely to be robbed themselves.
This needn't be because Humans Are Bastards - it could be because the world is, quite simply, unforgiving. A Crapsack World is a tough place to live. It is quite likely dying, or at least regressing, the golden age is past and unlikely to return ever, the gods don't care much, everything is in shambles, the decline is slow and agonizing, and last winter was definitely milder than this one. A Crapsack setting is definitely a pessimistic one, and Status Quo Is God in a bad way.
The world itselfWhile making a Crapsack World, you have to ask itself - what made it the way it is? Why is there so much pessimism, why can't humanity advance and make everything better? Oftentimes, Crapsackiness comes from the nature of characters' surroundings. If there's little in the way of resources, or the climate is too hostile, there will be competition between people, and thus wars - which don't make anything better. Other times, the great golden age is a thing of the past, and now everything is in slow decline as people continue to use the slowly-deteriorating Lost Technology while lacking the need to create anything of their own, because older was better and whatever we can do, it won't match what we have (and what is slowly dying out). In yet other worlds, Crapsack comes from the nature of the government. Perhaps it doesn't care; perhaps it doesn't exist, or is too weak to work effectively; perhaps preserving Crapsack is in its best interests, or it believes that anything else could be worse.
Why can't the world change, then? It probably lacks resources or impetus to do so. A society of barbarians in a world full of giant, man-eating beasts and volcanoes isn't capable of building any sort of domed city to live in safely. A society based on usage of ancient feats of magic and wonder doesn't feel like inventing an irrigation system when everyone knows you have to use a watering amulet to make plants grow - and if the amulets are slowly stopping to work because they're old and no-one knows how to make them anymore? Well, someone will just murmur "it used to be better" and people will carry on, slowly starving.
Magic in a Crapsack World isn't lights and rainbows. It's more likely to be actively hostile or corrupting, and if it isn't trying to murder you and yet is effective to some extent, it probably has high cost on the user or requires unsavoury elements like blood or children sacrifices to work. It certainly won't be a morally-proper way for protagonists to solve their problems.
The peopleThe people living in a Crapsack World are pessimists - or, as they'd called it, "realists" - and any optimist is likely to be ridiculed, and then proven wrong by the universe itself. There are barely any standards in the military forces, and Rape, Pillage, and Burn are the order of the day. If there are any idealists left, they have to compromise heavily with the world they live in, and are likely vastly outnumbered by those who don't believe in any cause.
Crapsack Worlders are unlikely to be champions of any ideology. Their gods are dark and unfriendly, and if they are prayed to, it's mostly to avoid getting struck down by a scorned deity. Their main philosophy comes down to "whatever it takes to survive", and they will care for their own group rather than include any stranger. They're not given to flights of romanticism beyond "it used to be better", and believe their world to be in a steady decline. They're unlikely to do something new, even if it could safe them, because it's too risky to change.
This being said, you can count on people in a Crapsack World to know how to survive in it. They're usually either adept survivalists and fighters or street-smart, and if they believe you can be useful to them, they will adopt you into the community even if they dislike you. Friendships are rare, but mutual respect is something that can and will happen. Even if the two sides despise each other, they are likely to grit their teeth and cooperate - as long as they have to, anyway. Then, all bets are off.
One thing to remember is that from the perspective of people in-universe, Crapsackiness is relative. Consider a hypothetical world, divided in two castes, one of which lives in flying cities and has decadent parties all day long while the other has to work to fund those parties under watchful eyes of upper caste's mechas. While from our perspective, and from worker caste's perspective, the world is definitely Crapsack, the upper caste likely doesn't see it as such, which will inform their perspective on things.
The protagonistThere are three main types of people that usually end up being protagonists in those stories.
Na´ve Newcomer was probably sheltered, or lived in a place where Crapsackiness wasn't very overt, at least until recently. They are convinced that they live in A World Half Full at the very least, and the narrative is there to show them that no, they don't - or, alternatively, that the story everyone thought was grimdark is actually nobledark and yes, a Na´ve Newcomer with fresh perspective on things can achieve something others cannot. A straight Crapsack World will probably go with the former, though.
Shell-Shocked Veteran is older, and far more experienced. Such a person is a Crapsack World in miniature - the days of glory are long past them, they are bitter, pessimistic and very dangerous. This sort of protagonist will likely find themselves drawn into an Evil vs. Evil conflict where they will try to make a difference, or join the Gray side of Gray and Black Morality, where they'll probably relearn that there is still good in the world and something worth fighting for. You decide whether it's true or if they succeed.
Right Man in the Wrong Place is probably just a member of some ruined country, a villager by the side of the haunted forest, or a wanderer of dangerous routes. Like everyone around them, they try to eke out a living in a world that is actively opposed to that goal, and the plot invades their mundane life, either in form of a Harbinger of Impending Doom, a haughty nobleman who goes too far, or some catastrophe. The protagonist must then raise to the occassion and learn to be a badass to survive the plot.
Dark for the sake of dark. One thing that writers of Crapsack Worlds often fall prey to is the seriousness. Yes, the Crapsack World is a dark and unforgiving place where everything is trying to kill you and most people are apathetic, if not bastards. But if you play this completely straight - you don't include the slightest ray of sunshine, everyone is just so friggin' serious! and people make decisions that lack logic and reason for the sake of being dark - then you're not writing grimdark, you're writing grimderp and drown in autoparody. Thing of logical reason why things are bad, rather than enforcing worst possible solutions and behaviours just to prove to us that darkness reigns supreme.
People don't work that way. While people, on the average, will look out for themselves before the rest, it's been shown time and again in history that in crisis situations, we will form groups and try to help one another. It doesn't have to be motivated strictly by some form of altrusim, it's advantageous even from animalistic point of view - any person you help is one more person that can help you later, and as a pack, you are safer. Ruling by love is much safer than ruling by threat - even Warhammer 40 000, the king of Crapsack World, points out that a comissar who shoots his charges for slightest insubordination is a comissar with a very short lifespan. Likewise, parents are wildly protective of their children and while they might give them up to a volcano god if they are convinced that is the best for them, they will defend their children from things like rape or being forced into slavery. And another fact: military commanders who preserve their troops rather than ordering them forward are more likely to command respect and emerge victorious than those whose preferred method is Attack! Attack! Attack! So, when writing real people, apply real psychology.
Humour is a coping mechanism. Again, write real people, not parodies for the sake of being "dark". Humour is the main coping mechanism for people and if they didn't joke about their horrid circumstances, they'd go insane in short order. It's probably Gallows Humor, but this isn't necessarily a bad thing - we will try to find the proverbial ray of sunshine everywhere. This is also important from storytelling perspective, because a tale that tries to kill all hope and optimism, but provides no moments of levity to balance it out, is just going to depress your readers or viewers, and make them more likely to put the book down/turn the film off and go off in search of something that could restore their faith in humanity. While we're on this topic...
Paint in shades of gray, not black. Stories set in a Crapsack World are especially in danger of Darkness-Induced Audience Apathy and Eight Deadly Words, which will turn your readers/viewers away from the story. If one side is full of thieving, self-righteous bastards and the other is full of murderous, barbaric bastards, who is the viewer supposed to root for? While the world may suggest that Evil vs. Evil conflict is the only possibility, you have to remember thar you're creating a story for people, and therefore the audience must root for at least one side to emerge victorious. So, rather than some sort of "Black and Black" Morality, use both blacks and grays, so that we know who to support and so that we want to support them.
No-one likes a "Shaggy Dog" Story. Yes, it is very likely that in a world like this, your protagonists will fail, but the audience has spent hundreds of pages/dozens of minutes following those characters and rooting for them to succeed. If they fail because of some contrived Diabolus ex Machina, or at the very end it turns out their quest was all for naught, your audience will feel cheated. If you're going with a purely grimdark setting, then no, your protagonists are unlikely to turn the world from Crapsack to happy, but they can score at least some minor, local victories or stave off a disaster. And even if The Bad Guy Wins and the story ends with a complete failure when it comes to the main mission, at least let the reader take solace in the fact that the heroes helped at least somebody in their quest and the small good they did will not be undone by a strike of bad luck.
Keep in mind, however, that you have to stop yourself from going too much in the other direction, least the audience asks a question you don't really wish to hear:
Is it actually such a bad place to live in? Sometimes you can see such a world. Volcanoes are spewing ashes into the heavens, ruins litter the skyline, people act nastily to each other. But... trains run on time. Nobody seems to be going hungry. All the basic needs of society are met without going to war, and changes are possible... if only everyone didn't bemoan the grimness of the world they live in. What happened is that rather than grimdark, you've written a nobledark setting - a place that is dangerous and risky to be alone in, but one in which there is hope, the civillization actually functions and the pessimism isn't really warranted. That in itself isn't bad, the problems come when you're trying to force this to act like a Crapsack World. Either force your characters to struggle to get what they need, or acknowledge that your setting isn't all that Crapsack.