It is getting pretty wild out there in AILandia. Prompt any of the big LLMs at this point with “Make me a self contained web app that runs locally from a single HTML file. I need this app to do ‘insert your use case here’.”
“Combine and edit PDFs” for example.
“Generate ambient background music, including many different musical styles and several effects. Include the ability to record and save.”
From Google:
To effectively prompt AI on Google Search to create a web app game, use a clear, detailed, and iterative approach. Start with a high-level concept, then give specific instructions on gameplay, technology, and the user interface.Initial, high-level promptsThese prompts are useful for brainstorming and creating a basic proof-of-concept.
- “Create the code for a simple web app game. The game is a space shooter where the player controls a ship and has to dodge asteroids. The game should be in vanilla JavaScript, HTML, and CSS.”
- “Build a classic text-based adventure web game. Include a prompt where the user can type commands, and the AI generates the next part of the story.”
- “Generate a full web app for a ‘guess the word’ game, similar to Wordle. Provide all the necessary HTML, CSS, and JavaScript.”
Detailed, intermediate promptsUse these prompts once the core concept is established to add more specific features and technologies.For a space shooter game
- Gameplay and mechanics: “Expand on the space shooter game. Add different types of asteroids that move at varying speeds. Implement a scoring system that increases every time the player survives a set amount of time. The game should end when an asteroid hits the player’s ship.”
- Visuals and UI: “Enhance the styling of the space shooter game. Make the player’s ship look futuristic and the asteroids appear rocky. Add an animated background with stars that move to simulate being in space.”
- Technology stack: “Refactor the space shooter game to use a JavaScript game framework like p5.js for better drawing and handling of game logic. Write the new code for the entire project.”
For a text-based adventure game
- Character and lore: “Flesh out the text-based adventure. Generate a medieval fantasy world with two distinct regions. Create a lore sheet for a non-player character (NPC) named ‘Elias’ who runs the town’s tavern.”
- Inventory and state management: “Add an inventory system to the text-based game. The player should be able to type ‘take [item name]’ and ‘use [item name]’. Keep track of the player’s current inventory in the game state.”
- Dynamic narrative: “Modify the text adventure to be more dynamic. The story and quests should adapt based on the player’s choices and interactions. After each player command, update the game state and generate a new descriptive response based on the current context.”
Advanced, iterative promptsThese prompts can be used to refine and enhance the game through interaction, especially with tools like Gemini Code Assist or Canvas.
- Refining game mechanics: “Review the code for the space shooter game’s scoring system. Add a bonus for every ten asteroids successfully dodged. Show how to implement and test this new feature.”
- Debugging and optimizing: “Analyze the JavaScript code for the text adventure game. Identify any potential bugs or areas for performance improvement, particularly in how the game state is updated. Rewrite the problematic code with explanations.”
- Implementing new features: “Write the code for a save and load game feature for the text adventure. The game state should be stored in the browser’s local storage and loaded when the page is refreshed.”
- Testing and examples: “Generate a unit test for the
scorefunction in the space shooter game to ensure it handles all scoring events correctly. Then, create a few example output scenarios for the text adventure based on different player choices.”- Full-stack development: “Expand the web app game to be multiplayer. Provide the backend code using a Node.js framework like Express and use WebSockets for real-time communication. Include instructions on how to set up and run both the server and client.”
Additional: 7 fun AI prompts to try on Google Gemini to make your own word games | Tom’s Guide

Recent Comments