Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Icarium

Pages: [1]
1
I just want to say thanks a lot for all your replies!
They've given me a lot to think about!
Especially Omnomnom, Snargleplax and Xlambda! You have some great points and you've opened my formerly stuck mind, so I'll be re-reading your posts as soon as I have the time :) (lots of work coming up the next couple of weeks)

Also, requerent has a good point. Maybe I should explore different data structures for different purposes...!

Thanks again!
So I'll report back when I have something to report!

2
Hello fellow roguelikers! :)

One of my hobbies is toying around with making a couple of RL games, and in one of them I need to (or, would like to) procedurally generate one or more large families, but I'm having trouble figuring out a nice way to do it.

What I want to do is basically start with one or more ancestors, and build a (realistic) family tree from there.

For example, I start with Bob and Jane Smith who get married in 1850. Then I give them 1 or more children, and each of those children will get one of the following fates:
a) meet a spouse, but have no children
b) meet a spouse, have one or more children
c) forever alone
(there could of course be other possibilities, but I'm trying to keep it fairly simple for now)

if b) then repeat the same procedure with each child, until we get to present day (i.e. start of the game).

Oh, and to further complicate things: each person's spouse could be from one of the other procedurally generated families in town! Or it could be someone unrelated, e.g. an immigrant.



Or, in other words, what I'm trying to accomplish is to generate/simulate the population in a small town/village over a couple of hundred years. Dwarf Fortress & Toady One seems to be able to do this on a large scale, so I'm hopeful that it's possible for a hobby amateur programmer like me to do it on a very small scale....?!

I've tried a couple of simple approaches with recursive functions, but quickly got stuck in infinite loops... Also, keeping track of fathers, mothers, children, siblings and other relations quickly becomes a mess. (Btw, I'm programming in C, and using a ton of pointers for this.)

So I would really appreciate some input, thoughts and fresh ideas on this issue, if anyone has any! I feel like I've painted myself into a corner and can't find a way out. Maybe someone else is able to see a way out? I'm sure there are many different approaches to solving this problem, but right now I can't see them...

Thanks in advance for any input, ideas and thoughts!

Pages: [1]