Skip to content

Commit b5fcee9

Browse files
Site changes [skip-ci]
1 parent cffa864 commit b5fcee9

9 files changed

+110192
-110183
lines changed

faq/faq.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,20 @@ A: The following platforms are supported for the editor/tools and the engine run
101101
| macOS | 11 Big Sur | `x86-64`, `arm-64` | Editor |
102102
| macOS | 10.15 | `x86-64`, `arm-64` | Engine |
103103
| Windows | Vista | `x86-32`, `x86-64` | Editor and Engine |
104-
| Ubuntu (1) | 18.04 | `x86-64` | Editor |
104+
| Ubuntu (1) | 22.04 LTS | `x86-64` | Editor |
105105
| Linux (2) | Any | `x86-64`, `arm-64` | Engine |
106106
| iOS | 11.0 | `arm-64` | Engine |
107107
| Android | 4.4 (API level 19) | `arm-32`, `arm-64` | Engine |
108108
| HTML5 | | `asm.js`, `wasm` | Engine |
109109

110-
(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.)
111111

112112
(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)
113113

114114

115115
#### Q: What target platforms can I develop games for with Defold?
116116

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.
118118

119119

120120
#### Q: What rendering API does Defold rely on?

llms-full.txt

+17-14
Original file line numberDiff line numberDiff line change
@@ -1884,8 +1884,11 @@ You can interact with the editor using `editor` package that defines this API:
18841884
- `editor.engine_sha1` — a string, SHA1 of Defold engine
18851885
- `editor.editor_sha1` — a string, SHA1 of Defold editor
18861886
- `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
18881889
- `"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)
18891892
- some properties that are shown in the Properties view when you have selected something in the Outline view. These types of outline properties supported:
18901893
- `strings`
18911894
- `booleans`
@@ -2423,7 +2426,7 @@ local create_file = editor.ui.show_dialog(editor.ui.dialog({
24232426
grow = true,
24242427
text = file_name,
24252428
-- Typing callback:
2426-
on_text_changed = function(new_text)
2429+
on_value_changed = function(new_text)
24272430
file_name = new_text
24282431
end
24292432
})
@@ -3285,7 +3288,7 @@ Relative addressing works by automatically prepending the current naming context
32853288

32863289
### Shorthands
32873290

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:
32893292

32903293
`.`
32913294
: Shorthand resolving to the current game object.
@@ -3346,7 +3349,7 @@ The absolute address of the manager script is `"/manager#controller"` and this a
33463349

33473350
## Hashed identifiers
33483351

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.
33503353

33513354
When you get the identifier of a game object, the engine will always return an absolute path identifier that is hashed:
33523355

@@ -3381,7 +3384,7 @@ go.set_position(pos, relative_id)
33813384

33823385
To complete the picture, let's look at the full format of Defold addresses: the URL.
33833386

3384-
An URL is an object, usually written as specially formatted strings. A generic URL consists of three parts:
3387+
A URL is an object, usually written as a specially formatted string. A generic URL consists of three parts:
33853388

33863389
`[socket:][path][#fragment]`
33873390

@@ -3456,7 +3459,7 @@ Let's first look at a few simple usage examples. Suppose that you are building a
34563459
![Message passing structure](https://defold.com/manuals/images/message_passing/message_passing_structure.png)
34573460

34583461
<div class='sidenote' markdown='1'>
3459-
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.
34603463
</div>
34613464

34623465
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
35463549

35473550
## Sending messages
35483551

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()`.
35503553

35513554
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.
35523555

@@ -3587,7 +3590,7 @@ There is a hard limit to the `message` parameter table size. This limit is set t
35873590

35883591
### Shorthands
35893592

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:
35913594

35923595
`.`
35933596
: 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
36563659

36573660
## Message chains
36583661

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.
36603663

36613664
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:
36623665

@@ -4700,7 +4703,7 @@ To create a BMFont, you need to use a tool that can generate the appropriate fil
47004703

47014704
* [Bitmap Font Generator](http://www.angelcode.com/products/bmfont/), a Windows only tool provided by AngelCode.
47024705
* [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.
47044707
* [Glyph Designer](https://71squared.com/glyphdesigner), a commercial macOS tool from 71 Squared.
47054708
* [bmGlyph](https://www.bmglyph.com), a commercial macOS tool from Sovapps.
47064709
</div>
@@ -10685,7 +10688,7 @@ go.property("target", msg.url())
1068510688

1068610689
function init(self)
1068710690
-- store initial position of target.
10688-
-- self.target is an url referencing another objects.
10691+
-- self.target is a url referencing another object.
1068910692
self.target_pos = go.get_position(self.target)
1069010693
...
1069110694
end
@@ -10732,7 +10735,7 @@ function update(self, dt)
1073210735
end
1073310736
```
1073410737

10735-
User-defined script properties can also be accessed through the getting, setting and animation functions, the same way as any other property:
10738+
User-defined script properties can also be accessed through the get, set and animate functions, the same way as any other property:
1073610739

1073710740
```lua
1073810741
-- another.script
@@ -10753,7 +10756,7 @@ If you use a factory to create the game object, it is possible to set script pro
1075310756
local props = { health = 50, target = msg.url("player") }
1075410757
local id = factory.create("#can_factory", nil, nil, props)
1075510758

10756-
-- Accessing to factory created script properties
10759+
-- Accessing factory-created script properties
1075710760
local url = msg.url(nil, id, "can")
1075810761
local can_health = go.get(url, "health")
1075910762
```
@@ -10771,7 +10774,7 @@ local ids = collectionfactory.create("#cangang_factory", nil, nil, props)
1077110774

1077210775
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.
1077310776

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()`.
1077510778

1077610779

1077710780
## Resource properties

manuals/addressing.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ Relative addressing works by automatically prepending the current naming context
115115

116116
### Shorthands
117117

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:
119119

120120
{% include shared/en/url-shorthands.md %}
121121

@@ -159,7 +159,7 @@ The absolute address of the manager script is `"/manager#controller"` and this a
159159

160160
## Hashed identifiers
161161

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.
163163

164164
When you get the identifier of a game object, the engine will always return an absolute path identifier that is hashed:
165165

@@ -194,7 +194,7 @@ go.set_position(pos, relative_id)
194194

195195
To complete the picture, let's look at the full format of Defold addresses: the URL.
196196

197-
An URL is an object, usually written as specially formatted strings. A generic URL consists of three parts:
197+
A URL is an object, usually written as a specially formatted string. A generic URL consists of three parts:
198198

199199
`[socket:][path][#fragment]`
200200

manuals/editor-scripts-ui.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ local create_file = editor.ui.show_dialog(editor.ui.dialog({
157157
grow = true,
158158
text = file_name,
159159
-- Typing callback:
160-
on_text_changed = function(new_text)
160+
on_value_changed = function(new_text)
161161
file_name = new_text
162162
end
163163
})

manuals/editor-scripts.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ You can interact with the editor using `editor` package that defines this API:
5353
- `editor.engine_sha1` — a string, SHA1 of Defold engine
5454
- `editor.editor_sha1` — a string, SHA1 of Defold editor
5555
- `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
5758
- `"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)
5861
- some properties that are shown in the Properties view when you have selected something in the Outline view. These types of outline properties supported:
5962
- `strings`
6063
- `booleans`

manuals/font.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ To create a BMFont, you need to use a tool that can generate the appropriate fil
124124

125125
* [Bitmap Font Generator](http://www.angelcode.com/products/bmfont/), a Windows only tool provided by AngelCode.
126126
* [Shoebox](http://renderhjs.net/shoebox/), a free Adobe Air based app for Windows and macOS.
127-
* [Hiero](https://github.com/libgdx/libgdx/wiki/Hiero), an open source Java based tool.
127+
* [Hiero](https://libgdx.com/wiki/tools/hiero), an open source Java based tool.
128128
* [Glyph Designer](https://71squared.com/glyphdesigner), a commercial macOS tool from 71 Squared.
129129
* [bmGlyph](https://www.bmglyph.com), a commercial macOS tool from Sovapps.
130130
</div>

manuals/message-passing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Let's first look at a few simple usage examples. Suppose that you are building a
2424
![Message passing structure](../images/message_passing/message_passing_structure.png)
2525

2626
<div class='sidenote' markdown='1'>
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 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.
2828
</div>
2929

3030
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
114114

115115
## Sending messages
116116

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()`.
118118

119119
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.
120120

@@ -155,7 +155,7 @@ There is a hard limit to the `message` parameter table size. This limit is set t
155155

156156
### Shorthands
157157

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:
159159

160160
{% include shared/en/url-shorthands.md %}
161161

@@ -207,7 +207,7 @@ A more in depth description on how proxies work can be found in the [Collection
207207

208208
## Message chains
209209

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.
211211

212212
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:
213213

0 commit comments

Comments
 (0)