Commit Graph
118 Commits
Author SHA1 Message Date
西风逍遥游 23324e2216 Merge branch 'main' of https://github.com/EVEngine/EVEngine 2026-08-19 11:34:06 +08:00
西风逍遥游 c63725e5df Merge remote-tracking branch 'origin/main' into codex/ui-viewport-terrain-editor
# Conflicts:
#	src/modules/graphics/RenderSystem3D.h
#	src/modules/ui/UI.h
#	src/modules/ui/UISystem.h
#	src/modules/ui/Widget.h
2026-08-19 09:59:41 +08:00
西风逍遥游 4f46060765 Merge pull request #119 from EVEngine/codex/asserts-and-api-docs
feat: zeroerr parameter validation + Doxygen API documentation
2026-08-19 09:43:21 +08:00
西风逍遥游 1bce65f794 Merge pull request #114 from EVEngine/codex/test-suite-optimization
test: prune redundant cases, bundle CTest discovery, fast headless defaults
2026-08-19 09:40:38 +08:00
西风逍遥游 90b49cb63b Merge branch 'main' of https://github.com/EVEngine/EVEngine 2026-08-19 09:15:37 +08:00
西风逍遥游 34f9d0045e feat(rpg): add RPG Quest Tracker design document and implementation plan
- Introduced a new document detailing the design of a universal quest tracker for the RPG module, covering objectives, policies, and event handling.
- Updated existing RPG framework documentation to reference the new quest tracking system.
- Created an implementation plan outlining the architecture, file structure, and initial tasks for developing the quest tracker.
2026-08-19 09:15:26 +08:00
西风逍遥游 c7de064bf4 Merge remote-tracking branch 'origin/main' into codex/ui-viewport-terrain-editor
# Conflicts:
#	src/modules/sceneloader/SceneLoader.cpp
#	test/sceneloader.cpp
2026-08-19 09:11:05 +08:00
西风逍遥游 4ac980118e test: default back to per-case CTest runs; bundles stay opt-in
CI showed GPU/window tests are ~70x slower when several share one
process (bundle/animation_sprite_spine.cpp: 373s vs 5s per-case under
Lavapipe), so the default make test/* now runs per-case (fast, process
isolated) and excludes bundle/* entries. Bundle runs remain available
via FILTER=bundle/<file>.cpp or ctest -L bundle for CPU-focused local
runs. ClassicScenes fast headless defaults (VIEW_SECONDS, PERF_FRAMES)
stay enabled.
2026-08-19 09:11:05 +08:00
西风逍遥游 a2dd8d7fb1 feat(ui): two-pass layout, images, events, virtualization, viewport
Gap-closing work for the declarative UI module vs UE/Unity/Godot:

- Layout: real measure pass (measureTree) + pure flexArrange with
  margin/padding/min-max/percent/anchor/absolute placement; window size,
  anchors and percentage sizing; script layout props.
- Widgets: Image/ImageButton (engine textures + nine-patch + tint/uv),
  Combo, text wrapping + CJK font candidates/ranges, InputText 1024B,
  virtualized ScrollList/virtualList.
- Events: script onClick/onChange callbacks with structured payloads
  (keeps the poll queues for compatibility).
- Tooling: UI JSON save/load (saveTreeJson/loadTreeJson), host pos tween
  animation, gamepad nav, per-frame UI stats.
- Viewport: embedded offscreen render target widget with input routing;
  RenderSystem3D::renderToCanvas preview pass + Graphics::renderScene3DToCanvas;
  editor.newHeightmapMesh/updateHeightmapMesh for heightmap terrain;
  examples/terrain-editor demonstrating orbit camera + raise/lower brush.
- Tests: 32 UI tests including real-window Vulkan smoke for the viewport.
2026-08-19 09:07:55 +08:00
西风逍遥游 4377e062dd feat: zeroerr parameter validation + Doxygen API documentation
Squashed onto current main. Adds src/engine/common/Assert.h (EV_PARAM_CHECK / EV_ASSERT backed by zeroerr), an EVENGINE_ENABLE_ASSERTS option (non-Debug builds strip ZEROERR_NO_ASSERT unless enabled), parameter checks at key entry points, Doxygen comments across headers, Doxyfile + make docs / CMake docs targets, and Windows setup + code conventions in AGENTS.md.
2026-08-19 09:01:12 +08:00
西风逍遥游 50a230f5a3 Revert "feat: zeroerr parameter validation + Doxygen API documentation (#113)"
This reverts commit 3f3e41990b, reversing
changes made to 7d6375bc95.
2026-08-19 08:36:18 +08:00
西风逍遥游 af0cae4e49 Merge branch 'main' into codex/asserts-and-api-docs
# Conflicts:
#	src/engine/cmdline/cmdline.h
#	src/modules/building/BuildingTypes.h
#	src/modules/building/Ghost.h
#	src/modules/building/JsonHelpers.h
#	src/modules/building/PlacementSystem.h
#	src/modules/building/PlacementWorld.h
#	src/modules/dialogue/Dialogue.h
#	src/modules/filesystem/HotReload.h
#	src/modules/gpgpu/Gpgpu.h
#	src/modules/graphics/Graphics.h
#	src/modules/inventory/JsonHelpers.h
#	src/modules/model3d/ModelData.h
#	src/modules/network/Network.h
#	src/modules/network/TcpSocket.h
#	src/modules/rpg/JsonHelpers.h
#	src/modules/scene/SceneHost.h
#	src/modules/tensor/GpuBackend.h
#	src/modules/tensor/Graph.h
#	src/modules/tensor/Tensor.h
#	src/modules/voxel/Chunk.h
#	src/modules/voxel/GreedyMesher.h
#	src/modules/voxel/VoxelWorld.h
2026-08-19 08:20:18 +08:00
西风逍遥游 fa06dc3be4 Merge remote-tracking branch 'origin/main' into codex/test-suite-optimization
# Conflicts:
#	cmake/ZeroErrDiscoverTestsImpl.cmake
#	src/modules/sceneloader/SceneLoader.cpp
#	test/voxel.cpp
2026-08-19 08:05:21 +08:00
西风逍遥游 3c1ff324ac Merge branch 'main' into codex/model3d-material-api 2026-08-19 07:44:47 +08:00
西风逍遥游 92e0c653a2 Merge pull request #115 from EVEngine/codex/network-module-improvements
network: reliable UDP transport, RPC and multi-peer host
2026-08-19 07:44:19 +08:00
西风逍遥游 6f3552a7c2 Merge pull request #116 from EVEngine/codex/voxel-engine-gap-improvements
feat(voxel): close feature/perf gap vs mainstream voxel engines
2026-08-19 07:43:01 +08:00
西风逍遥游 e98f125f21 feat(voxel): close feature/perf gap vs mainstream voxel engines
- Cross-chunk seam culling via GreedyMesher::ChunkSampler; border edits now
  invalidate the adjacent chunk; air writes no longer allocate chunks
- selectVisible meshes only after range/frustum culling
- DDA voxel raycast (CPU + script getters)
- Parallel remeshDirty(maxThreads) with serial fallback; output equals serial
- Vertex AO: Minecraft-style 4-corner AO packed 2bit x 4, Vulkan instancing +
  voxel_rect shaders (SPIR-V .inc regenerated); WebGPU accepts params (TODO)
- Persistence: serializeWorld/deserializeWorld (EVVX LE) + saveWorld/loadWorld;
  unloadChunksOutside + streamAround for player-centered streaming
- Terrain: reuse procgen::TerrainSampler (no new module), setTerrainParams +
  terrainHeightAt; script setTerrain/streamAround
- CPU tests + gap-analysis/module/user docs; local MSVC harness 1741 checks pass
2026-08-19 04:13:21 +08:00
西风逍遥游 0d596c5d38 test(model3d): material API, auto-assembly and glTF render smoke tests
Adds OBJ/glTF material API cases, buildRenderable wiring, an embedded-texture UV-orientation render assertion (top red / bottom blue, fails on V-flip) with PBR factor checks, and a CesiumMan glTF render smoke test. Local win32 regression: model3d 15/15 PASS (175 assertions), sceneloader 12/12, animation 62 PASS / 2 pre-existing warnings.
2026-08-19 04:12:54 +08:00
西风逍遥游 d75e3bcf0d network: reliable UDP transport, RPC and multi-peer host
- UdpLink: reliable/unreliable/unreliable-ordered UDP with ACK/retransmit,
  fragmentation, heartbeat and loss simulation; main-thread pump routing
- NetRpc: u16 msgId + payload envelope, C++ handlers and script closures
- NetHost: shared-socket multi-peer routing with auto peer ids and lifecycle
  events (peerconn/peerdisconn)
- NetReader/NetWriter: typed little-endian serialization primitives
- TcpSocket: queued sends with partial-write/would-block handling; connect
  timeout unit fix; UDP socket buffers raised to 1MiB
- Tests mirrored in test/network.cpp; docs: design spec + user module doc
2026-08-19 04:08:24 +08:00
西风逍遥游 75e4e5e51e test: prune redundant cases, bundle CTest discovery, fast headless defaults
- test/voxel.cpp: merge parameter-variant families into single cases
  (pack roundtrip, single voxel mesh, mesher API, frustum, decode
  planes/UV/origin, visible batches, dirty flags, remove chunk,
  registry) and drop 3 face-cull cases subsumed by the six-axis test;
  134 -> 90 cases, all assertions preserved.
- test/particles_attach_skin.cpp: fold followRotationOff / yzPlane /
  skinnedCacheReadable assertions into their siblings; 11 -> 8 cases.
- cmake/ZeroErrDiscoverTestsImpl.cmake: register one CTest bundle/<file>
  per test source (label bundle) alongside per-case entries, preferring
  zeroerr --list-format=plain with a legacy-format fallback; default
  make test/* runs -L bundle so the suite spawns ~115 processes instead
  of ~1385.
- Makefile: fast headless defaults for ClassicScenes (VIEW_SECONDS=0.3,
  PERF_FRAMES=30) and bundle-mode ctest invocation.
- sceneloader: apply the known scene-ecs merge fix (linkTarget/linkKind
  -> SceneLink) from codex/fix-sceneloader-merge-ci so this branch builds.
- docs: test-suite optimization + per-file pruning log.
2026-08-19 04:07:35 +08:00
西风逍遥游 228b5a0f15 docs: add Doxygen API comments, docs target, and Windows AGENTS.md
Normalize all header comments to Doxygen @brief form and fill in missing class/method docs across engine common, cmdline, and module headers (~2368 @brief entries). Add root Doxyfile, 'make docs' target, CMake docs target, .gitignore for docs/api, README/docs/dev updates, and a Windows (native) + code-conventions section in AGENTS.md.
2026-08-19 00:13:35 +08:00
西风逍遥游 e95248dbe5 Merge pull request #112 from EVEngine/codex/dialogue-procedural-generation
feat(dialogue): procedural dialogue generation v1 (.dnut C++ compiler + variables/conditions/pools)
2026-08-19 00:08:35 +08:00
西风逍遥游 8e19511202 Merge branch 'main' into codex/dialogue-procedural-generation 2026-08-18 21:58:09 +08:00
Cursor Agentand西风逍遥游 817524e76e fix(test): isolate tile collect and build xray pipelines off the render pass
TileRenderSystem::collect walks the global ECS, so leftover TileLayer
entities from earlier cases made tilesContributeDepthY (and dual-grid
depth sort) see extra draw items. Hide other layers first, matching
the rest of the map suite.

drawMeshShader always runs inside an open 3D pass, so lazily calling
vkCreateGraphicsPipelines for the xray variant crashed Lavapipe.
Create that pipeline with the shader (and recreate it on MSAA/RP
change) instead, and skip the draw if it is still missing.

Also refresh module counts after rebasing onto grid / buildingfx.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-18 13:46:25 +00:00
Cursor Agentand西风逍遥游 8a861597b4 docs: record the delivered state and add a trimming guide
Marks the architecture document as implemented, replaces the roadmap section
with what each step actually landed and the measured result, and regenerates
the module inventory against the post-change dependency graph (scene is L1 now,
gameplay modules no longer pull data, and each row names the first profile that
includes it).

Adds docs/usr/TRIMMING.md for the user-facing side: profiles, per-module
switches, how dependency closure and the configure-time conflict errors behave,
has_module() in scripts, what cannot be trimmed and why, and measured savings.
Linked from the user and developer indexes.

Headline numbers after S1-S6: dependency cycles 26 -> 0, layering back-edges
16 -> 3, JSON implementations 6 -> 1, modules using Poco 15 -> 9, boot scripts
2 -> 1, and any module trimmable on desktop where none were before.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-18 13:46:25 +00:00
Cursor Agentand西风逍遥游 ced3366ceb docs: reconcile module counts and verify quantitative claims
Count by module directory (51) throughout, and state the directory-vs-script-
class discrepancy up front: filesystem also exposes HotReload, Cmdline lives in
engine/cmdline, and data/tensor bind under different class names.

Also align the layer diagram with the script's computed depths, add math and
audio to the functional-domain table, and correct the figures that were
estimated during drafting (97 soft lookups, 202 cross-module includes,
136 Poco include sites of which 79 are JSON).

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-18 13:46:04 +00:00
Cursor Agentand西风逍遥游 c4fd641115 docs: add module orchestration and trimming architecture analysis
Analyse how the 53 modules currently collaborate and why none of them can be
trimmed outside the hardcoded WASM axis, then lay out a target architecture and
a six-step route to per-module build options.

Adds scripts/module_depgraph.py, which produces the dependency graph, the
7-layer topological ordering and the cycle list the document cites. Its --check
mode fails on any back-edge outside the 16 known ones, so it doubles as the CI
guardrail for step S1.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-18 13:46:04 +00:00
西风逍遥游 703b5e5353 feat(dialogue): procedural dialogue generation v1
Add data-driven procedural dialogue to eve.Dialogue:

- Variables: setVar/getVar*/hasVar/clearVar/clearVars with global and
  scene scopes; the scene scope auto-clears when the selected Scene host
  changes (polled in update()).
- Conditions: structured tables ({var,op,value} with eq/ne/gt/ge/lt/le/
  has/missing, all/any/not, script predicates) + evalCondition().
- Line pools: loadPoolsFromTable() with weight/when/meta/tags, seeded
  weighted selection (setRandomSeed), per-pool no-repeat history, and
  playLine()/playPool() that resolve {var} interpolation or i18n keys and
  auto-apply meta.expression/motion to bound avatars.
- .dnut authoring format compiled by a new C++ parser (DnutParser):
  loadPoolsFromDnut(source, path) / loadPoolsFromDnutFile(path); parse
  errors surface path:line via getLastPoolsError(). The previous Squirrel
  compiler script and its engine wiring are removed.
- Example (examples/dialogue) uses pools.dnut with mood/hour variables,
  scene-scope auto-clear demo, and hot reload via eve_asset_reload.
- Tests: C++ unit tests (dialogue_proc.cpp) covering variables,
  conditions, pools, selection/dedupe, meta, i18n, scene auto-clear and
  the .dnut parser; Squirrel integration test for the script-facing API.
- Docs: design doc updated with the new content model / API / format.
2026-08-18 21:08:19 +08:00
西风逍遥游 7820703cfa feat(building): 统一 Grid 抽象 + 3D 放置 + 多样式 Tilemap 打通
对照 Unity Grid/Tilemap 与 Grid Placement System 架构补齐建筑放置能力:

- 新增 grid 模块:GridConfig(rectangle/hexagon/isometric/staggered/iso-z-as-y、cellGap、stagger、XY/XZ 平面轴)+ 投影/占地旋转纯函数;map::TileProjection 委托复用,公开 API 不变。
- PlacementWorld 支持可选 GridConfig、多通道占用(channel)、bindTileLayer + GID 地形懒解析、XZ 平面 3D 放置、surface 表面接口(内置 plane)。
- BuildingDefinition 新增 channel/renderMode/visual2d/visual3d;rotationMode 支持 hex(60°)。
- 新增 buildingfx 渲染桥:按定义生成/同步 Renderable2D/3D、鬼影+占地光标、2D/3D 网格可视化。
- 新增 PlacementSession(放置/拆除/旋转/指针更新)。
- 测试:grid/building/buildingfx 新用例(REQUIRE 级)+ map/sceneloader 回归;示例 building-tilemap(等距/六角)、building-3d(XZ 地面)。
- 顺带修复 HEAD 上 sceneloader 未迁移 SceneLink 新 API 导致的编译失败(SceneLoader.cpp / test/sceneloader.cpp)。
2026-08-18 17:41:01 +08:00
西风逍遥游 011b8b7b5e Merge branch 'main' into codex/scene-ecs-integration 2026-08-18 10:55:33 +08:00
西风逍遥游 34a9a63bfa Merge pull request #105 from EVEngine/codex/eve-mcp-host
feat(mcp): headless eve mcp host with AI-crafted MVVM editors
2026-08-18 10:40:21 +08:00
西风逍遥游 27012cbc41 Merge pull request #102 from EVEngine/tools/gamedev-support
feat(devtools): add runtime console and REPL
2026-08-18 00:31:52 +08:00
西风逍遥游 21b6e18ad1 Merge pull request #101 from EVEngine/feature/rx
feat(rx): add reactive programming module
2026-08-18 00:31:28 +08:00
西风逍遥游 0a24d91b73 Merge pull request #93 from EVEngine/feature/virtual-geometry-nanite
feat(virtualgeometry): add Nanite-style virtualized geometry rendering
2026-08-18 00:30:37 +08:00
西风逍遥游 1c755f8940 feat(scene): scene/script-ECS integration, generic links, serialization & picking
Scene module overhaul: per-node script entities (SceneObject/SceneEntity/NodeRef), script ECS view-cache perf, generic multi-link system (renderable/physics/camera/audio), API completeness (transform getters, hierarchy ops, quaternions, tags/layer), incremental transforms, id index, reconcile moves, node events, JSON serialization, ray/frustum picking, spatial-index sync and SceneLoader auto AABB. Includes Cmdline/PhysFS argv0 robustness fix for unit tests.
2026-08-17 22:45:18 +08:00
西风逍遥游 4b24d1a157 feat(mcp): headless eve mcp host with AI-crafted MVVM editors
Adds 'eve mcp': a desktop-only headless MCP host (stdio by default, --port for TCP, --root for the project). It runs the full runtime, attaches DevTools (eve_eval / eve_run_script / snapshot), and starts the new EditorHost module that renders JSON-defined editor Views (ImGui) bound two-way to Squirrel ViewModel tables (MVVM), persists editors under editors/, and exposes the eve_host_* tool family (apply/state/set_value/events/capture/script/shutdown...). The stdio transport uses a background stdin reader and keeps stdout JSON-RPC-only; script print() is routed to stderr.

Tests: stdio handshake + tools/list round trip, host editor binding (VM<->View sync, set_value -> VM write + onChange events, save/reload persistence). Docs updated (AI与MCP支持.md, 命令行设计.md, tools/eve-mcp README) with the editor JSON protocol and Codex stdio setup.
2026-08-17 22:43:08 +08:00
西风逍遥游 0b8cfca633 feat(devtools): add runtime console and REPL 2026-08-17 22:06:16 +08:00
sunxfancy 38312f4a4f feat(rx): add reactive programming module 2026-08-17 22:01:48 +08:00
sunxfancy 788adcbb53 Merge remote-tracking branch 'origin/main' into feature/virtual-geometry-nanite
# Conflicts:
#	CMakeLists.txt
#	src/engine/CMakeLists.txt
#	src/modules/graphics/Graphics.cpp
#	src/modules/graphics/Graphics.h
2026-08-17 17:14:42 +08:00
西风逍遥游 7b27945c88 Merge branch 'main' into codex/ai-scene-director 2026-08-17 17:10:24 +08:00
西风逍遥游 f07774109b Merge pull request #96 from EVEngine/codex/sprite-stacking
feat(spritestack): sprite-stacking pseudo-3D rendering
2026-08-17 16:28:59 +08:00
西风逍遥游 0d0d97dbbb Merge pull request #98 from EVEngine/codex/i18n-module
feat(i18n): add game localization module
2026-08-17 16:02:04 +08:00
西风逍遥游 d71b126636 feat(particles): particle system feature set (P0-P2)
Rendering: rotation render fix, additive/opaque blend modes, flipbook animation, gradients and lifetime curves, unified DrawItem2D render path (Vulkan + WebGPU).

Simulation: timed bursts, prewarm, line/ring shapes, gravity, damping, velocity limits/curves, inherit velocity, local/world space, collision (bounds + resolver), CPU noise, sub-emitters, stretched trails, overflow policies, dt caps, offscreen sim skip.

Advanced: radial force fields, custom particle shaders, pooled Light2D particle lights, opt-in GPU-accelerated simulation with automatic CPU fallback.

Fixes: Vulkan pipeline builder lifetime bug (crash on window init), emitter-life emission timing, emit() syncs attachment position.

Tests: new coverage incl. scale regression (128 emitters).
2026-08-17 15:27:43 +08:00
sunxfancy b954ac9fd5 feat(i18n): add game localization module
Add an i18n module (eve.I18n) for game localization:
- Load per-language JSON locale tables from VFS or raw JSON.
- Dot-path key lookup with {name} placeholder substitution.
- CLDR-style plural rules (en/fr/ru/pl/cs/zh and more).
- Fall back to default language, then to the raw key.
- Optional file auto-reload via update(dt).

Self-contained JSON parser (no Poco) so it builds on WASM too.
Includes C++ + Squirrel script tests, user/module docs, an
examples/i18n demo, and i18n integration in the dialogue example.
2026-08-17 14:54:50 +08:00
西风逍遥游 fe7b68deb4 feat(spritestack): sprite-stacking pseudo-3D rendering 2026-08-17 13:58:03 +08:00
西风逍遥游 4e61805c69 feat(story-scene-agent): story-to-qualified-stage orchestrator + example
One-line story -> stage brief (parse_stage) -> creative-brain plan -> build
via scene_director -> scene-qc inspection/fix loop -> report + screenshots.
Reuses the in-repo creative-brain and scene-qc packages; ships a dry-run
in-memory executor and tests, an empty examples/ai-stage host, an openCode
subagent, and the AI场景导演 integration doc that doubles as the
agent-queryable scene-director spec.
2026-08-17 10:10:37 +08:00
西风逍遥游 79127ed354 feat(scene-director): agent-drivable scene-authoring kit + engine MCP tools
Add the scene_director Squirrel kit (src/scripts/scene_director.nut) with
spawn/move/scale/rotate/remove/material/lighting/camera/cameras/info/modify/
reset, embedded into the engine and exposed to host games as
eve.sceneDirectorScript. New MCP tools (eve_scene_director_install/status,
eve_scene_reset, eve_scene_modify, eve_scene_info, eve_camera_generate) are
thin dispatchers over the kit, so agents can place props, set lighting,
frame cameras, inspect truth and reset the stage through MCP alone.

The kit's cross-references are written explicitly as scene_director.<field>
to avoid Squirrel table-closure 	his resolution, and cameras() uses a
fixed 6-way compass table (no math-lib dependency) so it works both in the
engine and in plain ssq test VMs.
2026-08-17 10:10:09 +08:00
sunxfancy fed7c3ff11 Merge remote-tracking branch 'origin/main' into feature/virtual-geometry-nanite 2026-08-16 21:49:45 +08:00
sunxfancy 2f13169b68 feat(virtualgeometry): add Nanite-style virtualized geometry rendering
Add a virtualgeometry module implementing a Nanite-inspired virtualized
geometry pipeline on the Vulkan backend:

- Cluster DAG preprocess (CPU): greedy meshletization + QEM edge-collapse
  hierarchical LOD, with per-cluster bounding spheres and geometric error.
- GPU-driven culling (compute): frustum + screen-space-error LOD selection
  that emits exactly one cluster per DAG branch (no gaps/overlaps).
- Software cluster rasterizer (compute): fills a visibility buffer
  (packed depth<<16 | clusterId) via atomicMin.
- Visibility-buffer resolve (CPU readback + resolve shader reference).
- Module facade (VirtualGeometry / VirtualGeometryRenderer) reusing the
  gpgpu compute backend; LodSelection CPU reference for tests.
- 14 unit tests (CPU preprocess + LOD-transition sweep + GPU end-to-end),
  shader compile script, example, and design doc.
2026-08-16 21:49:40 +08:00
西风逍遥游 2d05741d88 Merge remote-tracking branch 'origin/main' into codex/mcp-new-features 2026-08-16 19:10:00 +08:00