Diskussion

Spiellogik-Architekt für Rätselmechaniken

Von Wikiprompt, der freien Prompt-Enzyklopädie

loshu2000
Beigetragen vonloshu2000Quelle

29. Apr. 2026

Spiellogik-Architekt für Rätselmechaniken Ein System-Prompt für einen Spielelogik-Architekten zur Gestaltung von Puzzle-Mechaniken, mit Fokus auf Grid-Datenstrukturen, Kaskadenalgorithmen und Nachfüll-Logik.

Prompt-InhaltSpeichern

🌐
{ "grid": "6x6 2D array, indexed [row][col], row 0 at top. Each cell stores an element type (int or enum). Empty cells are null.", "matchDetection": { "algorithm": "Scan all cells. For each cell, check horizontal runs (same type, contiguous) and vertical runs. If run length >= 3, mark all cells in that run for removal. Use a boolean 'marked' array parallel to grid.", "recursiveCascade": { "trigger": "After initial removal, for each removed cell, check its 4 orthogonal neighbors (up, down, left, right). If neighbor is not null and not already marked, add to a 'toCheck' queue.", "process": "While 'toCheck' not empty: pop cell, check if it forms a run of >=3 with its orthogonal neighbors (considering only unmarked cells). If yes, mark those neighbors and add them to queue. Repeat until queue empty.", "termination": "When queue empty, remove all marked cells (set to null). Then check if any new matches formed due to gravity (see refill). If yes, repeat cascade from step 1." } }, "gravityRefill": { "drop": "For each column (col index 0-5), iterate from bottom row (row 5) upward. Maintain a 'write' pointer starting at row 5. For each cell from bottom to top: if cell is not null, copy its value to 'write' position, then set original to null, decrement 'write'. After processing all rows in column, all cells above 'write' are null.", "spawn": "For each column, for each null cell from top (row 0) down to 'write' (exclusive), assign a new random element type (from allowed set).", "cascadeCheck": "After refill, run matchDetection again. If any matches found, repeat gravity and spawn. Continue until no matches." }, "dataStructures": { "grid": "int[6][6] or ElementType[6][6]", "marked": "bool[6][6]", "queue": "Queue<Cell> (row, col) for BFS/DFS cascade", "columnWritePointer": "int[6] (per column, for gravity)" }, "pseudoCode": { "mainLoop": "do { detectMatches(); if (noMatches) break; removeMarked(); applyGravity(); spawnNew(); } while (true);", "detectMatches": "clear marked; for each cell, check horizontal/vertical runs; mark runs >=3; if any marked, return true; else false.", "removeMarked": "for each cell if marked, set grid[row][col] = null.", "applyGravity": "for each col, writePointer = 5; for row from 5 to 0: if grid[row][col] != null, grid[writePointer][col] = grid[row][col]; if writePointer != row, grid[row][col] = null; writePointer--;", "spawnNew": "for each col, for row from 0 to writePointer-1: grid[row][col] = randomType();" } }

Melde dich an, um den vollständigen Prompt zu sehen

Weiter mit:

Mit der Anmeldung akzeptierst du unsere Nutzungsbedingungen und Datenschutz

Verwendung

Dieser Prompt ist für die Verwendung mit coding gedacht. Kopiere den Inhalt oben und füge ihn in dein bevorzugtes KI-Tool ein.

Für beste Ergebnisse passe die Platzhalter (eckige Klammern oder Großbuchstaben) an deine Anforderungen an.

Referenzen

Kategorien:coding| prompts.chat| game-logic| puzzle-mechanics

Diskussion