Inspiration

Our team was inspired by the influence of short-form video consumption has on the current and future generations; specifically in terms of cognitive function and creativity. Research indicates that there is a 35% reduction in the attention span of consumers of this content with creative thinking taking a massive hit specifically. We wanted to create an alternative that allows users to still cure boredom, but also allows lightweight creative freedom.

What it does

Can't Bear Boredom is a website where users can interact with AI to create and play shortform mini-games. The user simply enters the prompt of the kind of game they are looking to play and based on the prompt, a game will made and ran for the user to save, edit, and play. The user can name the game and save it for later or edit the game with additional prompts tweaking it to their own preferences. The AI can create not only games but any application that you can fit in an iframe, for example we created a phishing simulator to train employees to tell phishing emails apart from legitimate ones.

How we built it

The backend of the project uses flask as a core engine to handle the incoming data, render the webpage, redirect the browser, and store information about the session. We chose to use Flask because it is a lightweight canvas and Flask has the ability to return JSON responses with "jsonify". Additionally, we used Flask to store the JSON bundles in their own directory. This allows the user to save the mini-apps they make and allows the backend to perform operations such as renaming and deleting apps safely.

The frontend of the project uses an IFrame sandbox to inject and load each minigame on the website. The IFrame uses the srcdoc attribute to inject a string of HTML directly into the frame which the user can interact with. Additionally we used "allow-scripts" as the only permission given which allows the mini-app to run its own game logic. This created an environment where the AI-generated content can be fully interactable without posing a threat to the hosts application data. We used a generator view to manage the waiting state between when the user sends their prompt, and the minigame is generated; this is done by triggering an overlay that masks the background. Additionally, the generator view ensures the user never sees a broken screen by using a dual-layer parsing system with "JSON.parse()" as a first attempt to convert the JSON string, if failed the raw code is extracted and wrapped into a valid object structure.

When constructing the AI prompt, we made the decision to use Google's Gemma 4.0 as the core model to create the minigames. We started off our prompt by defining Gemma 4.0 as an AI that specifically only generates mini-apps, and laying out the responsibilities the AI has such as the output (User-friendly description & code), the goal of understanding a user's boredom craving, and the expectation that the app must be "complete". Following the responsibilities, we explained important details, app requirements, and output format. The app requirements ensure that the code generated is lightweight, automatically run-ready, and that the user never comes into contact with the physical code. Lastly, we added rules such as reasoning & consistency rules that will be used to make the process from the prompt to the idea run smoothly and keep the output within the strict requirements that are needed.

Challenges we ran into

The process of making Can't Bear Boredom was both a rewarding and frustrating process. There were challenges that we ran into surrounding the AI-Prompt, and more technical issues such as the app delete button function, and mini-app generation time. When making the prompt, we underestimated how specific the prompt needed to be; especially with the format of the JSON file returned. This challenge required us to go further into detail and specifics to ensure a consistent performance within the games. This issue went hand-in-hand with the length of time taken to generate the mini-app. Our team initially struggled with the generation time because the length of our prompt directly effected the performance. This required us to work together and find the most optimal median between performance and attention to detail within the games. Additionally, we ran into some technical issues with the mini-app delete button. When the button was first implemented there were some inconsistencies with the smoothness in the graphic as well as the function.

Accomplishments that we're proud of

Our goal coming into this event was to push the limits of our knowledge, and when we step back and look at our project, we genuinely feel that we accomplished that. We knew that we could execute our idea on a baseline level but, we're proud of how we exceed our baseline and take it to the project to the next level. We wanted to elevate the quality of the app in terms and create a smooth & appealing to the eye experience, which feels like a really big step forwards in terms of our capabilities.

What we learned

Throughout this project, we learned just how precise and intentional AI-prompt engineering needs to be for a high-quality output. This was one of our biggest takeaways because we underestimated how sensitive the model was to structure, and formatting as well as how much of a difference an open-ended detail could make. We also learned a lot about building a safe environment to generate the AI-content. Designing an IFrame sandbox and ensuring that the injected code runs smoothly taught us more about security and dual-layer parsing.

What's next for Can't Bear Boredom!

When reviewed our website, we realized that with the foundation we've built, there is endless possibilities. One of our major next steps is implement a user and account system. This would open the door to mini-app sharing and potentially giving the opportunity to users to collaborate on curing their boredom. We also plan to introduce categories and more detailed prompt structures. This would let us generate more tailed mini-apps and significant enhance the overall gameplay experience. Although we made strong progress in reducing generation time for each mini-app, there is always room to further optimize performance.

Built With

Share this project:

Updates