Commit Graph
15 Commits
Author SHA1 Message Date
西风逍遥游 290498095c fix(test): register profiler_content in nut script template
The script-test content symbols are declared explicitly in test/template.cpp.in,
so profiler.nut (added in the profiler feature) needs its content symbol wired
there, otherwise the unit_test link fails with an unresolved profiler_content.
2026-08-26 02:33:23 +08:00
西风逍遥游 90b28f9fbc Merge pull request #205 from EVEngine/codex/crowd-flowfield
feat(crowd): flow-field pathfinding + boids crowd behavior module
2026-08-23 21:43:05 +08:00
西风逍遥游 9d5e61fde8 feat(crowd): flow-field pathfinding + boids crowd behavior module
- CrowdField: Dijkstra integration field to continuous gradient flow
  field with bilinear sampling, terrain cost and multi-goal support
- Crowd: SOA simulation for massive crowds - flow/seek/boids/idle
  actions, turn-rate-limited heading, Boids separation/alignment/
  cohesion, wall penetration resolution, per-frame counting-sort
  spatial grid and overlap relaxation
- Squirrel API: eve.Crowd with batch getPositions/getHeadings
- example: examples/crowd (2000-agent marching / boids demo)
- tests: flow field correctness, turning, seek arrival, boids
  convergence, wall penetration, 20k-agent smoke + script round-trip
2026-08-23 19:17:12 +08:00
西风逍遥游 e48551911f Merge pull request #194 from EVEngine/codex/cloth-simulation
feat(physics): 2D/3D cloth with self-collision, fold limits, body collision, and GPU backend
2026-08-23 16:19:33 +08:00
西风逍遥游 188012ee47 feat(physics): 2D/3D cloth with self-collision, fold limits, body collision, and GPU backend
- Cloth3D: meter-space Verlet cloth with triangle-level self-collision, dihedral fold-angle limit, mass-proportional rigid-body collision, double-sided mesh rendering
- Cloth (2D): self-collision, fold-angle limit, mass-proportional body collision, Fluid-style interactAt
- ClothGPU: compute-shader Verlet + distance constraints (double-buffered Jacobi), overflow-free atomicExchange spatial-hash self-collision, Sequence single-submission per frame
- World/World3D point probes for particle-vs-body queries; Body3D::getMass; Squirrel bindings for all new APIs
- examples/softbody3d demo; softbody/softbody_gpu/physics_cloth tests; user/dev docs
2026-08-23 13:54:20 +08:00
西风逍遥游 0b8ff14a2b feat(decal): P2 IDecalQuery capability + script test
Adds the common-layer IDecalQuery capability (spawn/remove/clear/count/setLimit with an opaque texture handle) provided by the decal module at construction, so editor/devtools can drive decals without linking the module; adds a Squirrel script test (decal.nut + DecalScriptTest) covering eve.Decal() getName/clearAll/setLimit/update, and a C++ capability consumer test.
2026-08-23 00:57:15 +08:00
西风逍遥游 2ab09dcf68 feat(script): bind Image decode, Joystick Pad axes/buttons, Mouse relative mode
- Image: expose newImageData(newImageDataFromFile)/newEmptyImageData/isCompressed and a
  full ImageData script class (getWidth/Height/Format/Size, pixel get/set, paste, clone,
  rotate). ImageData is now registered once by the Image module; drop the duplicate
  minimal registrations in Font and Model3D that could overwrite each other.
- Joystick: expose getJoystick/getJoystickFromID/getIndex/addJoystick/removeJoystick and a
  Pad class with raw axes/buttons/hats, GameController axis/button names, device info,
  and vibration. Pads stay owned by the module (non-owning script handles).
- Mouse: expose setRelativeMode/getRelativeMode plus setVisible/setPosition/setX/setY/
  setGrabbed/isGrabbed (SDL backend already implemented them).
- Tests: add image.nut/image_script.cpp and joystick.nut/joystick_script.cpp script tests,
  extend mouse.nut with relative-mode/visibility checks, wire into test CMake and the nut
  embed template.
- Docs: update image/joystick/mouse user chapters, MODULES.md and the REVIEW log.
2026-08-20 12:31:11 +08: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
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
西风逍遥游 dd3541750f feat: enhance event handling and graphics functionality
- Added new methods for event polling and handling in the Event module, including `pollName` for retrieving message names.
- Introduced new graphics functions for clearing the screen and drawing solid rectangles with RGBA support.
- Updated the Window module to expose new settings and graphics functionalities.
- Refactored the main script to utilize the new graphics and event features, improving the example game structure.
2026-08-05 17:17:50 +08:00
西风逍遥游 2e04aaa815 update test 2024-06-22 11:38:07 -07:00
西风逍遥游 412ec4ddcb update 2022-07-16 22:00:44 -07:00
西风逍遥游 3445b18b1f update module structure 2021-10-21 20:54:07 -07:00
西风逍遥游 debcc2428e add test cases and impl window 2021-10-03 00:23:57 -07:00
西风逍遥游 966298d0b7 add unit test 2021-09-30 14:29:12 -07:00