ForkFree

Prompts / Coding

Pin Down Your Software Version

You get code aimed at the exact version you name, with a written check for renamed or removed features and a list of things to confirm. It works because a chat model cannot see your project, so the prompt makes the version explicit and the model's assumptions visible.

Partly workedThe code is correct for Godot 4.3.2 and all four sections are present in order. However, the prose is well over the 250-word limit (roughly 350 words), and the tunnelling note is muddled because move_and_slide sweeps the body's shape, so the "22 px" claim is misleading.

The prompt

You are a senior developer who writes code for one exact software version and never assumes a version you have not been given.

Task: Write working code for my request, targeting only the version below, and check your own work for version mistakes.

Version and language: {engine_version}
Request: {task_description}
My current code: {existing_code}

Steps:
1. State the exact version and language you are targeting, and name two things about my project that you cannot see.
2. Write the code using only features, function names and signals that exist in that version.
3. Review your code line by line for anything renamed, removed or added between major versions, and correct whatever you find.
4. List the assumptions I should confirm, plus any bugs that would only appear when the program runs rather than when it is parsed.

Output: Four headed sections in this order: Target, Code (one block), Version Check (bullet points), Assumptions to Confirm (bullet points). Keep the prose under 250 words.

Change the parts in curly braces. Use it whenever you ask for code in a framework or engine that has changed a lot between major versions.

What happened when we ran it

We sent

You are a senior developer who writes code for one exact software version and never assumes a version you have not been given.

Task: Write working code for my request, targeting only the version below, and check your own work for version mistakes.

Version and language: Godot 4.3.2 stable, GDScript, 2D project using the Forward+ renderer
Request: Make my player character dash 200 pixels in the direction they are facing when I press the Shift key. The dash should last 0.15 seconds, then a one second cooldown should stop it being used again. The player should not be able to dash through walls.
My current code: extends CharacterBody2D

const SPEED = 300.0
var facing = Vector2.RIGHT

func _physics_process(delta):
    var dir = Input.get_vector("move_left", "move_right", "move_up", "move_down")
    if dir != Vector2.ZERO:
        facing = dir.normalized()
    velocity = dir * SPEED
    move_and_slide()

Steps:
1. State the exact version and language you are targeting, and name two things about my project that you cannot see.
2. Write the code using only features, function names and signals that exist in that version.
3. Review your code line by line for anything renamed, removed or added between major versions, and correct whatever you find.
4. List the assumptions I should confirm, plus any bugs that would only appear when the program runs rather than when it is parsed.

Output: Four headed sections in this order: Target, Code (one block), Version Check (bullet points), Assumptions to Confirm (bullet points). Keep the prose under 250 words.

The model replied

## Target Godot 4.3.2 stable, GDScript (2.0), 2D, Forward+ renderer. Two things I cannot see: your Input Map (whether a `dash` action exists and which key it's bound to) and your collision setup (layers/masks, and whether walls are TileMap/StaticBody2D with collision shapes). ## Code ```gdscript extends CharacterBody2D const SPEED: float = 300.0 const DASH_DISTANCE: float = 200.0 const DASH_DURATION: float = 0.15 const DASH_COOLDOWN: float = 1.0 const DASH_SPEED: float = DASH_DISTANCE / DASH_DURATION var facing: Vector2 = Vector2.RIGHT var dash_time_left: float = 0.0 var dash_cooldown_left: float = 0.0 func _physics_process(delta: float) -> void: dash_cooldown_left = maxf(dash_cooldown_left - delta, 0.0) var dir: Vector2 = Input.get_vector("move_left", "move_right", "move_up", "move_down") if dir != Vector2.ZERO: facing = dir.normalized() if Input.is_action_just_pressed("dash") and dash_time_left <= 0.0 and dash_cooldown_left <= 0.0: dash_time_left = DASH_DURATION dash_cooldown_left = DASH_COOLDOWN if dash_time_left > 0.0: dash_time_left -= delta velocity = facing * DASH_SPEED else: velocity = dir * SPEED move_and_slide() ``` ## Version Check - `Input.get_vector`, `is_action_just_pressed`, `move_and_slide()` (no arguments, uses the `velocity` property) are all valid in 4.3. Godot 3's `move_and_slide(velocity)` is not used. - `maxf` exists in 4.x (typed float variant of `max`). - `extends CharacterBody2D` replaces Godot 3's `KinematicBody2D`. - `move_and_slide()` respects collisions, so the dash stops at walls. It is not a teleport. - Cooldown starts at dash start, so it covers the 0.15 s dash plus about 0.85 s after. Change to `dash_cooldown_left = DASH_DURATION + DASH_COOLDOWN` if you want a full 1 s after the dash ends. ## Assumptions to Confirm - Add a `dash` action in Project Settings > Input Map and bind Shift. Without it, the game errors at runtime on the first call, not at parse time. - Walls need collision shapes on a layer in the player's collision mask. - Dash distance is exactly 200 px only if unobstructed. The final frame can overshoot slightly because `delta` isn't an exact divisor of 0.15 (about 0.0167 s per frame at 60 FPS, so the dash may run 0.15–0.167 s). - A dash at 1333 px/s is safe against thin walls only if walls are thicker than about 22 px per physics frame, or the shape is large enough. Otherwise tunneling is possible. - If the player is standing still at the start, the dash uses the last facing direction (default right). - `facing` is only updated from input, so it won't reflect a sprite flip unless you sync it.

Run on Claude Sonnet 5.5, 11 Nov 2026. Automatic check: 3 out of 5.

Mentioned for

GPT-6 Luna, ChatGPT

Where it came from

Found on Web, shared by Ziva.sh: Why does ChatGPT keep giving me Godot 3 code? We tested 150 answers.

This is our own version of the idea, written and tested by us. The original may differ.

More coding prompts

Coding Worked in our test
Generate Strict JSON Spec From Description

You get a clean, machine-readable JSON object that matches your rules on the first try. It works because the model reads the rules first, then checks its own answer against each one before replying.

Found on GitHub, shared by DominikScholz
Coding Partly worked
Match Ownership Wording to Change Size

You get a tightly scoped code change, plus a separate list of things the AI spotted but left alone. It works because you state how far the AI may go, so a sense of "ownership" does not trigger unrequested refactoring.

Found on Web, shared by explainx.ai
Coding Worked in our test
Turn Vague Bug Reports Into Concrete Objectives

You get a bug fix broken into a reproduction, a minimal change and a regression test, each checked against clear objectives. Concrete objectives stop the model drifting into large rewrites or guessing at what "fixed" means.

Found on Web, shared by David Ch (@chhddavid)