Suggestions for opening the Rails toolbox to design a challenge game?

Posted by keruilin on Stack Overflow See other posts from Stack Overflow or by keruilin
Published on 2010-05-27T10:44:22Z Indexed on 2010/06/02 18:14 UTC
Read the original article Hit count: 205

How would you suggest designing a challenge system as part of a food-eating game so that it's automated as possible? All RoR tools, design patterns and logic are at your disposal (e.g., admin consoles, crontab, arch, etc.). Prize goes to whoever can suggest the simplest and most-automated design!

Here are the requirements:

  1. User has many challenges.

  2. Badge has many challenges. (A unique badge is awarded for each challenge won.)

  3. Only one challenge can run at a time.

  4. Each challenge has a limited number of days that it runs. For example, one challenge can run 3 days, while another runs 7 days.

  5. Challenges can be seasonal. For example, "Eat 13 Pumpkins" only runs during the Fall.

  6. New challenges are added to the game on an ongoing basis. For example, a new challenge every week.

  7. Each challenge has a certain probability of being selected to run. For example, "Eat 10 Pies" challenge has 10% chance of being selected to run.

  8. As each new challenge is added to the database, I want the probabilities of running to change dynamically. I want to avoid the scenario where I'm manually updating a database field just to change the probability from 10% to 5%, for example.

  9. Challenges act like Easter eggs. Challenge icons pop-up at different places on the webpage.

  10. User is awarded a badge for successfully completing a challenge, but only when it's active.

  11. There is some wait time between each challenge. Between 1 and 7 days. Which wait time is random, but the probability of the wait time being short is high and the probability of it being a long wait time is low.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about design-patterns