I've done this w/ an RDBMS and have it down pretty well. I'm taking what I 
already know and trying to learn CouchDB by taking an existing problem and 
translating it to the new domain. I'm looking for advice on "The CouchDB Way" 
of getting it done...

I'm creating a game for one of my kids similar to games like Pokemon or Magic - 
The Gathering. You have a collection of items that each have different 
properties that result in a "score" depending on what happens in the game 
environment.

Let's say I have a "Wind Rider" card that is in play and that card will 
normally attack at 50pts. But during game play an unexpected event happens and 
a "Great Wind" blows through doubling the attack value of all Wind based cards 
so it becomes 100pts of attack. Really cool and so far a straightforward 
calculation.

So now we add in that there are multiple tournaments that can be running in 
that any player can participate in and each tournament can have a different a 
different scoring system (Great Wind can be 2.0 in one tournament, 1.25 in 
another, 3.5 in yet another) as well as a different likelihood (5% chance in 
one, 25% in another, etc.).

In my RDBMS model a Tournament has a Scoring System column and by JOINing to 
that in a SQL VIEW I can can then run my calcs. If performance is an issue 
(projected to be an issue at certain numbers then I will run the calcs offline 
and denormalize the data modifying the VIEW to use that so that my application 
code does not have to know anything about how the calcs actually happen.

So to recap...
+ A Tournament has some number of players who have a collection of playable 
items that have base performance characteristics and then bonuses
+ A Tournament will pit players head-to-head in a game where the highest score 
wins based on the items played and then random events that occur during play
+ A Tournament is associated with a Scoring System that determines the 
likelihood and multiplier values of each random event

We can talk about different tournament styles and schedules (single 
elimination, double elimination, qualifying into a field followed by single or 
double elimination) later... 

Comments, suggestions, hints are welcome.

Many thanks!

rjsjr

Reply via email to