I've been working on a similar game, and while it's been fun - I'm also struggling with the detail level. If you try and start out with some very basic lives scetched out, and some sensible parameters of life, you actually get something up and running pretty quickly (provided you have thought a minute or two about the size of game world and population to simulate in relation to your average PC memory!)
For one thing, I find that no matter how more complex you make the life simulations, they still end up either boring and mondane (unrealistically so), or simply totally unbelievable.
You need both time-relative statistics of lots of complete areas of a real world, and a proper AI (which is in skunk labs, but far from those of science fiction and not suited for our needs) to make a simulated life really realistic. But you could simulate parts of lives that are running in a "controlled simulation", where the user would choose individual persons or familys to open and control (like in Sims).
If leave you with some old pseudo-code from an earlier venture, before it got very complex and messy. It illustrates the game loop for a world simulation, where people live basic lives, get born, married and even go to war and die...
void world_sim() {
for (int year = 1750; year <= 2100; year++) {
for (int day = 0; day < 365; day++) {
// people
for (int p; p < people.count; p++) {
if (!p.is_in_coma()) p.wake_up(); // fix: prevent people in coma from waking up every jan 1st
if (day == 0 && p.age == 0) {
p.get_born();
}
// here you can plug in your behavior
p.have_breakfast();
if (p.has_job() || p.age() > SCHOOL_AGE) {
p.goto_job();
if (p.is_lazy() && p.fucks_up())
if (random < 0.1) {
if (p.is_child()) {
p.get_teacher().give_detention();
} else {
p.get_boss().warning_or_fire(p);
}
}
p.go_home();
}
// plug in behavior
p.do_random_stuff();
// plug in behavior
p.have_dinner();
if (p.is_married()) {
p.argue_with_partner();
}
if (p.get_partners().count() > 0) {
p.have_sex();
if (p.is_having_unprotected_sex()) {
p.make_baby_with(p.current_partner());
}
}
// plug in behavior
p.sleep();
if (rand() * p.age > 100) {
p.die();
}
// plug in behavior
} // days
// world events
if (year % 100) major_catastrophic_event()
if (year % 50) industrial_revolution();
if (year % 25) major_war();
if (year % 4) summer_games();
// plug in behavior
// for expansion
// if (year && 20000) ice_age();
// if (year && 500) new_religion();
} // years
end_of_world();
}
It is I, the spectaculous Don Karnage! My bloodthirsty horde is on an intercept course with you. We will be shooting you and looting you in precisely... Ten minutes. Felicitations!