Inspiration

Food Guard was inspired by the real-world challenge of reducing food waste in school cafeterias. Studies have shown that factors such as meal options, plate size, lunch schedule, and cafeteria layout significantly impact food waste. Our goal was to create an interactive and educational simulation where users could experiment with these variables in a 3D cafeteria setting to see firsthand how they influence food waste and make better decisions as cafeteria administrators.

What it does

In Food Guard, the user plays as a cafeteria administrator tasked with minimizing food waste. With a budget of $3000, the user must purchase and strategically position lunch tables, waste bins, and food bars (such as salad, fruit, and milk sections) within a 3D cafeteria model. The goal is to arrange these elements in a way that encourages students to waste as little food as possible. Additionally, users can adjust the lunch schedule using a slider to either extend or shorten lunch periods, and modify the size of the students' plates. At the end of the game, the system uses a Chat GPT API to analyze the user's choices and provides an insightful analysis of how their decisions impacted food waste.

How we built it

We started by importing assets like lunch tables and waste bins from the Unity Asset Store to create the core elements of the cafeteria. We used Blender to design the structure of the cafeteria and imported textures for a realistic feel. The user’s initial budget is used to buy tables, waste bins, and food bars like salad and fruit bars, with each element having its own properties (such as collision detection). Users can interact with the environment by selecting objects and adjusting their position using WASD controls. To make it even more impactful, we implemented a system where the position of objects influences the amount of food waste. We also integrated a Chat GPT API to analyze the user's layout choices and give feedback on how to reduce food waste.

Challenges we ran into

We faced several challenges throughout development. One of the major hurdles was integrating the Chat GPT API, as we encountered compatibility issues between the Sketchfab package (used for the 3D assets) and the GPT API. Additionally, we struggled with version control. We didn’t commit changes to GitHub often enough, which led to difficulties when transferring work between teammates. This sometimes resulted in lost progress when downloading newer versions of the project. Despite these challenges, we pushed through to complete the game.

Accomplishments that we're proud of

We’re particularly proud of the way we developed a dynamic system for object placement, ensuring that users couldn’t place tables or waste bins in overlapping positions, forcing them to reconsider their designs. This addition significantly enhanced the realism and interactivity of the simulation. We also made the object selection system more generalizable, which allowed us to easily add new assets like fridges, ovens, and microwaves to enhance the realism of the cafeteria. The integration of the Chat GPT API to analyze user decisions was another key achievement, providing personalized feedback based on the user’s cafeteria setup.

What we learned

We learned a lot throughout this process, both technically and conceptually. From a technical perspective, we gained valuable experience with Unity, Blender, and the challenges of API integration. We also learned about the importance of version control and how a lack of proper commits can lead to significant setbacks in collaborative projects. On the conceptual side, we learned a great deal about the various factors that influence food waste in schools and how small changes in cafeteria design can have a significant impact on waste reduction.

What's next for Food Gaurd

In the future, we aim to expand Food Guard by adding more cafeteria assets, such as different food options and more customizable elements. We also plan to refine the user feedback system, possibly integrating data analytics to provide users with more detailed insights into their cafeteria designs and how their choices compare to best practices for reducing food waste. We envision turning the game into an even more comprehensive simulation with multiple levels or challenges, and potentially even adding multiplayer features where users can collaborate on optimizing a cafeteria together.

Built With

Share this project:

Updates