Implement chunk streaming system in GDScript #18

Closed
coder-bot wants to merge 0 commits from agent/1a6e82153969 into main
Collaborator

Auto-opened by coder for task 1a6e82153969.

Dashboard: http://cloudbison:7070/task/1a6e82153969

Godot script that manages chunk load/unload based on player position. Chunks should be loaded from the server and instantiated as Godot scenes.

Auto-opened by coder for task `1a6e82153969`. Dashboard: http://cloudbison:7070/task/1a6e82153969 Godot script that manages chunk load/unload based on player position. Chunks should be loaded from the server and instantiated as Godot scenes.
coder-bot added 16 commits 2026-08-18 00:16:46 +00:00
Collaborator

The project does not compile — verified with godot --headless --path . --quit. Real defects, not just missing polish:

Blocking:

  1. chunk_data_decoder.gd:111 — nested class TileDef: collides with the real global TileDef class (scripts/tile_def.gd, added in this same PR). Godot: "Class "TileDef" hides a global script class." Remove the nested duplicate and use the real TileDef class instead.

  2. chunk_data_decoder.gd:164 — const MAGIC: PackedByteArray = PackedByteArray([...]) is rejected: "Assigned value for constant "MAGIC" isn't a constant expression." PackedByteArray(...) constructor calls aren't foldable as GDScript constants even with literal arguments. Use static var MAGIC := PackedByteArray([0x41, 0x47, 0x50, 0x43]) instead of const.

  3. chunk_data_decoder.gd:671 — int("0x" + hex_str.substr(i, 2), 16): GDScript's int() takes exactly one argument, no base parameter (that's Python). Use ("0x" + hex_str.substr(i, 2)).hex_to_int().

  4. chunk_data_decoder.gd:679 — SHA256Hash doesn't exist in Godot 4. Use HashingContext: var ctx := HashingContext.new(); ctx.start(HashingContext.HASH_SHA256); ctx.update(data); var hash := ctx.finish().

  5. chunk_scene.gd:95 and :105 — assigning obj.rotation (a Vector4 quaternion, per world_object.gd:22) directly to Node3D.rotation (Vector3 Euler angles). Use .quaternion instead: static_obj.quaternion = Quaternion(obj.rotation.x, obj.rotation.y, obj.rotation.z, obj.rotation.w).

Minor: .godot/ cache files (global_script_class_cache.cfg, uid_cache.bin, filesystem_cache10, etc.) are committed — these are generated editor cache, not source, and should be gitignored.

None of this is a sign the approach is wrong — the chunk streaming design (manager/chunk/decoder/tile split) is reasonable and matches the architecture docs. These are real, fixable GDScript API mistakes (some Godot-3-vs-4, one a naming collision) that godot --headless --path . --quit would have caught immediately. Please fix and I'll re-review.

The project does not compile — verified with `godot --headless --path . --quit`. Real defects, not just missing polish: **Blocking:** 1. **`chunk_data_decoder.gd:111` — nested `class TileDef:` collides with the real global `TileDef` class** (`scripts/tile_def.gd`, added in this same PR). Godot: "Class "TileDef" hides a global script class." Remove the nested duplicate and use the real `TileDef` class instead. 2. **`chunk_data_decoder.gd:164` — `const MAGIC: PackedByteArray = PackedByteArray([...])` is rejected**: "Assigned value for constant "MAGIC" isn't a constant expression." `PackedByteArray(...)` constructor calls aren't foldable as GDScript constants even with literal arguments. Use `static var MAGIC := PackedByteArray([0x41, 0x47, 0x50, 0x43])` instead of `const`. 3. **`chunk_data_decoder.gd:671` — `int("0x" + hex_str.substr(i, 2), 16)`**: GDScript's `int()` takes exactly one argument, no base parameter (that's Python). Use `("0x" + hex_str.substr(i, 2)).hex_to_int()`. 4. **`chunk_data_decoder.gd:679` — `SHA256Hash` doesn't exist in Godot 4.** Use `HashingContext`: `var ctx := HashingContext.new(); ctx.start(HashingContext.HASH_SHA256); ctx.update(data); var hash := ctx.finish()`. 5. **`chunk_scene.gd:95` and `:105` — assigning `obj.rotation` (a `Vector4` quaternion, per `world_object.gd:22`) directly to `Node3D.rotation` (`Vector3` Euler angles).** Use `.quaternion` instead: `static_obj.quaternion = Quaternion(obj.rotation.x, obj.rotation.y, obj.rotation.z, obj.rotation.w)`. **Minor:** `.godot/` cache files (`global_script_class_cache.cfg`, `uid_cache.bin`, `filesystem_cache10`, etc.) are committed — these are generated editor cache, not source, and should be gitignored. None of this is a sign the approach is wrong — the chunk streaming design (manager/chunk/decoder/tile split) is reasonable and matches the architecture docs. These are real, fixable GDScript API mistakes (some Godot-3-vs-4, one a naming collision) that `godot --headless --path . --quit` would have caught immediately. Please fix and I'll re-review.
Collaborator

Superseded by a later review-feedback round that already merged. Closing — found while auditing why this PR was still sitting open (a chain-tracking bug meant multi-round review-feedback chains only ever closed the immediately prior PR, not the whole ancestry; fixed in agp's tools/definitions.py).

Superseded by a later review-feedback round that already merged. Closing — found while auditing why this PR was still sitting open (a chain-tracking bug meant multi-round review-feedback chains only ever closed the immediately prior PR, not the whole ancestry; fixed in agp's tools/definitions.py).
agent-bot closed this pull request 2026-08-18 15:54:55 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: daddy/modbison#18