Can GPT-4 code an entire game for you? Yes, yes it can.
Here's how I recreated a Snake game that runs in your browser using Chat GPT-4 and @Replit, with ZERO knowledge of Javascript all in less than 20 mins 🧵
First, I just asked GPT-4 to provide code for a Snake game, with the relevant HTML, CSS, and Javascript required to make it run. This provided all of the code I needed to get the project going. It wasn't able to complete it all in one response, but I just replied with "continue"
Once I had all of the necessary code for the game, I created an account on @Replit and started a new HTML, CSS, JS project. That gives you all of the necessary files you'll need to run the code (and all in your browser too!)
Then, just paste the code into the relevant files that GPT-4 tells you to lay them out in within Replit and hit run! Using my arrow keys, the game worked just as expected except...
It had some issues. The snake would die after its first bite instead of growing, and it kept adding the score in increments of 2 instead of 1. So I asked GPT-4 to make those tweaks and it did!
I love that it followed up with explanations too—what a wonderful way to learn to code and actually understand why it's doing the things it's doing. GPT-4 is a decent teacher!
Finally, I wanted to add a high score counter to the game to make it a little competitive. How do I do that? well, I just asked and it gave me exactly what I needed to update my game on Replit.
Of course, you could add so much more, sounds, custom art, to make this a fully-featured game. The potential is so exciting. Anyone can make their own games just by describing them!
Decided to add a little extra nostalgia to the game with the help of GPT-4... now that's more like it ✨ (sound on!).
A few replies said "isn't this just trained on how to write a Snake game from many examples on the web"... well, I pushed it further. What if you could point it to a game's Wikipedia page, make it understand the mechanics, and ask to recreate it?
... can't wait to show you! 👀
• • •
Missing some Tweet in this thread? You can try to
force a refresh
I spent 6 hours using ChatGPT, MidJourney, and a couple of other AI tools to make a fan-made Batman animated movie!
Here’s how 🧵
It started with the idea I had. I knew it was going to be about The Riddler (one of my favorites, and a huge fan of @mattreevesLA’s and Paul Dano’s rendition of the character) so I gave ChatGPT the prompt and we went back and forth on the monologue
I then used MidJourney to generate the artwork, broke down the lines from the script into different scenes I wanted and then went back and forth till I got a style that fit the eerie vibe I was going for
I spent the weekend playing with ChatGPT, MidJourney, and other AI tools… and by combining all of them, published a children’s book co-written and illustrated by AI!
Here’s how! 🧵
First, the idea: I wanted a story showing the magic of AI to children. I gave ChatGPT a prompt and went back and forth with it to refine details and get inspiration for the illustrations. It was like having a constant brainstorming partner who I could ping pong ideas off of.
Then, I took those ideas to MidJourney and gave it prompt after prompt till I could get a somewhat consistent style. This took a few hours but it was such a fun process playing with all the different styles!