55 Commits
Author SHA1 Message Date
西风逍遥游 155fafe0e0 Merge remote-tracking branch 'origin/dev' into codex/test-suite-representative-tests
# Conflicts:
#	Makefile
#	test/softbody.cpp
2026-09-12 12:32:04 +08:00
西风逍遥游 70501c2cea Match CI clang-format 18 output 2026-09-12 00:18:16 +08:00
西风逍遥游 1c4cb3ed4d Add resource-backed mesh rendering and bounded asynchronous loading 2026-09-12 00:09:01 +08:00
西风逍遥游 5741795fe3 fix: validate representative tests across native GPU backends 2026-09-11 14:19:51 +08:00
西风逍遥游 66dc4e8f3d feat(rpg): restore classic product loop after CI fix 2026-08-31 23:16:42 +08:00
西风逍遥游 775ac0c7cc Revert "Merge pull request #317 from EVEngine/codex/rpg-classic-product-loop"
This reverts commit 6541e5ac83, reversing
changes made to 3c21fe396a.
2026-08-31 23:04:39 +08:00
西风逍遥游 8f7c2d6358 fix(filesystem): use C++20 UTF-8 path construction 2026-08-31 20:41:17 +08:00
西风逍遥游 2319ae0118 feat(rpg): complete classic RPG product loop 2026-08-31 19:49:32 +08:00
西风逍遥游 63246b8c68 fix: complete architecture consolidation contracts 2026-08-28 00:01:55 +08:00
西风逍遥游 a8b8e83128 refactor: consolidate engine architecture contracts 2026-08-27 12:54:48 +08:00
西风逍遥游 2514fb77a2 Merge branch 'dev' into codex/galgame-demo 2026-08-26 07:34:37 +08:00
西风逍遥游 ef1091dbdb Merge pull request #248 from EVEngine/codex/live-game-editing
feat: enable safe live game editing
2026-08-26 01:32:58 +08:00
西风逍遥游 08614ed194 feat: add playable galgame demo 2026-08-25 22:45:53 +08:00
西风逍遥游 bb966397b0 feat(hotreload): stabilize recursive file watching 2026-08-25 21:10:26 +08:00
西风逍遥游 43f3546b3b build(webgpu): enable native Dawn validation 2026-08-25 02:32:54 +08:00
西风逍遥游 6250111ec2 feat(card): add presentation bridge APIs 2026-08-24 17:05:27 +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
西风逍遥游 548dc34087 feat(common): capability-registered filesystem/network/timer service interfaces + mocks
Add eve::service::{IFileSystem, INetwork, ITimer} in common/ServiceInterfaces.h.
The real modules register themselves via cap::provide at construction:
- filesystem: readFile/writeFile/fileExists (PhysFS-backed, failure returns false)
- network: synchronous httpRequest polling the existing worker completions
- timer: elapsedSeconds from the SDL performance counter

test/service_mocks.cpp provides deterministic doubles (missing files, read/write
failures, HTTP 404/transport errors, scripted clock) so consumers can exercise
error paths offline; also verifies Timer registers the real provider.
2026-08-22 08:31:37 +08:00
西风逍遥游 7437224c90 api(graphics): align C++/script names, validate sampler strings, document error contracts
- Add RGBA-float drawSolidRect/drawTexturedRect overloads so the C++ names
  match the script-facing API (script already bound those names).
- Add string-based setTextureSampler(Texture*, filter, mipmap, aniso, lodBias)
  overload with strict magic-string validation (unknown filter/mipmap now
  throws instead of silently falling back to linear); keep
  setTextureSamplerParams as a deprecated alias. Script binding now targets
  the overload with an explicit cast.
- Document error contracts: DataModule encode/decode (new[] ownership +
  throws), Filesystem setSource/mount/unmount (false on recoverable failure,
  no throw), ModelData getMesh vs numeric getters (nullptr vs throw), plus a
  two-state error-semantics section in API-CONVENTIONS.md.
- Tests: TextureSampler string validation (valid + deprecated alias + typo
  throws), headless test now exercises the RGBA-float overloads.
2026-08-22 02:30:12 +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
西风逍遥游 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
西风逍遥游 9172602030 fix(filesystem): unsubscribe Poco delegates outside mu_ to fix hot reload deadlock
FileWatch::add/remove/clear unsubscribed Poco DirectoryWatcher delegates while holding mu_. Poco's Delegate::notify() invokes the callback while holding the delegate's own mutex, so a watcher thread blocked in handlePocoEvent() on mu_ while dispatching a write event deadlocks (ABBA) against the thread doing the unsubscribe (Delegate::disable()). Moving both the unsubscribe and the DirectoryWatcher destruction (which joins its thread) outside mu_ eliminates the lock-order inversion. Reproduced by hotreload.tryReloadParticleJson and a standalone FileWatch stress test; fixed build passes 100/100 runs.
2026-08-20 12:28:04 +08:00
西风逍遥游 8f980a580f Merge remote-tracking branch 'origin/main' into codex/startup-timing 2026-08-19 09:49:51 +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
西风逍遥游 a0bd90c775 fix(startup): cut make-run delay and add boot timing diagnostics
Makefile: defer the WSL capability probe so make run no longer cold-starts the WSL VM (use wsl -l -q for make all). filesystem: file() now fails when the file is missing so file_exists() returns false (eve run from a dir without config.nut no longer dies at dofile). Add temporary [startup] stage timers and EVE_BOOT_BENCH auto-exit to profile boot time.
2026-08-19 08:26:53 +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
西风逍遥游 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
西风逍遥游 1531dadf06 feat(assert): add zeroerr parameter validation compiled out in release
Add src/engine/common/Assert.h (EV_PARAM_CHECK / EV_ASSERT) backed by zeroerr's ASSERT family, plus an EVENGINE_ENABLE_ASSERTS CMake option so non-Debug builds strip ZEROERR_NO_ASSERT unless explicitly enabled. Parameter checks added at key engine entry points: Runtime (stack size, script paths/names), ModuleManager (name/instance/creator), Object::setUpdate, Event::push, ImageData::paste/encode, Channel constructor, Filesystem::newFileData.
2026-08-19 00:13:20 +08:00
Cursor Agentand西风逍遥游 164e8c1b4c refactor(filesystem): dispatch hot reload instead of hard-coding asset kinds
HotReload knew what lived at every watched path: it included graphics to
refresh textures, particles to reload emitter configs and map to reload tile
layers. That made the engine's lowest-level module depend on three of its
highest, and it was the only reason filesystem sat in a dependency cycle.

Each module now registers an eve::caps::IAssetReloader for the assets it owns
and HotReload only routes paths. Behaviour is unchanged: automatic dispatch
still matches by extension, an explicit bind() still targets one kind and
ignores the extension, and the texture reloader runs at kTexture priority so
the GPU upload happens before emitters and tile layers re-bind to it.

The reloadable set now follows the linked module set, so a build without
particles simply has no particle reloader rather than a dangling reference.
Reload kinds also become extensible: a module or plugin can add one without
touching filesystem.

Back-edge whitelist 14 -> 11; the dependency graph is now acyclic apart from
the event pump.

(map.render.tilesContributeDepthY fails when run after the hotreload cases both
before and after this change -- pre-existing test-order state, not from here.)

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-08-18 13:46:04 +00:00
sunxfancy d715992a3a feat(hotreload): add dev-server remote hot reload for mac/iOS/Android
Add a development-server based remote hot reload so script/resource changes
made on the host are synced and reloaded live on devices whose game bundle is
read-only (iOS app bundle, Android APK).

- Implement the previously stubbed `eve dev` command as a small HTTP file
  server (GET /manifest, /raw/<path>, /ping) serving a game directory.
- Extend HotReload with a background remote-sync client: poll the server
  manifest, compare mtime/size, download changed files into a writable overlay
  directory mounted at "/" via the new Filesystem::mountRealDirectory, and
  queue changed virtual paths for the script layer to dofile/reload.
- Wire it into load.nut: config.devServer/devSyncMs, shared handle_change(),
  poll_remote_reload(), and a `eve run --dev-server <url>` CLI override.
- Add iOS/Android hot-reload dir helpers and cleartext-HTTP platform config
  (iOS ATS + NSLocalNetworkUsageDescription, Android usesCleartextTraffic).
- Add test/remotesync.cpp covering overlay shadowing, end-to-end sync, and
  unreachable-recovery; update docs.
2026-08-18 16:23:27 +08:00
西风逍遥游 011b8b7b5e Merge branch 'main' into codex/scene-ecs-integration 2026-08-18 10:55:33 +08:00
西风逍遥游 ac51c3f38f fix(filesystem): destroy DirectoryWatcher outside mu_ to avoid deadlock 2026-08-18 09:45:26 +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
西风逍遥游 28954811a2 feat(packaging): eve zip/package commands + in-memory game run
- Add eve zip <game> to compress a game directory into a .eve archive
  (custom streaming ZIP writer, DEFLATE via zlib, PhysFS-readable).
- Add eve package <game> -o <out> --sdk <sdk> to assemble a runnable
  Windows game folder from the target SDK: eve.exe + game.eve + runtime
  (vulkan + VC CRT) DLLs + platform template. SDK auto-detected from the
  running binary, --sdk, or \.
- Run a packaged game entirely from memory: detect game.eve, mount it via
  PHYSFS_mountMemory (no extraction to disk) and route Squirrel's
  file/dofile/loadfile through PhysFS so scripts load from the archive.
2026-08-16 00:24:39 +08:00
西风逍遥游 b3e5cfc5b2 fix(webgpu): build config, module init, and loading overlay
- Link eve to eve.html via --shell-file so the shell template is actually applied and regenerated on every build; track the shell as a link dependency.
- Keep C++ exception catching enabled under ASYNCIFY so expose() failures abort cleanly instead of asserting on __cxa_throw.
- ModuleManager::exposeVM no longer find()+catch for the eve table: Runtime::initialize() guarantees expose() runs once, and ASYNCIFY-wrapped frames can drop the catch and leak NotFoundException.
- Expose window.hideEVELoading and call it on the first presented frame so the shell's loading overlay is dismissed.
- FileWatch.h includes common/config.h so EVENGINE_WEBGPU is defined before the Poco guard.
2026-08-15 17:06:33 +08:00
西风逍遥游 4842b1e623 Merge remote-tracking branch 'origin/main' 2026-08-15 11:25:08 +08:00
西风逍遥游 8dd21d3ea3 feat(webgpu): integrate WebGPU backend support and enhance build configuration
- Added support for the WebGPU backend in the CMake configuration, enabling builds for Emscripten and native Dawn.
- Implemented conditional compilation for WebGPU-specific features, including shader management and file system handling.
- Updated the build process to exclude unnecessary modules and dependencies for WebGPU, optimizing the engine for browser environments.
- Enhanced the installation script to include WebGPU-related files and directories in the output.
- Refactored existing modules to accommodate WebGPU, ensuring compatibility and performance improvements across the engine.
- Introduced new compile options and configurations tailored for WebGPU builds, including handling of third-party libraries and assets.
2026-08-15 10:46:26 +08:00
西风逍遥游 c3a2da2d99 feat: add physics-driven metroidvania demo 2026-08-15 00:37:50 +08:00
西风逍遥游 f0b0527f9f feat: enhance map module with multi-layer support and object management
- Implemented multi-layer tilemap functionality, allowing for the reading and saving of Tiled JSON formats.
- Added support for various tile projections (orthogonal, isometric, staggered, hexagonal) and depth calculations.
- Introduced object layer parsing and caching for improved map object management.
- Updated the rendering system to unify 2D depth queues and enhance sprite handling.
- Added new methods for accessing object properties, including position and dimensions.

This update significantly improves the map module's capabilities and integration with the rendering system.
2026-08-08 00:26:58 +08:00
西风逍遥游 e614406baf chore: update submodule and enhance CMake configurations
- Updated the zeroerr submodule to the latest commit for improved functionality.
- Modified CMakeLists.txt to include additional system libraries for better compatibility across UNIX platforms.
- Added <cstdint> includes in multiple header files to ensure proper type definitions.
- Introduced a new hotReload variable in the demo script to support dynamic updates.
2026-08-07 17:21:44 +08:00
sunxfancyandCursor c19b8fda41 feat: enhance physics and map modules with Box2D integration and documentation updates
- Updated the physics module to include Box2D support, enabling management of physics bodies and collision events.
- Enhanced the map module to support tile layers and improved hot-reload functionality for tilemaps.
- Updated documentation to reflect the new features in the physics and map systems, including usage examples and API references.
- Modified CMakeLists.txt to include new modules for physics and font management, ensuring proper build configurations.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 23:53:39 +08:00
西风逍遥游 6ae6a778db Merge branch 'main' of https://github.com/EVEngine/EVEngine 2026-08-06 23:25:23 +08:00
西风逍遥游andCursor ade0a215cc feat: update documentation and build configurations for improved SDK installation and system dependencies
- Enhanced the README to include WSL2 support and updated package requirements for Ubuntu.
- Modified CMakeLists.txt to define compile options for the EVParticles module.
- Improved the FileWatch module to handle directory normalization across platforms.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 23:25:13 +08:00
sunxfancyandCursor 824f41ace1 feat: implement soft hot-reload functionality for scripts and assets
- Added support for soft hot-reloading of scripts and assets in the engine, allowing for dynamic updates without restarting.
- Introduced new functions in the load.nut script to track and reload modified scripts and assets.
- Enhanced the filesystem module with a HotReload class to manage asset reloading based on file changes.
- Updated CMakeLists.txt to include new timidity share data for desktop platforms.
- Improved the audio module to support MIDI playback with dynamic asset loading.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 22:39:16 +08:00
sunxfancyandCursor 73c779f87f feat: implement file watching functionality in the filesystem module
- Added methods for file watching, including `watch`, `unwatch`, `unwatchAll`, `getWatchCount`, `pollWatch`, `getLastWatchPath`, and `getLastWatchRealPath`.
- Enhanced the `Filesystem` class to support monitoring file changes, allowing for real-time updates.
- Updated the `physfs` implementation to handle file watch targets and events.
- Improved documentation and added unit tests to validate the new file watching features.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-06 14:51:07 +08:00
sunxfancyandCursor ce73a30e35 fix: enable MoltenVK portability and mobile surface recreate on iOS
Inject bundle game launch args, share Android-style resume surface rebuild, and skip validation layers for the first device bring-up.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 23:57:00 +08:00
sunxfancyandCursor 7eae0b886c feat: add Android platform runtime and assets-based game launch
Unpack APK game assets into internal storage, route SDL_main into the engine cmdline entry, and keep Android filesystem paths aligned with the runtime root.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 23:27:05 +08:00
西风逍遥游 d62b916c5a fix: improve file handling and audio source management
- Updated file handling to ensure proper opening in binary mode for reading, addressing issues with the PhysFS backend.
- Refactored audio source management by renaming and consolidating stream unregistration methods to prevent potential deadlocks.
- Enhanced mouse position handling to ensure reliable updates in SDL, particularly when window focus is lost.
- Added new tests for filesystem operations and HTTP request handling, including verification of SSL behavior in HTTPS requests.
2026-08-05 18:47:22 +08:00
西风逍遥游 a51708bb65 improve cmd 2021-10-24 22:37:07 -07:00