Mobile Game Achievements System Development
Achievement system isn't just "kill 100 enemies." Properly designed, it manages retention: player returns wanting to unlock achievement requiring 7 daily logins or kill specific boss. Achievements also provide long-term goals for players who finished main content.
Architecture: Local vs Server
For most mobile games architecture looks like:
- Achievement progress — client + server sync (Google Play Games / Game Center / PlayFab)
- Reward granting — server only (or Platform SDK with verification)
- Display — client
Storing progress locally only is risky: reinstall = lost achievements = negative experience. PlayFab Player Data or Google Play Games Snapshots solve this.
Data Model
[Serializable]
public class Achievement
{
public string id;
public string titleKey; // localization
public string descriptionKey;
public AchievementType type; // Counter, OneTime, Streak
public int targetValue;
public List<Reward> rewards;
public bool isSecret; // hidden until done
public string[] requiredAchievements; // dependency chains
}
public enum AchievementType
{
OneTime, // done or not
Counter, // progress 0..targetValue
Streak, // N days straight
Cumulative // total over all time
}
[Serializable]
public class AchievementProgress
{
public string achievementId;
public int currentValue;
public bool isUnlocked;
public DateTime? unlockedAt;
public bool rewardClaimed;
}
AchievementsManager
public class AchievementsManager : MonoBehaviour
{
public static AchievementsManager Instance { get; private set; }
private Dictionary<string, AchievementProgress> _progress;
private AchievementDatabase _database;
// Called from game logic
public void TrackEvent(string eventType, int value = 1, Dictionary<string, object> context = null)
{
foreach (var achievement in _database.GetAchievementsByEvent(eventType))
{
var progress = GetOrCreate(achievement.id);
if (progress.isUnlocked) continue;
switch (achievement.type)
{
case AchievementType.Counter:
case AchievementType.Cumulative:
progress.currentValue += value;
break;
case AchievementType.OneTime:
progress.currentValue = 1;
break;
}
if (progress.currentValue >= achievement.targetValue)
Unlock(achievement, progress);
}
SaveProgress();
}
private void Unlock(Achievement achievement, AchievementProgress progress)
{
progress.isUnlocked = true;
progress.unlockedAt = DateTime.UtcNow;
// Notify player
AchievementPopupUI.Instance.Show(achievement);
// Analytics
GameAnalytics.NewDesignEvent($"Achievement:Unlocked:{achievement.id}");
// Sync with platform
SyncWithPlatform(achievement);
}
}
TrackEvent is single entry point from gameplay. Adding new achievement needs only AchievementDatabase entry—no changes to combat, quest, or shop systems.
Streak Achievements
Daily streaks are one of best retention tools. Requires careful date handling:
public void RecordDailyLogin()
{
var lastLogin = PlayerPrefs.GetString("last_login_date", "");
var today = DateTime.UtcNow.Date.ToString("yyyy-MM-dd");
var yesterday = DateTime.UtcNow.Date.AddDays(-1).ToString("yyyy-MM-dd");
if (lastLogin == today) return; // already counted today
int streak = PlayerPrefs.GetInt("login_streak", 0);
streak = (lastLogin == yesterday) ? streak + 1 : 1; // reset if missed day
PlayerPrefs.SetString("last_login_date", today);
PlayerPrefs.SetInt("login_streak", streak);
TrackEvent("daily_login_streak", streak);
}
Always use UTC, not local time—otherwise player in UTC+12 could get double bonus at day change.
Platform Achievement Integration
Google Play Games and Game Center have native achievements visible in platform UI:
// Google Play Games (Play Games Services v2)
PlayGamesPlatform.Instance.UnlockAchievement("CgkI6ISmlocOEAIQAQ");
// Game Center (iOS)
GKAchievement achievement = new GKAchievement("first_boss_killed");
achievement.percentComplete = 100;
GKAchievement.Report(new[] { achievement }, (error) => { });
Sync only achievements making sense on platform. Don't duplicate all 100 in-game achievements to Game Center—only key milestones.
What's Included
- Achievement scheme design and event system
-
AchievementsManagerimplementation with Counter/OneTime/Streak types - Progress sync with PlayFab / Google Play Games / Game Center
- UI: achievement list, progress bars, unlock popup
- Reward system: currency, items, cosmetics
- Analytics of unlocks for difficulty balancing
- Localized titles and descriptions
Timeline
Basic system without platform integration: 4–6 days. Full system with sync, UI and rewards: 1.5–2.5 weeks. Cost calculated individually.







