Building classic games with Gemini 3
Watch on YouTube ↗ Subscribe on YouTube ↗
Use Gemini 3 Pro Preview in Google AI Studio to build single-file HTML versions of Tetris, Snake, Asteroids and Pac-Man from prompts written in ChatGPT. Tetris, Snake and Asteroids each take a couple of minutes and play, though the snake looks like a Tetris block and Asteroids runs slowly. The Pac-Man version does not work. Mike may host the games online.
Video summary
Build three classic games in minutes using Gemini 3 inside Google AI Studio. Learn how Google AI generates game logic, gameplay flow, and rapid prototypes with simple prompts.
The video covers 7 parts: Demos, Introduction to Gemini 3, Creating Tetris, Creating Asteroids, Creating Snake, Creating Pacman, and Conclusion.
What this video covers
What you build
Four browser games as single HTML files, previewed in AI Studio and downloaded to run locally.
Tools used
Key steps
- 1:42 - Ask ChatGPT to write a detailed Gemini prompt for a Tetris replica as one HTML, CSS and JavaScript file.
- 3:42 - Run the prompt in AI Studio, preview the playable Tetris game and download the HTML.
- 6:20 - Build Asteroids and Snake in parallel tabs.
- 7:46 - Play Snake, which works but looks wrong, and download it.
- 10:52 - Try Pac-Man, which does not run properly.
- 12:30 - Wrap up with the idea of publishing many classic games online.
Not covered
- A fix for Pac-Man, which Mike says needs more prompting.
- Code quality or how Gemini's output compares with other models on the same prompts.
- Rights questions around publishing copies of well-known games.
- Graphics polish. Mike calls the Asteroids graphics not great.
In this video
- 0:00 Demos
- 1:42 Introduction to Gemini 3
- 3:42 Creating Tetris
- 6:20 Creating Asteroids
- 7:46 Creating Snake
- 10:52 Creating Pacman
- 12:30 Conclusion
Questions and answers
How long did Gemini 3 take to build each game?
About one and a half to two minutes for Tetris and a few minutes for the others.
Did all four work?
No. Tetris, Snake and Asteroids ran, while the Pac-Man file was broken.
Do you need a paid plan to build games in AI Studio?
Mike used the free version of AI Studio, and says upgrading would probably help.
Keep learning
Transcript
Hey there. In this video, I want to take you through and show you three games that I've built within Gemini 3. And it took literally a few minutes to create these games. So, this one right here is the classic game of Tetris that every single person in the world knows about. So, as you can see, it works great. We've got levels. We've got, you know, it will actually uh reduce the rows and it works exactly like Tetris.
And that literally took a minute and a half, maybe two minutes to create this game. I didn't have to write a single line of code. It created this within seconds. Right. So there we go. That's Tetris. And then I've also got snake over here as well. It doesn't quite look like a snake. It's more like a Tetris block, but as you can see, that one works well, too. Can go ahead and restart the game. And uh yep, there we go. I'm not very good at Snake.
Read the rest of the transcript
I haven't played this game for years. But anyway, you get the idea. And it also has settings here as well. You can turn on sound effects, speed, all that stuff. And then last but not least, we have Asteroids. So, I've also created a replica of Asteroids over here. You can see it works exactly like the game of asteroids. And I can move around, too. Check it out. And I didn't have to write any code in order to create this.
It literally took minutes to build this game. And it's all over here in Gemini 3. So there it is. It wrote all of the code for me within a couple minutes. And then I can easily deploy. I could even put this up on website, like a website as well, and let people play these games. If you're interested in playing some of these games, let me know in the comments below, and I'll send it over to you. Hey there, welcome to the channel.
In this video, I'm going to show you how to use Google's latest and greatest AI model called Gemini 3 Pro Preview in order to create three classic games that everybody knows about. So that's going to be Tetris, Snake, and Asteroids. I just want to see if it's able to create these, and if so, how long it's going to take.
So to get started, I've just come over here to ChatgPT, and I told it to create a prompt for Gemini 3 to build a replica of the Tetris game. This is the prompt it came up with. It just says, "Create a fully working Tetris game. Use HTML, CSS, and JavaScript, and a single file unless the structure benefits from separating them. The game should include falling, tetramones, rotation, collision detection, line clearing, scoring, etc., etc. And I've just created this entire prompt in ChatGPT.
And I'm going to come over here and paste it into the textbox. Now, I'm just going to click on run. And we're going to see if it can create this game, and if so, how long it's going to take. I'm really curious to see if it can do this. I'm sure it's going to be able to no problem whatsoever because Gemini 3 is an amazing tool that has just come out as uh November 18th, so about a week ago.
I also made a tutorial recently yesterday, showing how to build landing pages and that sort of thing using Gemini 3 as well. And you can see the benchmarks down here too. So, it's just absolutely blowing every other AI model out of the water. Um, and it can also create games within a few minutes as well. So, let's see what it can do here. It's going to create all of the files. It's writing all the code for me right now.
And then once this is done, I should be able to preview the game. So, I'm just going to let this continue rolling so that we can get a good uh, you know, amount of time that this is going to take. Shouldn't take that long. Maybe a couple minutes and we can actually play the Tetris game. And then I also want to create another prompt for Snake as well.
So, let's just come over here and we're going to put that in because this is another classic game that I want to see if I can replicate within Gemini 3. So, we'll create this prompt. I just like to use ChatGPT to create these because uh it's then it's just going to be ready right out of the box. So, as you can see here, it just says nice brief below is a tight production ready prompt you can paste into Gemini 3 to get a complete playable Snake
game. It asks for a single self-contained file, clear features, and runnable verification steps. So, this is the prompt that it came up with here. Build a complete playable snake game as a single HTML file that runs in a modern browser. Do not use external libraries. Blah blah blah blah blah. So, we could just copy and paste this prompt into Gemini 3. Okay, so there we go. So, now we've created all of the files here.
And if I want to actually run this, there doesn't seem to be an easy way to to run this. We could come over here to run settings. Uh, looks like I can't actually run the game. So, I would need to plug this into like cursor or something in order to run it, unfortunately. Um, is there a way to actually run this game? We can preview it. So, if we show a preview. Oh, there we go. So, now look at that. So, it's running Tetris.
And I can just click on start game right here. And check that out. So, now we've got a playable version of Tetris, which was literally created in like, how long did that take? Two minutes or something. So, boom. There we go. Look at that. It took just within, you know, a couple seconds to create this game. And now, yeah, you can flip the flip everything. It looks great. Uh, it's even got the score over here, the level, everything you want. Very, very cool.
And it literally took a couple minutes to create this game. So, that just goes to show what's possible. Um, this one, well, yeah, that that's right right there. So, we can drop another block. Absolutely incredible what it's able to do. So, now we've got that. And then I think it's just saved automatically. We can exit out this preview here. And if I want to create the snake game next, I'm just going to come down here and once again copy and paste in the prompt.
And we're just going to run that. So, now it's going to create the snake game. And then I just want to create one more as well. We're going to create asteroids. I want to see if it can create a uh asteroids game as well. So let's go ahead and do that. Just create a replica of asteroids. I don't think I need to put game. It should know what I'm talking about based on previous context. So there we go.
Now build a complete playable Asteroids replica is a single HTML file that runs in a modern browser. Very similar prompt, but this is going to create asteroids. So, if I want to open up another tab here, I could just create both of these games at the same time. I don't even need the pro version of Google AI Studio in order to do this, although it probably would be helpful if I upgraded. But for now, I'm just going to stay on the free version.
And we can create this game of Asteroids as well. So, now we're creating two games at the same time. Um, and yeah, this is absolutely 100% going to put software developers out of work because look how easy this is. It literally takes a couple minutes to create these games and then you can also deploy them through here as well. So if you want to deploy this game or download it for example, you can download all the source code in a single HTML file.
So if I come up here to download the Tetris game, let's just scroll to the top here. And then we can just download this. Just going to put it in my downloads folder here. And then if we open this up, it should be running in a single HTML file. So there you go. So now we've got Tetris ready to play and all I have to do is make this live.
Like you just create my own domain and I can start cranking out these games using Gemini 3. So I can create all the classic games, as many of them as I want within, you know, a couple minutes and put them up online for people to play. How cool is that? So there it is running. And we can do the same thing for Snake once it's finished creating the game as well. Looks like it may already be finished. Let's see here.
We can scroll down to the bottom. Uh we're just going to scroll to the bottom here. It's still working on it. And then we've also got Asteroid over here building without writing a single line of code. Look how fast it is, too. So, it's just cranking this out like crazy. Um and then we can just download this or we can also preview this one as well. So, we're going to show a preview. And here we go.
So, we've got a playable version of Snake ready to go. I'm just going to go ahead and download that file as well. And then we can open it up in its own tab over here. So, there we go. So, now we've got Snake. That one doesn't really look quite right. Uh, it's got like a Tetris block as the snake, which is not Oh, see, but you can you can see it does work correctly.
maybe change the the layout a little bit, but overall that's pretty amazing what it was able to do in a couple minutes. So, you go. So, now you've got a playable version of Snake. They've even got some settings built in here as well. Uh you can change the speed, the sound effects, the grid size, everything. So, that's all done. And next, we're working on asteroids, which is still coding.
This is probably a pretty complex one to to build, but yeah, as you can see, it's now finished. So, now we've got a playable version of Asteroids. Uh, we can preview it. I'm also going to download this file because I might just put all of these up online for people to play. So, let's go ahead and preview this one. Or we can just open up this file that we've already downloaded here. And boom. Now, we've got Asteroids ready to go. Look at that.
That is absolutely incredible. And it literally took a couple minutes to build this. I mean, the graphics are not great, but obviously you can uh you can fix up those graphics as much as you want as well. And it even has a score up here. You can see the level the the number of lives that I have. It is a bit slow. Um I don't think I can change the settings or anything, but still that is pretty incredible was able to come up with.
So now I've got all these files as HTML and then of obviously I can preview it here as well. It has all the instructions. So Thrust I can move around as well. So there we go. Now it's being previewed inside Gemini 3. Uh if I want to create some other games I can, you know, create as many of these as I want basically. Uh let's come over to ChateBT and give me a list of classic games from the '9s.
So, if we want to create some other games, we can just, you know, create over here. Here's a whole bunch of different games that you could create. Uh, another one obviously would be Super Mario World. So, if you want to, uh, I would actually like PC games. So, classic PC games. Oh, like Pac-Man. So, we could also create um, Pac-Man as well. I forgot about Pac-Man. So, if we come up here, we could just issue that same prompt and type in Pac-Man right here.
And it doesn't take long at all to create these games. As you can see from this tutorial, I can create as many of these as I want within a couple minutes. Um, it's pretty incredible what Gemini 3 can do. So now I've got a prompt for Pac-Man replica. I'm just going to come over here and I'm once again going to copy and paste that in. So now we're creating a simple version of Pac-Man. Pretty incredible. Look, it's writing all of the code for me.
I don't have to write a single line of code. It's absolutely amazing what this can do. And again, it is beating all the other AI models on the uh benchmarks over here. We've got humanity's last exam blowing it out of the water. We've got, you know, a whole bunch of different benchmarks that I've honestly never even heard of before. So, here we go. It's still creating Pac-Man.
I don't understand what any of this code is doing, but the fact of the matter is I don't have to because I don't have to write this myself. I could just use Gemini 3 to do it for me. Look like it's finished with the game. And I'm also going to download this file real quick and then we can preview it over here. So, here we go. There we go. Pac-Man.JS. So, let's see what this looks like. It doesn't seem to work for some reason.
Let's actually just open it up in its own window using the HTML file. Uh, this one is seems to be broken unfortunately. So, it's not actually running properly, which is a little disappointing. Um, but yeah, with a little bit more prompting, I'm sure we can fix it. But for now, it's it's not quite working. But yeah, there's so many different games that you can create. I leave it up to you guys. Hopefully, you've enjoyed this video. Have some fun.
Play around with these things and just see what Gemini 3 is capable of. I think you're going to be blown away. And yeah, I just want to try something different in this particular video tutorial. Hopefully, you found it helpful and interesting. And with that being said, please subscribe to the channel and I will see you in the next one. signing off.



