Prechádzať zdrojové kódy

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

Björn Ritzl 1 mesiac pred
rodič
commit
9e2b4e6ac9

+ 6 - 0
.wordlist.txt

@@ -71,6 +71,7 @@ cmd
 CocoaPods
 CodeAndWeb
 codebase
+CJK
 codesign
 collada
 collectionfactory
@@ -94,6 +95,7 @@ customizable
 customizations
 cutscene
 cutscenes
+dt
 dae
 deadzone
 debuggable
@@ -128,6 +130,7 @@ esc
 excitemike
 exe
 ffmpeg
+FCM
 Fi
 filesystem
 filetype
@@ -160,6 +163,7 @@ Git's
 github
 gitlab
 GL
+GLES
 glb
 GLFW
 globals
@@ -186,6 +190,7 @@ hxdefold
 IAM
 IAP
 ico
+icns
 ICOConvert
 iconified
 idfa
@@ -366,6 +371,7 @@ scroller
 SD
 SDK
 SDKs
+SDF
 Sergey
 sha
 shader

+ 1 - 7
docs/en/manuals/camera.md

@@ -229,12 +229,6 @@ function M.screen_to_world(camera, screen_x, screen_y, z)
     local projection = go.get(camera, "projection")
     local view = go.get(camera, "view")
     local w, h = window.get_size()
-    -- The window.get_size() function will return the scaled window size,
-    -- ie taking into account display scaling (Retina screens on macOS for
-    -- instance). We need to adjust for display scaling in our calculation.
-    local scale = window.get_display_scale()
-    w = w / scale
-    h = h / scale
 
     -- https://defold.com/manuals/camera/#converting-mouse-to-world-coordinates
     local inv = vmath.inv(projection * view)
@@ -246,7 +240,7 @@ function M.screen_to_world(camera, screen_x, screen_y, z)
 end
 ```
 
-Visit the [Examples page](https://defold.com/examples/render/screen_to_world/) to see screen to world coordinate conversion in action. There is also a [sample project](https://github.com/defold/sample-screen-to-world-coordinates/) showing how to do screen to world coordinate conversion.
+Keep in mind that the values `action.screen_x` and `action.screen_y` from `on_input()` should be used as arguments for this function. Visit the [Examples page](https://defold.com/examples/render/screen_to_world/) to see screen to world coordinate conversion in action. There is also a [sample project](https://github.com/defold/sample-screen-to-world-coordinates/) showing how to do screen to world coordinate conversion.
 
 ::: sidenote
 The [third-party camera solutions mentioned in this manual](/manuals/camera/#third-party-camera-solutions) provides functions for converting to and from screen coordinates.

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

@@ -71,6 +71,7 @@ You can interact with the editor using `editor` package that defines this API:
 - `editor.can_get(node_id, property)` — check if you can get this property so `editor.get()` won't throw an error.
 - `editor.can_set(node_id, property)` — check if `editor.tx.set()` transaction step with this property won't throw an error.
 - `editor.create_directory(resource_path)` — create a directory if it does not exist, and all non-existent parent directories.
+- `editor.create_resources(resources)` — create 1 or more resources, either from templates or with custom content
 - `editor.delete_directory(resource_path)` — delete a directory if it exists, and all existent child directories and files.
 - `editor.execute(cmd, [...args], [options])` — run a shell command, optionally capturing its output.
 - `editor.save()` — persist all unsaved changed to disk.
@@ -692,7 +693,7 @@ The editor script runtime uses 2 execution modes that are mostly transparent to
 Some of the functions that the editor scripts can use may take a lot of time to run. For example, `editor.execute("git", "status", {reload_resources=false, out="capture"})` can take up to a second on sufficiently large projects. To maintain editor responsiveness and performance, functions that may be time-consuming are not allowed in contexts where the editor needs an immediate response. Attempting to use such a function in an immediate context will result in an error: `Cannot use long-running editor function in immediate context`. To resolve this error, avoid using such functions in immediate contexts.
 
 The following functions are considered long-running and cannot be used in immediate mode:
-- `editor.create_directory()`, `editor.delete_directory()`, `editor.save()`, `os.remove()` and `file:write()`: these functions modify the files on disc, causing the editor to synchronize its in-memory resource tree with the disc state, which can take seconds in large projects.
+- `editor.create_directory()`, `editor.create_resources()`, `editor.delete_directory()`, `editor.save()`, `os.remove()` and `file:write()`: these functions modify the files on disc, causing the editor to synchronize its in-memory resource tree with the disc state, which can take seconds in large projects.
 - `editor.execute()`: execution of shell commands can take an unpredictable amount of time.
 - `editor.transact()`: large transactions on widely-referenced nodes may take hundreds of milliseconds, which is too slow for UI responsiveness.
 

+ 15 - 0
docs/en/manuals/editor.md

@@ -175,6 +175,21 @@ You can also get access to editor logs while the editor is running if it is star
 $ > ./path/to/Defold.app/Contents/MacOS/Defold
 ```
 
+## Editor server
+
+When the editor opens a project, it will start a web server on a random port. The server may be used to interact with the editor from other applications. Since 1.11.0, the port is written to the `.internal/editor.port` file.
+
+Additionally, since 1.11.0 the editor executable has a command line option `--port` (or `-p`), which allows specifying the port during launch, e.g.::
+```shell
+# on Windows
+.\Defold.exe --port 8181
+
+# on Linux:
+./Defold --port 8181
+
+# on macOS:
+./Defold.app/Contents/MacOS/Defold --port 8181
+```
 
 ## FAQ
 :[Editor FAQ](../shared/editor-faq.md)

+ 77 - 6
docs/en/manuals/font.md

@@ -16,11 +16,6 @@ Fonts added to your project are automatically converted into a texture format th
 - Bitmap
 - Distance field
 
-::: sidenote
-It is possible to [generate font glyphs at runtime](/extension-fontgen) from a bundled TrueType font instead of generating and including a font texture in the application bundle. This approach can greatly reduce the download size and runtime memory consumption of a Defold game.
-:::
-
-
 ## Creating a font
 
 To create a font for use in Defold, create a new Font file by selecting <kbd>File ▸ New...</kbd> from the menu, then select <kbd>Font</kbd>. You can also <kbd>right click</kbd> a location in the *Assets* browser and select <kbd>New... ▸ Font</kbd>.
@@ -97,7 +92,7 @@ space ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E
 *Cache Width/Height*
 : Constrains the size of the glyph cache bitmap. When the engine renders text, it looks up the glyph from the cache bitmap. If it does not exist there, it will be added to the cache before rendering. If the cache bitmap is too small to contain all the glyphs the engine is asked to render, an error is signalled (`ERROR:RENDER: Out of available cache cells! Consider increasing cache_width or cache_height for the font.`).
 
-  If set to 0 the cache size is set automatically.
+  If set to 0 the cache size is set automatically, and will grow to 2048x4096 max.
 
 ## Distance field fonts
 
@@ -167,3 +162,79 @@ For example - to generate a gradient in a shader fragment, simply write:
 `float horizontal_gradient = fract(var_texcoord0.y / texture_size_recip.w);`
 
 For more information about shader uniforms, see the [Shader manual](/manuals/shader).
+
+## Runtime generation
+
+It is possible to use runtime generation for SDF type fonts, when using TrueType (.ttf) fonts.
+This approach can greatly reduce the download size and runtime memory consumption of a Defold game.
+The small downside is a very small delay for each glyph generated at runtime.
+
+Enable the feature by setting `font.runtime_generation` in game.project.
+
+::: sidenote
+This feature is currently experimental, but with the intention to be used as the default workflow in the future.
+:::
+
+::: important
+This setting affects all .ttf fonts in the project.
+:::
+
+### Prewarming glyph cache
+
+In order to make the runtime fonts easier to use, they support prewarming of the glyph cache.
+This means the font will generate the glyphs listed in *Characters* in the font.
+
+::: sidenote
+If `All Chars` is selected, there will be no prewarming as it defeats the purpose of not having to generate all glyphs at the same time.
+:::
+
+### Font Scripting
+
+For runtime fonts, it's possible to add or removed sub fonts.
+This is useful when a large font has been split up into multiple files for different character sets (e.g. CJK)
+
+::: important
+Adding a subfont doesn't automatically load or render all the glyphs.
+:::
+
+```lua
+-- Add the range A-Z to the .fontc
+local font_hash = hash("/assets/fonts/roboto.fontc")
+local ttf_hash = hash("/assets/fonts/Roboto/Roboto-Bold.ttf")
+local codepoint_min = 0x00000041 -- A
+local codepoint_max = 0x0000005A -- Z
+font.add_source(font_hash, ttf_hash, codepoint_min, codepoint_max)
+```
+
+```lua
+-- Remove the associated ttf resource
+local font_hash = hash("/assets/fonts/roboto.fontc")
+local ttf_hash = hash("/assets/fonts/Roboto/Roboto-Bold.ttf")
+font.remove_source(font_hash, ttf_hash)
+```
+
+To load the glyphs to the font, you will need to call the `font.add_glyphs()`.
+It is an asynchronous operation, and once it's done, it's safe to progress to show any message containing the glyphs.
+
+```lua
+local function add_glyph_callback(self, id, result, errmsg)
+  if not result then
+    print("Request " .. id .." finished with error:", errmsg)
+  else
+    msg.post(some_url, "show_dialog")
+  end
+end
+
+-- Load glyphs into the font
+local font_hash = hash("/assets/fonts/roboto.fontc")
+local glyphs = "Some text to be shown!" -- for optimal performance, make this a list of unique glyphs
+local request_id = font.add_glyphs(font_hash, ttf_hash, add_glyph_callback)
+```
+
+And, once the characters aren't needed anymore, you can discard that memory:
+```lua
+-- Remove the associated ttf resource
+local font_hash = hash("/assets/fonts/roboto.fontc")
+font.remove_glyphs(font_hash, "All the characters in the set")
+```
+

BIN
docs/en/manuals/images/live-update/05-liveupdate-settings-zip.png


+ 3 - 0
docs/en/manuals/live-update.md

@@ -48,6 +48,9 @@ There are currently two ways that Defold can store the resources. Choose the met
 `Zip`
 : This option tells Defold to create a Zip archive file with any excluded resources. The archive is saved at the location specified in the *Export path* setting.
 
+`Folder`  
+: This option tells Defold to create a folder with all the excluded resources. It works exactly the same way as Zip, but uses a directory instead of an archive. This may be useful in cases where you need to post-process files before uploading and plan to pack them into an archive yourself.
+
 `Amazon`
 : This option tells Defold to automatically upload excluded resources to an Amazon Web Service (AWS) S3 bucket. Fill in your AWS *Credential profile* name, select the appropriate *Bucket* and provide a *Prefix* name.  You can read more on how to setup an AWS account in this [aws guide](/manuals/live-update-aws)
 

+ 105 - 12
docs/en/manuals/project-settings.md

@@ -60,6 +60,12 @@ The title of the application.
 #### Version
 The version of the application.
 
+#### Publisher
+Publisher name.
+
+#### Developer
+Developer name.
+
 #### Write Log
 When checked, the engine will write a log file. If running more than one instance from the editor the file will be named *instance_2_log.txt* with `2` being the instance index. If running a single instance or from a bundle the file will be named *log.txt* The location of the log file will be one of the following paths (tried in order):
 
@@ -161,12 +167,18 @@ The desired frame rate in Hertz. Set to 0 for variable frame rate. A value large
 #### Swap interval
 This integer value controls how the application deals with vsync. 0 disables vsync, and the default value is 1. When using an OpenGL adapter, this value sets the number of frames the window should [update between buffer swaps](https://www.khronos.org/opengl/wiki/Swap_Interval). For Vulkan, there is no built-in concept of swap interval, the value instead controls if vsync should be enabled or not.
 
+#### Vsync
+Rely on hardware vsync for frame timing. Can be overridden depending on graphics driver and platform specifics. For deprecated 'variable_dt' behavior, uncheck this setting and set frame cap 0.
+
 #### Display Profiles
 Specifies which display profiles file to use, `/builtins/render/default.display_profilesc` by default. Learn more in the [GUI Layouts manual](/manuals/gui-layouts/#creating-display-profiles).
 
 #### Dynamic Orientation
 Check if the app should dynamically switch between portrait and landscape on device rotation. Note that the development app does not currently respect this setting.
 
+#### Display Device Info
+Output GPU info to console at startup.
+
 ---
 
 ### Render
@@ -185,8 +197,18 @@ Clear color alpha channel, used by the render script and when the window is crea
 
 ---
 
+### Font
+
+#### Runtime Generation
+Use runtime font generation.
+
+---
+
 ### Physics
 
+#### Max Collision Object Count
+Max number of collision objects.
+
 #### Type
 Which type of physics to use, `2D` or `3D`.
 
@@ -238,6 +260,12 @@ The max number of 3d ray cast requests per frame.
 #### Trigger Overlap Capacity
 The maximum number of overlapping physics triggers.
 
+#### Velocity Threshold
+Minimum velocity that will result in elastic collisions.
+
+#### Max Fixed Timesteps
+Max number of steps in the simulation when using fixed timestep (3D only).
+
 ---
 
 ### Graphics
@@ -254,6 +282,9 @@ The max number of render calls.
 #### Max Characters:
 The number of characters preallocated in the text rendering buffer, i.e. the number of characters that can be displayed each frame.
 
+#### Max Font Batches
+The maximum number of text batches that can be displayed each frame.
+
 #### Max Debug Vertices
 The maximum number of debug vertices. Used for physics shape rendering among other things.
 
@@ -271,6 +302,13 @@ Set the 'core' OpenGL profile hint when creating the context. The core profile r
 
 ---
 
+### Shader
+
+#### Exclude GLES 2.0
+Don't compile shaders for devices running OpenGLES 2.0 / WebGL 1.0.
+
+---
+
 ### Input
 
 #### Repeat Delay
@@ -334,6 +372,9 @@ Max number of game objects in the input stack.
 #### Gain
 Global gain (volume), `0`--`1`.
 
+#### Use Linear Gain
+If enabled, gain is linear. If disabled, uses an exponential curve.
+
 #### Max Sound Data
 Max number of sound resources, i.e the number of unique sound files at runtime.
 
@@ -346,6 +387,12 @@ Max number of sound resources, i.e the number of unique sound files at runtime.
 #### Max Sound Instances
 Max number of concurrent sound instances, i.e. actual sounds played at the same time.
 
+#### Max Component Count
+Max number of sound components per collection.
+
+#### Sample Frame Count
+Number of samples used for each audio update. 0 means automatic (1024 for 48 kHz, 768 for 44.1 kHz).
+
 #### Use Thread
 If checked, the sound system will use threads for sound playback to reduce risk of stutter when the main thread is under heavy load.
 
@@ -404,6 +451,15 @@ Max number of mesh components per collection. [(See information about component
 #### Max Count
 Max number of model components per collection. [(See information about component max count optimizations)](#component-max-count-optimizations).
 
+#### Split Meshes
+Split meshes with more than 65536 vertices into new meshes.
+
+#### Max Bone Matrix Texture Width
+Maximum width of the bone matrix texture. Only the size needed for animations is used, rounded up to nearest power-of-two.
+
+#### Max Bone Matrix Texture Height
+Maximum height of the bone matrix texture. Only the size needed for animations is used, rounded up to nearest power-of-two.
+
 ---
 
 ### GUI
@@ -411,11 +467,8 @@ Max number of model components per collection. [(See information about component
 #### Max Count
 Max number of GUI components. [(See information about component max count optimizations)](#component-max-count-optimizations).
 
-#### Max Particlefx Count
-The max number of concurrent emitters.
-
 #### Max Particle Count
-The max number of concurrent particles.
+The max number of concurrent particles in GUI.
 
 #### Max Animation Count
 The max number of active animations in gui.
@@ -442,6 +495,19 @@ The max number of concurrent particles.
 
 ---
 
+### Box2D
+
+#### Velocity Iterations
+Number of velocity iterations for the Box2D 2.2 physics solver.
+
+#### Position Iterations
+Number of position iterations for the Box2D 2.2 physics solver.
+
+#### Sub Step Count
+Number of sub-steps for the Box2D 3.x physics solver.
+
+---
+
 ### Collection proxy
 
 #### Max Count
@@ -471,6 +537,9 @@ Image file (.png) to use as application icon at given width and height dimension
 #### Launch Screen
 Storyboard file (.storyboard). Learn more about how to create one in the [iOS manual](/manuals/ios/#creating-a-storyboard).
 
+#### Icons Asset
+The icons asset file (.car) containing app icons.
+
 #### Prerendered Icons
 (iOS 6 and earlier) Check if your icons are prerendered. If this is unchecked the icons will get a glossy highlight added automatically.
 
@@ -492,9 +561,6 @@ The Apple Privacy Manifest for the application. The field will default to `/buil
 #### Custom Entitlements
 If specified, the entitlements in the supplied provisioning profile (`.entitlements`, `.xcent`, `.plist`) will be merged with the entitlements from the provisioning profile supplied when bundling the application.
 
-#### Override Entitlements
-If checked the Custom Entitlements will replace the ones in the provisioning profile when bundling. Must be used in combination with the Custom Entitlements setting above.
-
 #### Default Language
 The language used if the application doesn't have user's preferred language in `Localizations` list (see [`CFBundleDevelopmentRegion`](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-130430)). Use the two-letter ISO 639-1 standard if preferred language is available there or the three-letter ISO 639-2.
 
@@ -520,12 +586,21 @@ Specifies which payload JSON field should be used as notification text. If left
 #### Version Code
 An integer value indicating the version of the app. Increase the value for each subsequent update.
 
+#### Minimum SDK Version
+The minimum API Level required for the application to run (`android:minSdkVersion`).
+
+#### Target SDK Version
+The API Level that the application targets (`android:targetSdkVersion`).
+
 #### Package
 Package identifier. Must consist of two or more segments separated by a dot. Each segment must start with a letter. Each segment must only consist of alphanumeric letters or the underscore character.
 
 #### GCM Sender Id
 Google Cloud Messaging Sender Id. Set this to the string assigned by Google to enable push notifications.
 
+#### FCM Application Id
+Firebase Cloud Messaging Application Id.
+
 #### Manifest
 If set, use the specified Android manifest XML file when bundling.
 
@@ -538,9 +613,15 @@ Specifies which method to use to get keyboard input on Android devices. Valid op
 #### Immersive Mode
 If set, hides the navigation and status bars and lets your app capture all touch events on the screen.
 
+#### Display Cutout
+Extend to display cutout.
+
 #### Debuggable
 Whether or not the application can be debugged using tools such as [GAPID](https://github.com/google/gapid) or [Android Studio](https://developer.android.com/studio/profile/android-profiler). This will set the `android:debuggable` flag in the Android manifest ([official documentation](https://developer.android.com/guide/topics/manifest/application-element#debug)).
 
+#### ProGuard config
+Custom ProGuard file to help strip redundant Java classes from the final APK.
+
 #### Extract Native Libraries
 Specifies whether the package installer extracts native libraries from the APK to the file system. If set to `false`, your native libraries are stored uncompressed in the APK. Although your APK might be larger, your application loads faster because the libraries load directly from the APK at runtime. This will set the `android:extractNativeLibs` flag in the Android Manifest ([official documentation](https://developer.android.com/guide/topics/manifest/application-element#extractNativeLibs)).
 
@@ -549,7 +630,7 @@ Specifies whether the package installer extracts native libraries from the APK t
 ### macOS
 
 #### App Icon
-Image file (.png) to use as application icon on macOS.
+Bundle icon file (.icns) to use as application icon on macOS.
 
 #### Info.plist
 If set, use the specified info.plist file when bundling.
@@ -600,6 +681,9 @@ Suffix to be appended to the archive files. Useful to, for instance, force non-c
 #### Engine Arguments
 List of arguments that will be passed to the engine.
 
+#### Wasm Streaming
+Enable streaming of the wasm file (faster and uses less memory, but requires the `application/wasm` MIME type).
+
 #### Show Fullscreen Button
 Enables Fullscreen Button in `index.html` file.
 
@@ -632,11 +716,11 @@ Check to automatically finish IAP transactions. If unchecked, you need to explic
 
 ### Live update
 
-#### Private Key
-If set, use the specified private key file when bundling live update content. If no key file is set, a key is generated.
+#### Settings
+Liveupdate settings resource file to use during bundling.
 
-#### Public Key
-If set, use the specified public key file when bundling live update content. If no key file is set, a key is generated.
+#### Mount On Start
+Enables auto-mount of previously mounted resources when the application starts.
 
 ---
 
@@ -649,9 +733,18 @@ If set, use the app manifest to customize the engine build. This allows you to r
 
 ### Profiler
 
+#### Enabled
+Enable the in-game profiler.
+
 #### Track Cpu
 If checked, enable CPU profiling in release versions of the builds. Normally, you can only access profiling information in debug builds.
 
+#### Sleep Between Server Updates
+Number of milliseconds to sleep between server updates.
+
+#### Performance Timeline Enabled
+Enable in-browser performance timeline (HTML5 only).
+
 ---
 
 ## Setting config values on engine startup

+ 6 - 12
docs/ru/manuals/camera.md

@@ -226,17 +226,11 @@ end
 -- @return world_y мировая координата Y
 -- @return world_z мировая координата Z
 function M.screen_to_world(camera, screen_x, screen_y, z)
-	local projection = go.get(camera, "projection")
-	local view = go.get(camera, "view")
-	local w, h = window.get_size()
-	-- window.get_size() возвращает масштабированный размер окна,
-	-- учитывая дисплейный масштаб (например, Retina на macOS).
-	-- Нужно скорректировать размер с учётом масштаба.
-	local scale = window.get_display_scale()
-	w = w / scale
-	h = h / scale
-
-	-- https://defold.com/manuals/camera/#converting-mouse-to-world-coordinates
+    local projection = go.get(camera, "projection")
+    local view = go.get(camera, "view")
+    local w, h = window.get_size()
+
+    -- https://defold.com/manuals/camera/#converting-mouse-to-world-coordinates
     local inv = vmath.inv(projection * view)
     local x = (2 * screen_x / w) - 1
     local y = (2 * screen_y / h) - 1
@@ -246,7 +240,7 @@ function M.screen_to_world(camera, screen_x, screen_y, z)
 end
 ```
 
-На странице [Примеры](https://defold.com/examples/render/screen_to_world/) показано использование преобразования экранных координат в мировые. Также есть [примерный проект](https://github.com/defold/sample-screen-to-world-coordinates/) с демонстрацией этого процесса.
+Имейте в виду, что значения `action.screen_x` и `action.screen_y` из `on_input()` должны использоваться как аргументы для этой функции. На странице [Примеры](https://defold.com/examples/render/screen_to_world/) показано использование преобразования экранных координат в мировые. Также есть [примерный проект](https://github.com/defold/sample-screen-to-world-coordinates/) с демонстрацией этого процесса.
 
 ::: sidenote
 [Сторонние решения для камеры](/manuals/camera/#third-party-camera-solutions) предоставляют функции для преобразования координат между экраном и миром.

+ 76 - 5
docs/ru/manuals/font.md

@@ -11,16 +11,11 @@ brief: В этом руководстве описаны особенности
 - OpenType
 - BMFont
 
-
 Шрифты, добавленные в проект, автоматически конвертируются в текстуру, которую Defold может визуализировать. Доступны два метода визуализации шрифтов, каждый из которых имеет свои преимущества и недостатки:
 
 - Bitmap
 - Distance field
 
-::: sidenote
-Вместо генерации и включения текстуры шрифта в состав приложения можно [генерировать глифы шрифта во время выполнения](/extension-fontgen) из встроенного шрифта TrueType. Такой подход может значительно сократить размер загрузки и потребление оперативной памяти в игре на Defold.
-:::
-
 ## Создание шрифта
 
 Чтобы создать шрифт для использования в Defold, создайте новый файл Font, выбрав в меню <kbd>File ▸ New...</kbd>, затем <kbd>Font</kbd>. Можно также <kbd>кликнуть ПКМ</kbd> в нужном расположении в браузере ассетов и выбрать <kbd>New... ▸ Font</kbd>.
@@ -167,3 +162,79 @@ space ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E
 `float horizontal_gradient = fract(var_texcoord0.y / texture_size_recip.w);`
 
 Подробнее об унифицированных шейдерных переменных см. В [руководстве по шейдерам](/manuals/shader).
+
+## Генерация во время выполнения
+
+Возможно использовать генерацию шрифтов типа SDF (Distance Field) во время выполнения при использовании шрифтов TrueType (.ttf).  
+Этот подход позволяет значительно уменьшить размер загрузки и потребление памяти во время выполнения в игре на Defold.  
+Небольшой недостаток — небольшая задержка при генерации каждого глифа во время выполнения.
+
+Активируйте эту возможность, установив параметр `font.runtime_generation` в файле game.project.
+
+::: sidenote
+Эта функция на данный момент является экспериментальной, но планируется использовать её в качестве основного рабочего процесса в будущем.
+:::
+
+::: important
+Этот параметр влияет на все .ttf шрифты в проекте.
+:::
+
+### Предварительная генерация кэша глифов
+
+Чтобы упростить использование шрифтов, генерируемых во время выполнения, поддерживается предварительная генерация кэша глифов.  
+Это означает, что шрифт сгенерирует глифы, указанные в поле *Characters* ресурса шрифта.
+
+::: sidenote
+Если установлено свойство `All Chars`, предварительная генерация не будет выполняться, так как это противоречит цели — не генерировать все глифы сразу.
+:::
+
+### Скриптование шрифтов
+
+Для шрифтов, генерируемых во время выполнения, можно добавлять и удалять подшрифты.  
+Это полезно, если один большой шрифт был разделён на несколько файлов по наборам символов (например, для CJK).
+
+::: important
+Добавление подшрифта не приводит к автоматической загрузке или отображению всех глифов.
+:::
+
+```lua
+-- Добавить диапазон A-Z в .fontc
+local font_hash = hash("/assets/fonts/roboto.fontc")
+local ttf_hash = hash("/assets/fonts/Roboto/Roboto-Bold.ttf")
+local codepoint_min = 0x00000041 -- A
+local codepoint_max = 0x0000005A -- Z
+font.add_source(font_hash, ttf_hash, codepoint_min, codepoint_max)
+```
+
+```lua
+-- Удалить связанный ttf-ресурс
+local font_hash = hash("/assets/fonts/roboto.fontc")
+local ttf_hash = hash("/assets/fonts/Roboto/Roboto-Bold.ttf")
+font.remove_source(font_hash, ttf_hash)
+```
+
+Чтобы загрузить глифы в шрифт, необходимо вызвать `font.add_glyphs()`.
+Это асинхронная операция, и после её завершения можно безопасно отображать сообщения, содержащие эти глифы.
+
+```lua
+local function add_glyph_callback(self, id, result, errmsg)
+  if not result then
+    print("Запрос " .. id .. " завершился с ошибкой:", errmsg)
+  else
+    msg.post(some_url, "show_dialog")
+  end
+end
+
+-- Загрузить глифы в шрифт
+local font_hash = hash("/assets/fonts/roboto.fontc")
+local glyphs = "Some text to be shown!" -- для наилучшей производительности используйте список уникальных глифов
+local request_id = font.add_glyphs(font_hash, ttf_hash, add_glyph_callback)
+```
+
+И, когда символы больше не нужны, можно освободить память:
+```lua
+-- Удалить глифы из памяти
+local font_hash = hash("/assets/fonts/roboto.fontc")
+font.remove_glyphs(font_hash, "Все символы из набора")
+```
+

+ 103 - 10
docs/ru/manuals/project-settings.md

@@ -60,6 +60,12 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Version
 Версия приложения.
 
+#### Publisher
+Название издателя.
+
+#### Developer
+Название разработчика.
+
 #### Write Log
 Если опция отмечена, движок будет записывать файл журнала. Если запущено несколько экземпляров из редактора, файл будет называться *instance_2_log.txt*, где `2` — индекс экземпляра. Если запущен один экземпляр или используется сборка, файл будет называться *log.txt*. Файл журнала будет сохранён в одном из следующих путей (в порядке приоритета):
 
@@ -161,12 +167,18 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Swap interval
 Целое значение, управляющее VSync. `0` — отключает, по умолчанию `1`. При использовании OpenGL это значение определяет количество кадров между обновлениями буфера ([swap interval](https://www.khronos.org/opengl/wiki/Swap_Interval)). Для Vulkan VSync контролируется напрямую этим значением, так как понятия swap interval нет.
 
+#### Vsync
+Использовать аппаратный VSync для тайминга кадров. Может быть переопределено драйвером графики и особенностями платформы. Для устаревшего поведения «variable_dt» отключите этот параметр и установите ограничение частоты кадров в `0`.
+
 #### Display Profiles
 Файл профилей дисплея. По умолчанию: `/builtins/render/default.display_profilesc`. Подробнее см. в [руководстве по GUI Layouts](/manuals/gui-layouts/#creating-display-profiles).
 
 #### Dynamic Orientation
 Если опция включена, приложение автоматически переключает ориентацию между альбомной и портретной при повороте устройства. Приложение разработки не поддерживает эту настройку.
 
+#### Display Device Info
+Выводить информацию о GPU в консоль при запуске.
+
 ---
 
 ### Render
@@ -185,8 +197,18 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 
 ---
 
+### Font
+
+#### Runtime Generation
+Использовать генерацию шрифтов во время выполнения.
+
+---
+
 ### Physics
 
+#### Max Collision Object Count
+Максимальное количество объектов столкновений.
+
 #### Type
 Тип физики: `2D` или `3D`.
 
@@ -238,6 +260,12 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Trigger Overlap Capacity
 Максимальное количество пересекающихся физических триггеров.
 
+#### Velocity Threshold
+Минимальная скорость, при которой столкновения считаются упругими.
+
+#### Max Fixed Timesteps
+Максимальное количество шагов симуляции при использовании фиксированного шага (только для 3D).
+
 ---
 
 ### Graphics
@@ -254,6 +282,9 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Max Characters
 Количество символов, заранее выделенных в буфере рендеринга текста — то есть сколько символов может быть отображено за кадр.
 
+#### Max Font Batches
+Максимальное количество батчей текста, которые могут быть отображены за кадр.
+
 #### Max Debug Vertices
 Максимальное количество отладочных вершин. Используется, в том числе, для отрисовки физических форм.
 
@@ -269,6 +300,13 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### OpenGL Core Profile Hint
 Устанавливает профиль OpenGL 'core' при создании контекста. Core-профиль исключает устаревшие функции OpenGL, такие как немедленный режим отрисовки (immediate mode). Не применяется к OpenGL ES.
 
+---
+  
+### Shader
+  
+#### Exclude GLES 2.0
+Не компилировать шейдеры для устройств, использующих OpenGLES 2.0 / WebGL 1.0.
+
 ---
 
 ### Input
@@ -334,6 +372,9 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Gain
 Глобальное усиление (громкость), от `0` до `1`.
 
+#### Use Linear Gain
+Если включено, усиление линейное. Если выключено, используется экспоненциальная кривая.
+
 #### Max Sound Data
 Максимальное количество звуковых ресурсов, то есть уникальных звуковых файлов во время выполнения.
 
@@ -346,6 +387,12 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Max Sound Instances
 Максимальное количество одновременно воспроизводимых экземпляров звуков.
 
+#### Max Component Count
+Максимальное количество звуковых компонентов на коллекцию.
+
+#### Sample Frame Count
+Количество сэмплов, используемых на каждое обновление аудио. `0` — автоматически (1024 для 48 кГц, 768 для 44.1 кГц).
+
 #### Use Thread
 Если включено, система звука будет использовать потоки для воспроизведения, что снижает риск запинаний при высокой нагрузке на основной поток.
 
@@ -404,6 +451,15 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Max Count
 Максимальное количество компонентов Model на коллекцию. [(См. информацию по оптимизации количества компонентов)](#component-max-count-optimizations).
 
+#### Split Meshes
+Разбивать меши с более чем 65536 вершинами на новые меши.
+
+#### Max Bone Matrix Texture Width
+Максимальная ширина текстуры матриц костей. Только необходимый размер для анимаций используется, округляется до ближайшей степени двойки.
+
+#### Max Bone Matrix Texture Height
+Максимальная высота текстуры матриц костей. Только необходимый размер для анимаций используется, округляется до ближайшей степени двойки.
+
 ---
 
 ### GUI
@@ -414,9 +470,6 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Max Particlefx Count
 Максимальное количество одновременно активных эмиттеров.
 
-#### Max Particle Count
-Максимальное количество одновременно отображаемых частиц.
-
 #### Max Animation Count
 Максимальное количество одновременно активных анимаций в GUI.
 
@@ -440,6 +493,19 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Max Particle Count
 Максимальное количество одновременно отображаемых частиц.
 
+---
+  
+### Box2D
+  
+#### Velocity Iterations
+Количество итераций по скоростям для солвера Box2D 2.2.
+  
+#### Position Iterations
+Количество итераций по позициям для солвера Box2D 2.2.
+  
+#### Sub Step Count
+Количество субшагов для солвера Box2D 3.x.
+  
 ---
 
 ### Collection proxy
@@ -471,6 +537,9 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Launch Screen
 Файл раскадровки (.storyboard). Подробнее о создании см. в [руководстве по iOS](/manuals/ios/#creating-a-storyboard).
 
+#### Icons Asset
+Файл ассетов иконок (.car), содержащий иконки приложения.
+
 #### Prerendered Icons
 (iOS 6 и ниже) Если опция не включена, иконки получат глянцевое покрытие автоматически. Если включена — иконки считаются уже готовыми к использованию.
 
@@ -492,9 +561,6 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Custom Entitlements
 Если задано, права (entitlements) из предоставленного provisioning profile (`.entitlements`, `.xcent`, `.plist`) будут объединены с правами из профиля, указанного при сборке.
 
-#### Override Entitlements
-Если включено, пользовательские entitlements заменят права из provisioning profile. Используется только вместе с настройкой Custom Entitlements.
-
 #### Default Language
 Язык, используемый приложением, если в списке `Localizations` отсутствует предпочтительный язык пользователя (см. [`CFBundleDevelopmentRegion`](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-130430)). Используйте двухбуквенный ISO 639-1, если доступен, или трёхбуквенный ISO 639-2.
 
@@ -520,12 +586,21 @@ local gravity_y = sys.get_config_number("physics.gravity_y")
 #### Version Code
 Целочисленное значение, указывающее версию приложения. Увеличивайте при каждом обновлении.
 
+#### Minimum SDK Version
+Минимальный уровень API, требуемый для запуска приложения (`android:minSdkVersion`).
+
+#### Target SDK Version
+Уровень API, на который нацелено приложение (`android:targetSdkVersion`).
+
 #### Package
 Идентификатор пакета. Должен состоять минимум из двух сегментов, разделённых точками. Каждый сегмент должен начинаться с буквы и содержать только буквенно-цифровые символы или подчёркивания.
 
 #### GCM Sender Id
 Sender Id для Google Cloud Messaging. Установите строку, выданную Google, чтобы включить push-уведомления.
 
+#### FCM Application Id
+Идентификатор приложения Firebase Cloud Messaging.
+
 #### Manifest
 Если указано, используется заданный Android-манифест (XML-файл) при сборке.
 
@@ -538,9 +613,15 @@ Sender Id для Google Cloud Messaging. Установите строку, вы
 #### Immersive Mode
 Если включено, скрывает навигационные и статус-бары и позволяет приложению обрабатывать все касания по экрану.
 
+#### Display Cutout
+Расширять область приложения в зону выреза экрана (display cutout).
+
 #### Debuggable
 Определяет, может ли приложение быть отлажено с помощью таких инструментов, как [GAPID](https://github.com/google/gapid) или [Android Studio](https://developer.android.com/studio/profile/android-profiler). Устанавливает флаг `android:debuggable` в Android-манифесте ([официальная документация](https://developer.android.com/guide/topics/manifest/application-element#debug)).
 
+#### ProGuard config
+Пользовательский файл ProGuard для удаления избыточных Java‑классов из итогового APK.
+
 #### Extract Native Libraries
 Указывает, должен ли установщик извлекать нативные библиотеки из APK в файловую систему. Если установлено в `false`, библиотеки остаются внутри APK в несжатом виде. Это увеличивает размер APK, но ускоряет загрузку, так как библиотеки загружаются напрямую. Устанавливает флаг `android:extractNativeLibs` в Android-манифесте ([официальная документация](https://developer.android.com/guide/topics/manifest/application-element#extractNativeLibs)).
 
@@ -600,6 +681,9 @@ HTML-шаблон, используемый при сборке. По умолч
 #### Engine Arguments
 Список аргументов, передаваемых движку при запуске.
 
+#### Wasm Streaming
+Включить потоковую загрузку wasm‑файла (быстрее и использует меньше памяти, но требует корректного MIME‑типа `application/wasm`).
+
 #### Show Fullscreen Button
 Включает кнопку полноэкранного режима в `index.html`.
 
@@ -632,11 +716,11 @@ HTML-шаблон, используемый при сборке. По умолч
 
 ### Live update
 
-#### Private Key
-Если указано, используется заданный файл закрытого ключа при сборке live update-контента. Если ключ не задан, он будет сгенерирован автоматически.
+#### Settings
+Ресурс настроек Liveupdate, используемый при сборке.
 
-#### Public Key
-Если указано, используется заданный файл открытого ключа при сборке live update-контента. Если ключ не задан, он будет сгенерирован автоматически.
+#### Mount On Start
+Автоматически монтировать ранее смонтированные ресурсы при запуске приложения.
 
 ---
 
@@ -649,9 +733,18 @@ HTML-шаблон, используемый при сборке. По умолч
 
 ### Profiler
 
+#### Enabled
+Включить внутриигровой профайлер.
+
 #### Track Cpu
 Если включено, разрешается профилирование CPU в release-сборках. Обычно доступ к профилированию возможен только в debug-сборках.
 
+#### Sleep Between Server Updates
+Количество миллисекунд ожидания между обновлениями сервера.
+
+#### Performance Timeline Enabled
+Включить таймлайн производительности в браузере (только HTML5).
+
 ---
 
 ## Установка конфигурационных значений при запуске движка