You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(1 The editor is built and tested for 64-bit Ubuntu 18.04. It should work on other distributions as well but we give no guarantees.)
110
+
(1 The editor is built and tested for 64-bit Ubuntu. It should work on other distributions as well but we give no guarantees.)
111
111
112
112
(2 The engine runtime should run on most 64-bit Linux distributions as long as graphics drivers are up to date, see below for more information on graphics APIs)
113
113
114
114
115
115
#### Q: What target platforms can I develop games for with Defold?
116
116
117
-
A: With one click you can publish to PS4™, Nintendo Switch, iOS, Android and HTML5 as well as macOS, Windows and Linux. It’s truly one codebase with multiple supported platforms.
117
+
A: With one click you can publish to PS4™, PS5™, Nintendo Switch, iOS (64-bit), Android (32-bit and 64-bit) and HTML5 as well as macOS (x86-64 and arm64), Windows (32-bit and 64-bit) and Linux (x86-64 and arm64). It’s truly one codebase with multiple supported platforms.
Copy file name to clipboardExpand all lines: llms-full.txt
+17-14
Original file line number
Diff line number
Diff line change
@@ -1884,8 +1884,11 @@ You can interact with the editor using `editor` package that defines this API:
1884
1884
- `editor.engine_sha1` — a string, SHA1 of Defold engine
1885
1885
- `editor.editor_sha1` — a string, SHA1 of Defold editor
1886
1886
- `editor.get(node_id, property)` — get a value of some node inside the editor. Nodes in the editor are various entities, such as script or collection files, game objects inside collections, json files loaded as resources, etc. `node_id` is a userdata that is passed to the editor script by the editor. Alternatively, you can pass resource path instead of node id, for example `"/main/game.script"`. `property` is a string. Currently these properties are supported:
1887
-
- `"path"` — file path from the project folder for *resources* — entities that exist as files. Example of returned value: `"/main/game.script"`
1887
+
- `"path"` — file path from the project folder for *resources* — entities that exist as files or directories. Example of returned value: `"/main/game.script"`
1888
+
- `"children"` — list of children resource paths for directory resources
1888
1889
- `"text"` — text content of a resource editable as text (such as script files or json). Example of returned value: `"function init(self)\nend"`. Please note that this is not the same as reading file with `io.open()`, because you can edit a file without saving it, and these edits are available only when accessing `"text"` property.
1890
+
- for atlases: `images` (list of editor nodes for images in the atlas) and `animations` (list of animation nodes)
1891
+
- for atlas animations: `images` (same as `images` in atlas)
1889
1892
- some properties that are shown in the Properties view when you have selected something in the Outline view. These types of outline properties supported:
1890
1893
- `strings`
1891
1894
- `booleans`
@@ -2423,7 +2426,7 @@ local create_file = editor.ui.show_dialog(editor.ui.dialog({
2423
2426
grow = true,
2424
2427
text = file_name,
2425
2428
-- Typing callback:
2426
-
on_text_changed = function(new_text)
2429
+
on_value_changed = function(new_text)
2427
2430
file_name = new_text
2428
2431
end
2429
2432
})
@@ -3285,7 +3288,7 @@ Relative addressing works by automatically prepending the current naming context
3285
3288
3286
3289
### Shorthands
3287
3290
3288
-
Defold provides two handy shorthands that you can use to send message without specifying a complete URL:
3291
+
Defold provides two handy shorthands that you can use to send messages without specifying a complete URL:
3289
3292
3290
3293
`.`
3291
3294
: Shorthand resolving to the current game object.
@@ -3346,7 +3349,7 @@ The absolute address of the manager script is `"/manager#controller"` and this a
3346
3349
3347
3350
## Hashed identifiers
3348
3351
3349
-
The engine stores all identifiers as hashed values. All functions that take as argument a component or a game object accepts a string, hash or an URL object. We have seen how to use strings for addressing above.
3352
+
The engine stores all identifiers as hashed values. All functions that take as argument a component or a game object accepts a string, hash or a URL object. We have seen how to use strings for addressing above.
3350
3353
3351
3354
When you get the identifier of a game object, the engine will always return an absolute path identifier that is hashed:
The content of this example lives in two separate files. There is one file for the main bootstrap collection and one for the collection with the id "level". However, file names _do not matter_ in Defold. The identity you assign instances does.
3462
+
The content of this example lives in two separate files. There is one file for the main bootstrap collection and one for the collection with the id "level". However, file names _do not matter_ in Defold. The identity you assign to instances does.
3460
3463
</div>
3461
3464
3462
3465
The game contains a few simple mechanics that require communication between the objects:
@@ -3546,7 +3549,7 @@ The game contains a few simple mechanics that require communication between the
3546
3549
3547
3550
## Sending messages
3548
3551
3549
-
The mechanics of sending a message is, as we have seen above, very simple. You call the function `msg.post()` which posts your message to the message queue. Then, each frame, the engine runs through the queue and delivers each message to its target address. For some system messages (like `"enable"`, `"disable"`, `"set_parent"` etc) the engine code handles the message. The engine also produces some system messages (like `"collision_response"` on physics collisions) that are delivered to your objects. For user messages sent to script components, the engine simply calls a special Defold Lua function named `on_message()`.
3552
+
The mechanics of sending a message are, as we have seen above, very simple. You call the function `msg.post()` which posts your message to the message queue. Then, each frame, the engine runs through the queue and delivers each message to its target address. For some system messages (like `"enable"`, `"disable"`, `"set_parent"` etc) the engine code handles the message. The engine also produces some system messages (like `"collision_response"` on physics collisions) that are delivered to your objects. For user messages sent to script components, the engine simply calls a special Defold Lua function named `on_message()`.
3550
3553
3551
3554
You can send arbitrary messages to any existing object or component and it is up to the code on the recipient side to respond to the message. If you send a message to a script component and the script code ignores the message, that is fine. The responsibility of dealing with messages is fully on the receiving end.
3552
3555
@@ -3587,7 +3590,7 @@ There is a hard limit to the `message` parameter table size. This limit is set t
3587
3590
3588
3591
### Shorthands
3589
3592
3590
-
Defold provides two handy shorthands that you can use to send message without specifying a complete URL:
3593
+
Defold provides two handy shorthands that you can use to send messages without specifying a complete URL:
3591
3594
3592
3595
`.`
3593
3596
: Shorthand resolving to the current game object.
@@ -3656,7 +3659,7 @@ A more in depth description on how proxies work can be found in the [Collection
3656
3659
3657
3660
## Message chains
3658
3661
3659
-
When a message that has been posted is eventually dispatched the recipients’ `on_message()` is called. It is quite common that the reaction code post new messages, which are added to the message queue.
3662
+
When a message that has been posted is eventually dispatched, the recipients’ `on_message()` is called. It is quite common that the reaction code posts new messages, which are added to the message queue.
3660
3663
3661
3664
When the engine starts dispatching it will work through the message queue and call each message recipient's `on_message()` function and go on until the message queue is empty. If the dispatching pass adds new messages to the queue, it will do another pass. There is, however, a hard limit to how many times the engine tries to empty the queue, which effectively puts a limit to how long message chains you can expect to be fully dispatched within a frame. You can easily test how many dispatch passes the engine performs between each `update()` with the following script:
3662
3665
@@ -4700,7 +4703,7 @@ To create a BMFont, you need to use a tool that can generate the appropriate fil
4700
4703
4701
4704
* [Bitmap Font Generator](http://www.angelcode.com/products/bmfont/), a Windows only tool provided by AngelCode.
4702
4705
* [Shoebox](http://renderhjs.net/shoebox/), a free Adobe Air based app for Windows and macOS.
4703
-
* [Hiero](https://github.com/libgdx/libgdx/wiki/Hiero), an open source Java based tool.
4706
+
* [Hiero](https://libgdx.com/wiki/tools/hiero), an open source Java based tool.
4704
4707
* [Glyph Designer](https://71squared.com/glyphdesigner), a commercial macOS tool from 71 Squared.
4705
4708
* [bmGlyph](https://www.bmglyph.com), a commercial macOS tool from Sovapps.
The property values provided via `factory.create()` and `collectionfactory.create()` will override any value set in the prototype file as well as the default values in the script.
10773
10776
10774
-
If several script components attached to a game object defines the same property, each component will get initialized with the value provided to `factory.create()` or `collectionfactory.create()`.
10777
+
If several script components attached to a game object define the same property, each component will get initialized with the value provided to `factory.create()` or `collectionfactory.create()`.
Copy file name to clipboardExpand all lines: manuals/addressing.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ Relative addressing works by automatically prepending the current naming context
115
115
116
116
### Shorthands
117
117
118
-
Defold provides two handy shorthands that you can use to send message without specifying a complete URL:
118
+
Defold provides two handy shorthands that you can use to send messages without specifying a complete URL:
119
119
120
120
{% include shared/en/url-shorthands.md %}
121
121
@@ -159,7 +159,7 @@ The absolute address of the manager script is `"/manager#controller"` and this a
159
159
160
160
## Hashed identifiers
161
161
162
-
The engine stores all identifiers as hashed values. All functions that take as argument a component or a game object accepts a string, hash or an URL object. We have seen how to use strings for addressing above.
162
+
The engine stores all identifiers as hashed values. All functions that take as argument a component or a game object accepts a string, hash or a URL object. We have seen how to use strings for addressing above.
163
163
164
164
When you get the identifier of a game object, the engine will always return an absolute path identifier that is hashed:
Copy file name to clipboardExpand all lines: manuals/editor-scripts.md
+4-1
Original file line number
Diff line number
Diff line change
@@ -53,8 +53,11 @@ You can interact with the editor using `editor` package that defines this API:
53
53
-`editor.engine_sha1` — a string, SHA1 of Defold engine
54
54
-`editor.editor_sha1` — a string, SHA1 of Defold editor
55
55
-`editor.get(node_id, property)` — get a value of some node inside the editor. Nodes in the editor are various entities, such as script or collection files, game objects inside collections, json files loaded as resources, etc. `node_id` is a userdata that is passed to the editor script by the editor. Alternatively, you can pass resource path instead of node id, for example `"/main/game.script"`. `property` is a string. Currently these properties are supported:
56
-
-`"path"` — file path from the project folder for *resources* — entities that exist as files. Example of returned value: `"/main/game.script"`
56
+
-`"path"` — file path from the project folder for *resources* — entities that exist as files or directories. Example of returned value: `"/main/game.script"`
57
+
-`"children"` — list of children resource paths for directory resources
57
58
-`"text"` — text content of a resource editable as text (such as script files or json). Example of returned value: `"function init(self)\nend"`. Please note that this is not the same as reading file with `io.open()`, because you can edit a file without saving it, and these edits are available only when accessing `"text"` property.
59
+
- for atlases: `images` (list of editor nodes for images in the atlas) and `animations` (list of animation nodes)
60
+
- for atlas animations: `images` (same as `images` in atlas)
58
61
- some properties that are shown in the Properties view when you have selected something in the Outline view. These types of outline properties supported:
The content of this example lives in two separate files. There is one file for the main bootstrap collection and one for the collection with the id "level". However, file names _do not matter_ in Defold. The identity you assign instances does.
27
+
The content of this example lives in two separate files. There is one file for the main bootstrap collection and one for the collection with the id "level". However, file names _do not matter_ in Defold. The identity you assign to instances does.
28
28
</div>
29
29
30
30
The game contains a few simple mechanics that require communication between the objects:
@@ -114,7 +114,7 @@ The game contains a few simple mechanics that require communication between the
114
114
115
115
## Sending messages
116
116
117
-
The mechanics of sending a message is, as we have seen above, very simple. You call the function `msg.post()` which posts your message to the message queue. Then, each frame, the engine runs through the queue and delivers each message to its target address. For some system messages (like `"enable"`, `"disable"`, `"set_parent"` etc) the engine code handles the message. The engine also produces some system messages (like `"collision_response"` on physics collisions) that are delivered to your objects. For user messages sent to script components, the engine simply calls a special Defold Lua function named `on_message()`.
117
+
The mechanics of sending a message are, as we have seen above, very simple. You call the function `msg.post()` which posts your message to the message queue. Then, each frame, the engine runs through the queue and delivers each message to its target address. For some system messages (like `"enable"`, `"disable"`, `"set_parent"` etc) the engine code handles the message. The engine also produces some system messages (like `"collision_response"` on physics collisions) that are delivered to your objects. For user messages sent to script components, the engine simply calls a special Defold Lua function named `on_message()`.
118
118
119
119
You can send arbitrary messages to any existing object or component and it is up to the code on the recipient side to respond to the message. If you send a message to a script component and the script code ignores the message, that is fine. The responsibility of dealing with messages is fully on the receiving end.
120
120
@@ -155,7 +155,7 @@ There is a hard limit to the `message` parameter table size. This limit is set t
155
155
156
156
### Shorthands
157
157
158
-
Defold provides two handy shorthands that you can use to send message without specifying a complete URL:
158
+
Defold provides two handy shorthands that you can use to send messages without specifying a complete URL:
159
159
160
160
{% include shared/en/url-shorthands.md %}
161
161
@@ -207,7 +207,7 @@ A more in depth description on how proxies work can be found in the [Collection
207
207
208
208
## Message chains
209
209
210
-
When a message that has been posted is eventually dispatched the recipients’ `on_message()` is called. It is quite common that the reaction code post new messages, which are added to the message queue.
210
+
When a message that has been posted is eventually dispatched, the recipients’ `on_message()` is called. It is quite common that the reaction code posts new messages, which are added to the message queue.
211
211
212
212
When the engine starts dispatching it will work through the message queue and call each message recipient's `on_message()` function and go on until the message queue is empty. If the dispatching pass adds new messages to the queue, it will do another pass. There is, however, a hard limit to how many times the engine tries to empty the queue, which effectively puts a limit to how long message chains you can expect to be fully dispatched within a frame. You can easily test how many dispatch passes the engine performs between each `update()` with the following script:
0 commit comments