Before Dawn: a pixel-art, turn-based roguelike
Free · English & 中文 · by Tianle Wang
Time is part of the strategy
Beats instead of turns
Every skill costs a number of beats, and heroes and enemies move along the same timeline. While an enemy winds up a slow, heavy attack, a nimble hero can slip in several quick moves. Haste and delay effects push units along the timeline, so a weak but fast skill can matter more than a strong one.

Read the intent, break the poise
Enemies show what they will do next and whom they will hit. Wear down their poise to Break them: a Broken enemy loses a beat, its armor shatters, and the next hit lands for extra damage.

A party that keeps changing
Pick four of seven heroes. Along the way they learn new skills and awaken random upgrades, collect relics and potions, and face events, shops and campfires across three regions: Rotroot Forest, Thornwood Abbey and the Dayless Sanctum.

Behind the game
I made Before Dawn in about five days, starting on October 7, 2026. I was responsible for the design, mechanics, testing and tuning; Claude wrote much of the code, and ChatGPT helped with the character art. A few things I learned along the way:
- Balancing is far harder than it looks. Skills that seem weak alone can become overpowered in combination, and once heroes, relics, enemies and random upgrades interact, tuning the whole game becomes a very hard problem.
- A language model can be a great programmer, but not necessarily a great player. It knows what every skill does, yet still makes moves no human would, which makes automated playtesting harder than expected.
- AI does not remove the cost of development; it changes what the cost is made of. Writing code is no longer the bottleneck, but design, testing, balancing and polish still take a great deal of time.
The full essay is waiting inside the game, on the About page. It unlocks after your first clear.
Notes on balancing
Most of the work after the first release went into numbers. Here are the three tools that helped most.
1. A price list for every effect
Every effect is converted into one currency, where 1 damage is worth 1 point. A skill's budget depends on how many beats it costs: 3 points for 1 beat, 7 for 2 and 11 for 3. Each extra beat adds 4, a little more than the first, because a slow skill leaves you open for longer. Ultimates aim for about 18.
- Damage 1
- Healing 1
- Armor 0.8
- Poise damage 1.5
- Weak 1.5
- Panic 1.5
- Daze 3
- Strength 5
- Delay 1 beat 2
- Delay 2 beats 5
- Haste 1 beat 2.5
- Bleed total × 0.7
- Warmth total × 0.8
- All enemies × 3.2
- All allies × 3.6
Area effects are not worth ×4 for four targets: enemies die before the last hits land, and group healing overflows.
| Skill | Beats | Price | Budget |
|---|---|---|---|
| Dread Stab: 4 damage, 1 poise damage, Panic 1 | 2 | 4 + 1.5 + 1.5 = 7.0 | 7 |
| Blood Gale: 2 damage and 1 poise damage to all enemies | 3 | (2 + 1.5) × 3.2 = 11.2 | 11 |
| Breath of Bloom: heal all allies 3 | 2 | 3 × 3.6 = 10.8 | 7, so twice per battle |
The table is a check, not a law. Its real job is to flag outliers. Daybreak, an ultimate, priced at 12 until we noticed its hero's passive (hasted allies gain Warmth) was missing from the sum. With it, Daybreak comes to 17.
2. Measuring difficulty by simulation, then by hand
Two automated players fight every boss thousands of times with random teams. One picks the move with the best previewed value per beat, the other picks at random. The hard part is modeling what a real player brings: for the Layer 2 boss, we assume at least 3 relics and 2 awakenings, worked out from how much gold and how many learning screens come before it.
Two rules of thumb came out of it. Bosses on the same footing should have similar win rates, and a 0% win rate for random play over thousands of runs means something is broken, not just hard. But simulations and people disagree: in the simulations the Wolf King looked easier than the Bishop, while in real play Layer 2 snowballs and the Bishop was easier. So simulation catches broken designs, and the final numbers come from full playthroughs with no debug tools. The final boss took five rounds against one target: a win in 32–45 beats, still in danger at the end.
| Round | Result | Beats | Survivors |
|---|---|---|---|
| 1 | Won | 26 | 4 of 4, too easy |
| 2 | Won | 30 | 4 of 4 |
| 3 | Lost | 34 | 0 of 4, silenced every other turn |
| 4 | Won | 38 | 1 of 4 |
| 5 | Won | 38 | 2 of 4, shipped |
3. Where the efficiency bonus comes from
Winning a fight fast pays its bounty a second time. At or under the "full" time you get all of it, and it falls linearly to nothing at the "zero" time. Both times come from 10,000 simulated fights per tier, played by the stronger automated player at full health, with a model of what the party has by then: 1, 2 and 3 skills per hero across Layer 1, then 3 skills plus 1–2 relics and 1–3 awakenings on Layer 2. Full is the 1st percentile and zero is the median.
| Fights | Full bonus (1st percentile) | No bonus (median) |
|---|---|---|
| Layer 1: first, middle, last | 4 · 8 · 12 beats | 8 · 18 · 24 beats |
| Layer 2: first, middle, last | 6 · 10 · 13 beats | 11 · 17 · 25 beats |
Two lessons from getting this wrong first. In v0.1 the full mark was the single fastest of 2,000 runs, one lucky outlier, so the full bonus was nearly out of reach. Percentiles barely move between runs, and the minimum jumps around. A simulation also has to model what the player actually has at that moment: the first fights are played with one skill per hero, not a finished build.
Controls
- Mouse
- Choose skills and targets; hover anything for details
- 1–7
- Pick a skill
- Right click
- Cancel
- F1
- Rules
- F11
- Full screen
- M
- Music on or off
Switch between English and Chinese on the title screen. The browser version needs a desktop browser with a mouse and keyboard; phones are not supported.
The downloads are not signed. On macOS, if the app is blocked, go to System Settings → Privacy & Security and click "Open Anyway". On Windows, if SmartScreen appears, click "More info", then "Run anyway".