重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
godot-genre-open-world by thedivergentai/gd-agentic-skills
npx skills add https://github.com/thedivergentai/gd-agentic-skills --skill godot-genre-open-world平衡规模、性能和玩家参与度的开放世界专家蓝图。
ResourceLoader.load_threaded_request() 来防止"加载卡顿"和帧冻结。call_deferred() 来安全地将后台线程的区块实例化应用到主线程。queue_free() 并置空引用,以防止内存溢出崩溃。store_var)进行高速I/O操作。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
_process() 中计算对物理敏感的状态;严格使用 _physics_process() 来在波动的帧率下实现确定性交互。MeshInstance3D 节点;严格使用 MultiMeshInstance3D 将数十万个网格批处理成单个GPU绘制调用。OccluderInstance3D 节点;这会强制CPU重建BVH并导致严重的微卡顿。CSGShape3D 节点处于活动状态;严格在发布前将它们烘焙成静态的 ArrayMesh 几何体。NavigationPathQueryParameters3D 将寻路限制在局部活动区域。find_child() 或深度树迭代来获取全局状态(例如,时间);严格使用场景组(call_group())进行优化的广播。| 阶段 | 技能 | 目的 |
|---|---|---|
| 1. 地形 | godot-3d-world-building, shaders | 大规模地形,三平面映射 |
| 2. 优化 | level-of-detail, multithreading | HLOD,后台加载,遮挡剔除 |
| 3. 数据 | godot-save-load-systems | 保存数千个对象的状态 |
| 4. 导航 | godot-navigation-pathfinding | 大型动态地图上的AI寻路 |
| 5. 核心 | floating-origin | 防止在10,000+单位距离时的精度抖动 |
围绕玩家加载和卸载世界。
# world_streamer.gd
extends Node3D
@export var chunk_size: float = 100.0
@export var render_distance: int = 4
var active_chunks: Dictionary = {}
func _process(delta: float) -> void:
var player_chunk = Vector2i(player.position.x / chunk_size, player.position.z / chunk_size)
update_chunks(player_chunk)
func update_chunks(center: Vector2i) -> void:
# 1. 确定需要的区块
var needed = []
for x in range(-render_distance, render_distance + 1):
for y in range(-render_distance, render_distance + 1):
needed.append(center + Vector2i(x, y))
# 2. 卸载旧的
for chunk in active_chunks.keys():
if chunk not in needed:
unload_chunk(chunk)
# 3. 加载新的(线程化)
for chunk in needed:
if chunk not in active_chunks:
load_chunk_async(chunk)
解决远离原点时的浮点精度误差(抖动)。
# floating_origin.gd
extends Node
const THRESHOLD: float = 5000.0
func _process(delta: float) -> void:
if player.global_position.length() > THRESHOLD:
shift_world(-player.global_position)
func shift_world(offset: Vector3) -> void:
# 将整个世界向玩家位置的相反方向移动
# 这样玩家产生移动的错觉,但逻辑保持在原点附近
for node in get_tree().get_nodes_in_group("world_root"):
node.global_position += offset
当区块45未加载时,跟踪"我是否在区块45杀死了强盗?"。
# global_state.gd
var chunk_data: Dictionary = {} # Vector2i -> Dictionary
func set_entity_dead(chunk_id: Vector2i, entity_id: String) -> void:
if not chunk_data.has(chunk_id):
chunk_data[chunk_id] = {}
chunk_data[chunk_id][entity_id] = { "dead": true }
当从1公里外观看时,将100栋房屋合并成1个简单网格。
罗盘栏逻辑。
func update_compass() -> void:
for poi in active_pois:
var direction = player.global_transform.basis.z
var to_poi = (poi.global_position - player.global_position).normalized()
var angle = direction.angle_to(to_poi)
# 将角度映射到UI位置
visibility_range_begin 和 end 来处理LOD,而无需专用的LOD节点。Thread.new() 加载区块以防止帧卡顿。每周安装量
49
仓库
GitHub 星标数
59
首次出现
2026年2月10日
安全审计
安装于
opencode48
codex47
gemini-cli47
kimi-cli46
github-copilot46
amp46
Expert blueprint for open worlds balancing scale, performance, and player engagement.
ResourceLoader.load_threaded_request() to prevent "Loading Hitches" and frame freezes.call_deferred() to safely apply background thread chunk instantiations back to the main thread.queue_free() and nullify references to prevent Out-Of-Memory (OOM) crashes.store_var) for high-speed I/O._process(); strictly use _physics_process() for deterministic interaction at fluctuating framerates.MeshInstance3D nodes for massive foliage; strictly use MultiMeshInstance3D to batch hundreds of thousands of meshes into a single GPU draw call.OccluderInstance3D nodes at runtime; this forces a CPU BVH rebuild and causes severe micro-stuttering.CSGShape3D nodes active in exported builds; strictly bake them into static ArrayMesh geometry before shipping.NavigationPathQueryParameters3D to limit pathfinding to localized active regions.find_child() or deep tree iteration for global state (e.g., Time of Day); strictly use Scene Groups (call_group()) for optimized broadcasting.| Phase | Skills | Purpose |
|---|---|---|
| 1. Tera | godot-3d-world-building, shaders | Large scale terrain, tri-planar mapping |
| 2. Opti | level-of-detail, multithreading | HLOD, background loading, occlusion |
| 3. Data | godot-save-load-systems | Saving state of thousands of objects |
| 4. Nav | godot-navigation-pathfinding |
Loading and unloading the world around the player.
# world_streamer.gd
extends Node3D
@export var chunk_size: float = 100.0
@export var render_distance: int = 4
var active_chunks: Dictionary = {}
func _process(delta: float) -> void:
var player_chunk = Vector2i(player.position.x / chunk_size, player.position.z / chunk_size)
update_chunks(player_chunk)
func update_chunks(center: Vector2i) -> void:
# 1. Determine needed chunks
var needed = []
for x in range(-render_distance, render_distance + 1):
for y in range(-render_distance, render_distance + 1):
needed.append(center + Vector2i(x, y))
# 2. Unload old
for chunk in active_chunks.keys():
if chunk not in needed:
unload_chunk(chunk)
# 3. Load new (Threaded)
for chunk in needed:
if chunk not in active_chunks:
load_chunk_async(chunk)
Solving the floating point precision error (jitter) when far from (0,0,0).
# floating_origin.gd
extends Node
const THRESHOLD: float = 5000.0
func _process(delta: float) -> void:
if player.global_position.length() > THRESHOLD:
shift_world(-player.global_position)
func shift_world(offset: Vector3) -> void:
# Move the entire world opposite to the player's position
# So the player creates the illusion of moving, but logic stays near 0,0
for node in get_tree().get_nodes_in_group("world_root"):
node.global_position += offset
Tracking "Did I kill the bandits in Chunk 45?" when Chunk 45 is unloaded.
# global_state.gd
var chunk_data: Dictionary = {} # Vector2i -> Dictionary
func set_entity_dead(chunk_id: Vector2i, entity_id: String) -> void:
if not chunk_data.has(chunk_id):
chunk_data[chunk_id] = {}
chunk_data[chunk_id][entity_id] = { "dead": true }
Merging 100 houses into 1 simple mesh when viewed from 1km away.
Compass bar logic.
func update_compass() -> void:
for poi in active_pois:
var direction = player.global_transform.basis.z
var to_poi = (poi.global_position - player.global_position).normalized()
var angle = direction.angle_to(to_poi)
# Map angle to UI position
visibility_range_begin and end on MeshInstance3D to handle LODs without a dedicated LOD node.Thread.new() for loading chunks to prevent frame stutters.Weekly Installs
49
Repository
GitHub Stars
59
First Seen
Feb 10, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode48
codex47
gemini-cli47
kimi-cli46
github-copilot46
amp46
GSAP 框架集成指南:Vue、Svelte 等框架中 GSAP 动画最佳实践
3,700 周安装
| AI pathfinding on large dynamic maps |
| 5. Core | floating-origin | Preventing precision jitter at 10,000+ units |