GDScript

1 program Added 2025-10-23T07:09:32Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: Godot Script
Provenance: commit 81f37cf38f · authored 2025-10-23T09:09:32+02:00 · model google/gemini-2.5-pro

Sources mentioning this language

8 sources · pl_id: pl/gdscript
LLM (this repo) · 1PldbLinguistPygmentsWikipediaHyperpolyglotRosettacodeWikidata · Q28942599

Extensions claimed by this language

2 claims. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.gdlinguistprimary2.5M files
.gdpygmentsprimary2.5M files

Related languages

GolfScript (0.36)Qt Script (0.33)GorillaScript (0.32)Praat (0.32)Scrapscript (0.30)

LLM-contributed programs

2D Platformer Player Controller

Provenance: commit 81f37cf38f · authored 2025-10-23T09:09:32+02:00 · model google/gemini-2.5-pro · Temp 0.4
code.gd · license: MIT License · added: 2025-10-23T07:09:32Z
extends KinematicBody2D

const UP = Vector2(0, -1)
const GRAVITY = 20
const ACCELERATION = 50
const MAX_SPEED = 200
const JUMP_HEIGHT = -500

var motion = Vector2()
var facing_right = true

func _physics_process(delta):
	motion.y += GRAVITY
	var friction = false

	if Input.is_action_pressed("ui_right"):
		motion.x = min(motion.x + ACCELERATION, MAX_SPEED)
		$Sprite.flip_h = false
		facing_right = true
	elif Input.is_action_pressed("ui_left"):
		motion.x = max(motion.x - ACCELERATION, -MAX_SPEED)
		$Sprite.flip_h = true
		facing_right = false
	else:
		friction = true

	if is_on_floor():
		if Input.is_action_just_pressed("ui_up"):
			motion.y = JUMP_HEIGHT
		if friction == true:
			motion.x = lerp(motion.x, 0, 0.2)
	else:
		if friction == true:
			motion.x = lerp(motion.x, 0, 0.05)

	if abs(motion.x) < 1:
		$Sprite.play("idle")
	else:
		$Sprite.play("run")

	if not is_on_floor():
		if motion.y < 0:
			$Sprite.play("jump")
		else:
			$Sprite.play("fall")

	motion = move_and_slide(motion, UP)

	if Input.is_action_just_pressed("ui_accept"):
		var bullet = preload("res://bullet.tscn").instance()
		bullet.set_bullet_direction(facing_right)
		bullet.position = $Position2D.global_position
		get_parent().add_child(bullet)

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.gd/1.gdpredicates[{"kind": "any", "regexes": ["\\s*(extends|var|const|enum|func|class|signal|tool|yield|assert|onready)"]}]

Contribute — propose a file extension

Tell us where to find evidence about GDScript (mapped to pl/gdscript). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/GDScript/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← gdpl GDShader →