Raster x3, gemalte Register, Ortsbild-Schleife
Basis 1920x1080 mit Kachel 96 (Phase 0.5): Assets, Daten-ids, Engine, Theme und Pruefungen umgestellt; alte 32-px-Master im Archiv. Boden, Dach und Haus gezeichnet statt generiert (boden.py, dach.py) — FLUX-Kacheln hatten nach --flatten nur zwei Farben. Schrift neu in Zielaufloesung (font16.py, 12x16 entworfen, x2 exportiert, proportionaler Vorschub). Zwei Register: gemaltes Ortsbild mit Hotspots und Kachelgebiet mit gemalten Figuren, verbunden ueber einen ScreenManager. Die Schleife ist ohne Fenster geprueft (tools/probe_schleife.tscn). Dokumentation: darstellung.md (Regeln), stand.md (Uebergabe), Beweise unter art/prep/ (terrain-96, kacheltest, stadt-gemalt, schleife, stil-vergleich).
This commit is contained in:
parent
ae7fde714e
commit
43600009e5
571 changed files with 9402 additions and 1700 deletions
59
game/tools/probe_lauf.gd
Normal file
59
game/tools/probe_lauf.gd
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
extends Node
|
||||
## Prüft Bewegung, Blockade und Dialog ohne Fenster.
|
||||
|
||||
func _ready() -> void:
|
||||
var szene: PackedScene = load("res://scenes/world/stadt.tscn")
|
||||
var stadt := szene.instantiate()
|
||||
add_child(stadt)
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
|
||||
var start: Vector2i = stadt._spieler_kachel
|
||||
print("Start: ", start, " (Feld belegt, wie erwartet: ", not stadt._begehbar(start.x, start.y), ")")
|
||||
|
||||
_taste(KEY_RIGHT)
|
||||
await get_tree().process_frame
|
||||
print("nach rechts: ", stadt._spieler_kachel, " (erwartet ", start + Vector2i(1, 0), ")")
|
||||
|
||||
# Wand anlaufen: von der Startzeile nach unten in die Mauer
|
||||
for i in 8:
|
||||
_taste(KEY_DOWN)
|
||||
await get_tree().process_frame
|
||||
print("nach 8x unten: ", stadt._spieler_kachel, " (Mauer bei y=11)")
|
||||
|
||||
# Dialog: ein Feld über der Wache — Position kommt aus den Daten, nicht
|
||||
# aus einer verdrahteten Zahl (die Karte ändert sich).
|
||||
var wache := Vector2i.ZERO
|
||||
for n in stadt._karte.get("npcs", []):
|
||||
if n["id"] == "wache":
|
||||
wache = Vector2i(int(n["x"]), int(n["y"]))
|
||||
stadt._spieler_kachel = wache + Vector2i(0, -1)
|
||||
_taste(KEY_E)
|
||||
await get_tree().process_frame
|
||||
print("Dialog offen: ", stadt._dialog.visible, " | ", stadt._dialog_name.text)
|
||||
_taste(KEY_E)
|
||||
await get_tree().process_frame
|
||||
print("Dialog zu: ", not stadt._dialog.visible)
|
||||
|
||||
# Zweiter Durchlauf für ein Bild mit offenem Dialog: neben die Wache,
|
||||
# nicht auf sie (gleiches Feld heißt kein Gespräch).
|
||||
stadt._spieler_kachel = wache + Vector2i(0, -1)
|
||||
var fuss := Vector2((stadt._spieler_kachel.x + 0.5) * 96,
|
||||
(stadt._spieler_kachel.y + 1) * 96)
|
||||
stadt._spieler.position = fuss - Vector2(0, stadt._spieler.texture.get_height() * 0.5)
|
||||
_taste(KEY_E)
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
await RenderingServer.frame_post_draw
|
||||
get_viewport().get_texture().get_image().save_png(
|
||||
"/tmp/opencode/stadt_dialog.png")
|
||||
print("Screenshot mit Dialog geschrieben")
|
||||
get_tree().quit()
|
||||
|
||||
|
||||
func _taste(code: int) -> void:
|
||||
var ev := InputEventKey.new()
|
||||
ev.physical_keycode = code
|
||||
ev.keycode = code
|
||||
ev.pressed = true
|
||||
Input.parse_input_event(ev)
|
||||
1
game/tools/probe_lauf.gd.uid
Normal file
1
game/tools/probe_lauf.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://7v6h6lpoqaru
|
||||
6
game/tools/probe_lauf.tscn
Normal file
6
game/tools/probe_lauf.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://tools/probe_lauf.gd" id="1_probe"]
|
||||
|
||||
[node name="Probe" type="Node"]
|
||||
script = ExtResource("1_probe")
|
||||
33
game/tools/probe_schleife.gd
Normal file
33
game/tools/probe_schleife.gd
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
extends Node
|
||||
## Prüft die Schleife Ortsbild → Gebiet → Ortsbild ohne Fenster.
|
||||
|
||||
func _ready() -> void:
|
||||
var ortsbild: Node = load("res://scenes/world/ortsbild.tscn").instantiate()
|
||||
add_child(ortsbild)
|
||||
await get_tree().process_frame
|
||||
var getroffen := {"ziel": ""}
|
||||
ortsbild.ziel_gewaehlt.connect(func(z: String) -> void: getroffen["ziel"] = z)
|
||||
ortsbild._auf_ziel({"name": "Marktplatz", "ziel": "garana"})
|
||||
print("Hotspot meldet: ", getroffen["ziel"])
|
||||
ortsbild.queue_free()
|
||||
|
||||
var stadt: Node = load("res://scenes/world/stadt.tscn").instantiate()
|
||||
stadt.set("gemalt", true)
|
||||
add_child(stadt)
|
||||
await get_tree().process_frame
|
||||
var zurueck := {"nein": false}
|
||||
stadt.zurueck.connect(func() -> void: zurueck["nein"] = true)
|
||||
|
||||
print("Start: ", stadt._spieler_kachel, " begehbar? ", stadt._begehbar(4, 8))
|
||||
stadt._spieler_kachel = Vector2i(4, 7)
|
||||
_taste(KEY_DOWN)
|
||||
await get_tree().process_frame
|
||||
print("nach unten: ", stadt._spieler_kachel, " | zurück ausgelöst: ", zurueck["nein"])
|
||||
get_tree().quit()
|
||||
|
||||
func _taste(code: int) -> void:
|
||||
var ev := InputEventKey.new()
|
||||
ev.physical_keycode = code
|
||||
ev.keycode = code
|
||||
ev.pressed = true
|
||||
Input.parse_input_event(ev)
|
||||
6
game/tools/probe_schleife.tscn
Normal file
6
game/tools/probe_schleife.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://tools/probe_schleife.gd" id="1"]
|
||||
|
||||
[node name="Probe" type="Node"]
|
||||
script = ExtResource("1")
|
||||
28
game/tools/schuss.gd
Normal file
28
game/tools/schuss.gd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
extends Node
|
||||
## Screenshot einer Szene — für die Sichtprüfung ohne Fenster.
|
||||
##
|
||||
## godot --path game res://tools/schuss.tscn -- <szene.tscn> <ziel.png>
|
||||
##
|
||||
## Lädt die Szene als Kind, wartet zwei Frames und schreibt das Bild in
|
||||
## Viewport-Größe. Damit lässt sich jeder Screen im echten Raster abnehmen.
|
||||
|
||||
func _ready() -> void:
|
||||
var args := OS.get_cmdline_user_args()
|
||||
var szene_pfad := "res://scenes/world/stadt.tscn"
|
||||
var ziel := "user://schuss.png"
|
||||
if args.size() > 0:
|
||||
szene_pfad = args[0]
|
||||
if args.size() > 1:
|
||||
ziel = args[1]
|
||||
var szene: PackedScene = load(szene_pfad)
|
||||
if szene == null:
|
||||
push_error("Szene fehlt: " + szene_pfad)
|
||||
get_tree().quit(1)
|
||||
return
|
||||
add_child(szene.instantiate())
|
||||
await get_tree().process_frame
|
||||
await get_tree().process_frame
|
||||
await RenderingServer.frame_post_draw
|
||||
get_viewport().get_texture().get_image().save_png(ziel)
|
||||
print("Screenshot: ", ProjectSettings.globalize_path(ziel))
|
||||
get_tree().quit()
|
||||
1
game/tools/schuss.gd.uid
Normal file
1
game/tools/schuss.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://uopf1df2pwf5
|
||||
6
game/tools/schuss.tscn
Normal file
6
game/tools/schuss.tscn
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://tools/schuss.gd" id="1_schuss"]
|
||||
|
||||
[node name="Schuss" type="Node"]
|
||||
script = ExtResource("1_schuss")
|
||||
Loading…
Add table
Add a link
Reference in a new issue