Skip to content

Commit f440f43

Browse files
committed
Merge branch 'master' of https://github.com/defold/doc
2 parents b2c04a6 + 36d2438 commit f440f43

File tree

6 files changed

+16
-5
lines changed

6 files changed

+16
-5
lines changed

docs/en/manuals/editor-scripts.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ return M
118118
Editor expects `get_commands()` to return an array of tables, each describing a separate command. Command description consists of:
119119

120120
- `label` (required) — text on a menu item that will be displayed to the user
121-
- `locations` (required) — an array of either `"Edit"`, `"View"`, `"Assets"`, `"Bundle"` or `"Outline"`, describes a place where this command should be available. `"Edit"` and `"View"` mean menu bar at the top, `"Assets"` means context menu in Assets pane, `"Outline"` means context menu in Outline pane, and `"Bundle"` means **Project → Bundle** submenu.
121+
- `locations` (required) — an array of either `"Edit"`, `"View"`, `"Project"`, `"Debug"`, `"Assets"`, `"Bundle"` or `"Outline"`, describes a place where this command should be available. `"Edit"`, `"View"`, `"Project"` and `"Debug"` mean menu bar at the top, `"Assets"` means context menu in Assets pane, `"Outline"` means context menu in Outline pane, and `"Bundle"` means **Project → Bundle** submenu.
122122
- `query` — a way for command to ask editor for relevant information and define what data it operates on. For every key in `query` table there will be corresponding key in `opts` table that `active` and `run` callbacks receive as argument. Supported keys:
123123
- `selection` means this command is valid when there is something selected, and it operates on this selection.
124124
- `type` is a type of selected nodes command is interested in, currently these types are allowed:
Loading
Loading

docs/en/manuals/live-update-scripting.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function init(self)
8181

8282
local level_name = "level1"
8383

84-
local info = get_lu_archive_for_level(level_name) -- <3>
84+
local info = get_lu_info_for_level(level_name) -- <3>
8585

8686
msg.post("#", "load_level", {level = "level1", info = info }) -- <4>
8787
end
@@ -109,7 +109,7 @@ function on_message(self, message_id, message, sender)
109109
end)
110110

111111
else
112-
print("Failed to download archive ", download_path, "from", url, ":", get_status_string(status))
112+
print("Failed to download archive ", download_path, "from", url, ":", response.status)
113113
end
114114
end, nil, nil, {path=download_path})
115115

docs/en/manuals/optimization-size.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,18 @@ A quick way to reduce the engine size is to remove functionality in the engine t
4545
The biggest wins in terms of asset size optimizations are usually gained by reducing the size of sounds and textures.
4646

4747
### Optimize sounds
48-
Defold supports .ogg and .wav files where .ogg is typically used for music and .wav for sound effects. Sounds must be 16-bit with a sampling rate of 44100 so any optimizations must be done on the sounds before encoding them. You can edit the sounds in an external sound editor software to reduce the quality or convert from .wav to .ogg. Also consider converting sounds from stereo to mono.
48+
Defold supports these formats:
49+
* .wav
50+
* .ogg
51+
* .opus
52+
53+
Sounds files must be using 16-bit samples.
54+
Our sound decoders will up/downscale sounds sample rates as needed for the current sound device.
55+
56+
Shorter sounds like sound effects are often compressed harder, whereas music files have less compression.
57+
No compression is done by Defold, so the developer will have to handle that specifically for each audio format.
58+
59+
You can edit the sounds in an external sound editor software (or command line using e.g. [ffmpeg](https://ffmpeg.org)) to reduce the quality or convert between formats. Also consider converting sounds from stereo to mono to further reduce the size of the content.
4960

5061
### Optimize textures
5162
You have several options when it comes to optimizing the textures used by your game, but the first thing to do is to check the size of the images that gets added to an atlas or used as a tilesource. You should never use a larger size on the images than is actually needed in your game. Importing large images and scaling them down to the appropriate size is a waste of texture memory and should be avoided. Start by adjusting the size of the images using external image editing software to the actual size needed in your game. For things such as background images it might also be ok to use a small image and scale it up to the desired size. Once you have the images down to the correct size and added to atlases or used in tilesources you also need to consider the size of the atlases themselves. The maximum atlas size that can be used varies between platforms and graphics hardware.

docs/en/manuals/sound.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The created component has a set of properties that should be set:
2424
![Select component](images/sound/sound_properties.png)
2525

2626
*Sound*
27-
: Should be set to a sound file in your project. The file should be in _Wave_ or _Ogg Vorbis_ format. Defold supports sound files saved at 16bit bit depth and with a sampling rate of 44100.
27+
: Should be set to a sound file in your project. The file should be in _Wave_, _Ogg Vorbis_ or _Ogg Opus_ format. Defold supports sound files saved at 16bit bit depth.
2828

2929
*Looping*
3030
: If checked the sound will play back in _Loopcount_ times or until explicitly stopped.

0 commit comments

Comments
 (0)