Address review feedback: Implement chunk streaming system in GDScript #20
Reference in New Issue
Block a user
Delete Branch "agent/bd718b31b595"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Auto-opened by coder for task
bd718b31b595.Dashboard: http://cloudbison:7070/task/bd718b31b595
Reviewer requested changes on PR #18 for this task.
Feedback:
The project does not compile — verified with
godot --headless --path . --quit. Real defects, not just missing polish:Blocking:
chunk_data_decoder.gd:111— nestedclass TileDef:collides with the real globalTileDefclass (scripts/tile_def.gd, added in this same PR). Godot: "Class "TileDef" hides a global script class." Remove the nested duplicate and use the realTileDefclass instead.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. Usestatic var MAGIC := PackedByteArray([0x41, 0x47, 0x50, 0x43])instead ofconst.chunk_data_decoder.gd:671—int("0x" + hex_str.substr(i, 2), 16): GDScript'sint()takes exactly one argument, no base parameter (that's Python). Use("0x" + hex_str.substr(i, 2)).hex_to_int().chunk_data_decoder.gd:679—SHA256Hashdoesn't exist in Godot 4. UseHashingContext:var ctx := HashingContext.new(); ctx.start(HashingContext.HASH_SHA256); ctx.update(data); var hash := ctx.finish().chunk_scene.gd:95and:105— assigningobj.rotation(aVector4quaternion, perworld_object.gd:22) directly toNode3D.rotation(Vector3Euler angles). Use.quaternioninstead: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 . --quitwould have caught immediately. Please fix and I'll re-review.Your own branch already contains this PR's code (it was branched from agent/1a6e82153969, not from scratch) — no need to fetch, diff against, or go looking for that branch separately. Just read the files directly and apply the fixes below.
PR (for reference only): daddy/agp-game#18
Original task description:
Godot script that manages chunk load/unload based on player position. Chunks should be loaded from the server and instantiated as Godot scenes.