Game Development Reference
In-Depth Information
mildly incompatible. Values within 10 points of 0 are too low to be accurate
predictors of future relationships. Values in the teens are strong predictors, but
smaller values less so. The simulation is slightly biased toward positive rela-
tionships due to the bonus term when both parties need an activity. Taylor is
more likely to have positive relationships because Taylor likes nearly everything.
Taylor's partners might not share that view, but in general, Taylor is a positive
person in this run. Between Taylor and Morrill in parentheses is how they
feel about each other. Taylor's score for Morrill is next to Taylor's name, and
Morrill's score for Taylor is next toMorrill's name. Since they have not interacted
yet, both are 0. These are the two values that are added to get the R รพ R number
out front.
Scroll through your output. If no two people have a compatibility value in the
teens (including in the negative teens) or larger, the interactions might not
produce strong results. Click the People button and the Dump button a few times
to get an interesting set of people. A compatibility score of 17 can produce twice
the relationships score of a compatibility of 12. To see this, we will have to make
our people interact. Add the following code to the Cruise class:
'Have two people interact.
Private Sub Interact(ByVal PersonA As Person, ByVal PersonB As Person, _
ByVal Need As String, ByVal Activity As String)
Dim RCa As Integer
Dim RCb As Integer
Dim bonus As Integer = 0
'We like it more if we both need it.
If PersonA.NeedsSome(Need) And PersonB.NeedsSome(Need) Then bonus += 1
RCa = PersonA.Likes(Activity) * PersonB.Likes(Activity) + _
PersonA.Likes(Activity) + bonus
RCb = PersonA.Likes(Activity) * PersonB.Likes(Activity) + _
PersonB.Likes(Activity) + bonus
Debug.WriteLine(PersonA.ShortDump & " tries " & Activity & "(" & _
PersonA.Likes(Activity).ToString & ", " & _
PersonB.Likes(Activity).ToString & ") with " & _
PersonB.ShortDump & " result (" & RCa.ToString & ", " & _
RCb.ToString & ")")
PersonA.UpdateRelationship(PersonB.name, RCa)
PersonB.UpdateRelationship(PersonA.Name, RCb)
PersonA.EaseNeed(Need)
PersonB.EaseNeed(Need)
End Sub