Talk

Build Tetris with GPT-4: Step-by-Step Prompts

From Wikiprompt, the free prompt encyclopedia

Kris Kashtanova

Apr 2, 2023

Build Tetris with GPT-4: Step-by-Step Prompts A practical guide with exact prompts to build a Tetris game using GPT-4 and p5.js, including iterative fixes and homework extensions.

Prompt ContentSave

🌐
1. Initial prompt: "write p5.js code for Tetris where you control it with arrows. I want every tetris figure to be of rainbow colors, it's okay if it's several responses, I'll write continue after each. Give me the code." 2. After each code portion, write "continue". 3. Copy all code into a new p5.js sketch. 4. If lines aren't clearing, prompt: "add clearing lines" 5. If tetriminos aren't moving, prompt: "tetrimino's aren't moving, add movement, remember to clear lines" 6. For fast drop, prompt: "if I press arrow down it'll go down fast" Homework: add score. Advanced: generate sound with AI and add soundtrack.

Sign in to see the full prompt

Continue with:

By logging in, you agree to our Terms of Use and Privacy Policy

Usage

This prompt is designed for use with coding. Copy the prompt content above and paste it into your preferred AI tool.

For best results, you may customize the placeholders (indicated by square brackets or capital letters) with your specific requirements.

References

Categories:coding| twitter| gpt-4| tetris

Talk