As a followup to my post on vibe coding in Salesforce, here's what happened with Gemini.
First let me take you back to my ZX80/81/Spectrum programming days. I created a little game where you woul drop blocks into a 2d pyramid shape. If a block fell outside that shape then it was Game Over. The graphics on those machines were addressable in 8 pixel blocks so it wasn't very realistic. I thought it would be a lot better if the blocks had proper physics. I didn't have the words for it at the time, but what I needed to do was create a physics engine. That seemed like a full time job, and programming was just a hobby in those days.
I gave Gemini this prompt to create the game I'd imagined in my childhood:
Create a browser game where there's a block at the top which regularly moves from left to right. When you press the space bar that block should drop another blog down to the ground below. The blocks should have proper physics and collision and tumble over each other.
It understood what I meant pretty well. I didn't give it a Game Over condition, but it invented one of its own - if the blocks filled up to the top of the screen then that was it. As it was, that was pretty much a good starting point. I spent a few iterations trying to get it to not trigger game over as soon as a block fell (because it was at the top of the screen).
At this point my impression switched from "this is amazing - look how complete a thing it can generate with a few words" to "why doesn't it understand what I'm saying?".
It did work eventually though, so I moved onto Phase 2 - the pyramid shape. Again it took a few iterations before I could get the shape I wanted - at first it did it upside down. Once I got the shape I wanted I added a game over/high score screen at the end and that was my minimum viable product.
It's got a cheery manner, as AIs seem to these days.
 


No comments:
Post a Comment