Skip to content

Document scene object, global service and Explorer file API paths - #41

Merged
JamieW105 merged 1 commit into
mainfrom
feat/canonical-game-api-paths
Oct 14, 2026
Merged

JamieW105 merged 1 commit into
mainfrom
feat/canonical-game-api-paths

Conversation

@JamieW105

@JamieW105 JamieW105 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Scripts can address object APIs through game.scene.SceneName.ObjectPath, global APIs through game.rustic, and file APIs through game.rustic.files.ExplorerPath. Add a reachable guide with setup, native syntax for every scripting language, receiver argument rules, file/audio behavior, compatibility and troubleshooting. Update generated API-reference sources and explain the JavaScript command flush that makes renamed scene targets resolve in the same callback.

Validation: lint with zero warnings, production build, TypeScript checking, seven API-reference tests, documentation/content and exported-link checks, and dependency audit (zero vulnerabilities). Examples match the engine's all-ten-language runtime conformance test.

Companion engine PR: Rustic-Game-Engine/engine#35 (draft pending the required Windows installer build).

@JamieW105 JamieW105 added area:website Documentation website type:docs Documentation changes labels Oct 14, 2026
@JamieW105
JamieW105 merged commit cf19e7f into main Oct 14, 2026
1 check passed
@JamieW105
JamieW105 deleted the feat/canonical-game-api-paths branch October 14, 2026 01:31
JamieW105 added a commit to Rustic-Game-Engine/engine that referenced this pull request Oct 14, 2026
)

Scene actions can now use `game.scene.SceneName.ObjectPath:api(...)` in
Lua/Luau and the corresponding native member syntax in every other
gameplay SDK. The path supplies the receiver, so a script attached to
Controller can tween Player without passing Player again. Objectless
services use `game.rustic`; Explorer-file operations use
`game.rustic.files` and insert the selected source file into the correct
argument position.

Add receiver methods for tweens, movement, effects, cameras, physics,
animation, signals, groups/tags, hierarchy, lifetime and components;
retain existing API tables for compatibility. Resolve canonical scene
targets against the live world, including queued renames in the same
callback. Cache Lua/Luau file children so repeated audio selections
share their decoded clip. Update generated editor declarations and
engine documentation. C uses explicit receiver values because it has no
implicit method receiver.

Validation:
- `RUSTIC_REQUIRE_ALL_SDKS=1 cargo test -p engine-scripting -p
engine-play --lib`: 113 tests pass. The new real-runtime fixture
executes all ten scripting types, verifies a renamed target, receiver
argument placement, Python/PHP named arguments, a global timer and an
Explorer file operation; the script owner remains unchanged.
- `cargo clippy -p engine-scripting -p engine-play --all-targets -- -D
warnings` and `cargo fmt --all -- --check` pass.
- Lua/Luau decoded-audio reuse tests pass; Python, JavaScript and PHP
syntax checks pass; native C, C++, C# and Java SDKs compile and execute
in the runtime tests.

Windows installer validation remains blocked: the required `powershell
-ExecutionPolicy Bypass -File ./tools/build-windows-installer.ps1`
invocation fails because PowerShell is unavailable in this Linux
environment. No fresh setup executable was produced. Keep this PR in
draft until the Windows installer build passes.

Companion website documentation PR:
Rustic-Game-Engine/docs#41

Conflict resolution: merged current `main`, preserved SDK parity and
canonical path APIs, and removed an automatically duplicated C++ method.
Reran all 113 engine-play/engine-scripting tests with every SDK
required; Clippy and formatting pass. Windows installer validation
remains blocked because PowerShell is unavailable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:website Documentation website type:docs Documentation changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants