Food Force/Meeting Logs3
MurielGodoi, deepank, Anubhav
<deepank>There is one more thing that I would like to discuss about. There is no population parameter in the game. So, are we going to assume a constant population for the village or should we take it as a parameter. High growth rates of population in countries like India and Brazil is one reason why there are frequent draughts and famines.
<Anubhav>yes sir, We beliebe that their should be some population paramter that should be displayed during gameplay. A rise in population would then demand for more facilities, thus making the game more of real life simulation game.
<MurielGodoi>At once I also though that... it is important, but I think we can assume a constant population in our first version
<deepank>Ok we can keep it as a feature to be added; but it can be easily added ... and can depend on the level of education and family control measures being taken
<MurielGodoi>it is easily added but not so simple to code the effects.
<deepank>If a human being is being represented by an object the number of instances of human being object can be directly proportional to population
<Anubhav>I was thinking of the same, because the code needs to be changed a lot when we add that growing population factor, as it will have many dependencies with it
<Anubhav>we had made the class diagram on paper. Please check it
<MurielGodoi>The image is not so clear, but from that I can read, why is indicator just related to facilities? s/facilities/resources
<deepank>Indicator is related to resources only and not to facilties. we thought that facilities will contribute to resources and thus indirectly to indicaors
<MurielGodoi>s/facilities/resources means replace facilities for indicator.. i typed wrong
<deepank>Muriel: buying or selling resources will automatically relate to indicators.
<MurielGodoi>the village stock is different from having infra-structure
<MurielGodoi>mainly to health... we can have medicines and do not have an hospital, so hospital should have effects in health indicator, I think indicator should relate both... resource and facilities. And facilities are more important (more weigh) than resources. We also need to check the relation type,composition or aggregation.
<deepank>Yes that was one thing in which I wanted to take your opinion
<MurielGodoi>I am checking my software engenniring... my last class about that was 6 years ago :)
<deepank>What do you think
<deepank>I was thinking of a main container class containing all these objects and helping integration among all these
<MurielGodoi>maybe just association. with labels and multiplicity?
<deepank>as n resources and n indicators affect 1 indicator
<MurielGodoi>houses can affect housing and health
<deepank>I overlooked that
<deepank>How do we model it in Python
<MurielGodoi>for instance. Health indicator can have an array of (facility, weight) tuples and another one for resources. Putting weights on it we can balance the importance of facilities and resources stock in the indicator.
<MurielGodoi>Could someone list for me the Resources methods, I can't read it here.
Update_Value(string name, int value)
void Buy(String name, int value)
void Sell(String name, int value)
<MurielGodoi>by value you mean, price or quantity?
<MurielGodoi>value is a generic name.. try to make attributes name as clear as possible
<Anubhav>we wont be changing the price I believe
<MurielGodoi>Anubhav: What happens to the price when we have low quantity of some product on sale?
<Anubhav>price goes up, in the market as demand is more , supply is less
<MurielGodoi>perfect, I am trying to make you think about the scenario, not just give you the answers
<MurielGodoi>about the model... think about what you modeled in Resources class. It is a unique resouce or a entire stock?
<deepank>entire stock of a resource
<Anubhav>each object will be 1 resource
<deepank>i.e. Wood has one object and it represents entire stock of the village
<MurielGodoi>so why did you add name in all methods? In Resource there is a mix of Resource and stock methods
<deepank>Wood is the name of the resource
<deepank>What is the difference between the two?
<MurielGodoi>deepank: but in that object do you have just a string to save that
<deepank>Yes, or we can change it to a global enum for saving memory.
<MurielGodoi>deepank: so how will you handle several resources there
<deepank>Each resource will have one object; with a name associated with it
<MurielGodoi>at first every class name should be in singular otherwise you be modeling a group, not a object
<MurielGodoi>deepank: object or instance?
<deepank>We have a class Resource.
<deepank>Now it has object - Wood with name as wood and value as quantity
<deepank>Another Object Food
<MurielGodoi>so you will create 1 instance for each resource?
<MurielGodoi>if each resource have you own instance why you need name in all methods
food = Resource('food', 15)
<deepank>Actually we are introducing redundancy. We will remove the name.
<MurielGodoi>I think a class for stock should be fine. I do not understand the difference between resource and stock. stock is a set of resources, not just one
<deepank>Yes, then we can keep name as a parameter
<MurielGodoi>you just need to decide between model a stock or resources. if you are modeling a stock so you should keep the name parameter
<deepank>If we keep stock, then we will need to make all the parameters as arrays
<MurielGodoi>i think you are inclined to model a stock. in that case, you should rename your class as stock and stock should have a list of tuples (resource, quantity)
<deepank>No on the contrary, I think I should model as resource only, my habit of C programming is coming in the way :)
<MurielGodoi>so, you should rename you class to Resource (not Resources) and remove name from the methods
<MurielGodoi>you should realize that there is no unique solution when modeling
<deepank>So, the changes are: 1. Association from Facilities to Indicator 2. Remove name as a parameter 3. Introduce a model to change prices
<MurielGodoi>we will need to instantiate two list of resources: 1 for the village, 1 for the market. Each one should have their own quantity and unit price
<deepank>but price will be decided in the market
<MurielGodoi>deepank: The game engine will change that
<MurielGodoi>each facilities have a list of produced and consumed resources on each turn. we should model that.
<deepank>name should be removed
<MurielGodoi>deepank: perfect.. the same case... are you modeling a Facility not the entire city
and so on
<deepank>We have not added any production methods. Will a user be able to define this?
<MurielGodoi>not the user... the game engine, that is your next step after the model. the game engine will perform the changes on each turn.. update resources, prices, facilities and indicators
<deepank>Should a game engine decide that rice is to be grown and that too in a particular quantity? We were taking a single food item :)
<MurielGodoi>the animation and gui elements will read these that and update the screen. the user will invest on rice farm, but the rice production will be calculate by the game engine, so we can set variables like season, training, weather. now we are working on the model which will store the game data
<deepank>yes we can introduce weather and seasonal changes in the game
<MurielGodoi>the game engine will contain the definitions to change it
<deepank>So, I think Facility is fine; we need to remove the name.
<MurielGodoi>and add the methods above to allow game engine set it. facilities and Indicators should have the method 'turn', the game engine will can it to all facilities, which will update resources
<deepank>the update_value function is working as next_turn
<MurielGodoi>nice, so just rename it to next_turn, it is a clear name
<MurielGodoi>the same for the name in methods and add methods to set the weights
health_indicator.addWeight('housing ', 20)
<deepank>Weights are static information?
<MurielGodoi>yep, they will allow us better balance the game further
<MurielGodoi>Have you learned Model-View-Control model? View will be the animation and gui. model is that we are doing now and control will be the game engine
<deepank>No, not in the formal course studies. Can you give me some links for it.
<MurielGodoi>ok... I will find some links and mail you
<MurielGodoi>so next meeting monday 11:30est
1. Make code of model
2. Read up on links given by you
2. Thinking about game engine
3. contact the artwork guys