Browse Source

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

Mikael Säker 7 years ago
parent
commit
e326fa5ccf

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

@@ -121,7 +121,7 @@ D/defold  ( 6210): DEBUG:SCRIPT: Hello there, log!
 You need the to create certificates in *.pem*-format and keys in *.pk8*-format. You can generate these with the `openssl` tool:
 You need the to create certificates in *.pem*-format and keys in *.pk8*-format. You can generate these with the `openssl` tool:
 
 
 ```sh
 ```sh
-$ openssl genrsa -out key.pem 1024
+$ openssl genrsa -out key.pem 2048
 $ openssl req -new -key key.pem -out request.pem
 $ openssl req -new -key key.pem -out request.pem
 $ openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
 $ openssl x509 -req -days 9999 -in request.pem -signkey key.pem -out certificate.pem
 $ openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt
 $ openssl pkcs8 -topk8 -outform DER -in key.pem -inform PEM -out key.pk8 -nocrypt

+ 3 - 2
docs/en/manuals/bob.md

@@ -15,7 +15,7 @@ Bob is distributed as a Java _JAR_ archive containing everything needed to build
 
 
 Bob is run from a shell or from the command line by invoking `java` (or `java.exe` on Windows) and providing the bob java archive as argument:
 Bob is run from a shell or from the command line by invoking `java` (or `java.exe` on Windows) and providing the bob java archive as argument:
 
 
-```sh
+```text
 $ java -jar bob.jar --help
 $ java -jar bob.jar --help
 usage: bob [options] [commands]
 usage: bob [options] [commands]
  -a,--archive                        Build archive
  -a,--archive                        Build archive
@@ -50,7 +50,8 @@ usage: bob [options] [commands]
  -pk,--private-key <arg>             Private key (Android)
  -pk,--private-key <arg>             Private key (Android)
  -r,--root <arg>                     Build root directory. Default is
  -r,--root <arg>                     Build root directory. Default is
                                      current directory
                                      current directory
- -tp,--texture-profiles <arg>        Use texture profiles
+ -tc,--texture-compression <arg>     Use texture compression as specified
+                                     in texture profiles
  -u,--auth <arg>                     User auth token
  -u,--auth <arg>                     User auth token
  -v,--verbose                        Verbose output
  -v,--verbose                        Verbose output
 ```
 ```

+ 13 - 6
docs/en/manuals/extensions.md

@@ -35,9 +35,7 @@ To create a new extension, create a folder in the project root. This folder will
 *lib*
 *lib*
 : This optional folder contains any compiled libraries that the extension depends on. Library files should be placed in subfolders named by `platform`, or `architecure-platform`, depending on what architectures are supported by your libraries.
 : This optional folder contains any compiled libraries that the extension depends on. Library files should be placed in subfolders named by `platform`, or `architecure-platform`, depending on what architectures are supported by your libraries.
 
 
-  Supported platforms are `ios`, `android`, `osx`, `win32`, `linux`.
-
-  Supported `arc-platform` pairs are `armv7-ios`, `arm64-ios`, `armv7-android`, `x86-osx`, `x86_64-osx`, `x86-win32`, `x86_64-win32`, `x86-linux`, `x86_64-linux`.
+  :[platforms](../shared/platforms.md)
 
 
 *res*
 *res*
 : This optional folder contains any extra resources that the extension depends on. Resource files should be placed in subfolders named by `platform`, or `architecure-platform` just as the "lib" subfolders. A subfolder `common` is also allowed, containing resource files common for all platforms.
 : This optional folder contains any extra resources that the extension depends on. Resource files should be placed in subfolders named by `platform`, or `architecure-platform` just as the "lib" subfolders. A subfolder `common` is also allowed, containing resource files common for all platforms.
@@ -171,6 +169,16 @@ print(rot_s) --> nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM
 
 
 And that's it! We have created a fully working native extension.
 And that's it! We have created a fully working native extension.
 
 
+## Defined platform identifiers
+
+The following identifiers are defined by the builder on each respective platform:
+
+* DM_PLATFORM_WINDOWS
+* DM_PLATFORM_OSX
+* DM_PLATFORM_IOS
+* DM_PLATFORM_ANDROID
+* DM_PLATFORM_LINUX
+
 ## The ext.manifest file
 ## The ext.manifest file
 
 
 Apart from the name of the extension, the manifest file can contain platform specific compile flags, link flags, libs and frameworks. If the *ext.manifest* file does not contain a "platforms" segment, or a platform is missing from the list, the platform you bundle for will still build, but without any extra flags set.
 Apart from the name of the extension, the manifest file can contain platform specific compile flags, link flags, libs and frameworks. If the *ext.manifest* file does not contain a "platforms" segment, or a platform is missing from the list, the platform you bundle for will still build, but without any extra flags set.
@@ -214,11 +222,10 @@ Platforms
 : Android lacks support for *.aar* archives. All platforms currently create debug builds only.
 : Android lacks support for *.aar* archives. All platforms currently create debug builds only.
 
 
 Languages
 Languages
-: C++, Objective C (MacOS and iOS) and Java (Android) are supported. Swift and Kotlin are currently not supported.
+: The Swift and Kotlin programming languages are currently not supported.
 
 
 Editor
 Editor
-: The editor integration. There is no build process indication. Error reporting is rudimentary.
+: The editor integration lacks build process indication. Error reporting is rudimentary.
 
 
 Debugging
 Debugging
 : Currently, when building on iOS, the *.dSYM* files are not included in the build result
 : Currently, when building on iOS, the *.dSYM* files are not included in the build result
-

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

@@ -111,7 +111,7 @@ end
 ```lua
 ```lua
 function init(self)
 function init(self)
     -- Set the color of the "my_label" component in the same game object
     -- Set the color of the "my_label" component in the same game object
-    -- as this script to grey...
+    -- as this script. Color is a RGBA value stored in a vector4.
     local grey = vmath.vector4(0.5, 0.5, 0.5, 1.0)
     local grey = vmath.vector4(0.5, 0.5, 0.5, 1.0)
     go.set("#my_label", "color", grey)
     go.set("#my_label", "color", grey)
 
 

+ 2 - 2
docs/en/manuals/message-passing.md

@@ -58,7 +58,7 @@ The game contains a few simple mechanics that require communication between the
   msg.post("/interface#gui", "update_score", { score = self.score })
   msg.post("/interface#gui", "update_score", { score = self.score })
   ```
   ```
 
 
-  In this case it's not possible to write a relative address since "interface" is at the root of the naming hierarchy and "hero" is not. The message is send to the GUI component that has a script attached to it, so it can react to the message accordingly. Messages can be sent freely between scripts, GUI scripts and render scripts.
+  In this case it's not possible to write a relative address since "interface" is at the root of the naming hierarchy and "hero" is not. The message is sent to the GUI component that has a script attached to it, so it can react to the message accordingly. Messages can be sent freely between scripts, GUI scripts and render scripts.
 
 
   The message `"update_score"` is coupled with score data. The data is passed as a Lua table in the `message` parameter:
   The message `"update_score"` is coupled with score data. The data is passed as a Lua table in the `message` parameter:
 
 
@@ -182,7 +182,7 @@ end
 
 
 ## Messaging between game worlds
 ## Messaging between game worlds
 
 
-If you use a collection proxy component to load a new game world into the runtime, you will want to pass messages between the game worlds. Suppose that you have loaded a collection via proxy and that the collection have its *Name* property set to "level":
+If you use a collection proxy component to load a new game world into the runtime, you will want to pass messages between the game worlds. Suppose that you have loaded a collection via proxy and that the collection has its *Name* property set to "level":
 
 
 ![Collection name](images/message_passing/collection_name.png)
 ![Collection name](images/message_passing/collection_name.png)
 
 

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

@@ -39,7 +39,7 @@ Model components are created just like any other game object component. You can
 With the model in place you need to specify a number of properties
 With the model in place you need to specify a number of properties
 
 
 *Mesh*
 *Mesh*
-: This property should refer to the Collada *.dae* file that contains the mesh to use.
+: This property should refer to the Collada *.dae* file that contains the mesh to use. If the file contains multiple meshes, only the first one is read.
 
 
 *Material*
 *Material*
 : Set this property to a material you have created that is suitable for a textured 3D object. There is a built-in *model.material* file that you can use as a starting point.
 : Set this property to a material you have created that is suitable for a textured 3D object. There is a built-in *model.material* file that you can use as a starting point.

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

@@ -36,7 +36,7 @@ The idea is that we call `fly_randomly()` at `init()` which will cause the butte
 The first line `require 'modules_example.flying'` reads the script file *flying.lua* in the folder *modules_example* (where the application logic is stored) into the engine.
 The first line `require 'modules_example.flying'` reads the script file *flying.lua* in the folder *modules_example* (where the application logic is stored) into the engine.
 
 
 ::: sidenote
 ::: sidenote
-The syntax of the filename string provided to `require` is a bit special. Lua will replace '.' characters in the filename string with path separators: '/' on Mac OS X and Linux and '\' on Windows.
+The syntax of the filename string provided to `require` is a bit special. Lua will replace '.' characters in the filename string with path separators: '/' on Mac OS X and Linux and '\\' on Windows.
 :::
 :::
 
 
 To create *flying.lua*, just add a new Lua module file to your project and name it:
 To create *flying.lua*, just add a new Lua module file to your project and name it:

+ 5 - 1
docs/en/manuals/project-settings.md

@@ -69,7 +69,11 @@ custom_resources (hidden setting)
 : A comma separated list of resources that will be included in the project. If directories are specified, all files and directories in that directory are recursively included.
 : A comma separated list of resources that will be included in the project. If directories are specified, all files and directories in that directory are recursively included.
 
 
 bundle_resources (hidden setting)
 bundle_resources (hidden setting)
-: A directory containing resource files and folders that should be copied as-is into the resulting package when bundling. The directory is specified with an absolute path from the project root, for example `/res`. The resource directory must contain subfolders named by `platform`, or `architecure-platform`. Supported platforms are `ios`, `android`, `osx` and `web`. Supported arc-platform pairs are `armv7-ios`, `arm64-ios`, `armv7-android`, `x86_64-osx` and `js-web`. A subfolder named `common` is also allowed, containing resource files common for all platforms.
+: A directory containing resource files and folders that should be copied as-is into the resulting package when bundling. The directory is specified with an absolute path from the project root, for example `/res`. The resource directory must contain subfolders named by `platform`, or `architecure-platform`.
+  
+  :[platforms](../shared/platforms.md)
+
+  A subfolder named `common` is also allowed, containing resource files common for all platforms.
 
 
 bundle_exclude_resources (hidden setting)
 bundle_exclude_resources (hidden setting)
 : A comma separated list of resources that should not be included in the bundle.
 : A comma separated list of resources that should not be included in the bundle.

+ 3 - 0
docs/en/shared/platforms.md

@@ -0,0 +1,3 @@
+Supported platforms are `ios`, `android`, `osx`, `win32`, `linux`, `web`.
+
+Supported `arc-platform` pairs are `armv7-ios`, `arm64-ios`, `armv7-android`, `x86-osx`, `x86_64-osx`, `x86-win32`, `x86_64-win32`, `x86-linux`, `x86_64-linux`, `js-web`.

+ 1 - 1
docs/en/tutorials/15-puzzle.md

@@ -229,7 +229,7 @@ The possible ways the number of inversions can change by a vertical slide is by
 
 
 The possible ways the empty square row can change by a vertical slide is by ±1.
 The possible ways the empty square row can change by a vertical slide is by ±1.
 
 
-In the final state of the puzzle, the empty square is in the lower right corner (the *odd* row 1) and the number of inversions is the *even* value 0. Each legal move either leave these two values intact (horizontal move) or switches their polarity (vertical move). No legal move can ever make the polarity of the inversions and the emply square row *odd*, *odd* or *even*, *even*.
+In the final state of the puzzle, the empty square is in the lower right corner (the *odd* row 1) and the number of inversions is the *even* value 0. Each legal move either leave these two values intact (horizontal move) or switches their polarity (vertical move). No legal move can ever make the polarity of the inversions and the empty square row *odd*, *odd* or *even*, *even*.
 
 
 Any puzzle state where the two numbers are both odd or both even is therefore impossible to solve.
 Any puzzle state where the two numbers are both odd or both even is therefore impossible to solve.
 
 

+ 1 - 1
docs/en/tutorials/snake.md

@@ -141,7 +141,7 @@ If you didn't understand any of the above, don't worry about it. Just tag along,
 
 
 ## The game script - update
 ## The game script - update
 
 
-The `init()` function is called exactly once, when the script component is instanciated into the running game. The function `update()`, however, is called once each frame, 60 times a second. That makes the function ideal for real time game logic.
+The `init()` function is called exactly once, when the script component is instantiated into the running game. The function `update()`, however, is called once each frame, 60 times a second. That makes the function ideal for real time game logic.
 
 
 The idea for the update is this:
 The idea for the update is this:
 
 

+ 41 - 41
docs/en/tutorials/war-battles.md

@@ -80,7 +80,7 @@ Let's take a moment to familiarize ourselves with the various views in the edito
     * <kbd>Scroll</kbd> to zoom in and out.
     * <kbd>Scroll</kbd> to zoom in and out.
     * <kbd>Alt + left mouse button</kbd> to pan around.
     * <kbd>Alt + left mouse button</kbd> to pan around.
     * <kbd>Ctrl + left mouse button</kbd> to rotate in 3D.
     * <kbd>Ctrl + left mouse button</kbd> to rotate in 3D.
-    * The menu <kbd>Scene ▸ Camera</kbd> includes tools to frame the view to the current selection and to realign the camera.
+    * The <kbd>View</kbd> menu includes tools to frame the view to the current selection and to realign the camera.
 
 
 3. The *Outline* shows the content of the file currently being edited, but in a hierarchial tree structure. The outline reflects the editor view and allows you to perform many operations on your items:
 3. The *Outline* shows the content of the file currently being edited, but in a hierarchial tree structure. The outline reflects the editor view and allows you to perform many operations on your items:
 
 
@@ -101,41 +101,41 @@ Let's take a moment to familiarize ourselves with the various views in the edito
 
 
 The empty project template is not 100% empty so we should fix that:
 The empty project template is not 100% empty so we should fix that:
 
 
-1. Open the file *main/main.collection*.
+1. Open the file "main/main.collection".
 2. Mark the game object "logo" in either the outline or the editor.
 2. Mark the game object "logo" in either the outline or the editor.
 3. Delete the game object.
 3. Delete the game object.
-4. Delete the file *main/images/logo.png* (you find it in the assets view).
-5. Delete the file *main/logo.atlas* (you find it in the assets view).
+4. Delete the file "main/images/logo.png" (you find it in the assets view).
+5. Delete the file "main/logo.atlas" (you find it in the assets view).
 
 
 Now the project is totally empty. You can verify this by selecting <kbd>Project ▸ Build</kbd> from the menu. This will launch the game and you should see nothing but a black window.
 Now the project is totally empty. You can verify this by selecting <kbd>Project ▸ Build</kbd> from the menu. This will launch the game and you should see nothing but a black window.
 
 
 ## Drawing the game map
 ## Drawing the game map
 
 
-Your game needs a setting, a map. The map that you are going to draw will be made out of tiles, small images that are put together like a mosaic into a larger image. In Defold, such an image is called a *Tile map*. In order to create a tile map, you need to import an image file that contain the various tiles. You then need to specify the size of the tiles, margins and padding on that image. This setup is done in a file called a *Tile source*.
+Your game needs a setting, a map. The map that you are going to draw will be made out of tiles, small images that are put together like a mosaic into a larger image. In Defold, such an image is called a *Tile map*. In order to create a tile map, you need to import an image file that contain the various tiles. You then need to specify the size of the tiles, margins and padding on that image. This setup is done in a file of a type called *Tile source*.
 
 
 1. Download the "War Battles" asset package. The file is a ZIP archive that you have to unpack on your hard drive.
 1. Download the "War Battles" asset package. The file is a ZIP archive that you have to unpack on your hard drive.
 
 
    <a class="btn btn-primary btn-xs-block btn-icon" href="//storage.googleapis.com/defold-doc/assets/war-battles-assets.zip">Download asset package<span aria-hidden="true" class="icon icon-download"></span></a>
    <a class="btn btn-primary btn-xs-block btn-icon" href="//storage.googleapis.com/defold-doc/assets/war-battles-assets.zip">Download asset package<span aria-hidden="true" class="icon icon-download"></span></a>
 
 
-2. Drag the file *map.png*, which contains all tiles, from the asset package to the folder *main* in the *Assets* view of your project.
+2. Drag the file "map.png", which contains all tiles, from the asset package to the folder "main" in the *Assets* view of your project.
 
 
-3. <kbd>Right click</kbd> the folder *main* and select <kbd>New ▸ Tile source</kbd>. This will create a new tile source file. Name the file "map.tilesource".
+3. <kbd>Right click</kbd> the folder *main* and select <kbd>New ▸ Tile source</kbd>. This will create a new tile source file. Name the file "map" (full name "map.tilesource").
 
 
    ![map](images/war-battles/map_tilesource.png)
    ![map](images/war-battles/map_tilesource.png)
 
 
-4. The new tilesource file opens automatically in the editor. Set the *Image* property of the tile source to the image file */main/map.png*. The easiest way to do that is to click the resource selector by the *Image* property to bring up the resource selector. Then select the file */main/map.png*:
+4. The new tilesource file opens automatically in the editor. Set the *Image* property of the tile source to the image file "/main/map.png". The easiest way to do that is to click the resource selector by the *Image* property to bring up the resource selector. Then select the file "/main/map.png":
 
 
     ![tilesource](images/war-battles/tilesource.png)
     ![tilesource](images/war-battles/tilesource.png)
 
 
     The tiles are 16⨉16 pixels in the source image with no margins or padding so there is no need to alter the default properties of the tile source.
     The tiles are 16⨉16 pixels in the source image with no margins or padding so there is no need to alter the default properties of the tile source.
 
 
-5. <kbd>Right click</kbd> the folder *main* and select <kbd>New ▸ Tile map</kbd>. Name the file "map.tilemap". The tile map is automatically opened in the editor view.
+5. <kbd>Right click</kbd> the folder *main* and select <kbd>New ▸ Tile map</kbd>. Name the file "map" (full name "map.tilemap"). The tile map is automatically opened in the editor view.
 
 
-6. Set the *Tile source* property of the new tile map to */main/map.tilesource*.
+6. Set the *Tile source* property of the new tile map to "/main/map.tilesource".
 
 
 7. Select "layer1" in the *Outline*.
 7. Select "layer1" in the *Outline*.
 
 
-8. Select <kbd>Scene ▸ Tile map ▸ Show palette</kbd>. This brings up the tile palette.
+8. Select <kbd>Edit ▸ Select Tile...</kbd>. This brings up the tile palette.
 
 
     ![palette](images/war-battles/palette.png)
     ![palette](images/war-battles/palette.png)
 
 
@@ -149,9 +149,9 @@ When you are happy with the map, it is time to add it to the game.
 
 
 ## Add the map to the game
 ## Add the map to the game
 
 
-Defold stores everything you build in *collections*. A collection is a container of game objects and other collections. In *game.project* you specify the collection that is loaded when the game starts up. This is initially set to the file */main/main.collection*.
+Defold stores everything you build in *collections*. A collection is a container of game objects and other collections. In the file "game.project" you specify the collection that is loaded when the game starts up. This is initially set to the file "/main/main.collection".
 
 
-1. Open the file *main.collection*.
+1. Open the file "main.collection".
 
 
 2. <kbd>Right click</kbd> the root node of the collection in the *Outline* and select <kbd>Add game object</kbd>.
 2. <kbd>Right click</kbd> the root node of the collection in the *Outline* and select <kbd>Add game object</kbd>.
 
 
@@ -159,11 +159,11 @@ Defold stores everything you build in *collections*. A collection is a container
 
 
 3. Change the *Id* property of the game object to "map". The id does not really matter for this game object but it is a good habit to set identifiers that are descriptive---it makes it easier to find your way around when you have many game objects.
 3. Change the *Id* property of the game object to "map". The id does not really matter for this game object but it is a good habit to set identifiers that are descriptive---it makes it easier to find your way around when you have many game objects.
 
 
-4. <kbd>Right click</kbd> the new game object and select <kbd>Add component file</kbd>.
+4. <kbd>Right click</kbd> the new game object and select <kbd>Add Component File</kbd>.
 
 
     ![add component](images/war-battles/add_component.png)
     ![add component](images/war-battles/add_component.png)
 
 
-5. In the resource selector, pick the file */main/map.tilemap*. This creates a new component in the game object based on the tilemap file. The tile map should now appear in the editor view.
+5. In the resource selector, pick the file "/main/map.tilemap". This creates a new component in the game object based on the tilemap file. The tile map should now appear in the editor view.
 
 
     ![tilemap](images/war-battles/tilemap.png)
     ![tilemap](images/war-battles/tilemap.png)
 
 
@@ -175,9 +175,9 @@ Defold stores everything you build in *collections*. A collection is a container
 
 
 1. Drag the folder *units/infantry* from the asset package to the folder *main* in the *Assets* view. This copies a set of flip book animation frame images to your project. The images are divided into folders with one folder for each movement direction: up, down, up-diagonally, down-diagonally and side.
 1. Drag the folder *units/infantry* from the asset package to the folder *main* in the *Assets* view. This copies a set of flip book animation frame images to your project. The images are divided into folders with one folder for each movement direction: up, down, up-diagonally, down-diagonally and side.
 
 
-2. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Atlas</kbd>. An atlas is a collection of images (PNG or JPEG) that are baked into a larger texture. Defold uses atlases instead of single image files for performance and memory reasons. The new atlas should open in the editor.
+2. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Atlas</kbd>. Name the new atlas file "sprites" (full name "sprites.atlas"). An atlas is a collection of images (PNG or JPEG) that are baked into a larger texture. Defold uses atlases instead of single image files for performance and memory reasons. The new atlas should open in the editor.
 
 
-3. <kbd>Right click</kbd> the root node of the atlas in the *Outline* and select <kbd>New ▸ Animation group</kbd>.
+3. <kbd>Right click</kbd> the root node of the atlas in the *Outline* and select <kbd>Add Animation Group</kbd>.
 
 
 4. Select the new animation group and change its *Id* property to "player-down".
 4. Select the new animation group and change its *Id* property to "player-down".
 
 
@@ -185,7 +185,7 @@ Defold stores everything you build in *collections*. A collection is a container
 
 
     ![add images](images/war-battles/add_images.png)
     ![add images](images/war-battles/add_images.png)
 
 
-6. With the animation group marked, select <kbd>Scene ▸ Play</kbd> from the menu to preview the animation. It will play back at full 60 FPS which is way too fast. Set the playback speed (*Fps* property) to 8.
+6. With the animation group marked, select <kbd>View ▸ Play</kbd> from the menu to preview the animation. It will play back at full 60 FPS which is way too fast. Set the playback speed (*Fps* property) to 8.
 
 
     ![play animation](images/war-battles/play_animation.png)
     ![play animation](images/war-battles/play_animation.png)
 
 
@@ -215,7 +215,7 @@ The player game object now has visual representation in the game world. The next
 
 
 ## Player input
 ## Player input
 
 
-1. Open the file */input/game.input_binding*. This file contains mappings from input sources (keyboard, touch screen, game pads etc) to input *actions*. Actions are just names that we want to associate with certain input.
+1. Open the file "/input/game.input_binding". This file contains mappings from input sources (keyboard, touch screen, game pads etc) to input *actions*. Actions are just names that we want to associate with certain input.
 
 
 2. Add *Key triggers* for the four arrow keys. Name the actions "up", "down", "left" and "right".
 2. Add *Key triggers* for the four arrow keys. Name the actions "up", "down", "left" and "right".
 
 
@@ -225,11 +225,11 @@ The player game object now has visual representation in the game world. The next
 
 
 Unlike the sprite component, which you added directly into the "player" game object, a script component requires that you create a separate file. This script file is then used as basis for the script component.
 Unlike the sprite component, which you added directly into the "player" game object, a script component requires that you create a separate file. This script file is then used as basis for the script component.
 
 
-1. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Script</kbd>. Name the new script file "player.script". The script file, pre-filled with template functions, opens up in the editor.
+1. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Script</kbd>. Name the new script file "player" (full name "player.script"). The script file, pre-filled with template functions, opens up in the editor.
 
 
     ![player script](images/war-battles/player_script.png)
     ![player script](images/war-battles/player_script.png)
 
 
-2. Open *main.collection*, <kbd>Right click</kbd> the game object "player" and select <kbd>Add component file</kbd>. Pick the new file */main/player.script* as the file to use for the component.
+2. Open *main.collection*, <kbd>Right click</kbd> the game object "player" and select <kbd>Add Component File</kbd>. Pick the new file "/main/player.script" as the file to use for the component.
 
 
 You now have a script that runs in the "player" game object. It does not do anything yet though. Let's start by adding player movement.
 You now have a script that runs in the "player" game object. It does not do anything yet though. Let's start by adding player movement.
 
 
@@ -307,13 +307,13 @@ What you need to is a *blueprint* for a rocket game object and then use some sor
 
 
 ## The rocket game object
 ## The rocket game object
 
 
-1. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Game Object</kbd>. Name this file *rocket.go*.
+1. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Game Object</kbd>. Name this file "rocket" (full name "rocket.go").
 
 
     (Note that by creating this file, you do not create a new game object instance but a *blueprint* file for actual game object instances.)
     (Note that by creating this file, you do not create a new game object instance but a *blueprint* file for actual game object instances.)
 
 
 2. Drag the folder *buildings/turret-rocket* from the asset package to the *main* folder in the *Assets* view.
 2. Drag the folder *buildings/turret-rocket* from the asset package to the *main* folder in the *Assets* view.
 
 
-3. Open *sprites.atlas* and create a new animation group (right click the root node and select <kbd>New ▸ Animation Group</kbd>). Name the animation "rocket".
+3. Open *sprites.atlas* and create a new animation group (right click the root node and select <kbd>Add Animation Group</kbd>). Name the animation "rocket".
 
 
 4. Add the three rocket images to the animation group and set the *Fps* property to a value that makes the animation look good when you preview.
 4. Add the three rocket images to the animation group and set the *Fps* property to a value that makes the animation look good when you preview.
 
 
@@ -327,11 +327,11 @@ Now you have a basic rocket game object blueprint, on file. The next step is to
 
 
 ## Spawning rockets
 ## Spawning rockets
 
 
-1. Open *main.collection* and <kbd>Right click</kbd> on the "player" game object. Select <kbd>Add Component ▸ Factory</kbd>.
+1. Open "main.collection" and <kbd>Right click</kbd> on the "player" game object. Select <kbd>Add Component ▸ Factory</kbd>.
 
 
-2. Select the new factory component and set its *Id* property to "rocketfactory" and its *Prototype* to the file */main/rocket.go* (the one you created above). Now the player game object is all set.
+2. Select the new factory component and set its *Id* property to "rocketfactory" and its *Prototype* to the file "/main/rocket.go" (the one you created above). Now the player game object is all set.
 
 
-3. Open the file */input/game.input_binding*.
+3. Open the file "/input/game.input_binding".
 
 
 4. Add a *Key trigger* for the firing action. Call this action "fire".
 4. Add a *Key trigger* for the firing action. Call this action "fire".
 
 
@@ -377,7 +377,7 @@ Now you have a basic rocket game object blueprint, on file. The next step is to
     1. If the `firing` flag is true, tell the factory component called "rocketfactory" that you just created to spawn a new game object. Note the character '#' that indicates that what follows is the id of a component.
     1. If the `firing` flag is true, tell the factory component called "rocketfactory" that you just created to spawn a new game object. Note the character '#' that indicates that what follows is the id of a component.
     2. Set the firing flag to false. This flag will be set in `on_input()` each frame the player presses the fire key.
     2. Set the firing flag to false. This flag will be set in `on_input()` each frame the player presses the fire key.
 
 
-7. Scroll down to the `on_input()` function. Add a fourth `elseif` for the case where the function is called with the "fire" action and only the one frame when the key is pressed down:
+7. Scroll down to the `on_input()` function. Add a fifth `elseif` for the case where the function is called with the "fire" action and only the one frame when the key is pressed down:
 
 
     ```lua
     ```lua
         ...
         ...
@@ -421,7 +421,7 @@ If you run the game now you should be able to move around and drop rockets all o
 
 
     Note that the rocket needs a movement direction in addition to the game object rotation (`rot`). It would be possible to make the rocket calculate its movement vector based on its rotation, but it is easier and more flexible to separate the two values. For instance, with a separate rotation it is possible to add rotation wobble to the rocket without it affecting the movement direction.
     Note that the rocket needs a movement direction in addition to the game object rotation (`rot`). It would be possible to make the rocket calculate its movement vector based on its rotation, but it is easier and more flexible to separate the two values. For instance, with a separate rotation it is possible to add rotation wobble to the rocket without it affecting the movement direction.
 
 
-3.  <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Script</kbd>. Name the new script file "rocket.script". Replace the template code in the file with the following:
+3.  <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Script</kbd>. Name the new script file "rocket" (full name "rocket.script"). Replace the template code in the file with the following:
 
 
     ```lua
     ```lua
     go.property("dir", vmath.vector3()) -- <1>
     go.property("dir", vmath.vector3()) -- <1>
@@ -442,7 +442,7 @@ If you run the game now you should be able to move around and drop rockets all o
     4. Calculate a new position based on the old position, the movement direction and the speed.
     4. Calculate a new position based on the old position, the movement direction and the speed.
     5. Set the new position.
     5. Set the new position.
 
 
-4. Open *rocket.go* and <kbd>Right click</kbd> the root in the *Outline* and select <kbd>Add Component ▸ Script</kbd>. Select the file *rocket.script* as basis for the component.
+4. Open *rocket.go* and <kbd>Right click</kbd> the root in the *Outline* and select <kbd>Add Component File</kbd>. Select the file "rocket.script" as basis for the component.
 
 
 5. Run the game and try the new mechanic. Notice that the rockets fly in the right direction but are oriented 180 degrees wrong. That's an easy fix.
 5. Run the game and try the new mechanic. Notice that the rockets fly in the right direction but are oriented 180 degrees wrong. That's an easy fix.
 
 
@@ -462,7 +462,7 @@ Now you only need to make the rockets explode a short while after they are fired
 
 
 1. Drag the folder *fx/explosion* from the asset package to the main folder in the Assets view.
 1. Drag the folder *fx/explosion* from the asset package to the main folder in the Assets view.
 
 
-2. Open *sprites.atlas* and create a new animation group (right click the root node and select <kbd>New ▸ Animation Group</kbd>). Call the animation "explosion".
+2. Open *sprites.atlas* and create a new animation group (right click the root node and select <kbd>Add Animation Group</kbd>). Call the animation "explosion".
 
 
 3. Add the nine explosion images to the animation group and set the *Fps* property to a value that makes the animation look good when you preview. Also make sure that this animation has the *Playback* property set to `Once Forward`.
 3. Add the nine explosion images to the animation group and set the *Fps* property to a value that makes the animation look good when you preview. Also make sure that this animation has the *Playback* property set to `Once Forward`.
 
 
@@ -523,11 +523,11 @@ This is definitely getting somewhere! But don't you think you need something to
 
 
 ## The tank game object
 ## The tank game object
 
 
-1. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Game Object</kbd>. Name this file *tank.go*. Like the rocket game object, this is a file that can be used as a *blueprint* when creating actual tank game objects.
+1. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Game Object</kbd>. Name this file "tank" (full name "tank.go"). Like the rocket game object, this is a file that can be used as a *blueprint* when creating actual tank game objects.
 
 
 2. Drag the folder *units/tank* from the asset package to the *main* folder in the *Assets* view.
 2. Drag the folder *units/tank* from the asset package to the *main* folder in the *Assets* view.
 
 
-3. Open *sprites.atlas* and create a new animation group (right click the root node and select <kbd>New ▸ Animation Group</kbd>). Name the animation "tank-down".
+3. Open *sprites.atlas* and create a new animation group (right click the root node and select <kbd>Add Animation Group</kbd>). Name the animation "tank-down".
 
 
 4. Add the two downwards facing images (*/main/tank/down/1.png* and */main/tank/down/2.png*) to the animation and set it's *Fps* value to something that looks good.
 4. Add the two downwards facing images (*/main/tank/down/1.png* and */main/tank/down/2.png*) to the animation and set it's *Fps* value to something that looks good.
 
 
@@ -559,7 +559,7 @@ Run the game and check that the tanks look okay. You will notice that if you fir
 
 
     ![tank collision](images/war-battles/tank_collision.png)
     ![tank collision](images/war-battles/tank_collision.png)
 
 
-6. Open *rocket.go* and <kbd>Right click</kbd> the root in the *Outline* and select <kbd>Add component ▸ Collision Object</kbd>.
+6. Open *rocket.go* and <kbd>Right click</kbd> the root in the *Outline* and select <kbd>Add Component ▸ Collision Object</kbd>.
 
 
 7. Set the *Type* property to "Kinematic".
 7. Set the *Type* property to "Kinematic".
 
 
@@ -613,17 +613,17 @@ Run the game and destroy some tanks! The tanks aren't very interesting enemies,
 
 
 ## Scoring GUI
 ## Scoring GUI
 
 
-1. Drag the the file *fonts/04font.ttf* from the asset pack folder to the *main* folder in the *Assets* view.
+1. Drag the the file "fonts/04font.ttf" from the asset pack folder to the "main" folder in the *Assets* view.
 
 
-2. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Font</kbd>. Name this file *text.font*.
+2. <kbd>Right click</kbd> the folder "main" in the *Assets* view and select <kbd>New ▸ Font</kbd>. Name this file "text" (full name "text.font").
 
 
-3. Open *text.font* and set the *Font* property to the file *04font.ttf*.
+3. Open *text.font* and set the *Font* property to the file "04font.ttf".
 
 
     ![text font](images/war-battles/text_font.png)
     ![text font](images/war-battles/text_font.png)
 
 
-4. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Gui</kbd>. Name this file *ui.gui*. It will contain the user interface where you will place the score counter.
+4. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Gui</kbd>. Name this file "ui" (full name "ui.gui"). It will contain the user interface where you will place the score counter.
 
 
-5. Open *ui.gui*. <kbd>Right click</kbd> *Fonts* in the *Outline* view and select <kbd>Add ▸ Fonts</kbd>. Select the */main/text.font* file.
+5. Open "ui.gui". <kbd>Right click</kbd> *Fonts* in the *Outline* view and select <kbd>Add ▸ Fonts</kbd>. Select the "/main/text.font" file.
 
 
 6. <kbd>Right click</kbd> *Nodes* in the *Outline* view and select <kbd>Add ▸ Text</kbd>.
 6. <kbd>Right click</kbd> *Nodes* in the *Outline* view and select <kbd>Add ▸ Text</kbd>.
 
 
@@ -633,15 +633,15 @@ Run the game and destroy some tanks! The tanks aren't very interesting enemies,
 
 
     ![ui gui](images/war-battles/ui.png)
     ![ui gui](images/war-battles/ui.png)
 
 
-9. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Gui Script</kbd>. Name this new file "ui.gui_script".
+9. <kbd>Right click</kbd> the folder *main* in the *Assets* view and select <kbd>New ▸ Gui Script</kbd>. Name this new file "ui" (full name "ui.gui_script").
 
 
-10. Go back to *ui.gui* and select the root node in the *Outline*. Set the *Script* property to the file */main/ui.gui_script* that you just created. Now if we add this Gui as a component to a game object the Gui will be displayed and the script will run.
+10. Go back to "ui.gui" and select the root node in the *Outline*. Set the *Script* property to the file "/main/ui.gui_script" that you just created. Now if we add this Gui as a component to a game object the Gui will be displayed and the script will run.
 
 
 11. Open *main.collection*.
 11. Open *main.collection*.
 
 
 12. <kbd>Right click</kbd> the root node of the collection in the *Outline* and select <kbd>Add Game Object</kbd>.
 12. <kbd>Right click</kbd> the root node of the collection in the *Outline* and select <kbd>Add Game Object</kbd>.
 
 
-13. Set the *Id* property of the game object to "gui", then <kbd>Right click</kbd> it and select <kbd>Add Component File</kbd>. Select the file */main/ui.gui*. The new component will automatically get the *Id* "ui".
+13. Set the *Id* property of the game object to "gui", then <kbd>Right click</kbd> it and select <kbd>Add Component File</kbd>. Select the file "/main/ui.gui". The new component will automatically get the *Id* "ui".
 
 
     ![main gui](images/war-battles/main_ui.png)
     ![main gui](images/war-battles/main_ui.png)
 
 

+ 1 - 0
docs/ru/tutorials/war-battles.md

@@ -0,0 +1 @@
+