The Mafia: The Asynchronous Social Game in the Mafia Wars Tradition We Are Building
The Mafia is Codiosity’s next project: an asynchronous social game for Android in the Mafia Wars tradition. You start as a small-time criminal in Vespera, a fictional five-district port city, then run missions, build businesses, and attack rivals asynchronously. This article covers the design, why every calculation lives on the server, where development actually stands, and what does not exist yet.
One genre has quietly gone missing from phones: the asynchronous social game. Mafia Wars and its contemporaries had a shape that suited busy people. You open the app, spend your energy, collect your income, upgrade one thing, and leave. No lobby to wait in, no match you have to watch to the end, and no guilt about abandoning a team halfway.
What replaced it mostly asks for the opposite: long sessions, real-time presence, and full attention. The Mafia is Codiosity’s next project, and it exists to fill that older shape in a way that is more honest underneath.
The project in brief
- The Mafia is an asynchronous social game in the Mafia Wars tradition, built by Codiosity, with an original story, city, cast, and artwork.
- You start as a nameless newcomer in Vespera, a fictional port city with five districts.
- A session is designed to finish in 2 to 5 minutes: spend energy, collect income, upgrade one thing, and get out.
- The core loop is missions, cash and XP, businesses, equipment, asynchronous attacks on rivals, and a weekly leaderboard.
- All cash, XP, energy, items, income, and combat results are computed on the server. The client only displays the outcome.
- Android is the first release target. The web build that sometimes shows up in our screenshots is an internal QA tool, not a public product.
- The design includes a gacha and a diamond currency. Diamonds come from gameplay, from rewarded ads the player chooses to watch, and from purchase. That part is still in production and is not live in the current build.
- There is no release date. Work now sits in Phase 3 of seven, while Phase 2 still waits on validation with real players before it can be called done.
Why asynchronous rather than real-time
Asynchronous means no other player has to be present at the same moment you are. You attack a rival and the server resolves it from both sides’ strength; that rival sees it in their combat log later, whenever they next open the app. Nobody is waiting on anybody.
That sounds like a limitation, but it is really a form of respect for a player’s time. Real-time games demand an unbroken block of it. An asynchronous game only asks for five minutes, and those five minutes can come from anywhere: a break at work, a queue, the moment before sleep. Energy refills on its own, one point every five minutes, computed from server time, so there is nothing to gain from staring at the screen while it fills.
Vespera, a city of five districts
The setting is not a real place. Vespera is a fictional industrial port city grown along both banks of a river, with a glowing art-deco centre standing on top of the old town. Its map is an illustrated command map rather than an open world, so you choose a destination from the map instead of walking the streets.
- The Verge: tenements, an old tram terminal, and abandoned warehouses. The neutral zone where newcomers live, and where Nadia Rowe works as an independent broker.
- Iron Quay: docks, steel cranes, and a fogged lighthouse. Where the prologue contract comes from, and home to the haulage and warehousing network.
- Crown Mile: art-deco towers, banks, and a bright boulevard. The centre of the city’s money and formal influence.
- Old Vesper: brick alleys, a covered market, and a clock tower. The centre of rumour and information, older than any of the skyscrapers.
- Cinderline: freight rail, a foundry, and depots. The contested industrial belt, where goods arrive, disappear, and reappear under a different owner.
From freelancer to a name of your own
Most mafia games cast the player as somebody’s underling forever. In The Mafia that is only the first act. Every player starts as a freelancer taking contracts through Nadia Rowe, an independent broker who belongs to no Family. A single neutral prologue contract opens the path to three NPC Families: Pier Nine on the docks, Alder House in the money district, and Lantern Market in the information trade.
Each Family’s trust is shown openly as a number that moves from 0 to 15, 30, then 50. The decision to join only unlocks at full trust, and you are free to hold off while you weigh the other offers. You do have to accept one patronage to enter the next act, but which Family gets you is yours to decide.
At Level 20 your name is big enough to found a Family of your own, with a name and an emblem you pick. That foundation exists and is stored on the server. What does not exist yet is the social half: applying, inviting, and filling a Family with real players is the next stage, and we would rather call it that than market it now.
Missions that are more than one button
The old weakness of this genre was the mission that amounted to a button and a spinner. You press "do the job", a number changes, done. Our first version worked exactly that way, and playing it felt like filling in a form.
Now every mission opens with an operation brief, then plays out as three interactive work beats with your own character on the main stage. There is an inspect-then-act rule: you examine illustrated objects at the location, examining reveals evidence, and the evidence is what unlocks the right action. Each kind of job has its own noir panorama, targets move position between rounds so the layout cannot be memorised, and something as small as reloading a revolver is given a minimum time you can feel. The outcome still comes from the server, but the route to it is now played rather than waited out.
The server holds every number, and a ledger records them
For an economy game this is the part that decides whether the product survives its first six months. Our rule is a single line: cash, XP, energy, items, income, combat, and cooldowns are computed on the server. Any prediction on the client is cosmetic. When the client and the server disagree, the server is right.
- Every change to a player’s resources runs inside a transaction with a row lock, so two requests arriving at once cannot mint the same money twice.
- Every currency change has to leave a row in the economy ledger, so there is an audit trail to replay when a report looks strange.
- Currency and XP use 64-bit integers rather than floats, because rounding money is a bug that is never funny.
- Missions, collect, upgrade, equip, and attack are idempotent against network retries, so a connection dropping mid-action does not pay out twice.
- Energy and business income are computed on read from server time rather than by a cron job per player, so more players does not mean more timers.
- Balancing values live as content data rather than magic numbers scattered through the UI, so rebalancing does not mean shipping the app again.
One codebase, three layout compositions
The screen is not one view scaled up. There are three deliberately different compositions: a single column with bottom navigation for phones, a navigation rail with two panes for tablets, and a sidebar with a context panel for wide screens. The rule is simple and written down as a spec: no core feature is exclusive to one screen size, and no core action is reachable only through hover, right-click, or a keyboard shortcut.
A deliberately boring stack
The client is Flutter and Dart. The API is Go over REST. The database is MySQL. Early production is one VPS: an HTTPS reverse proxy, one API binary, and MySQL, run as ordinary system services. No microservices, no Redis, no message queue, no Kubernetes, and no Docker at MVP.
That is a decision rather than a shortfall. A small studio running infrastructure it does not need yet will spend its time maintaining infrastructure instead of building a game. Every one of those components can be added later when a number demands it, and until that number appears, one server you fully understand beats five services you half understand.
What works today, and what does not
The roadmap is seven phases, worked one at a time. The next phase does not start until the current one meets its criteria.
- Phase 0, repository foundation and pipeline: complete.
- Phase 1, responsive shell and authentication including register, login, session restore, and character creation: complete.
- Phase 2, the first genuinely playable slice with missions, energy, rewards, and the ledger: code and automated tests complete, waiting on validation with real players before it counts as done.
- Phase 3, economy and inventory: businesses, items, equip, and a power summary.
- Phase 4, combat and leaderboard: rival matchmaking, asynchronous attacks, and the combat log.
- Phase 5, Android hardening and distribution: signed builds, a backup restore drill, and a runbook.
- Phase 6, launch readiness: balancing, onboarding, monitoring, and a staged launch.
The MVP content is deliberately bounded too: one city, 16 missions in Phase 2, ten business branches, 26 pieces of equipment made up of seven weapons and 19 items, one asynchronous combat formula, one weekly leaderboard, and the combat log. Not in this MVP slice, though some of it is planned: the gacha and diamonds, rewarded ads, purchases, gangs or clans that other players can join, chat, a marketplace, push notifications, an open world, real-time combat, a public web launch, Steam, and an iOS build.
Gacha, diamonds, and ads you choose yourself
The economy is designed in two layers. In-game cash covers the things you can calculate: businesses, upgrades, and equipment. Above it sits the diamond, a premium currency used for the gacha, and diamonds arrive by three routes: ordinary gameplay, rewarded ads, and purchase.
What matters to us is the shape the ads take. An ad only appears when you press the button yourself to earn energy, coins, or diamonds, served through Google AdMob. Nothing covers the screen mid-mission, no video plays on its own, and the game stays fully playable without ever watching one. Rewarded ads only speed things up rather than open a road that was otherwise closed.
Honestly, this whole layer is still in production and is not live in the build running today. The privacy policy for the version that carries ads and purchases is already written, ahead of the feature being switched on, so nothing changes quietly when it is. The app is intended for users aged 17 and over, given the crime setting.
Why a software house builds a game
The reason is the same one behind releasing Codi Agent for free. The most honest way to show how a studio works is to build something you can inspect, not to present a deck about it.
There is a second, more technical reason. An economy game is one of the best exercises for problems that also turn up in client products: state that has to be correct, two requests arriving at the same instant, network retries that must not pay twice, and the need to explain to a user why a number changed. The ledger, row locks, and idempotency in The Mafia are the same patterns we use when building point-of-sale, finance, or client portal systems. The difference is that here a mistake only breaks a game.
What we cannot promise yet
- There is no release date, and we would rather not name one until the distribution phase is finished.
- Android is the only first release target. iOS comes into consideration once Android has proven itself, and Windows or Steam sit further out again, even though the desktop layout already exists.
- The web build we sometimes show is a development and internal QA tool. It is not a public product and will not be marketed as a browser version.
- There are no other players inside your Family yet, no chat, and no trading between players.
- The Mafia is an original Codiosity work. It takes the shape of a genre Mafia Wars popularised, but it is not affiliated with any game, publisher, or brand, and the city, cast, and artwork are all our own.
- The city, the families, and every event in it are fictional. No real organisation or person is being depicted.
Why we are writing this now
The Mafia is still in development, and this article is deliberately written while the product is unfinished. If you are curious how a small studio decides things like this, the decisions are visible right here: a five-minute session, a server that holds every number, one VPS understood end to end, and a list of missing features written out plainly.
And if what you actually need is a team to build an app, a game, or an internal system this way, the first conversation is free with no obligation.
- Codiosity ProductsThe other apps we have shipped, from business point-of-sale to language learning.https://codiosity.com/en/work
- Codi Agent, our free desktop to-do appThe free product you can already install today.https://codiosity.com/en/about/insights/codi-agent-aplikasi-to-do-desktop-gratis-lokal-first
- Services & PricingIf you need an app or a game of your own: the service list with openly shown prices.https://codiosity.com/en/services
- Contact CodiosityA short, free chat, including questions about The Mafia.https://codiosity.com/en/contact
Frequently asked questions
What is The Mafia?
The Mafia is an asynchronous social game in the Mafia Wars tradition, built by Codiosity for Android. You start as a small-time criminal in Vespera, a fictional five-district port city, then run missions, collect cash and XP, build businesses, attack rivals asynchronously, and compete on a weekly leaderboard.
Is The Mafia the same thing as Mafia Wars?
No. The Mafia is an original Codiosity work and is not affiliated with Mafia Wars, its publisher, or any other brand. Only the genre shape is shared, an energy-based asynchronous social game, while the city, cast, story, and all artwork are our own.
When does The Mafia launch?
There is no release date yet. As this article is written the project sits in Phase 3 of seven, with Phase 2 still waiting on validation with real players. Android is the first release target.
Is The Mafia free, and does it have a gacha or purchases?
The Mafia is free to play, and the design includes a gacha with a diamond currency. Diamonds come from gameplay, from rewarded ads the player chooses to watch through Google AdMob, and from purchase. That part is still in production and not live in the current build, and the game is designed to stay fully playable without watching an ad or buying a diamond.
Can I play The Mafia in a browser or on iPhone?
Not yet. The web build that appears in some screenshots is a development and internal QA tool rather than a public product. An iOS version is only considered once the Android release has proven itself, and Windows or Steam sit further out again.
Is there real-time PvP in The Mafia?
No. All attacks are asynchronous: the server resolves the result from both sides’ strength, and the rival sees what happened in their combat log when they next open the app. No player has to be online at the same time as another.
How long is a session of The Mafia?
A session is designed to finish in 2 to 5 minutes: spend energy, collect income, upgrade one thing, and leave. Energy refills on its own at one point every five minutes based on server time, so watching the screen does not speed anything up.
Does The Mafia have gangs, chat, or a marketplace?
Not yet. Gangs or clans that other players can join, chat, and player-to-player trading are outside the MVP scope. Players can already found their own Family with a name and emblem at Level 20, but applying and inviting other players is the next stage.
Who makes The Mafia, and with what technology?
The Mafia is built by Codiosity, a Jakarta-based, remote-ready software house. The client uses Flutter and Dart, the API is Go over REST, the database is MySQL, and early production runs on a single VPS with no microservices, Redis, message queue, Kubernetes, or Docker.
