Skip to content

Commit 2d18fa9

Browse files
feat(vibegame): add terrain, audio assets and batch setup for simple-rpg
Add 2048x2048 terrain heightmap (10km world, seed 42) with terrain.json metadata. Update index.html with terrain config (levels=4, 16x16 chunks), spawn groups, camera and lighting. Add 8 generated audio SFX (hero, goblin, slime, merchant, potions, sword, shield, chest). Add batch scripts and presets-local.yaml for asset generation. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent fc0b834 commit 2d18fa9

16 files changed

Lines changed: 105 additions & 1856 deletions

File tree

VibeGame/examples/simple-rpg/index.html

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<!-- Fill + sol: mais fill no hemisfério + sol um pouco mais alto = sombras mais curtas e terreno menos “enterrado”. -->
3939
<GameObject
4040
ambient-light="sky-color: 0xd8ecff; ground-color: 0x726a58; intensity: 0.84"
41-
directional-light="color: 0xfff8f2; intensity: 1.78; direction-x: -0.92; direction-y: 1.55; direction-z: -0.78; cast-shadow: 1; shadow-map-size: 4096; distance: 55"
41+
directional-light="color: 0xfff8f2; intensity: 1.78; direction-x: -0.92; direction-y: 1.55; direction-z: -0.78; cast-shadow: 1; shadow-map-size: 4096; distance: 120"
4242
>
4343
</GameObject>
4444

@@ -83,31 +83,31 @@
8383
spatial="false"
8484
></AudioSource>
8585

86-
<!-- Relva: tom um pouco mais claro para ler melhor nas sombras (sem mexer no motor). -->
86+
<!-- 10 km × 10 km terrain — 16×16 chunks (levels=4), 2048×2048 heightmap. -->
8787
<Terrain
8888
pos="0 0 0"
89-
world-size="768"
90-
max-height="28"
91-
levels="6"
92-
resolution="64"
93-
lod-hysteresis="1.25"
89+
world-size="10000"
90+
max-height="200"
91+
levels="4"
92+
resolution="128"
93+
lod-hysteresis="1.3"
9494
lod-distance-ratio="2"
95-
height-smoothing="0.22"
96-
height-smoothing-spread="1.15"
95+
height-smoothing="0.3"
96+
height-smoothing-spread="1.25"
9797
heightmap="/assets/terrain/heightmap.png"
98-
collision-resolution="32"
98+
collision-resolution="64"
9999
skirt-width="0.015625"
100-
roughness="0.5"
100+
roughness="0.85"
101101
metalness="0"
102-
normal-strength="0.5"
102+
normal-strength="0.6"
103103
base-color="#96ad78"
104104
></Terrain>
105105

106106
<!-- Água gerada dinamicamente a partir de /assets/terrain/terrain.json no bootstrap. -->
107107

108108
<Fog
109109
color="#dde6d4"
110-
density="0.001"
110+
density="0.00025"
111111
mode="exponential"
112112
height-falloff="0.48"
113113
base-height="0"
@@ -118,7 +118,7 @@
118118

119119
<PlayerGLTF
120120
name="hero"
121-
pos="210 75 185"
121+
pos="5000 250 5000"
122122
model-url="/assets/models/hero.glb"
123123
script="auto-attacker.ts"
124124
></PlayerGLTF>
@@ -127,7 +127,7 @@
127127

128128
<!-- Pós: nítido primeiro (sem CA); bloom/grain/vignette moderados — o pacote “AAA” anterior é que “desfocava”. -->
129129
<FollowCamera
130-
target-distance="7"
130+
target-distance="12"
131131
target-pitch="0.32"
132132
yaw-smoothness="0.055"
133133
position-lag="0.18"
@@ -143,10 +143,10 @@
143143
<!-- Pilares Y-up (GLB corrigido com scripts/fix-glb-yup-feet.py); só euler 0 no spawn. -->
144144
<SpawnGroup
145145
profile="tree"
146-
count="30"
146+
count="80"
147147
seed="11"
148-
region-min="-330 0 -330"
149-
region-max="330 0 330"
148+
region-min="1000 0 1000"
149+
region-max="9000 0 9000"
150150
max-slope-attempts="180"
151151
pick-strategy="random"
152152
scale-min="1.5"
@@ -165,10 +165,10 @@
165165

166166
<SpawnGroup
167167
profile="gltf-crate"
168-
count="30"
168+
count="60"
169169
seed="23"
170-
region-min="-280 0 -280"
171-
region-max="280 0 280"
170+
region-min="1500 0 1500"
171+
region-max="8500 0 8500"
172172
max-slope-attempts="120"
173173
pick-strategy="random"
174174
>
@@ -182,13 +182,12 @@
182182
></GLTFDynamic>
183183
</SpawnGroup>
184184

185-
<!-- ~660×660 m² → ~0,436 km²; 200 obj/km² → ~87 árvores (ajusta density-per-km2). Escala 1,5–4× linear; yaw só em múltiplos de 45°. -->
186185
<SpawnGroup
187186
profile="tree"
188-
density-per-km2="200"
187+
density-per-km2="60"
189188
seed="7"
190-
region-min="-330 0 -330"
191-
region-max="330 0 330"
189+
region-min="0 0 0"
190+
region-max="10000 0 10000"
192191
max-slope-attempts="220"
193192
pick-strategy="random"
194193
scale-min="1.5"
1.63 MB
Binary file not shown.
1.65 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.72 MB
Binary file not shown.
1.56 MB
Binary file not shown.
Binary file not shown.
9.09 KB
Loading

0 commit comments

Comments
 (0)