Skip to content

Commit 727bb99

Browse files
committed
multi-navmesh libs
1 parent 1314628 commit 727bb99

96 files changed

Lines changed: 20922 additions & 157 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
---
2+
name: defold-api-fetch
3+
description: "Fetches Defold API documentation. Use when working with Defold engine APIs, looking up Lua/C++ functions, or needing API reference for game development."
4+
---
5+
6+
# Defold API Reference
7+
8+
Fetch documentation from the links below (the URLs point to plain Markdown files).
9+
10+
## Lua APIs (Most Common)
11+
12+
| Namespace | URL |
13+
|-----------|-----|
14+
| go (Game object) | https://defold.com/llms/apis/go-lua.md |
15+
| gui (GUI) | https://defold.com/llms/apis/gui-lua.md |
16+
| msg (Message) | https://defold.com/llms/apis/msg-lua.md |
17+
| vmath (Vector math) | https://defold.com/llms/apis/vmath-lua.md |
18+
| sprite (Sprite) | https://defold.com/llms/apis/sprite-lua.md |
19+
| factory (Factory) | https://defold.com/llms/apis/factory-lua.md |
20+
| collectionfactory (Collection factory) | https://defold.com/llms/apis/collectionfactory-lua.md |
21+
| collectionproxy (Collection proxy) | https://defold.com/llms/apis/collectionproxy-lua.md |
22+
| physics (Collision object) | https://defold.com/llms/apis/physics-lua.md |
23+
| sound (Sound) | https://defold.com/llms/apis/sound-lua.md |
24+
| timer (Timer) | https://defold.com/llms/apis/timer-lua.md |
25+
| sys (System) | https://defold.com/llms/apis/sys-lua.md |
26+
| resource (Resource) | https://defold.com/llms/apis/resource-lua.md |
27+
| render (Render) | https://defold.com/llms/apis/render-lua.md |
28+
| particlefx (Particle effects) | https://defold.com/llms/apis/particlefx-lua.md |
29+
| label (Label) | https://defold.com/llms/apis/label-lua.md |
30+
| tilemap (Tilemap) | https://defold.com/llms/apis/tilemap-lua.md |
31+
| model (Model) | https://defold.com/llms/apis/model-lua.md |
32+
| camera (Camera) | https://defold.com/llms/apis/camera-lua.md |
33+
| window (Window) | https://defold.com/llms/apis/window-lua.md |
34+
| buffer (Buffer) | https://defold.com/llms/apis/buffer-lua.md |
35+
| graphics (Graphics) | https://defold.com/llms/apis/graphics-lua.md |
36+
| image (Image) | https://defold.com/llms/apis/image-lua.md |
37+
| json (JSON) | https://defold.com/llms/apis/json-lua.md |
38+
| http (HTTP) | https://defold.com/llms/apis/http-lua.md |
39+
| html5 (HTML5) | https://defold.com/llms/apis/html5-lua.md |
40+
| crash (Crash) | https://defold.com/llms/apis/crash-lua.md |
41+
| profiler (Profiler) | https://defold.com/llms/apis/profiler-lua.md |
42+
| liveupdate (LiveUpdate) | https://defold.com/llms/apis/liveupdate-lua.md |
43+
| builtins (Built-ins) | https://defold.com/llms/apis/builtins-lua.md |
44+
| types (Types) | https://defold.com/llms/apis/types-lua.md |
45+
46+
## Lua Standard Library
47+
48+
| Namespace | URL |
49+
|-----------|-----|
50+
| base (Base) | https://defold.com/llms/apis/base-lua.md |
51+
| coroutine (Coroutine) | https://defold.com/llms/apis/coroutine-lua.md |
52+
| debug (Debug) | https://defold.com/llms/apis/debug-lua.md |
53+
| io (Io) | https://defold.com/llms/apis/io-lua.md |
54+
| math (Math) | https://defold.com/llms/apis/math-lua.md |
55+
| os (Os) | https://defold.com/llms/apis/os-lua.md |
56+
| package (Package) | https://defold.com/llms/apis/package-lua.md |
57+
| string (String) | https://defold.com/llms/apis/string-lua.md |
58+
| table (Table) | https://defold.com/llms/apis/table-lua.md |
59+
| bit (BitOp) | https://defold.com/llms/apis/bit-lua.md |
60+
| socket (LuaSocket) | https://defold.com/llms/apis/socket-lua.md |
61+
| zlib (Zlib) | https://defold.com/llms/apis/zlib-lua.md |
62+
63+
## Box2D Physics
64+
65+
| Namespace | URL |
66+
|-----------|-----|
67+
| b2d | https://defold.com/llms/apis/b2d-lua.md |
68+
| b2d.body | https://defold.com/llms/apis/b2d.body-lua.md |
69+
70+
## Editor Scripting
71+
72+
| Namespace | URL |
73+
|-----------|-----|
74+
| editor (Editor) | https://defold.com/llms/apis/editor-lua.md |
75+
76+
## Extension APIs
77+
78+
> **Note:** Extension APIs (`extension-*`) require the corresponding extension to be added as a dependency in `game.project`. To learn how to install and configure a specific extension, use the `defold-docs-fetch` skill to look up its documentation page.
79+
80+
| Extension | URL |
81+
|-----------|-----|
82+
| crypt (Crypt) | https://defold.com/llms/apis/extension-crypt_crypt.md |
83+
| safearea (SafeArea) | https://defold.com/llms/apis/extension-safearea_safearea.md |
84+
| poki_sdk (Poki SDK) | https://defold.com/llms/apis/extension-poki-sdk_poki_sdk.md |
85+
| websocket (WebSocket) | https://defold.com/llms/apis/extension-websocket_websocket.md |
86+
| webview (WebView) | https://defold.com/llms/apis/extension-webview_webview.md |
87+
| iap (In-App Purchase) | https://defold.com/llms/apis/extension-iap_iap.md |
88+
| push (Push) | https://defold.com/llms/apis/extension-push_push.md |
89+
| facebook (Facebook) | https://defold.com/llms/apis/extension-facebook_facebook.md |
90+
| firebase (Firebase) | https://defold.com/llms/apis/extension-firebase_firebase.md |
91+
| firebase (Firebase Analytics) | https://defold.com/llms/apis/extension-firebase-analytics_firebase.md |
92+
| firebase (Firebase RemoteConfig) | https://defold.com/llms/apis/extension-firebase-remoteconfig_firebase.md |
93+
| admob (AdMob) | https://defold.com/llms/apis/extension-admob_admob.md |
94+
| ironsource (IronSource) | https://defold.com/llms/apis/extension-ironsource_ironsource.md |
95+
| gpgs (Google Play Games) | https://defold.com/llms/apis/extension-gpgs_gpgs.md |
96+
| steam (Steam) | https://defold.com/llms/apis/extension-steam_steam.md |
97+
| review (Review) | https://defold.com/llms/apis/extension-review_review.md |
98+
| iac (Inter-App Communication) | https://defold.com/llms/apis/extension-iac_iac.md |
99+
| adinfo (Ad Info) | https://defold.com/llms/apis/extension-adinfo_adinfo.md |
100+
| permissions (Permissions) | https://defold.com/llms/apis/extension-permissions_permissions.md |
101+
| camera (Camera Extension) | https://defold.com/llms/apis/extension-camera_camera.md |
102+
| networkinfo (Network Info) | https://defold.com/llms/apis/extension-network-info_networkinfo.md |
103+
| spine (Spine) | https://defold.com/llms/apis/extension-spine_spine.md |
104+
| spine gui (Spine GUI) | https://defold.com/llms/apis/extension-spine_gui.md |
105+
| rive (Rive) | https://defold.com/llms/apis/extension-rive_rive.md |
106+
| fmod (FMOD) | https://defold.com/llms/apis/extension-fmod_fmod.md |
107+
| fontgen (Font Gen) | https://defold.com/llms/apis/extension-fontgen_fontgen.md |
108+
| crazygames (CrazyGames) | https://defold.com/llms/apis/extension-crazygames_crazygames.md |
109+
| pad (Play Asset Delivery) | https://defold.com/llms/apis/extension-pad_pad.md |
110+
| instantapp (Google Play Instant) | https://defold.com/llms/apis/extension-googleplayinstant_instantapp.md |
111+
| siwa (Sign in with Apple) | https://defold.com/llms/apis/extension-siwa_siwa.md |
112+
| zendesk (Zendesk) | https://defold.com/llms/apis/extension-zendesk_zendesk.md |
113+
| xsolla (Xsolla) | https://defold.com/llms/apis/extension-xsolla_shop.md |
114+
| realtime (Photon Realtime) | https://defold.com/llms/apis/extension-photon-realtime_realtime.md |
115+
| odin (ODIN Voice) | https://defold.com/llms/apis/extension-odin_odin.md |
116+
| adpf (Android ADPF) | https://defold.com/llms/apis/extension-adpf_adpf.md |
117+
118+
## C++ Native Extension APIs
119+
120+
| Namespace | URL |
121+
|-----------|-----|
122+
| dmExtension (Extension) | https://defold.com/llms/apis/engine-extension-src-dmsdk-extension-extension-h.md |
123+
| dmScript (Script) | https://defold.com/llms/apis/engine-script-src-dmsdk-script-script-h.md |
124+
| dmBuffer (Buffer) | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-buffer-h.md |
125+
| dmGameObject | https://defold.com/llms/apis/engine-gameobject-src-dmsdk-gameobject-gameobject-h.md |
126+
| dmGraphics | https://defold.com/llms/apis/engine-graphics-src-dmsdk-graphics-graphics-h.md |
127+
| dmGui | https://defold.com/llms/apis/engine-gui-src-dmsdk-gui-gui-h.md |
128+
| dmRender | https://defold.com/llms/apis/engine-render-src-dmsdk-render-render-h.md |
129+
| dmResource | https://defold.com/llms/apis/engine-resource-src-dmsdk-resource-resource-h.md |
130+
| dmSound | https://defold.com/llms/apis/engine-sound-src-dmsdk-sound-sound-h.md |
131+
| dmPhysics | https://defold.com/llms/apis/engine-physics-src-dmsdk-physics-physics-h.md |
132+
| dmVMath | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-vmath-h.md |
133+
| Hash | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-hash-h.md |
134+
| Log | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-log-h.md |
135+
| dmMutex | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-mutex-h.md |
136+
| dmThread | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-thread-h.md |
137+
| dmSocket | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-socket-h.md |
138+
| dmHttpClient | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-http_client-h.md |
139+
| dmConfigFile | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-configfile-h.md |
140+
| dmCrypt | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-crypt-h.md |
141+
| dmImage | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-image-h.md |
142+
| dmMessage | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-message-h.md |
143+
| dmProfile | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-profile-h.md |
144+
| dmSys | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-sys-h.md |
145+
| dmTime | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-time-h.md |
146+
| dmTransform | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-transform-h.md |
147+
| dmURI | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-uri-h.md |
148+
| dmAndroid | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-android-h.md |
149+
| Array | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-array-h.md |
150+
| Hashtable | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-hashtable-h.md |
151+
| dmMemory | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-memory-h.md |
152+
| dmWebServer | https://defold.com/llms/apis/engine-dlib-src-dmsdk-dlib-webserver-h.md |
153+
154+
## Usage
155+
156+
When you need API documentation:
157+
158+
1. Identify the namespace (e.g., `go`, `gui`, `vmath`)
159+
2. Fetch the corresponding URL (all URLs are plain Markdown — fetch and read the raw content)
160+
3. Example: fetch `https://defold.com/llms/apis/go-lua.md`
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
assets/
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
name: defold-assets-search
3+
description: "Searches the Defold Asset Store for community libraries and extensions. Use BEFORE writing custom modules for pathfinding, RNG, UI, save/load, localization, tweening, input handling, etc. Helps find, compare, and install Defold dependencies."
4+
---
5+
6+
# Defold Asset Store Search
7+
8+
Search the Defold community Asset Store to find existing libraries instead of writing custom code.
9+
10+
## When to use
11+
12+
**ALWAYS search the Asset Store first** when a task requires functionality like:
13+
- Pathfinding (A*, navigation)
14+
- Random number generation
15+
- UI components / GUI frameworks
16+
- Save/load systems
17+
- Localization / i18n
18+
- Tweening / easing
19+
- Input handling / gestures
20+
- Camera control
21+
- Screen management
22+
- Event systems
23+
- Dialogue / narrative systems
24+
- Physics helpers (AABB, raycasting)
25+
- Any other reusable game module
26+
27+
## Procedure
28+
29+
### Step 1: Generate and search the index
30+
31+
The index file is `.agents/skills/defold-assets-search/assets/dependencies_index.tsv`. If it already exists and is less than 24 hours old, use it directly. Otherwise, regenerate it by running `python .agents/skills/defold-assets-search/scripts/generate_index.py` from the project root. The TSV columns:
32+
33+
```
34+
id title author description tags stars api example_code manifest_url latest_zip
35+
```
36+
37+
Use `Grep` to search the generated TSV file by keyword with `literal: true` for single keywords, or Rust-style regex alternation `keyword1|keyword2` (no backslashes before `|`) for multiple keywords. Search not only the user's exact terms but also synonyms and related words (e.g., RNG → random, i18n → localization, tween → easing, pathfinding → A*). Entries are sorted by stars (descending).
38+
39+
### Step 2: Research candidates in depth
40+
41+
For each candidate found in Step 1 (up to top 5 by stars):
42+
1. **Skip `scene3d`** — this module is deprecated and should NOT be suggested.
43+
2. If the `example_code` column has a URL, fetch the URL to study the library's README, usage examples, and features.
44+
3. If the `api` column has a URL, fetch it too for API details.
45+
4. Use the gathered information to understand what each library actually does and how it compares to alternatives.
46+
5. If you need more details (all available versions, sub-dependencies, etc.), fetch the `manifest_url` from the index.
47+
48+
### Step 3: Present candidates to the user
49+
50+
After studying all candidates, show the user **2-3 best candidates** with:
51+
- Title, author, stars count
52+
- Brief description based on your research (not just the short TSV description)
53+
- Key features / pros / cons
54+
- Your recommendation and reasoning
55+
56+
Ask the user which one to use, or recommend the best one.
57+
58+
### Step 4: Install the dependency
59+
60+
1. The `latest_zip` column contains the dependency URL to add to `game.project`.
61+
2. Open `game.project` and add the URL to the `[project] dependencies` field (comma-separated list).
62+
3. Run the `defold-project-setup` skill to download the dependency into `.deps/`.
63+
4. Tell the user: **"In the Defold editor, go to Project → Fetch Libraries to sync."**
64+
5. After the dependency is downloaded, scan its folder in `.deps/` for `.script_api` files and `.lua` modules to learn the full API. Use this to show usage examples or suggest how to apply the library in the context of the user's original request.
65+
66+
## Community defaults
67+
68+
These libraries are the de facto standard choices in the Defold community:
69+
70+
| Need | Library | Author |
71+
|------|---------|--------|
72+
| GUI framework | **Druid** | Insality |
73+
| Screen management | **Monarch** | Björn Ritzl |
74+
| General-purpose utilities (especially `flow` and `broadcast`) | **Ludobits** | Björn Ritzl |
75+
| OS/window functions | **DefOS** | Brian Kramer |
76+
| Ready-made render script with shadows & post-processing | **Light and Shadows** | Igor Suntsev |
77+
| High-quality 2D downscale (UI, sprites) | **Sharp Sprite** | Indiesoft LLC |
78+
79+
**Camera** — a separate camera library is NOT needed. The built-in Defold camera component and its API already cover all common use cases.
80+
81+
Prefer these over alternatives unless the user has a specific reason to choose otherwise.
82+
83+
## Notable authors and libraries
84+
85+
| Author | Known for | Libraries |
86+
|--------|-----------|-----------|
87+
| **Insality** | Best-in-class Lua modules with detailed API docs | Druid (UI), Panthera (animation), Defold-Event, Defold-Saver, Defold-Tweener, Defold-Lang, Defold-Log, Defold-Token, Defold-Quest, Decore |
88+
| **Björn Ritzl** | Defold core team, prolific contributor | Monarch (screens), Orthographic (camera), Gooey (GUI), Rich Text, Defold-Input, DefTest |
89+
| **Selim Anaç** | High-performance native extensions | A* Pathfinding, DAABBCC (AABB tree), PCG Random, Graph Pathfinder, Tile Raycast |
90+
| **Brian Kramer** | Practical game utilities | DefOS, DefSave, DefMath, DefGlot, DefBlend |
91+
| **Roman Silin** | 3D game tools | Illumination, Kinematic Walker, Operator (camera), Narrator (Ink), TrenchFold |
92+
| **Indiesoft LLC** | Visual effects and platform tools | Hyper Trails, Sharp Sprite, YaGames, ResZip, Dissolve FX, SplitMix64 |
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
"""Download Defold Asset Store JSON and generate a compact TSV index.
2+
3+
Usage:
4+
python .agents/skills/defold-assets-search/scripts/generate_index.py
5+
6+
Output:
7+
.agents/skills/defold-assets-search/assets/dependencies_index.tsv
8+
"""
9+
10+
import json
11+
import os
12+
import urllib.request
13+
14+
SOURCE_URL = "https://insality.github.io/asset-store/dependencies_store.json"
15+
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
16+
OUTPUT_DIR = os.path.join(SCRIPT_DIR, os.pardir, "assets")
17+
OUTPUT_FILE = os.path.join(OUTPUT_DIR, "dependencies_index.tsv")
18+
19+
20+
def main() -> None:
21+
print(f"Downloading {SOURCE_URL} ...")
22+
with urllib.request.urlopen(SOURCE_URL) as resp:
23+
raw = json.loads(resp.read().decode("utf-8"))
24+
25+
# The JSON has an "items" key containing the list
26+
data: list[dict] = raw.get("items", raw) if isinstance(raw, dict) else raw
27+
28+
os.makedirs(OUTPUT_DIR, exist_ok=True)
29+
30+
# Exclude unlisted entries
31+
entries = [e for e in data if not e.get("unlisted", False)]
32+
33+
# Sort by stars descending (None → 0)
34+
entries.sort(key=lambda e: e.get("stars") or 0, reverse=True)
35+
36+
header = "id\ttitle\tauthor\tdescription\ttags\tstars\tapi\texample_code\tmanifest_url\tlatest_zip"
37+
lines: list[str] = [header]
38+
39+
for e in entries:
40+
latest_zip = ""
41+
content = e.get("content") or []
42+
if content:
43+
latest_zip = content[-1]
44+
45+
tags_str = ", ".join(e.get("tags") or [])
46+
desc = (e.get("description") or "").replace("\t", " ").replace("\n", " ")
47+
48+
line = "\t".join([
49+
e.get("id") or "",
50+
e.get("title") or "",
51+
e.get("author") or "",
52+
desc,
53+
tags_str,
54+
str(e.get("stars") or 0),
55+
e.get("api") or "",
56+
e.get("example_code") or "",
57+
e.get("manifest_url") or "",
58+
latest_zip,
59+
])
60+
lines.append(line)
61+
62+
with open(OUTPUT_FILE, "w", encoding="utf-8") as f:
63+
f.write("\n".join(lines) + "\n")
64+
65+
print(f"Generated {OUTPUT_FILE} with {len(entries)} entries.")
66+
67+
68+
if __name__ == "__main__":
69+
main()

0 commit comments

Comments
 (0)