Inspiration
Midnight Menu is inspired by cozy cooking games, and a late night coding session! During some nights, the breezy air smells a certain way and evokes fond memories. I thought that a game built in the same style, where customers come to players with their own memories/feelings, would bring about the same cozy feeling.
What it does
Midnight Menu is mobile-focused, and is a browser game in which the player serves three customers unique meals based on their requests. The meals are always scored deterministically. AI is used to generate corresponding text like dish names and the customer's reaction.
How it was built
This game is very much built with AI! Artificial intelligence was used for designing the gameplay loop and integrating actions with the in-game AI. Additionally, AI made it much easier to write and debug the code in this project.
Midnight Menu uses Vite, React, JavaScript, and CSS. The UI is a mobile-first card layout that includes ingredient cards, cooking method cards, a dish reveal screen, a final result screen, and a summary. Groq is ultimately used in the backend for its generous free-tier rate limits.
Challenges and lessons learned
The biggest challenge was deciding on a game mechanic which made the game feel unique and fun, while also being feasible under this time constraint. Using AI directly in the gameplay might make for an unfair frustrating game based on how the AI "feels" at any given time. It was difficult to balance the need for a fun game with the desire to use AI in a new way.
Another minor challenge was running into rate-limiting. Google AI was considered and implemented as the AI backend initially. In fact, Gemini 2.5 Flash was the first model used in an early version of this game. However, after quickly running into rate-limiting problems, the decision was made to switch to Groq. Even with Groq, it was important to keep prompts clear and concise to avoid hitting rate limits too early!
On that note, it is difficult to prompt AI! Even though AI made much of this development process easier, it wasn't effortless! With a vision in mind, prompting AI to generate the right code or rewrite an HTML block requires a detailed thorough prompt to improve accuracy. Occasionally, one might even think that it would be more efficient to write the code without asking AI!
Accomplishments
Midnight Menu is a unique game that's built with AI and runs on AI. It feels like a puzzle game, and not like another chatbot. AI enhances the mood, makes it replayable, and does so without compromising on reliability or taking control away from the player.
What's next for Midnight Menu
Below are a few ideas for expanding upon the game.
- have the AI generate a wildcard ingredient to use for each customer, given a set of related traits
- implement a "Replate" option which prompts the AI to build a new dish before the player decides to serve to the customer
- limit the ingredient resources available to the player each night, and/or replace them with new ingredients
Built With
- css
- groq
- javascript
- react
- vercel
- vite
Log in or sign up for Devpost to join the conversation.