I collaborated with Trevor on this project and we adapted each other's frontend and backend code
Our project is a baking game called LMC where you bake recipes and buy ingredients from the shop. To make the game feel more realistic we added inflation because everyone loves inflation. We made use of historical data on inflation in the US to train a model to predict inflation in the future using linear regression and applied it to our shop prices in the front end. After 10 seconds passes in the game, another month passes and the frontend sends a POST request containing the new date to then fetch the new inflation rates.
With inflation added to the game users will be more incentivized to bake more and more to keep up with the rising inflation costs and be able to continue to buy ingredients.
Future improvements
As inflation increases, the user also receives more points when they bake baked goods because they'll sell their baked goods for more.
Increasing inflation based on other factors other than what the date is. In real life, inflation increases for numerous reasons, so we may implement a rise in prices as users on the website buy products more, then raise the prices accordingly for everyone on the website.
Also slowing down the inflation, currently, after a few minutes on the shop pages banana prices skyrocket to 62 dollars. After a few more minutes, bananas become a rare commodity reserved only for the richest of the rich.
Initial Points
Initial date and prices
As time goes on the prices of the goods increase based on predicted inflation amount
Schema change in backend after purchasing ingredients
Meat and Bones of the Code
Backend Model
Initialization
Cleaning up the data to make the data usable
Linear Regression
Predicting Inflation Function and Converting array to 2-dimensional
CPT Project Integration
I collaborated with Trevor on this project and we adapted each other's frontend and backend code
Our project is a baking game called LMC where you bake recipes and buy ingredients from the shop. To make the game feel more realistic we added inflation because everyone loves inflation. We made use of historical data on inflation in the US to train a model to predict inflation in the future using linear regression and applied it to our shop prices in the front end. After 10 seconds passes in the game, another month passes and the frontend sends a POST request containing the new date to then fetch the new inflation rates.
With inflation added to the game users will be more incentivized to bake more and more to keep up with the rising inflation costs and be able to continue to buy ingredients.
Future improvements
As inflation increases, the user also receives more points when they bake baked goods because they'll sell their baked goods for more.
Increasing inflation based on other factors other than what the date is. In real life, inflation increases for numerous reasons, so we may implement a rise in prices as users on the website buy products more, then raise the prices accordingly for everyone on the website.
Also slowing down the inflation, currently, after a few minutes on the shop pages banana prices skyrocket to 62 dollars. After a few more minutes, bananas become a rare commodity reserved only for the richest of the rich.
Initial Points
Initial date and prices
As time goes on the prices of the goods increase based on predicted inflation amount
Schema change in backend after purchasing ingredients
Meat and Bones of the Code
Backend Model
Initialization
Cleaning up the data to make the data usable
Linear Regression
Predicting Inflation Function and Converting array to 2-dimensional
API
Frontend Code
Fetch Request