<br>On 28 August 2011 01:23, Warner Onstine <span dir="ltr">&lt;<a href="mailto:warnero@gmail.com">warnero@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
As a player I have:<br>
- a list of badges I am in progress of completing<br></blockquote><div><br>And also a list of badges a player already has, to avoid acquiting it over and over again.<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

- something I&#39;ve just done that could go towards one or more of these badges<br></blockquote><div><br>The &quot;or more&quot; is essential. I can imagine that certain things need to be done more than<br>once. Is that so?<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Within the game there are:<br>
- a list of potential badges that a player could earn<br>
- with a set of things to do to earn each badge (what I&#39;m considering the rules)<br></blockquote><div><br>Notice that the definition of a badge and how to earn it is very similar to what has<br>to be recorded for a player&#39;s progress.<br>
<br>It is certainly possible to write a rule for each badge to determine whether a player<br>has achieved it. But it could be much simpler if all achievements are tallied individually,<br>because then rules just need to check for each badge whether a player&#39;s achievements<br>
match the badge&#39;s requirements; this can be done with a single rule.<br><br>-W<br><br><br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<br>
In short I don&#39;t want to have to go through each thing each player has<br>
done and try and determine which rule to run, I just want to pass in:<br>
- their set of badges (with steps they&#39;ve completed so far)<br>
- what badges are available to earn (to match against)<br>
- what they just did<br>
<br>
Maybe I&#39;m thinking about this the wrong way and there&#39;s an easier way<br>
to do this. Still trying to figure the best implementation of the rule<br>
and rule set. My goal is to load all the rules at load time (and<br>
reload when I add a new badge) so that I have a full knowledgebase and<br>
can just run it whenever someone does something in the game.<br><br></blockquote></div>