Prompts99.com

Game Level Prompt Generator – Create Game Design Instructions

🎮 Game Level Prompt Generator

Level Parameters

Generated Prompt

Your generated prompt will appear here...

Saved Prompts

'; return; } savedPrompts.forEach((prompt, index) => { const promptElement = document.createElement('div'); promptElement.className = 'prompt-item'; const themeElement = document.createElement('p'); themeElement.textContent = `Theme: ${prompt.theme || 'Untitled'}`; themeElement.style.fontWeight = 'bold'; themeElement.style.color = '#4cc9f0'; const genreElement = document.createElement('p'); genreElement.textContent = `Genre: ${prompt.genre}`; const dateElement = document.createElement('p'); dateElement.textContent = `Created: ${prompt.date}`; dateElement.style.fontSize = '0.8rem'; dateElement.style.color = '#aaa'; const actionsElement = document.createElement('div'); actionsElement.className = 'actions'; const viewBtn = document.createElement('button'); viewBtn.textContent = 'View'; viewBtn.className = 'secondary'; viewBtn.addEventListener('click', () => { promptDisplay.textContent = prompt.text; currentPrompt = prompt.text; }); const deleteBtn = document.createElement('button'); deleteBtn.textContent = 'Delete'; deleteBtn.className = 'secondary'; deleteBtn.addEventListener('click', () => { savedPrompts.splice(index, 1); localStorage.setItem('savedPrompts', JSON.stringify(savedPrompts)); updateSavedPromptsDisplay(); }); actionsElement.appendChild(viewBtn); actionsElement.appendChild(deleteBtn); promptElement.appendChild(themeElement); promptElement.appendChild(genreElement); promptElement.appendChild(dateElement); promptElement.appendChild(actionsElement); savedPromptsContainer.appendChild(promptElement); }); } // Download current prompt as TXT function downloadCurrentPrompt() { if (!currentPrompt) { alert('No prompt to download'); return; } const theme = document.getElementById('theme').value || 'game-level-prompt'; const sanitizedTheme = theme.replace(/[^a-z0-9]/gi, '_').toLowerCase(); const filename = `${sanitizedTheme}_prompt.txt`; const blob = new Blob([currentPrompt], { type: 'text/plain' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = filename; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } // Download all prompts as TXT function downloadAllPrompts() { if (savedPrompts.length === 0) { alert('No prompts to download'); return; } let allPromptsText = '=== Game Level Prompt Collection ===\n\n'; savedPrompts.forEach((prompt, index) => { allPromptsText += `=== Prompt ${index + 1} ===\n`; allPromptsText += `Theme: ${prompt.theme || 'Untitled'}\n`; allPromptsText += `Genre: ${prompt.genre}\n`; allPromptsText += `Created: ${prompt.date}\n\n`; allPromptsText += `${prompt.text}\n\n\n`; }); const blob = new Blob([allPromptsText], { type: 'text/plain' }); const url = URL.createObjectURL(blob); const a = document.createElement('a'); a.href = url; a.download = 'game_level_prompts_collection.txt'; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } // Clear prompt list function clearPromptList() { if (savedPrompts.length === 0) { alert('Prompt list is already empty'); return; } if (confirm('Are you sure you want to clear all saved prompts?')) { savedPrompts = []; localStorage.setItem('savedPrompts', JSON.stringify(savedPrompts)); updateSavedPromptsDisplay(); } } });
Report
Web Home Analyze Generate Library All tools