<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>The Reincarnated · Devlog</title>
  <link href="https://lockestudio.net/en/devlog/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="https://lockestudio.net/en/devlog/" rel="alternate" type="text/html" hreflang="en"/>
  <id>https://lockestudio.net/en/devlog/feed.xml</id>
  <updated>2026-10-11T15:31:06+08:00</updated>
  <author><name>Locke Studio</name></author>
  <entry>
    <title type="html">Why Do Residents Get Hungry? Designing Needs</title>
    <link href="https://lockestudio.net/en/devlog/2026/10/needs-overview/" rel="alternate" type="text/html"/>
    <id>https://lockestudio.net/en/devlog/2026/10/needs-overview/</id>
    <published>2026-10-11T00:00:00+08:00</published>
    <updated>2026-10-11T00:00:00+08:00</updated>
    <summary type="html">How four desires—appetite, sleep, fun and company—drive each resident&apos;s day, and even shape who they become.</summary>
    <content type="html" xml:base="https://lockestudio.net/en/devlog/2026/10/needs-overview/">&lt;p&gt;In &lt;em&gt;The Reincarnated&lt;/em&gt;, residents aren’t scenery standing around waiting for the player to talk to them. They get hungry, tired, bored and lonely, and those feelings send them out the door, spending money, looking for someone to talk to—and, when they’re out of options, taking desperate risks.&lt;/p&gt;

&lt;p&gt;This post introduces the core that brings residents to life: &lt;strong&gt;the needs system&lt;/strong&gt;.&lt;/p&gt;

&lt;h2 id=&quot;four-desires&quot;&gt;Four desires&lt;/h2&gt;

&lt;p&gt;Every resident has four desires:&lt;/p&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;Desire&lt;/th&gt;
      &lt;th&gt;How it’s met&lt;/th&gt;
      &lt;th&gt;What makes it different&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Appetite&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Eating&lt;/td&gt;
      &lt;td&gt;Food can be bought ahead and eaten later&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Sleep&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Sleeping&lt;/td&gt;
      &lt;td&gt;Needs one unbroken stretch of time, but one good sleep is usually enough&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Fun&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Doing what you enjoy&lt;/td&gt;
      &lt;td&gt;Doing the same thing too often gets dull&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Company&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Spending time with others&lt;/td&gt;
      &lt;td&gt;The other person has to be willing, and one chat doesn’t go far&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;Think of each desire as a water level that slowly drops over time. Once it falls below the &lt;strong&gt;warning line&lt;/strong&gt;, the resident feels hungry, tired, bored or lonely, and their condition suffers. Meet the need well, on the other hand, and they get the good feeling of being full, rested or in high spirits.&lt;/p&gt;

&lt;p&gt;The four desires aren’t equally easy to meet: sleep is the easiest, filled in one go; company is the hardest, taking several encounters to top up.&lt;/p&gt;

&lt;figure class=&quot;post-fig&quot; role=&quot;img&quot; aria-label=&quot;Needs diagram: each of the four desires has a level; when one falls below the warning line, the resident compares options and goes to meet it; the level rises, then slowly drops again in a loop&quot;&gt;
&lt;svg viewBox=&quot;0 0 600 300&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;defs&gt;
    &lt;marker id=&quot;ar3&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerWidth=&quot;7&quot; markerHeight=&quot;7&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M0 0 L10 5 L0 10 Z&quot; fill=&quot;#8b6b34&quot; /&gt;&lt;/marker&gt;
  &lt;/defs&gt;
  &lt;g font-family=&quot;Georgia,&apos;Noto Serif TC&apos;,serif&quot; fill=&quot;#3a2a10&quot;&gt;
    &lt;g stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; fill=&quot;none&quot;&gt;
      &lt;rect x=&quot;40&quot; y=&quot;40&quot; width=&quot;30&quot; height=&quot;200&quot; /&gt;&lt;rect x=&quot;95&quot; y=&quot;40&quot; width=&quot;30&quot; height=&quot;200&quot; /&gt;
      &lt;rect x=&quot;150&quot; y=&quot;40&quot; width=&quot;30&quot; height=&quot;200&quot; /&gt;&lt;rect x=&quot;205&quot; y=&quot;40&quot; width=&quot;30&quot; height=&quot;200&quot; /&gt;
    &lt;/g&gt;
    &lt;rect x=&quot;41&quot; y=&quot;100&quot; width=&quot;28&quot; height=&quot;139&quot; fill=&quot;#c9a35a&quot; /&gt;
    &lt;rect x=&quot;96&quot; y=&quot;160&quot; width=&quot;28&quot; height=&quot;79&quot; fill=&quot;#c9a35a&quot; /&gt;
    &lt;rect x=&quot;151&quot; y=&quot;200&quot; width=&quot;28&quot; height=&quot;39&quot; fill=&quot;#b5593a&quot; /&gt;
    &lt;rect x=&quot;206&quot; y=&quot;130&quot; width=&quot;28&quot; height=&quot;109&quot; fill=&quot;#c9a35a&quot; /&gt;
    &lt;path d=&quot;M30 180 H245&quot; stroke=&quot;#b5593a&quot; stroke-width=&quot;1.5&quot; stroke-dasharray=&quot;5 4&quot; /&gt;
    &lt;text x=&quot;248&quot; y=&quot;176&quot; font-size=&quot;12&quot; fill=&quot;#b5593a&quot;&gt;warning&lt;/text&gt;
    &lt;text x=&quot;248&quot; y=&quot;190&quot; font-size=&quot;12&quot; fill=&quot;#b5593a&quot;&gt;line&lt;/text&gt;
    &lt;g font-size=&quot;13&quot; text-anchor=&quot;middle&quot;&gt;
      &lt;text x=&quot;55&quot; y=&quot;262&quot;&gt;Appetite&lt;/text&gt;&lt;text x=&quot;110&quot; y=&quot;262&quot;&gt;Sleep&lt;/text&gt;&lt;text x=&quot;165&quot; y=&quot;262&quot;&gt;Fun&lt;/text&gt;&lt;text x=&quot;220&quot; y=&quot;262&quot;&gt;Company&lt;/text&gt;
    &lt;/g&gt;
    &lt;g stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; fill=&quot;#f7f0dc&quot;&gt;
      &lt;rect x=&quot;300&quot; y=&quot;50&quot; width=&quot;130&quot; height=&quot;56&quot; /&gt;&lt;rect x=&quot;460&quot; y=&quot;50&quot; width=&quot;130&quot; height=&quot;56&quot; /&gt;
      &lt;rect x=&quot;460&quot; y=&quot;184&quot; width=&quot;130&quot; height=&quot;56&quot; fill=&quot;#ecd9a4&quot; /&gt;&lt;rect x=&quot;300&quot; y=&quot;184&quot; width=&quot;130&quot; height=&quot;56&quot; /&gt;
    &lt;/g&gt;
    &lt;g font-size=&quot;14&quot; font-weight=&quot;700&quot; text-anchor=&quot;middle&quot;&gt;
      &lt;text x=&quot;365&quot; y=&quot;75&quot;&gt;Slowly drops&lt;/text&gt;&lt;text x=&quot;525&quot; y=&quot;75&quot;&gt;Below the line&lt;/text&gt;
      &lt;text x=&quot;525&quot; y=&quot;209&quot;&gt;Compare options&lt;/text&gt;&lt;text x=&quot;365&quot; y=&quot;209&quot;&gt;Go and do it&lt;/text&gt;
    &lt;/g&gt;
    &lt;g font-size=&quot;12&quot; text-anchor=&quot;middle&quot; fill=&quot;#6b5530&quot;&gt;
      &lt;text x=&quot;365&quot; y=&quot;94&quot;&gt;over time&lt;/text&gt;&lt;text x=&quot;525&quot; y=&quot;94&quot;&gt;hungry, tired…&lt;/text&gt;
      &lt;text x=&quot;525&quot; y=&quot;228&quot;&gt;bag, shop, friend&lt;/text&gt;&lt;text x=&quot;365&quot; y=&quot;228&quot;&gt;eat, sleep, chat&lt;/text&gt;
    &lt;/g&gt;
    &lt;g stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; fill=&quot;none&quot; marker-end=&quot;url(#ar3)&quot;&gt;
      &lt;path d=&quot;M430 78 H458&quot; /&gt;&lt;path d=&quot;M525 106 V182&quot; /&gt;&lt;path d=&quot;M460 212 H432&quot; /&gt;&lt;path d=&quot;M365 184 V108&quot; /&gt;
    &lt;/g&gt;
    &lt;text x=&quot;372&quot; y=&quot;150&quot; font-size=&quot;12&quot; fill=&quot;#7a4f12&quot;&gt;level rises&lt;/text&gt;
  &lt;/g&gt;
&lt;/svg&gt;
&lt;figcaption&gt;Each desire is a level that slowly drops; a resident&apos;s day is spent looking after these four levels.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;everyone-plans-their-day&quot;&gt;Everyone plans their day&lt;/h2&gt;

&lt;p&gt;Residents plan the next day ahead of time: when to work, how many meals to eat, when to sleep, and whether there’s time for fun or friends. Time and energy are limited, so nobody can do everything perfectly—everyone has to make trade-offs.&lt;/p&gt;

&lt;h2 id=&quot;where-to-go-is-a-calculation-too&quot;&gt;Where to go is a calculation, too&lt;/h2&gt;

&lt;p&gt;When residents get hungry, they don’t just run to the nearest place. They weigh the options at hand:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Is there still food in the bag?&lt;/li&gt;
  &lt;li&gt;Is the shop nearby expensive? The one farther away is cheaper—but is it worth the walk?&lt;/li&gt;
  &lt;li&gt;A restaurant fills you up more—but is there enough money in the purse?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They consider how much each option helps, how far they’d have to walk and how much it costs, check their own budget, and pick the best deal. That’s also why shops and markets have customers at all (see “&lt;a href=&quot;/en/devlog/2026/10/economy-overview/&quot;&gt;How a Loaf of Bread Reaches You&lt;/a&gt;”).&lt;/p&gt;

&lt;h2 id=&quot;desires-shape-character&quot;&gt;Desires shape character&lt;/h2&gt;

&lt;p&gt;This world has “seven sins” and “seven virtues”—gluttony and temperance, greed and generosity, sloth and diligence, and so on. They’re closely tied to desires:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;People who lean toward sin&lt;/strong&gt; have big appetites and burn through things fast, but they can take in a lot at once and last a long time. Where food is plentiful, they thrive.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;People who lean toward virtue&lt;/strong&gt; use less and are thrifty, but they can’t store much. When things are scarce, they hold out better.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither is simply better—&lt;strong&gt;it depends on how rich the world around them is&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Character isn’t set in stone at birth, either. Everyone has a rough daily portion of how much to eat or play, and &lt;strong&gt;going beyond it is indulgence&lt;/strong&gt;. Those who indulge again and again may slowly fall into sin; those who learn restraint have a chance to grow toward virtue.&lt;/p&gt;

&lt;h2 id=&quot;when-theres-nowhere-left-to-turn&quot;&gt;When there’s nowhere left to turn&lt;/h2&gt;

&lt;p&gt;Of the four desires, only &lt;strong&gt;eating and sleeping&lt;/strong&gt; can be fatal. Boredom and loneliness hurt, but they won’t kill you.&lt;/p&gt;

&lt;p&gt;When someone is truly starving with nothing to their name, what they do depends on &lt;strong&gt;what kind of person they are&lt;/strong&gt; and &lt;strong&gt;who the other person is&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Good people&lt;/strong&gt; turn to people they know for help, or beg.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Evil or rebellious people&lt;/strong&gt; may steal from, or rob, people they already dislike.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Righteous people&lt;/strong&gt; may even rob villains and give what they take to good people.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Surviving may come at a moral cost—and that is how sin takes root in hardship. If even that path fails, the ending is the result of the road they walked, not a roll of the dice.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;The needs system is where most of this world’s stories begin: why shops have customers, why residents make friends, why a good person turns bad. In future posts we’ll share more about character, relationships and illness, and how they weave together with needs.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title type="html">How a Loaf of Bread Reaches You: Designing the Economy</title>
    <link href="https://lockestudio.net/en/devlog/2026/10/economy-overview/" rel="alternate" type="text/html"/>
    <id>https://lockestudio.net/en/devlog/2026/10/economy-overview/</id>
    <published>2026-10-10T00:00:00+08:00</published>
    <updated>2026-10-10T00:00:00+08:00</updated>
    <summary type="html">What do the guild, trading houses and shops each do? One diagram shows how goods and money move through the world.</summary>
    <content type="html" xml:base="https://lockestudio.net/en/devlog/2026/10/economy-overview/">&lt;p&gt;In &lt;em&gt;The Reincarnated&lt;/em&gt;, the goods on a shop’s shelf don’t appear out of thin air. Every item is gathered by someone, made by someone and passed along by someone, and its price changes along the way. This post explains, as simply as we can, the three players behind it all: &lt;strong&gt;the guild, the trading houses and the shops&lt;/strong&gt;.&lt;/p&gt;

&lt;figure class=&quot;post-fig&quot; role=&quot;img&quot; aria-label=&quot;Economy diagram: gathering sites and workshops sell to a trading house; the trading house sells wholesale to the Merchant Guild&apos;s market and also supplies shops, which sell to residents&quot;&gt;
&lt;svg viewBox=&quot;0 0 600 330&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;defs&gt;
    &lt;marker id=&quot;ar&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerWidth=&quot;7&quot; markerHeight=&quot;7&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M0 0 L10 5 L0 10 Z&quot; fill=&quot;#8b6b34&quot; /&gt;&lt;/marker&gt;
  &lt;/defs&gt;
  &lt;g font-family=&quot;Georgia,&apos;Noto Serif TC&apos;,serif&quot; text-anchor=&quot;middle&quot; fill=&quot;#3a2a10&quot;&gt;
    &lt;g stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; fill=&quot;#f7f0dc&quot;&gt;
      &lt;rect x=&quot;20&quot; y=&quot;30&quot; width=&quot;130&quot; height=&quot;56&quot; /&gt;
      &lt;rect x=&quot;20&quot; y=&quot;130&quot; width=&quot;130&quot; height=&quot;56&quot; /&gt;
      &lt;rect x=&quot;235&quot; y=&quot;80&quot; width=&quot;130&quot; height=&quot;56&quot; /&gt;
      &lt;rect x=&quot;450&quot; y=&quot;80&quot; width=&quot;130&quot; height=&quot;56&quot; fill=&quot;#ecd9a4&quot; /&gt;
      &lt;rect x=&quot;235&quot; y=&quot;240&quot; width=&quot;130&quot; height=&quot;56&quot; /&gt;
      &lt;rect x=&quot;450&quot; y=&quot;240&quot; width=&quot;130&quot; height=&quot;56&quot; stroke-dasharray=&quot;5 4&quot; /&gt;
    &lt;/g&gt;
    &lt;g font-size=&quot;15&quot; font-weight=&quot;700&quot;&gt;
      &lt;text x=&quot;85&quot; y=&quot;57&quot;&gt;Gathering site&lt;/text&gt;&lt;text x=&quot;85&quot; y=&quot;157&quot;&gt;Workshop&lt;/text&gt;
      &lt;text x=&quot;300&quot; y=&quot;107&quot;&gt;Trading house&lt;/text&gt;&lt;text x=&quot;515&quot; y=&quot;107&quot;&gt;Merchant Guild&lt;/text&gt;
      &lt;text x=&quot;300&quot; y=&quot;267&quot;&gt;Shop&lt;/text&gt;&lt;text x=&quot;515&quot; y=&quot;267&quot;&gt;Residents&lt;/text&gt;
    &lt;/g&gt;
    &lt;g font-size=&quot;12&quot; fill=&quot;#6b5530&quot;&gt;
      &lt;text x=&quot;85&quot; y=&quot;76&quot;&gt;wheat, ore, herbs&lt;/text&gt;&lt;text x=&quot;85&quot; y=&quot;176&quot;&gt;bread, potions…&lt;/text&gt;
      &lt;text x=&quot;300&quot; y=&quot;126&quot;&gt;middleman&lt;/text&gt;&lt;text x=&quot;515&quot; y=&quot;126&quot;&gt;runs the market&lt;/text&gt;
      &lt;text x=&quot;300&quot; y=&quot;286&quot;&gt;bakery, hospital&lt;/text&gt;&lt;text x=&quot;515&quot; y=&quot;286&quot;&gt;eat, use, heal&lt;/text&gt;
    &lt;/g&gt;
    &lt;g stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; fill=&quot;none&quot; marker-end=&quot;url(#ar)&quot;&gt;
      &lt;path d=&quot;M150 64 L233 98&quot; /&gt;
      &lt;path d=&quot;M150 152 L233 120&quot; /&gt;
      &lt;path d=&quot;M365 108 L448 108&quot; /&gt;
      &lt;path d=&quot;M300 136 L300 238&quot; /&gt;
      &lt;path d=&quot;M365 268 L448 268&quot; /&gt;
    &lt;/g&gt;
    &lt;g font-size=&quot;14&quot; fill=&quot;#7a4f12&quot;&gt;
      &lt;text x=&quot;190&quot; y=&quot;70&quot;&gt;raw&lt;/text&gt;&lt;text x=&quot;190&quot; y=&quot;152&quot;&gt;goods&lt;/text&gt;
      &lt;text x=&quot;406&quot; y=&quot;100&quot;&gt;wholesale&lt;/text&gt;
      &lt;text x=&quot;300&quot; y=&quot;190&quot; text-anchor=&quot;start&quot; dx=&quot;10&quot;&gt;supplied at cost&lt;/text&gt;
      &lt;text x=&quot;406&quot; y=&quot;260&quot;&gt;retail&lt;/text&gt;
    &lt;/g&gt;
  &lt;/g&gt;
&lt;/svg&gt;
&lt;figcaption&gt;Goods flow left to right; money flows back the other way.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;h2 id=&quot;the-three-players&quot;&gt;The three players&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The Merchant Guild: the wholesaler that runs the market.&lt;/strong&gt;
The guild buys goods from the trading houses and sells them in bulk at the market. The market is built for large orders—it’s where you stock up by the batch, not where you buy things one at a time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Trading houses: the middlemen that connect everyone.&lt;/strong&gt;
A trading house buys from gathering sites and workshops, then sells on to the guild on one side and supplies its member shops on the other. Each house only deals in goods within its own line of business.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shops: retail, face to face with residents.&lt;/strong&gt;
Shops are members of a trading house. They can buy goods from it at cost, then sell them to residents at a markup. Twenty percent of the profit goes back to the trading house; the rest is theirs. A hospital is a kind of shop too: the doctor first works out what’s ailing a patient, then prescribes the right medicine.&lt;/p&gt;

&lt;h2 id=&quot;producers-have-their-own-plans&quot;&gt;Producers have their own plans&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Gathering sites&lt;/strong&gt; send people out to fields and mines and sell the raw materials to a trading house.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Workshops&lt;/strong&gt; buy their own raw materials at the market, make finished goods and sell them. Normally they sell to a trading house; only when the workshop’s storeroom is nearly full and the trading house can’t take any more does the guild step in and buy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;why-prices-rise-at-every-step&quot;&gt;Why prices rise at every step&lt;/h2&gt;

&lt;p&gt;Each step &lt;strong&gt;buys out&lt;/strong&gt; the goods from the step before—nobody is selling on someone else’s behalf. So every step needs a margin to make the deal worthwhile, and whoever holds the goods carries the risk if they don’t sell:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Workshop → trading house → guild → market: each hand-off adds a little to the price.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Shops then add a markup on top of the market price. That’s how retail makes money, which is why shops usually cost more than the market—but you can &lt;strong&gt;haggle&lt;/strong&gt;.&lt;/p&gt;

&lt;h2 id=&quot;residents-count-their-coins-too&quot;&gt;Residents count their coins too&lt;/h2&gt;

&lt;p&gt;When residents are hungry or sick, they weigh their options: food in their own bag, the shop nearby, or a cheaper shop farther away. They think about the walk, the price and their own budget before deciding where to go. When money is tight, they make do.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;The economy is still being developed and tuned. In future devlogs we’ll dig into each part in more detail—how a workshop decides what to make, and how prices move when goods run short.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title type="html">The Bigger the World, the Harder a Day Ends: Three Performance Hurdles</title>
    <link href="https://lockestudio.net/en/devlog/2026/10/day-close-parallel/" rel="alternate" type="text/html"/>
    <id>https://lockestudio.net/en/devlog/2026/10/day-close-parallel/</id>
    <published>2026-10-10T00:00:00+08:00</published>
    <updated>2026-10-10T00:00:00+08:00</updated>
    <summary type="html">From a stuttering editor and an end-of-day that grew slower every day, to splitting the day&apos;s work into lanes that run side by side.</summary>
    <content type="html" xml:base="https://lockestudio.net/en/devlog/2026/10/day-close-parallel/">&lt;p&gt;In &lt;em&gt;The Reincarnated&lt;/em&gt;, every resident, trading house and guild is living its own life. At the end of each day, the world runs an &lt;strong&gt;end-of-day settlement&lt;/strong&gt;: workshops tally their output, trading houses restock, the guild buys up goods, residents eat and see the doctor, payments land in wallets… Only when all of it is done can the next day begin.&lt;/p&gt;

&lt;p&gt;While the world was small, this ran smoothly. But as we added more towns and people, we ran into three hurdles, one after another.&lt;/p&gt;

&lt;h2 id=&quot;hurdle-one-opening-the-observer-window-froze-everything&quot;&gt;Hurdle one: opening the observer window froze everything&lt;/h2&gt;

&lt;p&gt;During development we use an “observatory” window to watch the state of the world live. The trouble was that every time the window redrew, it reached straight into the world’s data—and the world itself was running on the same thread. The result: &lt;strong&gt;the window waited on the world, the world waited on the window&lt;/strong&gt;, and the whole editor stuttered.&lt;/p&gt;

&lt;p&gt;This isn’t just a tooling problem; the in-game interface players see would hit the same wall.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: move the world onto its own background thread and have it publish a “snapshot” once a second. The interface only reads the snapshot and never touches the world while it’s changing. Once a second is plenty for human eyes, and the world can finally focus on its own work.&lt;/p&gt;

&lt;h2 id=&quot;hurdle-two-each-day-took-longer-to-end&quot;&gt;Hurdle two: each day took longer to end&lt;/h2&gt;

&lt;p&gt;After the move, a new problem surfaced: the simulation couldn’t keep up with the target speed, and &lt;strong&gt;the end-of-day settlement got slower every day&lt;/strong&gt;. Day one took 1.6 seconds; a few days later, the slowest day took 22.&lt;/p&gt;

&lt;p&gt;We timed each part of the settlement separately and found that about &lt;strong&gt;90% of the time&lt;/strong&gt; went into “write the entire commission record back to the database every time a commission is completed.” Yet nobody needs that record until the player actually saves.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The fix&lt;/strong&gt;: write only when saving. Afterwards, the settlement went back to 1–2 seconds a day, and stopped growing with the day count.&lt;/p&gt;

&lt;h2 id=&quot;hurdle-three-doing-things-at-once-without-miscounting-money&quot;&gt;Hurdle three: doing things at once, without miscounting money&lt;/h2&gt;

&lt;p&gt;Next, we wanted the world to hold up as it grows. The obvious approach is &lt;strong&gt;parallelism&lt;/strong&gt;: much of the settlement is work that doesn’t depend on anything else—trading house A restocks, trading house B restocks, residents eat on their own. There’s no reason it all has to wait in a single line.&lt;/p&gt;

&lt;p&gt;But parallelism carries a serious risk. Imagine two people working on the same wallet at the same moment:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;The wallet holds 100 copper coins. A receives 30, and at the same moment B receives 50. Both first read “100,” work out 130 and 150, and write their result back. The wallet ends up at 150. &lt;strong&gt;Those 30 coins simply vanish.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;While investigating, we also found this risk &lt;strong&gt;already existed&lt;/strong&gt;: residents’ everyday actions and the settlement could already touch the same wallet at once—it just hadn’t been caught yet.&lt;/p&gt;

&lt;h2 id=&quot;the-design-today-separate-lanes-one-at-a-time-counters&quot;&gt;The design today: separate lanes, one-at-a-time counters&lt;/h2&gt;

&lt;figure class=&quot;post-fig&quot; role=&quot;img&quot; aria-label=&quot;Sequential vs parallel: before, all work waited in one line; now it is split by owner into lanes that run together, and the next stage starts only when every lane is done&quot;&gt;
&lt;svg viewBox=&quot;0 0 600 300&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
  &lt;defs&gt;
    &lt;marker id=&quot;ar2&quot; viewBox=&quot;0 0 10 10&quot; refX=&quot;9&quot; refY=&quot;5&quot; markerWidth=&quot;7&quot; markerHeight=&quot;7&quot; orient=&quot;auto&quot;&gt;&lt;path d=&quot;M0 0 L10 5 L0 10 Z&quot; fill=&quot;#8b6b34&quot; /&gt;&lt;/marker&gt;
  &lt;/defs&gt;
  &lt;g font-family=&quot;Georgia,&apos;Noto Serif TC&apos;,serif&quot; fill=&quot;#3a2a10&quot;&gt;
    &lt;g font-size=&quot;16&quot; font-weight=&quot;700&quot;&gt;
      &lt;text x=&quot;14&quot; y=&quot;64&quot;&gt;Before&lt;/text&gt;
      &lt;text x=&quot;14&quot; y=&quot;200&quot;&gt;Now&lt;/text&gt;
    &lt;/g&gt;
    &lt;g stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; fill=&quot;#f7f0dc&quot;&gt;
      &lt;rect x=&quot;80&quot; y=&quot;40&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;&lt;rect x=&quot;160&quot; y=&quot;40&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;&lt;rect x=&quot;240&quot; y=&quot;40&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;
      &lt;rect x=&quot;320&quot; y=&quot;40&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;&lt;rect x=&quot;400&quot; y=&quot;40&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;&lt;rect x=&quot;480&quot; y=&quot;40&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;
      &lt;rect x=&quot;80&quot; y=&quot;130&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;&lt;rect x=&quot;160&quot; y=&quot;130&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;
      &lt;rect x=&quot;80&quot; y=&quot;176&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;&lt;rect x=&quot;160&quot; y=&quot;176&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;
      &lt;rect x=&quot;80&quot; y=&quot;222&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;&lt;rect x=&quot;160&quot; y=&quot;222&quot; width=&quot;80&quot; height=&quot;36&quot; /&gt;
    &lt;/g&gt;
    &lt;g font-size=&quot;12&quot; text-anchor=&quot;middle&quot;&gt;
      &lt;text x=&quot;120&quot; y=&quot;63&quot;&gt;House A&lt;/text&gt;&lt;text x=&quot;200&quot; y=&quot;63&quot;&gt;House B&lt;/text&gt;&lt;text x=&quot;280&quot; y=&quot;63&quot;&gt;Workshop C&lt;/text&gt;
      &lt;text x=&quot;360&quot; y=&quot;63&quot;&gt;Resident 1&lt;/text&gt;&lt;text x=&quot;440&quot; y=&quot;63&quot;&gt;Resident 2&lt;/text&gt;&lt;text x=&quot;520&quot; y=&quot;63&quot;&gt;Resident 3&lt;/text&gt;
      &lt;text x=&quot;120&quot; y=&quot;153&quot;&gt;House A&lt;/text&gt;&lt;text x=&quot;200&quot; y=&quot;153&quot;&gt;Resident 1&lt;/text&gt;
      &lt;text x=&quot;120&quot; y=&quot;199&quot;&gt;House B&lt;/text&gt;&lt;text x=&quot;200&quot; y=&quot;199&quot;&gt;Resident 2&lt;/text&gt;
      &lt;text x=&quot;120&quot; y=&quot;245&quot;&gt;Workshop C&lt;/text&gt;&lt;text x=&quot;200&quot; y=&quot;245&quot;&gt;Resident 3&lt;/text&gt;
    &lt;/g&gt;
    &lt;path d=&quot;M260 120 V268&quot; stroke=&quot;#8b6b34&quot; stroke-width=&quot;2&quot; stroke-dasharray=&quot;6 5&quot; /&gt;
    &lt;text x=&quot;260&quot; y=&quot;286&quot; font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#7a4f12&quot;&gt;wait for everyone&lt;/text&gt;
    &lt;path d=&quot;M268 194 H318&quot; stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; marker-end=&quot;url(#ar2)&quot; /&gt;
    &lt;rect x=&quot;320&quot; y=&quot;176&quot; width=&quot;100&quot; height=&quot;36&quot; fill=&quot;#ecd9a4&quot; stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; /&gt;
    &lt;text x=&quot;370&quot; y=&quot;199&quot; font-size=&quot;14&quot; text-anchor=&quot;middle&quot;&gt;Next stage&lt;/text&gt;
    &lt;rect x=&quot;440&quot; y=&quot;130&quot; width=&quot;140&quot; height=&quot;128&quot; fill=&quot;none&quot; stroke=&quot;#8b6b34&quot; stroke-width=&quot;1.5&quot; stroke-dasharray=&quot;4 4&quot; /&gt;
    &lt;g font-size=&quot;13&quot; text-anchor=&quot;middle&quot; fill=&quot;#6b5530&quot;&gt;
      &lt;text x=&quot;510&quot; y=&quot;156&quot; font-weight=&quot;700&quot; fill=&quot;#5b3f14&quot;&gt;Shared counters&lt;/text&gt;
      &lt;text x=&quot;510&quot; y=&quot;180&quot;&gt;wallets · markets&lt;/text&gt;
      &lt;text x=&quot;510&quot; y=&quot;200&quot;&gt;relationships&lt;/text&gt;
      &lt;text x=&quot;510&quot; y=&quot;226&quot;&gt;one at a time,&lt;/text&gt;
      &lt;text x=&quot;510&quot; y=&quot;246&quot;&gt;others queue&lt;/text&gt;
    &lt;/g&gt;
    &lt;path d=&quot;M80 100 H560&quot; stroke=&quot;#b8893a&quot; stroke-width=&quot;1&quot; /&gt;
    &lt;text x=&quot;320&quot; y=&quot;96&quot; font-size=&quot;12&quot; text-anchor=&quot;middle&quot; fill=&quot;#7a4f12&quot;&gt;time →&lt;/text&gt;
  &lt;/g&gt;
&lt;/svg&gt;
&lt;figcaption&gt;Work is split by owner into lanes that run side by side; shared counters serve one at a time.&lt;/figcaption&gt;
&lt;/figure&gt;

&lt;p&gt;We didn’t rewrite every system. We changed just two things:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;One scheduler&lt;/strong&gt; sorts the day’s work into lanes. Everything belonging to the same trading house or the same resident always goes into the same lane, so work for different owners can run at the same time. At the end of each stage, the scheduler waits for every lane to finish before moving on.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Locks on shared counters&lt;/strong&gt;: wallets, markets, relationships and guild membership rolls—things everyone touches—each get a “one at a time” lock. The lock only covers the short “read, work out, write back” step, and nobody may run off to another counter while holding one, so two people can never end up waiting on each other forever.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A few more rules:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Switch between two modes at any time&lt;/strong&gt;: “sequential mode” still does things one by one, which makes problems easy to track down; “parallel mode” uses multiple lanes. Comparing the two while measuring shows exactly where the bottleneck is.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Two markets never settle at the same time&lt;/strong&gt;: when a market runs short it buys from another market, so if both settled at once they could end up waiting on each other.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;How we know nothing was miscounted&lt;/strong&gt;: in parallel, who gets to a deal first depends on timing, so we don’t require both modes to produce identical results. Instead we check &lt;strong&gt;conservation&lt;/strong&gt;: every coin and every item in the world must be accounted for, nothing may go negative, and nobody may join the same kind of organization twice.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;results&quot;&gt;Results&lt;/h2&gt;

&lt;p&gt;In a test world with four towns and 128 residents:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;The full end-of-day settlement dropped from about &lt;strong&gt;3.5 seconds to 2.6 seconds&lt;/strong&gt; on average.&lt;/li&gt;
  &lt;li&gt;The part where every organization settles its own business ran about &lt;strong&gt;twice as fast&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Both modes ran with zero errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not every part can run in parallel. Some stages have a natural order—goods must be put on sale before anyone can buy them—and we deliberately kept those one at a time.&lt;/p&gt;

&lt;p&gt;Measuring also revealed the next bottleneck: at every moment, the world updates the countdown on status effects for every character, including residents of distant towns. We’re already planning a new approach, and we’ll share more once it’s further along.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title type="html">The Devlog Is Open</title>
    <link href="https://lockestudio.net/en/devlog/2026/10/devlog-start/" rel="alternate" type="text/html"/>
    <id>https://lockestudio.net/en/devlog/2026/10/devlog-start/</id>
    <published>2026-10-09T00:00:00+08:00</published>
    <updated>2026-10-09T00:00:00+08:00</updated>
    <summary type="html">The development log for The Reincarnated starts here.</summary>
    <content type="html" xml:base="https://lockestudio.net/en/devlog/2026/10/devlog-start/">&lt;p&gt;Starting today, we’ll be posting regular updates on the development of &lt;em&gt;The Reincarnated&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;This is where we’ll share the journey: the thinking behind new systems, art progress, the pitfalls we hit and the bugs we fixed, and every milestone along the way.&lt;/p&gt;

&lt;h2 id=&quot;what-to-expect&quot;&gt;What to expect&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Systems&lt;/strong&gt;: how rebirth, gifts, the daily lives of residents and the economy grow step by step&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Art&lt;/strong&gt;: progress on character portraits, the interface and environments&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Fixes&lt;/strong&gt;: the more interesting bugs, and how we caught them&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Milestones&lt;/strong&gt;: playable builds, events and release news&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;A blessing, or a curse? The fate of the reincarnated is in your hands.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can follow updates via &lt;a href=&quot;/en/devlog/feed.xml&quot;&gt;RSS&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
</feed>

