What inspired us to create ArgiLife is the text-based quiz games we’ve done in the past. After looking at the prompt, we realized we could implement it in a slightly similar way and create a farming simulation game which displays how various factors (weather, soil type, soil moisture) can affect crop yield and profit for farmers.
What it does
When the game runs, the player puts in their name and is shown a welcome message. Other aspects of the game that the player must input their own value for is how many acres they want to till, how many acres they want to allocate to the four crop choices (soybeans, peanuts, cotton, and corn), and how dense they want their crops to be planted. They also must put how much fertilizer or pesticide they want. Throughout the game the player is asked how much they want to water their crops. If the player goes past the limit for any of these factors (ex. watering too much or too less, allocating too much land to crops) then the particular question restarts. The random aspects of the game which the player can’t control are the soil type and weather. For instance the player may get unhealthy soil, or extremely rainy weather and they must water and/or fertilize the crops accordingly.
How we built it
Before creating the functions, we initialized several global variables corresponding to the different values we’d need to keep track of. For instance, the player variable would be used for the player name, the moisture variable stores the water level of the soil, the density is how dense the crops are planted, the soil variable actually represents the weather, and the ssize would store the amount of land allocated to soybeans and crsize is the amount of land allocated to corn. We then use these variables in various functions that represent different factors in the farming. For instance, there’s a function for soil type which gives the player a certain type of soil using randint, and weather also uses randint to give the player a certain type of weather. We had 3 different watering functions where the player is prompted to add a certain amount of water to the crops, and they’d have to take their soil type and the weather into consideration. At the end, the harvest function would take the moisture, soil type, density, and pest treatment into account and increase or decrease the crop yield accordingly, and then the crop profit.
Challenges we ran into
We did have some merge conflicts, but we realized that in order to merge properly we had to work on only the part we assigned ourselves and commit then push before everyone could pull. We did have minor conflicts with implementing the functions: at times, we didn’t assign variables properly and had issues with the operators, but after sharing our screens on zoom we were able to locate the issues and fix them.
Accomplishments that we're proud of
We are proud that we were able to overcome the initial barriers that we faced when we first met on zoom. With none of us having participated in a hackathon before, we were really lost. However, we stuck with it and worked our way towards a submittable project that we are all proud of. Going through this project together from the beginning to end was a journey and I think everyone is proud of how we handled it.
What we learned
The most important thing we learnt this weekend was how to collaborate on a coding project. With all of our experience coming from Computer Science classes at UNC, which are normally independent, none of us had ever collaborated in this manner. We learnt how to use github to push and pull commits from the main branch. We especially learned how to deal with merge conflicts that inevitably arose during the process of creating Argilife.
What's next for Argilife
We would love to come back with more experience especially in the graphics department and find a way to animate the game and truly bring it to life. We chose to implement the Argilife concept as a text-based game as that is what fits our collective skill level. It would be rewarding, and perhaps a challenge for the future to create graphics for the game. Additionally, we would want to refine Argilife to be less abstract in some areas and use numbers that simulate real life more accurately. During the hackathon, we were limited by time, availability of information, and experience. Removing these barriers and studying statistics around crop yield, for example, will allow us to create a game that is even more true to life.
Log in or sign up for Devpost to join the conversation.