Fix a daily login streak that resets by mistake or can be claimed twice in a day
Players lose a long streak because they travelled, played just after midnight or changed the clock, and others collect twice. Timestamps are the trap here. This entry shows how to make the AI compare calendar days instead and give a fair rule for a missed day.
Why this works
People think in calendar days, not in hours. Comparing the day on the calendar gives the answer a player expects, while elapsed hours depend on clock time, travel and settings that have nothing to do with whether they came back today.
When not to use it
Skip it if the game is played against other people in real time, where the exact moment matters, or if the reward is a limited event with a fixed start and end. There a countdown in hours is the honest rule.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 24 lines of example code with 5 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Fix a daily login streak that resets by mistake or can be claimed twice in a day" (read_entry daily-reward-streak-breaks-wrongly) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP