Suggestions for opening the Rails toolbox to design a challenge game?
- by keruilin
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:
User has many challenges.
Badge has many challenges. (A unique badge is awarded for each challenge won.)
Only one challenge can run at a time.
Each challenge has a limited number of days that it runs. For example, one challenge can run 3 days, while another runs 7 days.
Challenges can be seasonal. For example, "Eat 13 Pumpkins" only runs during the Fall.
New challenges are added to the game on an ongoing basis. For example, a new challenge every week.
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.
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.
Challenges act like Easter eggs. Challenge icons pop-up at different places on the webpage.
User is awarded a badge for successfully completing a challenge, but only when it's active.
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.