Inspiration
Most daily games are over in a minute and you play them alone. I wanted a daily game that a community plays together, with a reason to come back in the evening as well as the morning: one shared boss, one health bar, and a city of your own that keeps growing between raids.
What it does
Sublords is a 3D city builder and raid game that runs inside a Reddit post.
- You play first. Tap the post and you are in a short guided fight. You pick a city afterwards. There is no tutorial wall.
- Boss of the Day. Every day the app posts a new boss city. The whole subreddit attacks the same city and shares one health bar, which shows on the feed card. When one of its five phases falls, everyone who helped opens a chest. There is a daily leaderboard, and a pinned war-room comment where you can choose to share your score.
- Raids. Drop five kinds of troops on the roads and spend Karma mid-fight: rally your troops, heal them, or delete a building. A raid lasts at most 90 seconds.
- Defences that answer back. Lightning that jumps between bunched-up troops, a beam that heats up on tanks, shells for swarms, hidden road traps, and an HQ that fights for itself. Every city has to choose its mix.
- Your city. Collect, build, upgrade and arrange defences in one of four districts. Daily quests, a seven-day gift and a chest give you something to finish each day.
- Other players. Raid real players and bot clans, watch a replay of whoever attacked you, and take revenge.
How I built it
Devvit Web, with React for the HUD, Hono on the server and Redis for cities, leaderboards and the shared boss. The 3D city, raids and world map are three.js. Every model, texture, sound and piece of game music is generated in code.
The battle is a deterministic simulation that runs ten times a second and is shared by client and server. The client sends only its drops and powers, and the server replays them to work out the result. The same replay is what you watch in your city log.
Challenges I ran into
- Phones. My first version drew about 540 objects per frame in a fight. With the processor slowed four times, it ran at 12 frames a second. Merging meshes, drawing each troop as one mesh and lowering quality automatically brought that to 32–47.
- Balance. I wrote a simulator that fights many raids with different armies. It showed that percentage healing made one troop unbeatable, so I changed it. A mixed army now beats any single-troop army at the top level.
- Feed loading. The feed card paints first and loads the 3D engine afterwards.
Accomplishments I'm proud of
A full 3D base builder that opens inside a post, a shared boss that gives a whole subreddit one goal for the day, and a first session that starts with playing.
What I learned
Good looks did not make the game engaging by themselves. Playing it honestly showed me that what was missing was decisions during a fight, a first minute with no menus, and a reason to come back. Powers, the guided raid and the shared boss came out of that.
What's next
More boss types, weekly events for whole communities, and trophy flair for players who want it.