Morning Brew - Bezi Jam
I took part in a monthly game jam held by the people at Bezi. Bezi is an agentic AI tool made specifically for Unity. The platform reads your entire project folder structure, including the Unity files, which means it has access to your object heirarchy and the way things are setup in your scene. Further, it can interact directly with Unity to get logs from the console and see what you have selected in the editor. I joined this jam as I thought it would be a great integration to my workflow.
This was a monthly Jam that lasted 5 days (Thursday 8pm to Tuesday 12:30pm). There are three requirements, use Unity, use Bezi (somewhere in the development -even to test it out), and build for the web. This month's theme was Cozy Games with a twist revealed at the begining of the Jam.
Before the Jam I thought of different cozy things that could be part of the game. Finally I stuck with a game about coffee. Holding a cup of hot coffee on a cold rainy morning is the coziness I wanted the player to experience. But just sipping coffee is not enough, I wanted to lead the player to fix their own cozy cup of coffee and get to enjoy it.
I was thinking of mechanics I could add in these short 5 days empowered by bezi. I was always satisfied by the latte art that came on an occasional latte. This mechanic satisfied my curiousity, I had never integrated drawing into any of my projects.
Thursday
Bezi's twist was to keep the gameplay loop under 6 minutes. This limitation did not have any effect on my plans. I decided to stick with my plan on making a cozy latte art game. I managed to find a team (a composer and an artist) on discord that was on board with my plan. I started out by sketching out some design plans for the coffee game. The loop was simple: pull a shot of coffee, make latte art, and enjoy drinking it. I decide against having any scoring system.
The rest of the day was spent ideating and setting up version control for my project.
Friday
I dove into development, I prioritised the latte art mechanic as that was key ingredient for my game. I discussed the design implementation with Gemini, a tool I was comfortable with. It suggested a few different strategies and I went with the Render Texutre for Drawing on Textures option. This was a completely new area for me.
A render texture can be thought of as a film that is placed upon the image that can change the rendering of the image. The key feature is that it can be changed dynammicaly at runtime. The process for drawing involved detecting inputs, accurately translating them to the texture coordinates and detecting bounds, and then drawing.
I fed this strategy into Bezi, and let it cook! Bezi generated three files including a shader for the brush, the latte art painter component and a scriptable object for to store brush settings. This was a lot to take in and inspect, and suprise suprise it did not work. Since I am no expert at textures and shaders, I figured it was better to clean the slate and go step by step.
I prompted Bezi to do the same, keep the implementation simple start by detecting inputs and testing the coordinate system. This prompt was key! Bezi setup some helpful debugging logs and painted a white dot on the texture. Things were still going wrong, but I could see visible progress and that was motivating.
Bezi was having a hard time translating the coordinate system. There were numerous things that needed to be fixed like the scaling, inverting the Y-coordinate, making sure it painted within the bounds of the circular coffee sprite, etc. I iterated through them and by the end of the day Bezi and I had made it to a point where the input and coordinate systems were working smoothly.
Saturday
I managed to get the rest of the painting mechanic to work in the morning, and decided to spend the rest of the day improving upon the coffee and latte art (make it more realistic add some shaders/post processing) I was excited as this was an entirely new domain. The plan was to use my own custom brush texture to paint and add some bubble and wave effects to the coffee. I spent the entire day tinkering with Bezi, I made sure that Bezi created new scripts so that I would have a fallback.
There were different things I tried like changing the render pipeline, changing the setup, many of which I did not understand the reasons for. There were a lot of issues popping up while rendering and Bezi tried fixing them by making functions that show in the context menu of the component, I was not happy with this as it felt duct taped, also it did not work. The day ended with no progress.
Sunday
I probably should have moved on and completed the gameplay loop at this stage, but I was still eager to improve my latte art scene. I decided to use only Gemini for development. There was this annoying bug where the render texture showed up as a white box in the middle of my scene, that Bezi was not able to resolve. Gemini removed it. But again no significant progress. I could not get into the code and fix it as I had not researched render textures enough. I did see a youtube video that used a second camera, and I was considering doing that but I had had enough.
I ended the day by working on the start scene of the coffee shot being pulled from the espresso machine. I was still using gemini, and managed to add some camera movement and a small transition effect that faded in and out.
Monday-Tuesday
I spent these two days just polishing up the game. I found some sfx online for the coffee machine and sipping. Added the music track to the game. I figured it would be fun and easy to add a sipping mechanic where the player has to hold click to sip their coffee. I managed to add it with Bezi, Bezi even told me the type of art I would need to get it to work well, which I appreciated. I added another transition when the coffee was finished, this one was for a clock ticking.
It turns out that it is not easy adding video files to the scene, so I had to get all the frames from the clock ticking gif (over 300 frames - also found online). Bezi made a gif processing script that worked well, and there I had my second transition.
There were 3 hours left to submit, I decided to submit this. There was not a lot I could do that would have made a significant improvement to the game, mostly because I did not want to mess with the latte art scene.
Comments
I realised later I could have improved the game by introducing new mechanics instead of losing time trying to polish the one latte art mechanic.
I found Bezi to be a helpful tool. It was quick at resolving errors and could pinpoint exactly what went wrong. The code it generates is sometimes overly complicated and I was uncomfortable publishing the final scripts.
I think the key takeaway here is that Bezi will speed up your process but you cannot let it guide into the dark. Next time I would research the mechanics and systems I am implementing before using Bezi or other Agents to code it through.