瀏覽代碼

Merge branch 'master' of https://github.com/defold/doc

Björn Ritzl 4 月之前
父節點
當前提交
f440f43d8e

+ 1 - 1
docs/en/manuals/editor-scripts.md

@@ -118,7 +118,7 @@ return M
 Editor expects `get_commands()` to return an array of tables, each describing a separate command. Command description consists of:
 
 - `label` (required) — text on a menu item that will be displayed to the user
-- `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.
+- `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.
 - `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:
   - `selection` means this command is valid when there is something selected, and it operates on this selection.
     - `type` is a type of selected nodes command is interested in, currently these types are allowed:

二進制
docs/en/manuals/images/live-update/05-liveupdate-settings-zip.png


二進制
docs/en/manuals/images/live-update/bundle-app.png


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

@@ -81,7 +81,7 @@ function init(self)
 
     local level_name = "level1"
 
-    local info = get_lu_archive_for_level(level_name) -- <3>
+    local info = get_lu_info_for_level(level_name) -- <3>
 
     msg.post("#", "load_level", {level = "level1", info = info }) -- <4>
 end
@@ -109,7 +109,7 @@ function on_message(self, message_id, message, sender)
 				end)
 
 			else
-				print("Failed to download archive ", download_path, "from", url, ":", get_status_string(status))
+				print("Failed to download archive ", download_path, "from", url, ":", response.status)
 			end
 		end, nil, nil, {path=download_path})
 

+ 12 - 1
docs/en/manuals/optimization-size.md

@@ -45,7 +45,18 @@ A quick way to reduce the engine size is to remove functionality in the engine t
 The biggest wins in terms of asset size optimizations are usually gained by reducing the size of sounds and textures.
 
 ### Optimize sounds
-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.
+Defold supports these formats:
+* .wav
+* .ogg
+* .opus
+
+Sounds files must be using 16-bit samples.
+Our sound decoders will up/downscale sounds sample rates as needed for the current sound device.
+
+Shorter sounds like sound effects are often compressed harder, whereas music files have less compression.
+No compression is done by Defold, so the developer will have to handle that specifically for each audio format.
+
+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.
 
 ### Optimize textures
 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.

+ 1 - 1
docs/en/manuals/sound.md

@@ -24,7 +24,7 @@ The created component has a set of properties that should be set:
 ![Select component](images/sound/sound_properties.png)
 
 *Sound*
-: 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.
+: 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.
 
 *Looping*
 : If checked the sound will play back in _Loopcount_ times or until explicitly stopped.