The Mafia Now Has an Economy: Ten Businesses, an Armory, and Income That Stops at Twelve Hours
Two weeks after publishing the design of The Mafia, the economy exists. Ten Vespera branches pay income on server time up to a twelve hour cap, an armory sells seven weapon tiers with ammunition that runs out and durability that has to be repaired, five equipment slots hold nineteen items, and three future cities are readable previews rather than promises. This is what shipped, why each limit is there, and every gate still standing between it and a playable alpha.
“Cash, XP, energy, items, income, and cooldowns are computed on the server. Any prediction the client makes is cosmetic, and when the two disagree the server wins.”
The rule we wrote down before the first line of economy code
Two weeks ago we published the design of The Mafia and said the economy was the part that would decide whether the game survives its first six months. Since then we built it. Vespera now has businesses that pay while the app is shut, an armory where ammunition runs out, and a wardrobe of five slots that changes how strong you actually are.
This is a progress report written from inside development, which means it carries the pending list next to the finished one. Nothing here is on Google Play, and there is still no release date.
What shipped since the last write-up
- Ten Vespera business branches can be opened, upgraded through three levels, and collected from, with income accruing on server time to a twelve hour ceiling.
- An armory of seven weapon tiers, from a Pocket .22 given away free to a Black Crown .50 at $16,000, each with its own ammunition, magazine size, and durability.
- Five equipment slots holding nineteen items: armor, clothing, footwear, vehicle, and accessory, each item with a level requirement and a power bonus the server adds up.
- A bank that takes deposits, a hospital that prices treatment by how badly you are hurt, and two doors on the map kept visibly locked because the gameplay behind them does not exist yet.
- A four city network under Vespera, with Valdora, Morrow Bay, and Saint Corvin readable as lore and no capture mechanics invented for them.
- One authoritative power summary, read by the player screen today and by the rival system Phase 4 will add.
- Phase 3 is still open. Balance telemetry, the first remote APK build, and a technical alpha on physical devices are all ahead of us.
Ten branches that earn while the app is shut
Vespera holds ten branches across its five districts, drawn from five kinds of business: two hospitals, two cafés, two restaurants, two banks, and two schools. Each sits under a Family, and the portfolio only opens once you belong to a Family yourself, either through patronage from Pier Nine, Alder House, or Lantern Market, or by founding your own at Level 20. Before that the screen stays visible and honest about why it is empty.
Opening an operation costs cash, starting at $80 for Café Lantern. From there the branch earns on a five minute tick, and three levels exist per branch, each upgrade raising both the rate and the ceiling. Mercy Row General begins at $2 a tick with a cap of 288 and reaches $5 a tick with a cap of 720 at level three.
Nothing about that income is counted by a timer running per player. It is derived on read from server time, which is the difference between a game that gets slower as it gains players and one that does not.
What a takeover actually costs you
Branches change hands through a takeover the server resolves, not a duel you can time by hand. Your equipped weapon and its power are read server side, the branch answers with a defence value between 20 and 35, and the result arrives with the bill attached: rounds gone from the magazine, five to ten points of durability off the weapon, and health lost either way. Winning costs two to five health. Losing costs eight to sixteen and puts a sixty second cooldown on that branch.
The asymmetry is deliberate. A takeover you can retry instantly is a button. A takeover that punishes failure three times harder than success is a decision, and deciding is the thing this genre is actually made of.
Losing the branch no longer loses the operation
Our first version deleted your operation when control of a branch moved. That was wrong, and wrong in the way that costs trust rather than money: a player whose branch changes hands for an afternoon should not also lose the income already banked inside it.
Each operation now carries the control version of the branch and the Family that sponsored it. When those stop matching, accrual pauses and the buy, upgrade, and collect actions each say why they are locked instead of failing blankly. When the branch returns to your Family, the operation rebinds to the new control version and the banked income is still sitting there.
The retry that must not pay twice
Every action in this phase that moves money runs through the same shape, and it is the shape we use in client work for tills and finance tools.
- The player row is locked first, in the same order in every code path, so two requests arriving together cannot mint the same money twice.
- Each request carries an idempotency key, stored with a SHA-256 fingerprint of its payload under a locking read. An exact retry replays the stored result permanently, while a different payload under the same key is refused as a conflict rather than guessed at.
- Every change in value writes a signed row to the economy ledger, so a balance that looks wrong can be replayed instead of argued about.
- Cash and XP are 64-bit integers with explicit overflow checks, because rounding money is a bug that never becomes funny.
- Prices, income rates, and caps live as versioned content rows, so rebalancing after the alpha does not mean shipping the app again.
An armory where the ammunition runs out
The old Inventory placeholder is gone. The weapon shop is its own destination now, with seven tiers that each bring their own ammunition type, magazine size, and durability.
- Pocket .22, free once at Level 1: 14 attack, 18 rounds, 40 durability. The gun you are handed so that a first takeover is possible at all.
- Dockhand .38 at Level 2 for $120, then Vesper 9 at Level 5 for $450, ordinary sidearms with room to grow into.
- Wharf 12 at Level 8 for $1,100: a heavy shotgun with five rounds in the tube and enough stopping power to matter.
- Typewriter .45 at Level 12 for $2,800, the first automatic, carrying up to a hundred rounds.
- Sentinel 7.62 at Level 16 for $7,000, for branches whose defence is out of a pistol’s reach.
- Black Crown .50 at Level 20 for $16,000: 120 attack, 150 durability, and $450 for a pack of five rounds.
Ammunition comes in packs and repair is priced per ten points of durability, from $3 on the starter pistol to $70 on the Black Crown. Both are ledgered like any other spend. A weapon out of rounds or out of durability simply stops working, and that is the intent: firepower here is a running cost rather than a permanent upgrade you buy once.
Five slots, nineteen items, and two screens doing different jobs
Equipment used to be three slots. It is five now: armor, clothing, footwear, vehicle, and accessory, holding nineteen items between them. A dockside work shirt is $12 at Level 1. The Alder tailored suit is $420 at Level 6. Each of the nineteen has its own photoreal product artwork rather than an icon standing in for something we never drew.
Buying and wearing were pulled apart on purpose. Purchases happen in the shop, equipping happens in Inventory, and Inventory shows what you are wearing above what you merely own. An item bought and not equipped says so. An empty slot says that too, rather than implying a bonus you do not have.
What all those bonuses add up to comes from a single authoritative power summary that the player screen reads today and the rival system will read in Phase 4. Computing that number twice is exactly how two screens end up disagreeing about how strong a player is.
The bank takes deposits and does not hand them back yet
Crown Mile Bank accepts cash deposits, idempotently and through the ledger like everything else. It pays no interest, allows no withdrawals, and moves no money between players. Each of those is its own rule set with its own abuse surface, and one flow that is correct beats three that are approximately right.
The hospital runs the other way around: five severity tiers priced from $10 to $50 in ten dollar steps, charged when a job or a takeover leaves you hurt. Theft and bank robbery are the two things on the map still visibly locked through Level 9, and their gameplay genuinely does not exist. The lock is an honest state rather than a teaser. When it opens it will arrive with its own risk, cooldown, and ledger rules instead of borrowing the takeover’s.
Three cities you can read about and cannot enter
Under the Vespera map there is now a four city network: Vespera itself, active, plus Valdora on the northern rail, Morrow Bay on the western harbour, and Saint Corvin in the southern industrial belt. Each city carries three Families and each Family five characters, served from an authenticated read-only catalog with original artwork and case files that open a piece at a time.
Nine of those twelve Families are marked preview only in the database itself. There is no city control state, no capture action, and no schema pretending otherwise. Turning a preview into a playable city needs control tables, versioned APIs, transactional capture rules, and concurrency coverage, and until that work is done a preview is the truthful shape for it.
The audit we ran against ourselves
Two passes this phase went into attacking our own build rather than adding to it. Mission work is verified server side, so a crafted request cannot claim a result the player never played. Sessions are stored as hashes with revocation. Passwords use Argon2id at OWASP parameters with constant time comparison. Rate limits bucket per IP and per IPv6 /64 before sign-in and per user after it, every query is parameterised, and nothing that decides an outcome uses an insecure random source.
One finding is still open and worth naming here: registration currently reveals whether an email address already exists. Closing it properly needs verified email or an equivalent step outside the app, and it is tracked as its own task rather than quietly carried. The deploy path grew locks of its own in the same pass: a manual backup acknowledgement, a checksum parity check against the script installed on the server, and a refusal to roll a binary backwards over a schema that already moved forward.
Where Phase 3 actually stands
Everything above is code complete and verified locally. That is not the same as done, and the distance between the two is this list.
- Balance is unsettled on purpose. The sixteen missions, ten branches, and twenty six pieces of equipment stay adjustable until telemetry from real players exists.
- The Android technical alpha APK builds through a manual workflow whose first remote run, download, checksum, signature check, and device install have not happened yet.
- The technical alpha itself, three days on real devices, has not been run or triaged.
- The MySQL and MariaDB runtime gate is open, and so is the backup and restore drill.
- Physical device testing across a real Android matrix is pending, as is deploying the paired schema and client to production.
Phase 2 is also still not closed, for a human reason rather than a technical one. Two usability sessions with real players, three to five people and then five to eight, have to be run and triaged before that milestone counts. Code passing its own tests has never been the same thing as a game being worth the evening.
Still not in the build
- Rival combat, the combat log, and the weekly leaderboard. That is Phase 4, and the power summary was built to feed it.
- Chat, player-run gangs, applications and invites for your own Family, roles, and moderation. The Family foundation exists at Level 20; the social half of it does not.
- Money moving between players, in any form.
- The gacha, diamonds, rewarded ads, and purchases. The design includes them, the current build contains none of it, and the ad SDK is not in the APK. Our monetised privacy policy is already written and stays unpublished until the day a release actually carries that SDK.
- Push notifications, an open world, real-time combat, a public web build, iOS, and Windows. The web build that shows up in our screenshots is an internal QA tool.
Why we publish the unfinished half
A studio writing about its own game gets to choose which sentence to leave out, and the pending list is always the tempting one. We print it because the alternative teaches readers to discount everything else on the page. Every specific here can be checked against the game when it lands: the twelve hour cap, the free starter pistol, the deposit-only bank, the doors locked through Level 9. If one of them turns out different, hold us to what we wrote.
The Mafia is built by the same two people who build client software at Codiosity, on the same rules we apply when the money belongs to somebody else: locked transactions, a ledger row for every change in value, integers instead of decimals, and actions that stay safe when a phone retries them. A game economy is a demanding place to practise that, which is a large part of why we are building one.
- The Mafia: the design, the city, and the premiseThe first write-up: why asynchronous, the five districts of Vespera, and the freelancer to Family arc.https://codiosity.com/en/about/insights/the-mafia-game-sosial-asynchronous-bergaya-mafia-wars
- What software the Codiosity team can build, and the proof behind itEight kinds of software, each pinned to a product you can open today.https://codiosity.com/en/about/insights/software-yang-bisa-dibangun-tim-codiosity
Frequently asked questions
What is new in The Mafia after the Phase 3 update?
The Mafia now has a working economy: ten Vespera business branches that can be opened, upgraded through three levels, and collected from, an armory of seven weapon tiers with finite ammunition and repairable durability, and five equipment slots holding nineteen items. A four city network was also added, with Vespera playable and three cities as read-only previews.
How does business income work in The Mafia?
Each branch earns on a five minute tick, calculated from server time when you next read your state rather than by a timer running per player. Income accumulates while the app is closed and stops at 144 ticks, which is a twelve hour ceiling, and collecting it is a server-authoritative transaction recorded in the economy ledger.
Why does business income stop after twelve hours in The Mafia?
The cap exists so that being away longer costs you nothing further and refreshing the app more often gains you nothing. It keeps the game inside its designed session length of a few minutes a day instead of rewarding compulsive checking.
What happens to my business if another Family takes the branch?
Your operation is not deleted. Income accrual pauses while the branch is controlled by another Family, the buy, upgrade, and collect actions report exactly why they are locked, and when the branch returns to your Family the operation rebinds and the income already banked is still there.
How many weapons does The Mafia have, and is the first one free?
There are seven weapon tiers. The Pocket .22 is free once at Level 1 so a first takeover is possible without spending, and the top tier Black Crown .50 costs $16,000 at Level 20. Every weapon has its own ammunition packs and durability that has to be repaired, so firepower is a running cost.
Does equipment in The Mafia do anything besides change how you look?
Yes. Nineteen items spread across five slots, armor, clothing, footwear, vehicle, and accessory, each carry a power bonus that the server adds into one authoritative power summary. That summary is what a takeover is resolved against, and it is the same number the rival system will use later.
Can I withdraw money from the bank in The Mafia?
Not yet. Crown Mile Bank currently accepts deposits only, with no interest, no withdrawals, and no transfers between players. Each of those needs its own rules and abuse handling, so they are being added deliberately rather than all at once.
Can I play Valdora, Morrow Bay, or Saint Corvin?
No. Vespera is the only playable city. The other three exist as read-only previews with their own Families, characters, and artwork, and no capture or control mechanics have been built for them, so nothing in the game implies you can take them.
Is The Mafia released, and does it have a release date?
No and no. Phase 3 is code complete and verified locally, but a technical alpha on physical Android devices, database runtime gates, balance telemetry, and production deployment are all still pending. Android is the first release target and there is no release date to announce.
Does The Mafia have ads or in-app purchases?
Not in the current build. The design includes diamonds and a gacha, with diamonds coming from gameplay, from rewarded ads a player chooses to watch, and from purchase, but none of that is in the build today and the ad SDK is not in the APK. When it does arrive, rewarded ads stay opt-in and no stage will require paying to pass.
