My Village Simulator

Started by
5 comments, last by Srekel 19 years, 9 months ago
I have started to work on a village simulator. It is slightly similiar with the Settlers games, if you're familiar with those. So, what is my Village Simulator? It is a program that generates a number of different jobs/professions. These are currently static and hardcoded, but hopefully that will change. Every job has a list of resources it needs, and a list of resources it provides. For example, the farmer needs tools and provides grain. The cook needs grain and provides food. When the jobs are set up, about 40 people are created. Each person also has a list of needs (and shuold have a list of things he/she can provide but that is not currently implemented) which currently says that a person need one unit of food, and somewhere between zero and two units of culture. When a person is old enough (currently 20 years old), he chooses a profession depending on what the village needs! This means that they will always make sure that there are a surplus of every resource. The problem however is that people retire (and later die), which sometimes unstables the resource management. This is of course not a bug, it's a feature! :D I have yet to actually do something about the lack of resources, but it's interesting to see how the next ones to choose jobs try to stabilize thing again. Each year, there is a chance for every combination of man and woman to become a couple. Couples may later become married couples. Each of these can give birth to babies (the chance is bigger for the married ones) which will grow up over time and contribute to the village. The names of the babies are currently randomly generated to add some personality :) When it's done (it simulates about 100-200 years), it prints out all the stuff to a HTML file with some nice color coding. :) There are lots of things that I'm going to implement, like real families and hopefully a money system somewhere down the road. Stuff like diceases (?) and accidents should also happen randomly. It is not really a game, yet, because there is no user input (unless you edit the code :)), but it is still quite interesting I think. It is written in Python, and there is currenly about 430 lines of code all in all, which IMO is quite impressive given the complexity of the program :) I'm not saying that the code is very complex, or that I'm a great coder, but I think that the program is quite cool because of what it pulls off :) What are your opinions? Is it cool? What could be added? You can download Village Simulator HERE!
------------------"Kaka e gott" - Me
Advertisement
I like it. Projects like this always intrigue me.

I think it'd be neat if you actually generated certain characteristics about people as they are born. Perhaps physical attractiveness, charisma, physical prowess etc and even such things as alcoholism and gambling problems which would then have an effect on who (if any) they mated with, if they divorce/remarry, how many children they have, whether they are successful etc. Granted that's sort of a tangent to what you're presently doing, but I think it'd add amazing depth with not too much work.

An interesting discussion here some time ago on generating characters took place here.

Cheers.
If a plant cannot live according to its nature, it dies; so a man.
Sounds interesting. I also like that kindof stuff. You could go somewhere with this if you could figure out someway for the users to interact that is fun... Also it would need a cool graphic display.

Ideas for interaction:

Build Universities that allow more professional development like engineers that increase the food farmers can produce ect.

Have a no TV day which causes couples to have ... couple time. Thus increasing the population :>
Interesting program. Ages need to be checked though I think.

Miss 28 retired in year 14 aged 60.

Afer getting married she had a child in year 24. I don't think any woman can have children at 70.

Edit she had another child at age 80. :)
That's awesome, i am actually trying to design something similar to this. But why do you have negative supplies? I had -15 grain. I thought that was a little strange. I don't see how 45 was produced but 60 were used. You should implement a starving feature or something. All in all, great work. This can go places :D

And just curious, how long did it take you to make this?
Quote:Original post by Alvarny
Interesting program. Ages need to be checked though I think.

Miss 28 retired in year 14 aged 60.

Afer getting married she had a child in year 24. I don't think any woman can have children at 70.

Edit she had another child at age 80. :)


Hehe. Yeah, I need to fix that. Won't be too hard. :)


Quote:Original post by DigitalChaos
But why do you have negative supplies?


Well, I guess simply because I haven't done anything about it yet. Hopefully a negative value limits will mean that the worker can't use those resources and thus produce less things. I will implement some kind of starving feature, and the more food in the village, the better. For example, if there is just enough food for the villagers, they should almost be starving and thus not as likely to have kids, and won't be able to work as well.


Quote:
And just curious, how long did it take you to make this?

Lemme see. I started doing it because of this thread:
http://gamedev.net/community/forums/topic.asp?topic_id=257690
My post is dated 7/18/2004, which means about four days. I guess I have spent somewhere between five and ten hours per day, I'm not really sure.
------------------"Kaka e gott" - Me
Quote:Original post by Woodsman
I like it. Projects like this always intrigue me.

I think it'd be neat if you actually generated certain characteristics about people as they are born. Perhaps physical attractiveness, charisma, physical prowess etc and even such things as alcoholism and gambling problems which would then have an effect on who (if any) they mated with, if they divorce/remarry, how many children they have, whether they are successful etc. Granted that's sort of a tangent to what you're presently doing, but I think it'd add amazing depth with not too much work.

An interesting discussion here some time ago on generating characters took place here.

Cheers.


Yup, characteristics is something I hope to implement soon. It would, as you said, add amazing depth. :)
I've already thought of a way to generate characters (in a project unrelated to the village simulator) but I'll take a look on that thread. :)

Quote:Original post by bigryanjoel
Sounds interesting. I also like that kindof stuff. You could go somewhere with this if you could figure out someway for the users to interact that is fun... Also it would need a cool graphic display.

Ideas for interaction:

Build Universities that allow more professional development like engineers that increase the food farmers can produce ect.

Have a no TV day which causes couples to have ... couple time. Thus increasing the population :>


Hehe, yeah I will hopefully soon implement a sort of view of the village soon, in 2D or 3D (depending on which is the easiest) so that you can see how it grows :) I think that would be really cool. It's not my first priority though, I wanna get a good ground to stand on first.

I've been thinking a little about engineers (researching people, making other people more efficient), but I'm not quite sure how to implement it yet.

Small random events such as "No TV Day" or "A meteor has crashed in the middle of the city, killing random() people" would kick ass :D
And should be quite easy to implement as well.
------------------"Kaka e gott" - Me

This topic is closed to new replies.

Advertisement