5

One thing that has always made me curious is how online games are able to process in real-time really novel or unique achievements and instantly give you a badge.

Simple things like get 10 kills or finish a level seem easy enough, but things like kill someone by shooting every bullet in your clip into one person while jumping - or something like that seems pretty crazy to program.

Do they just have a big processor that reads through real time logs of all activity and is constantly calculating every achievement - or is achievement programmed into the game itself, into the very game logic? It seems like the latter wouldn't be the case since new achievements for games come up fairly frequently.

Is there a well-established pattern or architecture for this kind of thing?

MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
  • if we take Steam as an example, then they provide an API to communicate that you accomplished an achievement, so implementation in that case would be implemented on the game side. Here in stackoverflow there is a similar thing, but they are not exactly real time, I guess there are a list of actions that occur and then an async process detecting something was accomplished (maybe badges have some kind of counter). There are several ways on how this could be implemented, but it all depends on context – Sebastian Piu Oct 06 '15 at 08:32
  • just saw these answers that look good http://stackoverflow.com/questions/2343538/implementation-of-achievement-systems-in-modern-complex-games and http://gamedev.stackexchange.com/questions/908/how-can-i-set-up-a-flexible-framework-for-handling-achievements – MonkeyBonkey Oct 06 '15 at 12:58
  • Very good question! wondering this myself. For sure that they use some sort of observer pattern, but I guess you already knew that. – melledijkstra Jun 26 '17 at 22:37

0 Answers0