Inspiration
The project was inspired by some previous simple but fun games like Wordle. We wanted to bring some new technologies, make it fun to play and make it look nice.
What it does
The game is a guessing name where one person comes up with a prompt and generates an image using text-to-image diffusion model, DALL-E in our case. Then this image is sent to the other devices in the game but without the original prompt. The players' objective is to guess the original prompt as close as possible, or just make it funny, there are no strict rules! After all the guesses are made, the prompter (person who came up with the original prompt) ranks the guesses based on some metric. The ranking is then broadcasted to all the other players, and the round of a game concludes.
How we built it
We used MultipeerConnectivity API to create a local game session and exchange data between nearby devices that are in the session. On the frontend, we used SwiftUI to built the entire user interface. Finally, we used OpenAI's text-to-image API (DALL-E model) to create images based on the prompter's input.
Challenges we ran into
The most challenging part was to keep shared game state synchronized across multiple devices, keeping the source of truth on one device only (the prompter's device). Also, using the MultipeerConnectivity API enforces some constraints on the ability to quickly change where the source of truth resides
Accomplishments that we're proud of
We are especially proud of our design, which looks like an actually game every member of the team would play on a regular basis. Also, we are very proud how snappy and smooth the app feels, thanks to the way we handle shared state across the devices.
What we learned
We learned that creating real-time AI based games is extremely hard. The team has learned a lot about how to handle multiuser, continuous input and how to make the UI a function of not only a local, on device state but also the state of the entire game session.
What's next for GUESS-E
is fixing bugs, of course! Once the app is polished, we are planning on putting it on the App Store and let people across the world enjoy some fun, powered by AI.
Built With
- multipeerconnectivity
- openai
- stablediffusion
- swift
- swiftui
Log in or sign up for Devpost to join the conversation.