Commit Graph
105 Commits
Author SHA1 Message Date
西风逍遥游 f7b732def2 feat(tactics): add deterministic battle module and KayKit showcase 2026-08-29 09:23:46 +08:00
西风逍遥游 01661c60cb Merge remote-tracking branch 'origin/dev' into codex/rpg-api-gap
# Conflicts:
#	scripts/architecture_contracts.json
2026-08-29 03:13:27 +08:00
西风逍遥游 6eeb16a3e8 fix(ci): satisfy architecture-contract and binding-doc gates
Address the two failing CI checks:
- Module layering: document the new RPGActor::release binding in rpg.md
  and bind getAttackSpeed/getAttackTimesAdd so the doc matches the bindings.
- Architecture contracts:
  - ecs-system: register the 10 new RPG systems (LevelSystem, VitalsSystem,
    TraitSystem, ClassSystem, QuestSystem, Tracker, Battle, BattleSystem,
    EquipmentSystem, LootSystem) in scripts/architecture_contracts.json.
  - api-lifetime: add @ownership/@lifetime Doxygen to raw-pointer accessors
    (registry find() and Battle actor/event accessors).
  - api-shape: mark script-facing bool operations as compatibility facades
    in their Doxygen; rename QuestSystem::requiresMet -> hasMetRequirements
    so the predicate name passes the lexical predicate check.
2026-08-28 22:21:13 +08:00
西风逍遥游 9ff0a026eb feat: add climbing and parkour system 2026-08-28 20:21:50 +08:00
西风逍遥游 63246b8c68 fix: complete architecture consolidation contracts 2026-08-28 00:01:55 +08:00
西风逍遥游 293be41d66 Merge remote-tracking branch 'origin/dev' into codex/architecture-consolidation
# Conflicts:
#	cmake/module_manifest.cmake
#	docs/usr/modules/procgen.md
#	src/engine/CMakeLists.txt
#	src/engine/cmdline/Run.cpp
#	src/engine/common/ScriptModule.h
#	src/modules/animation/Animation.cpp
#	src/modules/physics/World.cpp
#	src/modules/physics/World3D.cpp
#	src/modules/procgen/Procgen.cpp
#	src/modules/procgen/Procgen.h
#	src/modules/scene/SceneCapabilities.cpp
#	src/modules/schema/Schema.cpp
#	src/modules/schema/Schema.h
2026-08-27 14:52:28 +08:00
西风逍遥游 a8b8e83128 refactor: consolidate engine architecture contracts 2026-08-27 12:54:48 +08:00
西风逍遥游 112ace39c2 feat: integrate EveScript across engine tooling 2026-08-26 21:56:34 +08:00
西风逍遥游 437a2b795a Merge branch 'dev' into codex/error-logging-audit 2026-08-26 14:29:00 +08:00
西风逍遥游 1552bdc3c6 ci: allowlist undocumented procgen getBool/setBool bindings
Pre-existing dev failure: Procgen.cpp binds addFunc('getBool'/'setBool')
without documenting them in procgen.md, which fails the script-binding
documentation check for any PR against dev. Acknowledge the gap via the
known-gaps allowlist (unrelated to the logging change).
2026-08-26 10:37:59 +08:00
西风逍遥游 d539530b27 Merge pull request #260 from EVEngine/codex/particle-system-professional
feat(particles): professional particle system pipeline
2026-08-26 10:15:28 +08:00
西风逍遥游 fd04a8a019 Merge pull request #259 from EVEngine/codex/mature-shaders
feat(stylize): port mature Unity/Godot-style effect shaders
2026-08-26 09:45:51 +08:00
西风逍遥游 279975027e feat(stylize): port mature Unity/Godot-style effect shaders
Add 7 shaders to the stylize module, exposed through the existing
Style* runtime and Squirrel API (no new module or bindings):

- Mesh materials (reuse mesh3d_toon.vert): rim light, dissolve,
  hologram, snow accumulation.
- Post passes: vignette, chromatic aberration, film grain.

Original GLSL implementations of common techniques, not verbatim
copies (see docs/dev/ported-material-shaders.md for licensing).

Adds EffectShaders.{h,cpp} with param tables + uniform binding +
shader creation, wired via delegation from StyleShaders.cpp, plus
SPIR-V embeds and per-module tests (test/stylize_effects.cpp).
2026-08-26 08:22:30 +08:00
西风逍遥游 c3dc33b4c6 Merge remote-tracking branch 'origin/dev' into codex/particle-system-professional
# Conflicts:
#	src/modules/graphics/vulkan/GraphicsPipeline.cpp
2026-08-26 07:55:16 +08:00
西风逍遥游 ba0c343b2e feat(particles): add scene-color distortion materials 2026-08-26 04:17:57 +08:00
西风逍遥游 a4ed45fa49 feat: add procedural civilization-style hex terrain 2026-08-26 02:50:01 +08:00
西风逍遥游 f72d2cd019 feat(particles): add GPU-resident simulation and indirect rendering 2026-08-26 02:41:31 +08:00
西风逍遥游 c89d67862e test(devlab): wait for hot-reload watcher 2026-08-25 20:03:32 +08:00
西风逍遥游 9e9c6f9874 merge(dev): integrate WebGPU parity with latest rendering changes 2026-08-25 15:05:07 +08:00
西风逍遥游 727abd9386 ci(webgpu): validate browser-rendered frames 2026-08-25 07:56:31 +08:00
西风逍遥游 dc89d23328 ci(graphics): compare Vulkan and WebGPU render artifacts 2026-08-25 02:39:23 +08:00
西风逍遥游 30fcb3ea80 Merge pull request #232 from EVEngine/codex/spritestack-2d
refactor(spritestack): use the 2D rendering pipeline
2026-08-25 02:05:49 +08:00
西风逍遥游 1bbd8b57b2 refactor(spritestack): use the 2D rendering pipeline 2026-08-25 00:26:09 +08:00
西风逍遥游 84777ff6c1 Merge origin/dev into codex/animation-mainstream 2026-08-24 22:46:53 +08:00
西风逍遥游 d664b15f10 feat(animation): add built-in GPU skinned mesh pipeline 2026-08-24 22:17:55 +08:00
西风逍遥游 fb8390e006 Merge pull request #220 from EVEngine/codex/card-presentation-3d-api
feat(card): add presentation bridge APIs
2026-08-24 18:32:31 +08:00
西风逍遥游 6250111ec2 feat(card): add presentation bridge APIs 2026-08-24 17:05:27 +08:00
西风逍遥游 85e1709d30 feat(graphics): composite froxel atmosphere volumes 2026-08-24 15:39:30 +08:00
sunxfancy b152da9a1c feat(graphics): add procedural volumetric cloud rendering 2026-08-23 16:33:32 +08:00
西风逍遥游 5daf089955 feat(decal): P0 screen-space decal framework with albedo blending
Adds the box-projected decal layer between the G-buffer and forward passes: RenderControl decal feature (implies gbuffer); Vulkan DecalLayer resources + premultiplied-alpha pass + unit-box projection shader reading hwDepth/GBuffer normal; mesh3d bindings 8/9/10 with albedo over-blend before lighting (clustered + GPU-driven bound too); RenderSystem3D DecalExtraDrawer hook; new decal module (L4, script Decal) with DecalManager spawn/remove/quotas/lifetime fade; compile_decal_shaders.py; tests incl. GPU smoke (red decal on white plane).
2026-08-23 00:03:19 +08:00
西风逍遥游 1046c57887 ci: extend binding doc gate from new chapters to all modules
scripts/check_bindings.py now treats pre-existing doc gaps as registered
debt: scripts/check_bindings_gaps.txt (module:binding, regenerated via
--write-gaps, 857 entries) turns them into warnings, while any NEW bound
name missing from its doc chapter fails the check. make check/bindings and
the CI layering job now run the full --strict check instead of the ten
newly-authored chapters, so docs cannot silently drift from bindings
anywhere in the tree.
2026-08-22 11:55:35 +08:00
西风逍遥游 7def184397 merge: integrate origin/dev (webgpu-progress, quality-gates) into codex/0.2.0-prep
Resolved conflicts:
- test/*: keep the shared Fixtures.h migration (drop the per-file
  openGfxWindow copies that dev still had).
- vulkan/Graphics.cpp: keep dev's extName loop variable rename AND the
  headless set_headless() line.

Local win32-debug build + headless/sampler/mocks/binding tests pass after
forcing a rebuild of EVProcgen (stale object from the pre-merge tree caused
a duplicate PbrTextureSet::destroy symbol).
2026-08-22 09:37:37 +08:00
西风逍遥游 2788021701 Merge pull request #169 from EVEngine/codex/webgpu-progress
WebGPU: playground, SSAO, clustered lighting, voxel AO & custom shaders
2026-08-22 09:29:54 +08:00
西风逍遥游 e82887921a feat(quality): script-binding self-check (source vs docs) + runtime binding smoke
- scripts/check_bindings.py: scans every addFunc/addVar in src/modules and
  greps the matching docs/usr/modules chapter. Missing names are warnings by
  default (large pre-existing doc debt); --strict + --modules turn them into
  CI failures. Wired as make check/bindings and a step in the CI layering
  job for the ten newly-authored chapters (avatar, buildingfx, camera,
  database, dialogue, grid, housegen, sceneloader, stylize, virtualgeometry),
  so those chapters cannot silently drift from the bindings.
- test/binding_selfcheck.cpp: builds a script VM with every module exposed,
  constructs the light modules and asserts curated hot bindings exist
  (eve.reflect itself is covered by the existing ReflectScript test).
2026-08-22 08:35:24 +08:00
西风逍遥游 811eff1c3a ci(quality): warnings-as-errors gate, sanitizers, smoke, Python lint/tests
- EVENGINE_ENABLE_STRICT_WARNINGS option: MSVC /W4 /WX, GCC/Clang
  -Wall -Wextra -Werror, with documented noise suppressions and
  -isystem/-external:I for third-party headers; enabled on the
  Windows/Linux debug CI jobs.
- Fix warnings across engine, modules and tests exposed by the gate,
  including real bugs (incomplete-type deletes, Timespan microsecond
  overflow, overload hiding, enum switch gaps, dead code).
- Add Linux ASan+UBSan job, example smoke step, python-tools test
  job, ruff config (scripts+tools), weekly Linux coverage job and a
  CodeQL workflow.
2026-08-22 02:27:37 +08:00
西风逍遥游 87b2731fb6 Merge remote-tracking branch 'origin/dev' into codex/examples-devx-ai-native
# Conflicts:
#	Makefile
2026-08-22 00:50:23 +08:00
西风逍遥游 7228277392 fix(ci): make DevLab MCP test robust to slow runners
CI hit a python socket timeout connecting to the embedded MCP server,
likely because the sed-triggered hot reload delayed frame-loop MCP pumping
on a slower runner. Bump the socket timeout to 30s, retry eve_status, and
dump the eve log tail on failure so future CI failures carry the actual
engine output.
2026-08-22 00:46:45 +08:00
西风逍遥游 8af30cb1d3 docs: resolve merge with dev, keep gallery link in user guide 2026-08-21 22:50:38 +08:00
西风逍遥游 e3ad78d30c docs: add example render gallery with real engine captures
Render 14 examples with the prebuilt eve host and capture the actual
swapchain frame via gfx.saveFramePng (capture_root.nut wrapper), then
publish the PNGs under docs/images/examples with a gallery README and a
link from the user guide.

Adds scripts/capture_example.ps1 + scripts/capture_root.nut for
regenerating the captures on any example.
2026-08-21 22:48:40 +08:00
西风逍遥游 ef83a2eb89 Merge remote-tracking branch 'origin/dev' into codex/examples-devx-ai-native 2026-08-21 22:28:12 +08:00
西风逍遥游 b93247cf5f fix(ci): verify DevLab via MCP instead of grepping captured print
With --debug the engine routes Squirrel print() into the DevTools console,
so 'DevTools attached' never reaches stdout/stderr and the log-grep test
always timed out. The test now starts eve with --mcp-port, waits for the
stderr 'MCP listening' line, and verifies attachment + hot reload through
the embedded MCP server (eve_status attached + eve_eval lab.reloads).
2026-08-21 22:03:31 +08:00
西风逍遥游 27e08963e2 fix(filesystem): sq_file handle never stored _path/_data
sq_newslot(-3) expects a [table, key, value] three-level stack; the code
pushed only the value, so the slot write silently targeted the native
frame's mode argument (a string, not a table) and was skipped. Handles
therefore had methods but empty _path/_data, making read()/getSize()
throw 'file not readable' on every platform where the stack layout
did not accidentally alias the table.

Fix cardgame's ui.sameLine() calls to pass an id (the binding requires
one), and make the example smoke failure output print non-frame-error
lines so future CI failures carry the real root cause instead of being
buried under per-frame error spam.
2026-08-21 21:39:41 +08:00
西风逍遥游 453d33387f Merge remote-tracking branch 'origin/dev' into codex/gpu-driven-rendering
# Conflicts:
#	AGENTS.md
#	external/VKBuilder
#	src/modules/graphics/Graphics.h
#	src/modules/graphics/RenderControl.cpp
#	src/modules/graphics/RenderSystem3D.cpp
#	src/modules/graphics/vulkan/Graphics.cpp
#	src/modules/graphics/vulkan/Graphics.h
2026-08-21 20:45:42 +08:00
西风逍遥游 63445728e1 feat(webgpu): online playground with live script hot-reload
Adds a self-contained browser playground (editor + canvas + console + REPL)
around the Emscripten WebGPU build, plus the engine fixes required to render:
- JS<->Squirrel bridge (apply/eval/read/pause) and Emscripten 6 exports
- soft hot-reload via load.nut handle_change with __pg state preservation
- fix Uint16 index buffer byte sizes in SetIndexBuffer calls
- fix dangling GbufferSlot/SceneColorSlot gpuHandle pointers (std::move bug)
- fallback shadow depth texture when no shadow map is configured
- fix WGSL syntax (mod/ivec2) and default shadow sampler maxAnisotropy
- serve_webgpu.py COOP/COEP server and playground docs/demos/assets
2026-08-21 20:35:20 +08:00
西风逍遥游 96a96de58d fix(examples): scene-ecs addNode arity; smoke prints full failing log tail
scene.addNode(id, name) requires both params; the example passed one.
smoke_examples.sh now dumps the last 25 lines of a failing example's log
so CI failures carry the full error context.
2026-08-21 19:55:37 +08:00
西风逍遥游 f7962f43fe feat(examples): developer-experience and AI-native showcase examples
- devlab: flagship --debug example (console/snapshot/AI panel/pause/hot
  reload/error slice), make devlab target with RUN_ARGS support
- ai-game: agent-drivable live game + agent_demo.py (pause/read/mutate/
  verify/snapshot/restore/screenshot loop)
- ai-editor: headless eve mcp editor host demo (JSON View + ViewModel MVVM)
- examples: fill all missing READMEs + config.nut, add examples/ index
- load.nut: add key_just_pressed/clampf/persist helpers; dedupe 19 examples
- rpg/cardgame: move JSON definitions to data files
- fix eve mcp crash: ModuleManager::requireAll() instantiates modules in
  the headless host (IEditorHost etc. were null)
- graphics: actionable screenshot error when readback was just enabled
- CI: smoke all examples (devlab with --debug) + DevLab hot-reload test

Fixes surfaced by the new CI smoke (examples had never been smoke-tested):
- scene_director kit: camera slot doubled as function + instance and was
  nulled by reset(); move the live Camera3D into cameraObj
- readTextFile used non-existent readn()/len(); use file.read()
  (rpg/cardgame/hex-levels)
- daynight used non-existent keyboard.wasPressed() -> key_just_pressed
- outline passed ints to float-only drawSolidRect; linear-structures
  slider passed an int value
- scene-ecs beginNode() requires (id, name); ai-stage guarded compilestring
- smoke_examples.sh: timeout -k 3 so SIGTERM-ignoring hosts cannot hang CI
2026-08-21 19:18:52 +08:00
西风逍遥游 eae8cfbc38 feat(graphics): stage 3 - VirtualGeometry hardware-raster integration
Virtual-geometry assets now render through the main GPU-driven frame instead of
the standalone software-raster experiment:

- Shared VG scene in vulkan::Graphics: pooled positions/triangles/clusters +
  per-cluster asset ids + per-slot visible list / indirect commands / asset
  models + materials. Meshes attach an asset via gpuDrivenVgAttachToMesh;
  GpuMeshRecord.vgAssetId routes them out of the instance chain.
- vg_main_cull.comp runs in the main frame's compute section (frustum + HZB
  against the per-asset model) and emits per-cluster VkDrawIndirectCommand
  (vertexCount = triCount*3, firstInstance = cluster id).
- Hardware raster: mesh3d_gbuffer_vgvis draws clusters with NO vertex input -
  gl_InstanceIndex = cluster, gl_VertexIndex = triangle corner, positions from
  the cluster stream; face normals computed from world edges; writes the same
  visID/visBary attachments (bit31 marks VG clusters).
- resolve_vis.frag decodes VG clusters: asset -> material, interpolates from
  the cluster stream, flat-tint shading via the shared PBR core, writes
  gl_FragDepth so later transparent draws depth-test correctly.
- gpu_emit.comp additionally writes non-indexed VkDrawIndirectCommand per
  bucket (the 20-byte indexed layout's firstInstance sits at offset 16, which
  vkCmdDrawIndirect (16-byte commands) ignores - this was the vis pass showing
  only instance 0). The vis pass now draws from that command stream.
- All per-frame bindless updates (vis samplers 15/16, VG bindings 26-29) moved
  BEFORE the set is bound to the recording command buffer (no UPDATE_AFTER_BIND;
  updating a bound set invalidates the CB - caught by validation).
- drawIndirectCount Vulkan 1.2 feature enabled at device creation; the VG
  count buffer carries VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT.
- RenderControl gains the "visResolve" feature flag (the stage-3 resolve path
  was previously enabled via an unknown flag that setFeature silently dropped).

Verified: GpuDriven.visResolveParity now genuinely exercises the resolve path
(maxDelta = 0.0 vs forward); GpuDriven.vgVisResolve renders a sphere's clusters
through the main frame (9 visible after frustum+HZB, tint-correct center,
frustum-culled to 0 behind the camera); 19 render tests + 3x suite repeat pass;
validation shows no new VUIDs.
2026-08-21 19:04:13 +08:00
西风逍遥游 f7d526d528 feat(graphics): stage 3 - visibility buffer + fullscreen resolve + vertex pool
Opaque GPU-driven instances now render through a deferred-style path under the
new "visResolve" render-control flag (1x scene pass):

- GBuffer gains visID (R32G32UI: instance + pooled triangle base) and visBary
  (R16G16F) attachments plus a vis render-pass variant and pipeline.
- The vis pass draws the cull chain's indirect commands with NO vertex input:
  the vertex shader fetches position/normal/uv from new pooled buffers via
  gl_VertexIndex (non-indexed draw reuses the same indirect commands), which
  also makes the per-vertex barycentric constants exact (gl_VertexIndex % 3).
  Triangle ids are computed in the vertex stage and passed flat, avoiding
  gl_PrimitiveID in the fragment (which would require the SPIR-V Geometry
  capability / geometryShader feature).
- resolve_vis.frag runs as a fullscreen triangle inside the scene color pass:
  it reconstructs world pos / normal / uv from the pool using the barycentrics,
  shades with the shared PBR code and writes the opaque depth (gl_FragDepth),
  so later hair/transparent draws depth-test correctly.
- New vertex pool (positions/normals/uvs as vec4/vec4/vec2 SSBO arrays +
  u32 index pool, host-visible, grow-by-2x with waitIdle); meshes are pooled
  lazily at registerMeshRecord and GpuMeshRecord.vertexOffset/indexOffset now
  point into the pool. Bindless set1 gains bindings 15/16 (vis samplers) and
  18-21 (pool buffers), all rewritten per slot/frame following the safe-point
  rule from 8f156a6.
- pbr_shade.glsl extracts the GPU-driven PBR/CSM/cloud/env shading so the
  forward path and the resolve share one source of truth.

Verified: GpuDriven.visResolveParity passes with maxDelta=0.0 vs the forward
path (same cull, same pixels); full GpuDriven + RenderSystem3D/Shadow3D/
Lighting3D suites pass; validation shows no new VUIDs (the SPIR-V Geometry
capability error from gl_PrimitiveID was removed by the flat-triangle-base
change).
2026-08-21 17:22:40 +08:00
西风逍遥游 d82d246465 gpu-driven stage 2: GPU frustum/HZB cull + GPU-written indirect draws
Add the stage-2 compute chain to the main frame:
- ComputePass wrapper + compile script for compute SPIR-V (hzb_build /
  gpu_cull / gpu_emit); bindless set extended with cull UBO, visible flags,
  compacted instances, indirect commands, HZB buffer and GBuffer depth.
- HZB: R32F max-downsampled mip chain per frame slot built from the
  GBuffer depth after the GBuffer pass (buffer-based; offsets header at slot
  start). Same-frame self-occlusion handled by testing the bounding sphere's
  FRONT depth, and near-zero depth (uninitialized/corner garbage) never
  occludes.
- Cull: per-instance Gribb-Hartmann frustum test + HZB occlusion test, flags
  written per instance; emit compacts visible instances per CPU-provided
  bucket layout and fills per-bucket indirect commands with atomic counters.
- Frame wiring: begin3DFrame defers opening the scene color pass when the
  cull chain is live, so the compute section records before the opaque
  draws; RenderSystem3D uploads sorted instances, runs cull+emit, opens the
  pass and draws with GPU-written commands (per-bucket, empty buckets no-op).
  Fallback to stage 1 when compute caps are missing. gpuDriven now forces
  the GBuffer pass (HZB source).
- Known limitation: HZB is built from the same-frame GBuffer, so objects
  already in the GBuffer cannot be occlusion-culled until the GBuffer itself
  is culled (stage 3 vis buffer); the chain is verified with frustum culling
  (2 of 5 instances culled) and pixel parity.

Tests: GpuDriven.opaqueForwardCullParity (5 spheres, 2 outside frustum ->
3 visible / 3 non-empty buckets, pixel parity < 0.03); all 6 GpuDriven
tests pass (integrated GPU; the AMD driver intermittently crashes at
vkCreateImage during init - environmental).
2026-08-21 15:09:39 +08:00
西风逍遥游 95b1491e86 feat(graphics): GPU-driven phase 1 - CPU-built indirect draws for opaque forward
- Shared GPU-driven types (GpuDrivenTypes.h) in the backend-independent
  graphics namespace; IndirectBuilder (pure CPU) sorts instances by
  (pipeline, material, mesh) and merges buckets into GpuIndirectCommand.
- Base Graphics gains a capability-gated seam (supportsGpuDriven3D,
  gpuDrivenMeshRecord/MaterialRecord, gpuDrivenSubmitOpaque); WebGPU keeps
  the default false.
- Vulkan backend: mesh3d_gpudriven vert/frag (instance + bindless textures +
  material table, mirroring mesh3d PBR/CSM/IBL shading), a dedicated pipeline
  with a firstInstance push constant, per-frame arena upload of the sorted
  instance buffer + commands, and per-bucket vkCmdDrawIndexedIndirect.
- Bindless set1 uses fixed-size descriptor arrays + dynamic indexing instead
  of nonuniform() because this toolchain's glslc lacks
  GL_EXT_nonuniform_qualifier; indices are uniform per bucket (one material
  per indirect draw), which is spec-legal. Caps requirements updated to
  match (drops runtime descriptor arrays / non-uniform indexing).
- RenderControl feature 'gpuDriven' (default OFF; opt-in until runtime
  verified). RenderSystem3D collects opaque instances when enabled and
  eligible (default camera, Material-driven, no custom shader, no clustered);
  any ineligible item falls back to the legacy per-draw path.
- Tests: IndirectBuilder merging/stable-order/pipeline-separation (CPU).
  GPU-driven runtime tests (GpuDriven.*) remain pending driver recovery.

Rendering is unchanged by default (feature off).
2026-08-20 21:30:54 +08:00