Game Development Reference
In-Depth Information
Our monster provides better feelings when the feelings are controlled in their
own FSM. We still use the simple display techniques, but we improved the
emotional model. Our monster is not very sophisticated, so an FSM fills its
emotional needs easily.
Now that we have a separate emotional model, we can use the emotional state to
influence the behaviors of the AI. We are attempting to directly express emotions
with color, but we can also indirectly express emotions with altered behaviors.
Direct expression of emotion is more accessible to the player, but indirect
expression may be more accessible to the AI programmer. Good AI practice is to
attempt both; if the player sees that an AI character is visibly angry, the player will
expect the AI character to act angry as well. (See Exercise 3 at the end of the
chapter.)
Modeling Needs and Relationships
For our final project, we will model needs and relationships instead of modeling
emotions directly. As with The Sims , meeting needs through shared interests will
build relationships. Our project purports to be the social director of a cruise ship.
The director mixes people into pairs to share activities together. The director uses
a mix of intentional and random elements when selecting matchups and activ-
ities. The director makes sure that people with strong needs get those needs met.
The director randomly picks partners for the people with strong needs. The
activities are selected at random from those activities that will meet the need.
Over time, the interactions will build relationships. Let us examine the details
needed to make this general description clear.
We will model only three needs: exercise, culture, and dining. Everyone starts
with random values for each of their three needs. Needs can range from 100 to
þ 100, with negative values implying an unmet need and positive values implying
a met need. We will make sure that everyone starts with the sum of all of their
needs equal to zero. This is a design decision that is tunable. We also will limit the
initial range of any one need to 20 to þ 20, another tunable design decision.
Each turn, every need is reduced in value by 10. Every time a person does an
activity, the corresponding need is incremented by 30, exactly balancing the net
drop to be zero, keeping our system in balance.
Each need will have three activities that meet that need. Exercise is met by
swimming, tennis, and working out. Going to the movies, on a tour, or to a play
meets the culture need. The available dining pleasures include French cuisine,
Asian cuisine, and pub fare. We will keep these activities in a mini-database.
 
 
Search Nedrilad ::




Custom Search