Menu

Designing streak rewards that don't pay for commit spam
📰

Designing streak rewards that don't pay for commit spam

DEV Community: java·Vishal Pandey·6 days ago
#XPBsccUl
#devtojava#devto#dev#verified#return
Reading 0:00
15s threshold

Streaks are a strange design problem. The moment you reward people for showing up every day, you also reward them for faking it.

GitHub's contribution graph is the classic example. A green square for an empty commit looks exactly the same as a green square for a real fix. So when I started building Vigilante, a free browser game where your GitHub pushes open the next day of the story, the reward rules mattered more to me than the 3D city did.

This post walks through the rules as they exist today, and why each one is there. The code is a simplified sketch in Java (my day job language) to show the shape of the logic, not a copy of production code.

The rule everything else hangs on: one verified day

You pick one repo and a daily commit target. When GitHub sends a push webhook for that repo, the game checks the commits. If enough of them are meaningful, that day is verified, and the next day of the game opens.

"Meaningful" is doing a lot of work there.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.