Ishadijcks/Ishadijcks.github.io

[Disccusion] Achievements!

Closed this issue · 7 comments

So as with every game, this game needs achievements.
Achievements are awesome.
I want to implement around 500 of them, because that's cool.
I haven't found a way to do it efficiently yet, but I want each achievement to give a bonus to money/exp gain. Having all achievements will give you a +100% bonus.

Below we can compile a list of all possible achievements.
It is possible for some stats to appear multiple times.

Gain total money (5x)
Have money (5x)
Gain total tokens (5x)
Have tokens (5x)
Gain total quest points (5x)
Have quest points (5x)
Gain diamonds (5x)
Have diamonds (5x)

Each gym and E4:
Defeat 1/10/100/1000 times.

Each dungeon:
Clear 1/10/100/1000 times.

Each route:
Defeat 100/1000/10000 pokemons.
Hatch eggs 1/10/100/1000/10000 times.

Defeat Pokémon 100/1000/10000/100000/1000000 times.
Capture Pokémon 100/1000/10000/100000/1000000 times.
Click 10/100/1000 times.
Find items 1/10/100/1000/10000 times.
Have Pokemon Attack: 100/1000/5000/10000/25000
Dig items 1/10/100/1000/10000 times.
Dig deeper 1/10/100/1000 times.

This already is 40 + 65 + 40 + 75 + 5 + 10 + 3 + 5 + 5 + 5 + 4 = 275 achievements :)

Aegyo commented

Total time played
safari things
berry farm things
Gain shards
Unique pokemon
Quest related achievements
Total upgrades
Finish dungeon/gym in under x seconds

Hhhhhh: "Now is not the time to use that" Activate the Fishing Rod while in town
Hhhhhh: "I just can't right now" : skip X quests in a row

What is the best way to check for quests tho?
Since you don't want to check for quests every game tick. That can become quite intensive.
Is it possible in js to give an object a compare attribute. for example achievement.parameter = function(){return player.money >= 1000}. Then you can evaluate that for every achievement, and if it's complete show a notification and remove it from the array.

Why do it in the better-quests branch?

@Ishadijcks , I'll make a call to progressAchievement function in progressQuest function, nothing more.

Aegyo commented

You can reduce the number of comparisons by not checking eg 100/1000 gym defeats if you haven't gotten the achievement for 10 yet

@Ishadijcks Check for quest achievements everytime a quest is completed?