Inspiration

This project was inspired by our desire to create an application that utilized our two main areas of study (outside of strictly computer science), game design and statistics. We took large amounts of inspiration from idle games like Cookie Clicker and Adventure Capitalist for the core gameplay loop. The inspiration to incorporate ARIMA forecasting came from the concepts explored in STA 137: Time Series Analysis at UC Davis.

What it does

The game pulls historical mortality data from the CDC WONDER database to generate real-time, recursive forecasts of annual U.S. deaths from major physical and mental health issues. The projections are dynamically visualized on the right side of the screen, allowing players to watch trends evolve over time. Meanwhile, players can click the Donate button to generate funds, which can then be spent on upgrades. Each upgrade has different effects — some increase donation output, while others actively reduce the number of predicted deaths in the models, allowing players to combat the forecasted rise in mortality.

How we built it

The game was developed in Unity, with all UI and gameplay logic handled in-engine. We built a separate Python FastAPI backend hosted on Render to handle forecasting. Unity sends periodic HTTP requests to the API, which returns ARIMA-based forecasts for each health condition. These models are custom fit to each specific health time data. These values are then visualized in real-time using dynamic graph components in Unity. Historical data from the CDC was cleaned and preprocessed in Python, then imported into Unity to seed the initial state of each forecast model.

Challenges we ran into

The main issue we faced was that when the app was built (via Windows and WebGL), HTTP requests sent to the API are not received. This functionality is still missing from the most up to date version which only allows the app to run without any issues in the unity editor.

Other challenges include coming up with an idea that meaningfully combined game design with time series forecasting—two very different areas of study. Setting up the API backend was also tricky. We went through several iterations and had to redesign the architecture multiple times to ensure smooth integration with Unity. Additionally, the free hosting plan on Render introduced limitations in request speed, which would slow down the forecasting updates.

Accomplishments that we're proud of

We're proud of how clean and functional the user interface came out. The gameplay loop is effective and engaging in a way similar to other games in the idle clicker genre.

What we learned

We learned how to host and interact with an API backend, improved our Unity development and UI design skills, and gained hands-on experience implementing ARIMA time series models in Python.

What's next for HealthCare Capitalist

Next steps could include incorporating additional health-related datasets to expand the range of visualized conditions, adding more upgrades and abilities to deepen gameplay, fine-tuning game balance and scaling, and integrating larger datasets for more accurate and responsive forecasting. Further enhancements might also explore alternative forecasting models to compare trends across different methods.

Built With

Share this project:

Updates