Game Development Reference
sufficient reserves. The simulation is more pleasing with the times-two setting.
The 2.5 value for Gain in Stunt Show has a very narrow band of values between
spoiling Day Job and never being selected by anyone. The caution here is that
tuning is required, even in a relatively simple system like this one. The good news
is that the system can be tuned without heroic effort.
The people and occupations in this simulation were developed together, with
each occupation aimed toward at least one particular person. When the simu-
lation runs, the people sometimes opt for other occupations that were not
explicitly tuned for their selections. These behaviors show up, or emerge, from
the simulation. Emergent behaviors are a blessing and a curse. They are a blessing
because they are free complex outcomes from simpler parts. They are a curse
because there are no direct controls on the behaviors, and the system must be
extensively tested to ensure that all such behaviors are pleasing.
The basic game is straightforward. We need to create jobs and a simulation to use
them. That code will be employed by the AI we implement later so that it can act
on the decisions it makes. We start with the project itself.
1. Launch Visual Basic.
2. Create a new Windows Forms Application and name it DayInTheLife.
3. Double-click My Project in the Solution Explorer, click the Compile tab,
and set Option Strict to On. This option forces the programmer to make all
type conversions explicit.
4. Rename Form1.vb to MainForm.vb.
5. Right-click DayInTheLife in the Solution Explorer, select Add ? Class, and
name the class Job.vb.
6. Add another class, named Person.vb.
7. Click the File menu and choose Save All.
We have all the files we need. We will hold off on the user interface until we have
more of the underlying code completed.