-
Anyone interested
Hello Everyone!
I was interested if anyone wants to help me or lead me into a right direction for this very interesting and a bit difficult program that I would like to do!.....Basically create a town!....I will not go into detail unless people are interested in working together to figure this out!
Is anyone interested?
-
Was your name censored or something?
-
No I did that myself!...Did not want anyone to complain about it
-
3D modelling application to create the town? r/t ogl rendering?
full animation tools?
or an online / networked application to create a mmorpg?
create a town does not really give enough information to catch anyone's interest.
-
Creating a town in C++.
Class: How the village works
-70 food portions in the village warehouse
-no homes
-population 1 year at a time
- program runs until the user wants to stop, the town dies or the town reaches 100 years old
Main Program: have to make a class of these with attributes and methods.
Class: How they survive
-The begin of the year make a draw that contains the entire habitant and by this we found out if the habitant will survive for that year
-probability to survive for the builder and the baby machine is 90%. Cooks will survive only 85%. The probability to survive the whole year goes down by 6% if there is less then 1.7 food portions for one habitant.
- A dead habitant turns from living to dead but the soul stays, dead habitants don’t get old eat have babies build homes or cook. You don’t make a draw for the dead
Class: Giving birth
-Baby donors job is to make babies for the village with the help of three storks.
-Giving birth is carried out by making a draw whether or not the baby machine is going to have a baby or not.
-In one year the baby donor has a baby with the probability of 70:100
-If there are at least 0.5 homes per habitant the probability to have a baby grows by 5 percent (75:100)
- Every time the baby donor gives birth, they send a message to the storks and one will go to the baby donors, there are three different species of the stork and only one lives in the village at a time. Type of child depends on which species of the stork responses. spoonStork –brings a new cook to the village and roofStork brings a new builder.
-babyStork comes around 40% of the time when asked, spoonStork 35%, roofStork 25%.
Class: Food
- Every cook should make 30 food portions to the village warehouse in a year. Some of the portions ends up in the cooks own mouth. But the cook has a sweet tooth which varies from 0-5 depending on the cook, and this way it corresponds to the yearly food portions loses.
- As well as the cooks sweet tooth each habitant takes 3 portions of food from the warehouse.
- The amount of food portions that is in the village’s warehouse affects how many people die in the village.
Class: Homes
-Every builder that works builds 6 homes in one year.
-Builders retire at the age of 15-25.
-A draw will determine the exact retirement age of a builder which will be 15-25 as soon as they are born.
- The builder that has retired stops building homes but still eats also the retired builder well find out his death rate in a draw every year.
-Every ten years two homes will be destroyed in the village assuming that there are more then two homes in the village at that time. The quantity of homes affects the death rate because there are not enough houses to live in.
-Name the village and the first habitant after that lives in the village continues one year at a time when the user presses enter, user must have possibility to terminate the program. The program ends automatically when the village is 100 years old.
-When a child is born, tell if it is a boy or girl and ask the user to give the baby a name. When a habitant dies you print a testimonial which includes name and age. If a died baby machine has kids alive you print there names with the testimonial and the title is “We miss you”. When a cook dies the whole village will know how much the cook over ate from the warehouse
-The program prints out a statistic at the end of every year, the statistic shows the age of the village the date in years, the quantities of homes, and food portions as well as quantities of newborns and the dead and that has to be in male of female form.
- When the last habitant of the village dies, you print out a announcement that the village has died and a list of the people who lived in the village.
-
Sounds quite intersting. You must have put a lot of thought into this already. What plans have you made? Have you pre-written any presucode?
I take it will either use OpenGL or DirectX on WIn32. Although it is possible, it would look very basic as a console application project
-
I would go with the OpenGL approach, then you can easily port it to every other os in the future.
might be an idea to implement as a client erver, for latter expansion and to enable networked play.
[ the additional info suggesting a first edition game similar to Civilization ]
-
Basically I sort of took the idea from Warcraft and Civilization....Yes I did take a bit a time to come up with it but I was just thinking it would be good to get some help with it cause it is going to be big!...So if anyone has some code or anything please post it here and then we can work on this together!
-
Sounds like Black and White 3.
-
>Sounds like Black and White 3.
Never played that one. I had the first one where you are "God" and control a hand. Got quite far then it froze. it was second hand when I bought it.
-
Alright this is what I have so far!....Anyone what to help continue it?
Code:
#include <iostream>
#include <cstdlib>
#include <ctime>
#include "const_variables.h"
#include "CVillage.h"
#include "CInhabitant.h"
#include "CbabyStork.h"
#include "CspoonStork.h"
#include "CStork.h"
#include "CroofStork.h"
CVillage::CVillage()
{
unsigned short usC;
srand((unsigned)time(0));
maxAge = VILLAGE_MAX_AGE;
currentAge = 0;
startYear = rand()%(int)VILLAGE_MAX_START_YEAR;
currentYear = startYear;
foodPortions = VILLAGE_INIT_FOOD_PORTIONS;
houses = VILLAGE_INIT_HOUSES;
totalPopulation = 0;
Stork = 0;
Stork1 = 0;
Stork2 = 0;
Stork3 = 0;
for(usC = 0; usC < VILLAGE_MAX_INHABITANTS; usC++) { Inhabitants[usC] = 0; }
villageBirth();
}
CVillage::~CVillage()
{
}
void CVillage::villageBirth()
{
std::cout << "Give the town a name (max 50 letters): ";
std::cin >> name;
std::cout << "\n\"" << name << "\". Is the year " << currentYear;
std::cout << currentYear + maxAge << " What point the town is " << houses << " house and food " << foodPortions << " amount. ";
std::cout << "How much the town fits " << VILLAGE_MAX_INHABITANTS;
std::cout << "\n\n";
system("pause");
villageLive();
}
void CVillage::villageLive()
{
Stork = Stork1->bringStork();
Inhabitants[totalPopulation] = Stork1->bringBaby();
Inhabitants[totalPopulation]->inhabitantDeath();
totalPopulation++;
/*
->getOccupationID() -> 1 Birthgivers, 2 Cooks 3 Builders
while(1)
{
std::cout << "\nVillage has lived a year...\n";
}*/
}
void CVillage::villageDeath()
{
std::cout << "\nVillage has died...\n";
}
CStork* CVillage::callStork()
{
return 0;
}
unsigned short CVillage::maxAge = VILLAGE_MAX_AGE;
const float CVillage::foodToIncDeath = (float)VILLAGE_FOOD_PER_INH_TO_INC_DEATH;
const unsigned short CVillage::deathInc = VILLAGE_DEATH_INC_PERCENT;
const float CVillage::housesToIncBirth = VILLAGE_HOUSES_PER_INH_TO_INC_BIRTH;
const unsigned short CVillage::birthInc = VILLAGE_BIRTH_INC_PERCENT;
-
sounds interesting, if i were capable and had enough time i would deffinately help. i had an idea/day dream lol similar to this but with having a network, using AI for each individual of the village/town to see how they react, and what happens. although i know this is limited to current AI know-how,