diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index ae529549b5..0ea13f4630 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -2,6 +2,7 @@ name: Lint Markdown on: pull_request_target: + types: [opened, synchronize, reopened, edited] permissions: contents: write diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000000..6e83e0821f --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,17 @@ +{ + "default": true, + "MD001": false, + "MD004": false, + "MD007": { "indent": 4, "start_indent": 2, "start_indented": true }, + "MD010": { "ignore_code_languages": ["text"] }, + "MD013": false, + "MD024": false, + "MD025": false, + "MD026": false, + "MD033": false, + "MD036": false, + "MD038": false, + "MD045": false, + "MD046": false, + "MD047": false +} \ No newline at end of file diff --git a/CONTRIBUTE.md b/CONTRIBUTE.md index 8174f3f83e..7c30c2e415 100644 --- a/CONTRIBUTE.md +++ b/CONTRIBUTE.md @@ -38,7 +38,7 @@ mkdocs serve mkdocs serve --dirtyreload ``` -This will run the documentation on http://localhost:8000. +This will run the documentation on . ### Build diff --git a/SYNTAX.md b/SYNTAX.md index bf1a86ca7d..c89ad2e3da 100644 --- a/SYNTAX.md +++ b/SYNTAX.md @@ -21,7 +21,7 @@ For example, to display: You shall write: -``` +```md - Getting started - First step - Second step @@ -41,7 +41,7 @@ List of objects: will be rendered as: -``` +```md List of objects: - Sprite - Text ``` @@ -67,7 +67,7 @@ For example, to display: You shall write: -``` +```md 1. First item 1. First nested item 1. Second nested item @@ -84,9 +84,9 @@ Use this syntax: ```md
- +
``` diff --git a/docs/es/gdevelop5/objects/sprite.md b/docs/es/gdevelop5/objects/sprite.md index 9b3f52f9c2..16be533ecd 100644 --- a/docs/es/gdevelop5/objects/sprite.md +++ b/docs/es/gdevelop5/objects/sprite.md @@ -71,9 +71,9 @@ Para agregar el objeto sprite a nuestra escena, simplemente selecciónelo y haga Tu nuevo sprite ahora está completo, pero aún debes agregarlo a la escena de tu juego. Haga clic en el nuevo sprite en la lista de objetos. A continuación, haga clic en la escena donde desea agregar el sprite. Ahora verás tu sprite agregado a la escena. Puedes agregar múltiples "instancias" de tu sprite a tu pantalla de juego. Simplemente repita el proceso para agregar el primer sprite.
- +
### Más información sobre animaciones múltiples mientras usas eventos. diff --git a/docs/gdevelop5/all-features/admob/index.md b/docs/gdevelop5/all-features/admob/index.md index 0c7a80ba11..e765f7b924 100644 --- a/docs/gdevelop5/all-features/admob/index.md +++ b/docs/gdevelop5/all-features/admob/index.md @@ -9,11 +9,11 @@ Follow the [Google official documentation](https://support.google.com/admob/answ Ads can be loaded and displayed in your game at any time. They can be displayed as: - * **App open** that opens while your app starts - * **Banners** at the top or bottom of the screen - * **Interstitials** that cover the entire screen. - * **Rewarded videos** that show a video to the user rewarding them something at the end. - * **Rewarded interstitials** that are similar to videos, but that the user can skip + * **App open** that opens while your app starts + * **Banners** at the top or bottom of the screen + * **Interstitials** that cover the entire screen. + * **Rewarded videos** that show a video to the user rewarding them something at the end. + * **Rewarded interstitials** that are similar to videos, but that the user can skip Banner ads are usually displayed during gameplay. Interstitial screens and reward videos are displayed after the completion of a level or an objective. diff --git a/docs/gdevelop5/all-features/advanced-conditions/index.md b/docs/gdevelop5/all-features/advanced-conditions/index.md index 4b5283fff6..ed622c84ef 100644 --- a/docs/gdevelop5/all-features/advanced-conditions/index.md +++ b/docs/gdevelop5/all-features/advanced-conditions/index.md @@ -4,6 +4,7 @@ title: Advanced conditions # Advanced conditions ## And logical operation + ![](and.png) If the "**And**" condition is used in an event, the actions are performed if and only if all the sub-conditions are true. If one or more than one sub-conditions are false, the action is not performed. @@ -11,8 +12,8 @@ If the "**And**" condition is used in an event, the actions are performed if and The "**And**" condition is usually meant to be used within an "**Or**" condition. This is because having two conditions in the same event box is the same as using the "**And**" condition. - ## OR logical operation + ![](or-condition.png) If the "**OR**" condition is used in an event, the actions are performed when one or several sub-conditions are true. If none of the sub-conditions are true, the action is not performed. @@ -22,11 +23,13 @@ If the "**OR**" condition is used in an event, the actions are performed when on The OR condition has a special behavior regarding the [object filtering logic of GDevelop](http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/basic-game-making-concepts#events_and_how_objects_are_selected_by_these_events). The objects listed under it are _unselected_ by GDevelop if their condition is not met, so actions specific to these objects may not work. In some cases, using "Pick all instances" on the action side will fix things. In other cases, replacing the OR will be necessary. ## Not logical operation + ![](not-condition.png) If the "**Not**" condition is used in an event, it returns the contrary of the sub-conditions. If a sub-condition is true, it returns false and if a sub-condition is false, it returns true. ## Trigger once + ![](trigger-once-condition.png) Whenever the "**Trigger once while true**" condition is used, the actions for the event are triggered only once, for each time the conditions have been met. @@ -36,6 +39,7 @@ Whenever the "**Trigger once while true**" condition is used, the actions for th This condition applies to objects, not instances. If you need to trigger once for each instance, use an instance variable instead. ## Compare two numbers + ![](compare-two-numbers-condition.png) When you use the "**Compare two numbers**" condition, it will compare the two numbers/expression based on the Sign of the test. If the numbers satisfy the test, the condition returns true and the corresponding actions are performed. @@ -43,11 +47,13 @@ When you use the "**Compare two numbers**" condition, it will compare the two nu For example, suppose if the first value is entered as 5, the sign of the test is set to < (less than)" and the second value is equal to 7. In such a case, the test returns true because 5 is less than 7. ## Compare two strings + ![](compare-two-strings-condition.png) When you use the "**Compare two strings**" condition, it will compare the two strings/expression based on the Sign of the test. If the numbers satisfy the test, the condition returns true and the corresponding actions are performed. ## Always true/false + ![](always-condition.png) If you want a condition to always return true and the corresponding actions to be performed, you can use the "**Always**" condition. If the condition is inverted, it will always return false,_i.e. the corresponding actions will never be performed._ diff --git a/docs/gdevelop5/all-features/audio/index.md b/docs/gdevelop5/all-features/audio/index.md index 740f2cc132..923a1723a1 100644 --- a/docs/gdevelop5/all-features/audio/index.md +++ b/docs/gdevelop5/all-features/audio/index.md @@ -73,7 +73,7 @@ The condition "A sound is being played" (on this channel) is then true, while "A The sound will be stopped when: -* It reaches its **end** and is not configured to loop. * There is **an error during the loading** (in which case it will be considered as playing for a few milliseconds, then will be deemed to be stopped as it was unable to load). * Or you used **the action** to stop a sound or music on the channel. + * It reaches its **end** and is not configured to loop. *There is **an error during the loading** (in which case it will be considered as playing for a few milliseconds, then will be deemed to be stopped as it was unable to load).* Or you used **the action** to stop a sound or music on the channel. ## Reference diff --git a/docs/gdevelop5/all-features/collisions/index.md b/docs/gdevelop5/all-features/collisions/index.md index de0013533e..62a331ef6c 100644 --- a/docs/gdevelop5/all-features/collisions/index.md +++ b/docs/gdevelop5/all-features/collisions/index.md @@ -8,6 +8,7 @@ Most games need to detect and handle collisions between objects. Detecting and h GDevelop provides several different ways to handle collisions. You can detect collisions using Event Editor conditions and actions, or you can use Object behaviors. ## Make objects solids: use the "Separate objects" action (good for top-down games, RPG...) + ![](/gdevelop5/all-features/separate-condition.png) You can use the "**Separate objects**" action to move objects manually. The "Separate objects" action can also move objects with "forces" or set the object's position. @@ -44,7 +45,6 @@ You can find usage of these conditions and actions in the examples: [![](/gdevelop5/all-features/checkccollisionbetweenobjectsnew.png)](https://editor.gdevelop.io?project=example://bomb-the-crate) - ## Platformer games: use the Platformer character and Platform behaviors If you're making a platformer game, it's a good idea to use the ["Platformer character" behavior](/gdevelop5/behaviors/platformer). It's a ready-made platform game engine that is highly customizable. The "Platformer character" behavior handles the gravity and the collisions with the platforms. @@ -53,8 +53,8 @@ If you're making a platformer game, it's a good idea to use the ["Platformer cha In a platformer game with the "Platformer character" behavior, collisions with platforms are handled for you. -* You can still use the **Collision condition** to check for collisions between an object and other objects (for example, between the player and enemies) and react accordingly. -* You can use the "Is on Floor" condition to check if an object is on a platform. + * You can still use the **Collision condition** to check for collisions between an object and other objects (for example, between the player and enemies) and react accordingly. + * You can use the "Is on Floor" condition to check if an object is on a platform. ![](/gdevelop5/all-features/playerisonfloorevents.png) diff --git a/docs/gdevelop5/all-features/device-vibration/index.md b/docs/gdevelop5/all-features/device-vibration/index.md index 38d7422825..08dd70a02b 100644 --- a/docs/gdevelop5/all-features/device-vibration/index.md +++ b/docs/gdevelop5/all-features/device-vibration/index.md @@ -9,13 +9,13 @@ Vibration is supported on these devices: HTML web games: -- Android: Yes -- Apple iOS: **No** + - Android: Yes + - Apple iOS: **No** Native mobile apps: -- Android: Yes -- Apple iOS: Yes + - Android: Yes + - Apple iOS: Yes !!! note diff --git a/docs/gdevelop5/all-features/dialogue-tree/index.md b/docs/gdevelop5/all-features/dialogue-tree/index.md index 2643b897bb..48369105b5 100644 --- a/docs/gdevelop5/all-features/dialogue-tree/index.md +++ b/docs/gdevelop5/all-features/dialogue-tree/index.md @@ -11,7 +11,6 @@ title: The Dialogue Tree extension - [Dialogue tree with yarn online](https://editor.gdevelop.io/?project=https://resources.gdevelop-app.com/examples/dialogue-tree-with-yarn/dialogue-tree-with-yarn.json) - [Yarnalia game](https://editor.gdevelop.io/?project=https://resources.gdevelop-app.com/examples/dialogue-tree-simple-demo/dialogue-tree-simple-demo.json) - The Dialogue Tree extension can be used to quickly create a dynamic dialogue tree behaviour. It comes with actions, conditions and expressions that make it extremely easy to set such a system with text scrolling, animated avatars and conditional dialogues. The example demo project does that in only 16 events. If you want to make a game that is heavy on the story - be it an RPG, a Visual Novel or something else altogether, this extension will help you get there very fast and let you focus on your story. @@ -45,6 +44,7 @@ When you edit a node, you are writing in Yarn syntax. Writing stories in Yarn is just like writing dialogue, but also sprinkling it with behind the scenes hidden to the player instructions wrapped in special tags. These instructions can be used to drive what happens in the game. Depending on <> \[\[wrapping\]\] tags, there are three types of data that yarn understands - these three types are called "Dialogue line types" in my extension: ### 1. Text line type + The text is what the user will see displayed when they reach the dialogue branch it is on. If you don't put any special wrappers of the other type around your text - it will remain ordinary text. Yarn will give you a hint when that is not the case by changing its colour. !!! note @@ -52,6 +52,7 @@ The text is what the user will see displayed when they reach the dialogue branch New lines are interpreted by yarn as logical pauses between two text line types. So whenever you write text on a new line - that is also used to tell the game engine to start printing the text on the new line after the player has pressed a button. Of course that behaviour is entirely optional and depends on how you use the extension. Since it is the most common one, it should be noted that it is there by design. ### 2. <> line type + Remember the magic Yarn syntax we mentioned earlier - the words we place between the ordinary text the player reads to make things happen in the game? We call them commands. They are wrapped between **<<** and **>>**. Anything you place between these two symbols is a **<>** that the player will not see, but the Gdevelop will. These messages can be used to trigger events for you. If you are using the extension's built in scrolling logic, these commands will be triggered whenever the text scrolling has reached the <>. @@ -82,34 +83,30 @@ This lets you tell Yarn that if the player has seen that item, the npc will say _blah blah blah_ -** <> ** +**<>** _more blah_ -** <>** +**<>** _other blah_ **<>** -- will tell yarn to check **<>** will trigger _other blah_ to happen. The **<>** and **<>** are optional. Don't forget to close it with the **<>** + - if all fails, the **<>** will trigger _other blah_ to happen. The **<>** and **<>** are optional. Don't forget to close it with the **<>** !!! note - __Example:__ You found a weird rock **<>** - - !!! note - __Example at another node tree:__ There is a strange well. Peering down, you can only see darkness... @@ -124,15 +121,12 @@ _other blah_ **<>** - - Don't forget that you can put anything inside this **<>**...**<>** block - be it other commands or dialogue choices leading to other branches. !!! note The dialogue tree extension stores all the $variables the player sets while playing the game and also comes with expressions/actions to get/set them - in case you want to store them when the game is saved by the player and be able to reload them. - ### 3. Option line type This is the type that creates arrows between the nodes. It is what yarn uses to display to the user what choices they can make. The syntax is as follows: @@ -163,7 +157,8 @@ This will simply tell yarn to continue to that node, without any user input. Use **Gotchas to watch out for: ** If you try to do conditional options like this: -``` + +```text Ok kids we're gonna go with... [NotSure](/Actually, I'm not sure yet...) <> @@ -174,7 +169,7 @@ Ok kids we're gonna go with... Yarn will send the player to "NotSure" instead of displaying this as two options, even when the if is true. The correct way to do this would be: -``` +```text Ok kids we're gonna go with... <> [NotSure](/Actually, I'm not sure yet...) @@ -186,7 +181,8 @@ Ok kids we're gonna go with... ``` If you want to just send the player to another node (PickRobotMascot0) without displaying any options when the if statement is true, you can do: -``` + +```text Ok kids we're gonna go with... <> [PickRobotMascot0](/Frog) @@ -200,22 +196,22 @@ Ok kids we're gonna go with... ## Known issues: -* Using a -> shortcut crashes my game - This is a known bug in bondage.js - the library that the dialogue tree extension is using to parse yarn files. See [https://github.com/hylyh/bondage.js/issues/31](https://github.com/hylyh/bondage.js/issues/31) to check if that has been fixed. The reason it happens is that bondagejs expects you to indent any linked text with tabs, otherwise its seen as a syntax error. If you want to use the shortcut syntax, please refer to this example json file as to howto do it without crashing the parser [https://github.com/hylyh/bondage.js/blob/master/tests/yarn_files/shortcuts.json](https://github.com/hylyh/bondage.js/blob/master/tests/yarn_files/shortcuts.json) + * Using a -> shortcut crashes my game - This is a known bug in bondage.js - the library that the dialogue tree extension is using to parse yarn files. See [https://github.com/hylyh/bondage.js/issues/31](https://github.com/hylyh/bondage.js/issues/31) to check if that has been fixed. The reason it happens is that bondagejs expects you to indent any linked text with tabs, otherwise its seen as a syntax error. If you want to use the shortcut syntax, please refer to this example json file as to howto do it without crashing the parser [https://github.com/hylyh/bondage.js/blob/master/tests/yarn_files/shortcuts.json](https://github.com/hylyh/bondage.js/blob/master/tests/yarn_files/shortcuts.json) -* an empty space is clipped from text that comes after <> - this is a known bug in bondagejs [https://github.com/hylyh/bondage.js/issues/61](https://github.com/hylyh/bondage.js/issues/61) + * an empty space is clipped from text that comes after <> - this is a known bug in bondagejs [https://github.com/hylyh/bondage.js/issues/61](https://github.com/hylyh/bondage.js/issues/61) !!! warning If you ever encounter an issue that in its message mentions the file **bondage.min.js** , it is more than likely that it's an issue with the library. Please report it at the bondagejs git tracker, not gdevelop's [https://github.com/hylyh/bondage.js/issues/](https://github.com/hylyh/bondage.js/issues/) -* I encountered a problem while using Yarn to edit my dialogue - If that happens, unless you have encountered the problem when opening or saving your dialogue - it's likely a bug in Yarn, not Gdevelop. + * I encountered a problem while using Yarn to edit my dialogue - If that happens, unless you have encountered the problem when opening or saving your dialogue - it's likely a bug in Yarn, not Gdevelop. !!! warning To report Yarn editor bugs, please use the Yarn bug tracker, where more developers working on Yarn will see it. [https://github.com/YarnSpinnerTool/YarnEditor](https://github.com/YarnSpinnerTool/YarnEditor) -* I encountered a problem with the styling of the text coming from the Dialogue Tree - If that happens, it's likely a bug with another extension. If you are using the BBcode extension, and for example underlined text style does not work or some combination of styles does not work, the problem more than likely lies with the pixi-multistyle-text library that it is using. It is also worth noting that **pixi currently does not support __text underlining__ style in general. So while you can see it in Yarn editor, it will not work in your game**. + * I encountered a problem with the styling of the text coming from the Dialogue Tree - If that happens, it's likely a bug with another extension. If you are using the BBcode extension, and for example underlined text style does not work or some combination of styles does not work, the problem more than likely lies with the pixi-multistyle-text library that it is using. It is also worth noting that **pixi currently does not support text underlining style in general. So while you can see it in Yarn editor, it will not work in your game**. !!! warning @@ -228,15 +224,14 @@ If you look at the event sheet, you will find that the entire logic fits on a si ![](/gdevelop5/all-features/yarngdeventsheet.png) - The demo does not use the entire capability of the extension and is aiming to provide the functionality in the simplest/quickest way. The extension contains many more actions, conditions and expressions which can be used to build very customisable presentations to the player. ### The basic life cycle of a dialogue -- Load the dialogue tree data at the beginning of the game or the level -- Set when a dialogue gets triggered - using the "Start Dialogue from branch..." action, and passing as a parameter the name of the node title where it will start from. That is typically the root of a tree. In my example the npc object's dialogueBranch variable is used. That makes it easy to make many npcs and just change that in their properties -- Tell the game engine how you want the dialogue data to be displayed to the player and used by the engine - for each of the three types -- Set reusable commands to be triggered by Yarn - such as changing of avatars, playing of sound effects and any other game events to help tell your story. + - Load the dialogue tree data at the beginning of the game or the level + - Set when a dialogue gets triggered - using the "Start Dialogue from branch..." action, and passing as a parameter the name of the node title where it will start from. That is typically the root of a tree. In my example the npc object's dialogueBranch variable is used. That makes it easy to make many npcs and just change that in their properties + - Tell the game engine how you want the dialogue data to be displayed to the player and used by the engine - for each of the three types + - Set reusable commands to be triggered by Yarn - such as changing of avatars, playing of sound effects and any other game events to help tell your story. # Examples diff --git a/docs/gdevelop5/all-features/expressions/index.md b/docs/gdevelop5/all-features/expressions/index.md index f383c9f258..3d8646e642 100644 --- a/docs/gdevelop5/all-features/expressions/index.md +++ b/docs/gdevelop5/all-features/expressions/index.md @@ -13,9 +13,9 @@ These icons indicate that the field accepts an _expression_. There are multiple types of expressions: -- [Numbers](/gdevelop5/all-features/expressions#numbers) -- [Text](/gdevelop5/all-features/expressions#text) -- [Functions](/gdevelop5/all-features/expressions#functions) + - [Numbers](/gdevelop5/all-features/expressions#numbers) + - [Text](/gdevelop5/all-features/expressions#text) + - [Functions](/gdevelop5/all-features/expressions#functions) !!! note @@ -37,23 +37,23 @@ A numeric expression is a number. The following values are examples of numeric expressions: -- `0` -- `-10` -- `25.5` + - `0` + - `-10` + - `25.5` You can also use mathematical operators to add, subtract, multiply, and divide numbers: -- `2+2` -- `3-1` -- `10*10` -- `99/3` + - `2+2` + - `3-1` + - `10*10` + - `99/3` This is the complete list of operators: -- `+` (add) -- `-` (subtract) -- `*` (multiply) -- `/` (divide) + - `+` (add) + - `-` (subtract) + - `*` (multiply) + - `/` (divide) !!! tip @@ -69,9 +69,9 @@ A text expression is a string of text. The following values are examples of text expressions: -- `"Hello world"` -- `"This is a text expression"` -- `"GDevelop is cool!"` + - `"Hello world"` + - `"This is a text expression"` + - `"GDevelop is cool!"` All text expressions must be wrapped in double quotes. Without the double quotes, GDevelop assumes the value is a function, which will likely result in an error. @@ -85,12 +85,12 @@ This is where _functions_ come in. You can use functions to dynamically calculate complex values while the game is running. For example, the `X` and `Y` functions calculate the coordinates of an [object](/gdevelop5/objects): -``` +```javascript ObjectName.X() ObjectName.Y() ``` -Using a function is often referred to as *calling* a function. +Using a function is often referred to as _calling_ a function. !!! tip @@ -100,9 +100,9 @@ Using a function is often referred to as *calling* a function. There are three types of functions: -- Functions without objects -- Functions with objects -- Functions with objects and behaviors + - Functions without objects + - Functions with objects + - Functions with objects and behaviors Each type of function has a (slightly) different syntax. @@ -112,9 +112,9 @@ Some functions exist independently of objects and [behaviors](/gdevelop5/behavio These are some examples of functions without objects: -- `CurrentSceneName()` - Get the name of the current scene. -- `FileSystem::DesktopPath()` - Get the path of the "Desktop" directory. -- `ToNumber()` - Convert a string into a number. + - `CurrentSceneName()` - Get the name of the current scene. + - `FileSystem::DesktopPath()` - Get the path of the "Desktop" directory. + - `ToNumber()` - Convert a string into a number. !!! note @@ -126,9 +126,9 @@ Some functions are called on objects. This means the function affects or retriev These are some examples of functions with objects: -- `.Angle()` - Get the angle of the object (in degrees). -- `.Layer()` - Get the name of the layer that the object is on. -- `.ObjectName()` - Get the name of the object. + - `.Angle()` - Get the angle of the object (in degrees). + - `.Layer()` - Get the name of the layer that the object is on. + - `.ObjectName()` - Get the name of the object. #### Functions with objects and behaviors @@ -136,26 +136,26 @@ Some functions are called on an object's behavior. This means the function affec These are some examples of functions with objects and behaviors: -* `.Pathfinding::Speed()` -* `.Physics2::Friction()` -* `.PlatformerObject::Gravity()` + * `.Pathfinding::Speed()` + * `.Physics2::Friction()` + * `.PlatformerObject::Gravity()` ### Arguments Some functions accept _arguments_. An argument is a value that: -- can be passed into a function -- affects the output of the function + - can be passed into a function + - affects the output of the function For example, the `ToString` function converts a number into a string, but it can't do anything unless you provide it with a number. That number is the argument. In the following example, the number `42` is the argument: -``` +```javascript ToNumber(42) ``` Some functions, such as the `MouseX` function, accept multiple arguments: -``` +```javascript MouseX(layer, camera) ``` diff --git a/docs/gdevelop5/all-features/extensions/linked-objects-tools.md b/docs/gdevelop5/all-features/extensions/linked-objects-tools.md index 4a64e13a19..f65958b26a 100644 --- a/docs/gdevelop5/all-features/extensions/linked-objects-tools.md +++ b/docs/gdevelop5/all-features/extensions/linked-objects-tools.md @@ -7,14 +7,14 @@ This extension allows to create graphs (like a road networks) and use it to find 3 examples illustrate how this can be used in games: -- Match-3 game: a Bust-a-Move clone ([open the project online](https://editor.gdevelop.io/?project=example://bim-bam)) - - to find cluster of bubbles of the same colors - - to find bubbles that no longer held when some bubbles are removed -- Tactical games: selection and movement of units on a hexagonal grid ([open the project online](https://editor.gdevelop.io/?project=example://tactical-game-grid-movement)) - - to find cells where a unit can go - - to make the unit move to the selected cell -- City builders: evaluator demo ([open the project online](https://editor.gdevelop.io/?project=example://city-builder)) - - to evaluate distance between houses and facilities + - Match-3 game: a Bust-a-Move clone ([open the project online](https://editor.gdevelop.io/?project=example://bim-bam)) + - to find cluster of bubbles of the same colors + - to find bubbles that no longer held when some bubbles are removed + - Tactical games: selection and movement of units on a hexagonal grid ([open the project online](https://editor.gdevelop.io/?project=example://tactical-game-grid-movement)) + - to find cells where a unit can go + - to make the unit move to the selected cell + - City builders: evaluator demo ([open the project online](https://editor.gdevelop.io/?project=example://city-builder)) + - to evaluate distance between houses and facilities ## Understand graphs @@ -24,9 +24,9 @@ Graphs are a way to schematize networks like roads, Internet etc. Graphs are com It's not an obligation to organize nodes on a grid. But, for grid-based games, some actions can help to build such grids: -- Rectangular Grids -- Isometric Grids -- Hexagonal Grids + - Rectangular Grids + - Isometric Grids + - Hexagonal Grids ![](/gdevelop5/all-features/extensions/isometricgrid.png) diff --git a/docs/gdevelop5/all-features/filesystem/index.md b/docs/gdevelop5/all-features/filesystem/index.md index a53d7d5ad6..a14886f845 100644 --- a/docs/gdevelop5/all-features/filesystem/index.md +++ b/docs/gdevelop5/all-features/filesystem/index.md @@ -2,12 +2,14 @@ title: File system --- # File system + This extension gives you access to the file system of the pc the game is running on. !!! note This works only on Windows, Linux and MacOS. Mobile games and web games are currently not supported. ## File system versus Storage extension + GDevelop offers two different ways to save data permanently. The storage extension and the file system extension. Since GDevelop is built upon web technology, at the time of writing, every game is basically a website that either runs directly in a browser (Web export) or inside a stripped-down browser container "Electron" (Windows, macOS, Linux) / "Apache Cordova" (Android, iOS). @@ -16,30 +18,30 @@ All these platforms offer web storage, integrated into the browser component of For security reasons, web browsers don't let websites write any data to the file system of the computer they are executed on. Only games exported for Windows, macOS, or Linux can use this functionality. -### Storage +### Storage -- It is available on all platforms, a game can be exported to. + - It is available on all platforms, a game can be exported to. -- It can only hold text and numbers, binary data like screenshots can't be saved to the web storage. + - It can only hold text and numbers, binary data like screenshots can't be saved to the web storage. -- Its maximum capacity is limited to a few megabytes, depending on the type of web browser the player uses. + - Its maximum capacity is limited to a few megabytes, depending on the type of web browser the player uses. -- The player has no direct access to web storage. + - The player has no direct access to web storage. ### File system -- It is only available on Windows, Linux and macOS. - -- You can save any kind of data. + - It is only available on Windows, Linux and macOS. -- You are free to choose a folder to save your data. + - You can save any kind of data. -- There are no limits on the file size. + - You are free to choose a folder to save your data. -- The player can edit the files (i.e. manually correct a wrong screen resolution in a config file with a text editor) + - There are no limits on the file size. + - The player can edit the files (i.e. manually correct a wrong screen resolution in a config file with a text editor) ## Asynchronous execution + By default, actions get executed synchronously in GDevelop. This means that the game loop waits for each action to finish its execution before it runs the following event. Actions that take longer than a few milliseconds to execute will freeze the whole execution of the game until they finish. @@ -49,9 +51,9 @@ To get notified about the status of the background task, the asynchronous action By checking its value, you get to know when precisely the operation has finished and with which result: -- **"ok"**: The operation was performed without errors. + - **"ok"**: The operation was performed without errors. -- **"error"**: Something went wrong while trying to perform the action. + - **"error"**: Something went wrong while trying to perform the action. Saving the name of the next level after completing the previous one in a linear puzzle game, need not be done asynchronously. @@ -62,165 +64,195 @@ It is up to the game developer to decide which variant of the action is suitable --- ## Conditions -#### File or directory exists + +#### File or directory exists + This condition checks if the given file or directory exists on the file system. == Parameters == -** Path to file or directory: ** The absolute path to the file or directory which shall be checked. +**Path to file or directory:** The absolute path to the file or directory which shall be checked. ## Actions -#### Create a directory + +#### Create a directory + This action creates a new folder at the given file path. == Parameters == -** Directory: ** The absolute file path to the directory which should be created. +**Directory:** The absolute file path to the directory which should be created. It is advised to use the expressions for special folders (see below), to keep you game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. --- -#### Save a text into a file -This action saves the given text (string) into a file on the file system __synchronously__. +#### Save a text into a file + +This action saves the given text (string) into a file on the file system **synchronously**. == Parameters == -** String (text): ** The text that will be saved to the file. +**String (text):** The text that will be saved to the file. -** Save path: ** The path on the file system where the file should be saved. +**Save path:** The path on the file system where the file should be saved. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. --- -#### Save a text into a file (async) -This action saves the given text (string) into a file on the file system __asynchronously__. +#### Save a text into a file (async) + +This action saves the given text (string) into a file on the file system **asynchronously**. == Parameters == -** String (text): ** The text that will be saved to the file. +**String (text):** The text that will be saved to the file. -** Save path: ** The path on the file system where the file should be saved. +**Save path:** The path on the file system where the file should be saved. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. --- -#### Save a scene variable into a JSON file -This action saves the given scene variable into a file on the file system in JSON format __synchronously__. +#### Save a scene variable into a JSON file + +This action saves the given scene variable into a file on the file system in JSON format **synchronously**. == Parameters == -** Scene variable: ** The scene variable to save into the file. This can be a number-, text variable or a structure with children. +**Scene variable:** The scene variable to save into the file. This can be a number-, text variable or a structure with children. -** Save path: ** The path on the file system where the file should be saved. +**Save path:** The path on the file system where the file should be saved. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. --- -#### Save a scene variable into a JSON file (async) -This action saves the given scene variable into a file on the file system in JSON format __asynchronously__. +#### Save a scene variable into a JSON file (async) + +This action saves the given scene variable into a file on the file system in JSON format **asynchronously**. == Parameters == -** Scene variable: ** The scene variable to save into the file. This can be a number-, text variable or a structure with children. +**Scene variable:** The scene variable to save into the file. This can be a number-, text variable or a structure with children. -** Save path: ** The path on the file system where the file should be saved. +**Save path:** The path on the file system where the file should be saved. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. --- -#### Load a text from a JSON file -This action loads the JSON formatted text from a file and converts it into a scene variable structure. __synchronously__. +#### Load a text from a JSON file + +This action loads the JSON formatted text from a file and converts it into a scene variable structure. **synchronously**. == Parameters == -** Scene variable: ** The name of the scene variable to which the loaded structure will be added. +**Scene variable:** The name of the scene variable to which the loaded structure will be added. -** Load path: ** The path on the file system where the file should be saved. +**Load path:** The path on the file system where the file should be saved. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. --- -#### Load a text from a JSON file (async) -This action loads the JSON formatted text from a file and converts it into a scene variable structure. __asynchronously__. +#### Load a text from a JSON file (async) + +This action loads the JSON formatted text from a file and converts it into a scene variable structure. **asynchronously**. == Parameters == -** Scene variable: ** The name of the scene variable to which the loaded structure will be added. +**Scene variable:** The name of the scene variable to which the loaded structure will be added. -** Load path: ** The path on the file system where the file should be saved. +**Load path:** The path on the file system where the file should be saved. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. --- -#### Load a text from a file -This action loads the text from a file into the given scene variable. __synchronously__. +#### Load a text from a file + +This action loads the text from a file into the given scene variable. **synchronously**. == Parameters == -** Scene variable: ** The scene variable to store the text. +**Scene variable:** The scene variable to store the text. -** Load path: ** The path on the file system where the file is located. +**Load path:** The path on the file system where the file is located. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. --- -#### Load a text from a file (async) -This action loads the text from a file into the given scene variable. __asynchronously__. +#### Load a text from a file (async) + +This action loads the text from a file into the given scene variable. **asynchronously**. == Parameters == -** Scene variable: ** The scene variable to store the text. +**Scene variable:** The scene variable to store the text. -** Load path: ** The path on the file system where the file is located. +**Load path:** The path on the file system where the file is located. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. --- -#### Delete a file -This action deletes the file at the given file path __synchronously__. +#### Delete a file + +This action deletes the file at the given file path **synchronously**. == Parameters == -** File path: ** The path on the file system where the file is located. +**File path:** The path on the file system where the file is located. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. --- -#### Delete a file -This action deletes the file at the given file path __asynchronously__. +#### Delete a file + +This action deletes the file at the given file path **asynchronously**. == Parameters == -** File path: ** The path on the file system where the file is located. +**File path:** The path on the file system where the file is located. It is advised to use the expressions for special folders (see below) to keep your game platform independent. -** (Optional) Result variable: ** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. +**(Optional) Result variable:** Variable to store the result. It can either hold the value 'ok': the task was successful or 'error': an error occurred. The variable will be updated, at the moment the file operation has finished. ## Expressions + These expressions return the path to special folders on the users' operating system. If you use these expressions for loading and saving files it will be guaranteed to work on all supported operating systems. (Currently Windows, Linux, and macOS) !!! tip The following gives detailed descriptions of what each of the Filesystem expressions are for. To see the syntax of the expressions refer to the filesystem section of [this article](/gdevelop5/all-features/expressions-reference). It is _strongly recommended_ that you do not manually type any expressions, and instead use the expression builder as [mentioned here](/gdevelop5/all-features/expressions). -#### Desktop folder + +#### Desktop folder + This expression returns the operating system independent path to the _Desktop_ folder of the user that runs your game. -#### Documents folder + +#### Documents folder + This expression returns the operating system independent path to the _Documents_ folder of the user that runs your game. This is the standard folder for storing documents. -#### This games executable folder + +#### This games executable folder + This expression returns the operating system independent path to the folder where your game is being executed from. -#### Pictures folder + +#### Pictures folder + This expression returns the operating system independent path to the _Pictures_ folder of the user that runs your game. This is the standard folder for storing images. -#### Temp folder + +#### Temp folder + This expression returns the operating system independent path to the _Temp_ folder of the user that runs your game. This folder is used for temporary files that your operating system can delete at any time. -#### Userdata folder + +#### Userdata folder + This expression returns the operating system independent path to the _UserData_ folder of the user that runs your game. This folder is used for storing application settings. -#### Path delimiter + +#### Path delimiter + This expression returns the operating system independent path delimiter character. ("\" on Windows and "/" on Linux and macOS). Use this expression to build cross-platform file paths that can be accessed on all supported operating systems. ## Example + In order to save a screenshot to the _Pictures_ directory you could write: -``` +```javascript FileSystem::PicturesPath() + FileSystem::PathDelimiter() + "my_screenshot.png" ``` diff --git a/docs/gdevelop5/all-features/firebase/analytics.md b/docs/gdevelop5/all-features/firebase/analytics.md index 5622671e20..57cbf451a6 100644 --- a/docs/gdevelop5/all-features/firebase/analytics.md +++ b/docs/gdevelop5/all-features/firebase/analytics.md @@ -11,10 +11,10 @@ To get started with the Firebase analytics, use the action **Activate analytics* To send custom data, such as a player finishing a level, a "log event" can be used. Here is an example: -- When the players exits the level, before switching scenes: - - Create a new event or update an existing event with the **log event action** - - Ensure that "level1_finished" is listed as the event name. -- The users who have beaten level 1 will now show on the dashboard. + - When the players exits the level, before switching scenes: + - Create a new event or update an existing event with the **log event action** + - Ensure that "level1_finished" is listed as the event name. + - The users who have beaten level 1 will now show on the dashboard. !!! tip diff --git a/docs/gdevelop5/all-features/firebase/authentication.md b/docs/gdevelop5/all-features/firebase/authentication.md index 58b1bf3edb..3bbbc854c5 100644 --- a/docs/gdevelop5/all-features/firebase/authentication.md +++ b/docs/gdevelop5/all-features/firebase/authentication.md @@ -8,19 +8,21 @@ Firebase gives tools to help you create user accounts, authenticate (log into) a and linking their account to data using Firestore. ## Authenticating + The first and most important thing is the authentication process. That is the part where the user proves who he is. You usually do that through a _login screen_. Firebase provides a few ways to authenticate: -- **Anonymously**: you can use this to provide limited preview access to services requiring authentication. That way you can also assign data to this temporary profile. It may be possible to upgrade an anonymous account to a persistent account in the future, but GDevelop doesn't support that yet. -- By **email**: you make the user enter an email and password, and Firebase will take care of all the rest. -- Using **external providers**: the user can identify through a third party website, using for example their *Facebook* or *Google* accounts. + - **Anonymously**: you can use this to provide limited preview access to services requiring authentication. That way you can also assign data to this temporary profile. It may be possible to upgrade an anonymous account to a persistent account in the future, but GDevelop doesn't support that yet. + - By **email**: you make the user enter an email and password, and Firebase will take care of all the rest. + - Using **external providers**: the user can identify through a third party website, using for example their _Facebook_ or _Google_ accounts. !!! danger For now, external providers only work on the browser, it won't work on PC exports or previews. ## Identifying the user + Once you are sure about the identity of the user, Firebase provides you a handy user ID that links your user to their data. Everything related to this user should be stored with this ID to be able to track their ownership of the data back and provide it to them once they need it. diff --git a/docs/gdevelop5/all-features/firebase/firestore.md b/docs/gdevelop5/all-features/firebase/firestore.md index 9a8e54c725..bfff7ae305 100644 --- a/docs/gdevelop5/all-features/firebase/firestore.md +++ b/docs/gdevelop5/all-features/firebase/firestore.md @@ -25,11 +25,9 @@ the friend list individually and you can get the player data without getting all !!! tip - The other advantage of collections is that they are very good and fast at filtering/ordering data before sending it to the player. Sadly, GDevelop doesn't yet supports sending queries to collections. - For more informations on the data model of Firestore, read [the data model guide](https://firebase.google.com/docs/firestore/data-model) and [the data structuring guide](https://firebase.google.com/docs/firestore/manage-data/structure-data). @@ -79,7 +77,7 @@ The value/text filter allows to check all documents that meet a certain criteria This filter allows to automatically sort the documents of the query to be ordered by the value of a field. For example, if you have documents that look like this: -``` +```text { price: 69, name: "Lamp oil"}, { price: 42, name: "Rope"}, { price: 420, name: "Bombs"} @@ -91,7 +89,7 @@ And use the filter like this: Then the documents would be reordered inside the query like this: -``` +```text { price: 420, name: "Bombs"}, { price: 69, name: "Lamp oil"}, { price: 42, name: "Rope"} @@ -132,7 +130,8 @@ Once you have built your query (or just created an empty one to target all docum ### The query result When a query finishes, it stores its result in the passed structure variable. It will look like this: -``` + +```text { size: 1, empty: false, diff --git a/docs/gdevelop5/all-features/firebase/functions.md b/docs/gdevelop5/all-features/firebase/functions.md index 6d7a1c8b1b..0b32b5f97d 100644 --- a/docs/gdevelop5/all-features/firebase/functions.md +++ b/docs/gdevelop5/all-features/firebase/functions.md @@ -5,14 +5,12 @@ title: Firebase Functions !!! danger - This feature is intended for experimented JavaScript developers. [Also note that this feature requires the Blaze plan as of March 15 2021](https://firebase.google.com/support/faq#expandable-13). - Firebase is meant to replace a whole backend server by itself. Sometimes though, you need to code some server logic yourself: that's where firebase functions come in. -Firebase let you code some server-side logic that triggers on certain events. To see the whole documentation go on https://firebase.google.com/docs/functions/callable. +Firebase let you code some server-side logic that triggers on certain events. To see the whole documentation go on . One of those events are "https callables". You can trigger those via a GDevelop action. Use the trigger function action with the https callable name. You can pass arguments and let the https callable return an object. \ No newline at end of file diff --git a/docs/gdevelop5/all-features/firebase/index.md b/docs/gdevelop5/all-features/firebase/index.md index 796166a3b6..7aef346ca1 100644 --- a/docs/gdevelop5/all-features/firebase/index.md +++ b/docs/gdevelop5/all-features/firebase/index.md @@ -13,10 +13,10 @@ Firebase is a set of free services for developers: analytics, authentication of The services includes: - * [Analytics](/gdevelop5/all-features/firebase/analytics) - * [Remote configuration](/gdevelop5/all-features/firebase/rc) - * [Authentication](/gdevelop5/all-features/firebase/authentication) - * [A document oriented database (Cloud Firestore Database)](/gdevelop5/all-features/firebase/firestore) - * [An online filesystem (Firebase Storage)](/gdevelop5/all-features/firebase/storage) - * [Firebase functions](/gdevelop5/all-features/firebase/functions) (requires JavaScript knowledge) - * [Remote performance measuring](/gdevelop5/all-features/firebase/perfomance) \ No newline at end of file + * [Analytics](/gdevelop5/all-features/firebase/analytics) + * [Remote configuration](/gdevelop5/all-features/firebase/rc) + * [Authentication](/gdevelop5/all-features/firebase/authentication) + * [A document oriented database (Cloud Firestore Database)](/gdevelop5/all-features/firebase/firestore) + * [An online filesystem (Firebase Storage)](/gdevelop5/all-features/firebase/storage) + * [Firebase functions](/gdevelop5/all-features/firebase/functions) (requires JavaScript knowledge) + * [Remote performance measuring](/gdevelop5/all-features/firebase/perfomance) \ No newline at end of file diff --git a/docs/gdevelop5/all-features/firebase/quickstart.md b/docs/gdevelop5/all-features/firebase/quickstart.md index a2b8e23741..481df446ac 100644 --- a/docs/gdevelop5/all-features/firebase/quickstart.md +++ b/docs/gdevelop5/all-features/firebase/quickstart.md @@ -1,7 +1,7 @@ --- title: Firebase Setup --- -## Firebase Setup +## Firebase Setup To use Firebase, you have to connect it to a Firebase account. This page explains how to do so. @@ -39,36 +39,36 @@ Firebase will now show you some code known as the firebase SDK that you would us ![](/gdevelop5/all-features/firebase/fb1.png) -You only need the Firebase configuration part. Copy-paste the part between the {} including the {}. For example, in this screenshot what we need to copy is: ``` - - { - apiKey: "AIzaSyCbFhG_bCyAvnxlmVSgIgn7Em0XOYE9YXA", - authDomain: "tutorial-gdevelop.firebaseapp.com", - databaseURL: "https://tutorial-gdevelop.firebaseio.com", - projectId: "tutorial-gdevelop", - storageBucket: "tutorial-gdevelop.appspot.com", - messagingSenderId: "386980638073", - appId: "1:386980638073:web:b00afc0ecb3ed7ca4f53a8", - measurementId: "G-R0KBN0HPQ8" - } - +You only need the Firebase configuration part. Copy-paste the part between the {} including the {}. For example, in this screenshot what we need to copy is: + +```text +{ + apiKey: "AIzaSyCbFhG_bCyAvnxlmVSgIgn7Em0XOYE9YXA", + authDomain: "tutorial-gdevelop.firebaseapp.com", + databaseURL: "https://tutorial-gdevelop.firebaseio.com", + projectId: "tutorial-gdevelop", + storageBucket: "tutorial-gdevelop.appspot.com", + messagingSenderId: "386980638073", + appId: "1:386980638073:web:b00afc0ecb3ed7ca4f53a8", + measurementId: "G-R0KBN0HPQ8" +} ``` Now open the GDevelop project you want to integrate Firebase to, and go to the project properties. In the "Firebase Configuration" field, paste the configuration you copied. However, the format used by GDevelop is stricter than the code provided by Firebase. You need to wrap all the key names with quotes. The example would become: +```text +{ + "apiKey": "AIzaSyCbFhG_bCyAvnxlmVSgIgn7Em0XOYE9YXA", + "authDomain": "tutorial-gdevelop.firebaseapp.com", + "databaseURL": "https://tutorial-gdevelop.firebaseio.com", + "projectId": "tutorial-gdevelop", + "storageBucket": "tutorial-gdevelop.appspot.com", + "messagingSenderId": "386980638073", + "appId": "1:386980638073:web:b00afc0ecb3ed7ca4f53a8", + "measurementId": "G-R0KBN0HPQ8" +} ``` - { - "apiKey": "AIzaSyCbFhG_bCyAvnxlmVSgIgn7Em0XOYE9YXA", - "authDomain": "tutorial-gdevelop.firebaseapp.com", - "databaseURL": "https://tutorial-gdevelop.firebaseio.com", - "projectId": "tutorial-gdevelop", - "storageBucket": "tutorial-gdevelop.appspot.com", - "messagingSenderId": "386980638073", - "appId": "1:386980638073:web:b00afc0ecb3ed7ca4f53a8", - "measurementId": "G-R0KBN0HPQ8" - } - -``` ![](/gdevelop5/all-features/firebase/quickstart6.png) +![](/gdevelop5/all-features/firebase/quickstart6.png) You can now start using [Firebase services](/gdevelop5/all-features/firebase). diff --git a/docs/gdevelop5/all-features/firebase/rc.md b/docs/gdevelop5/all-features/firebase/rc.md index 4d03c271f3..ec351f7cac 100644 --- a/docs/gdevelop5/all-features/firebase/rc.md +++ b/docs/gdevelop5/all-features/firebase/rc.md @@ -33,13 +33,11 @@ They are used when there is no network to update the variables value, or while t !!! warning - While you don't have to go through this step, it is very recommended to do go through it as not doing so could break the game for users with an unstable or nonexistent internet connection, or when the game is launched the first time and no configuration has been fetched yet. - We can do that by creating a structure containing the defaults: ![](/gdevelop5/all-features/firebase/rc3.png) And then setting it as the default: @@ -56,13 +54,10 @@ Now you can set some variables. Set the ones you have assigned a default to: !!! danger - Don't forget to save the changes! ![](/gdevelop5/all-features/firebase/fb3.png) - - ## Adding Synchronisation This extension let you manage the synchronisation of the remote configuration however you want. @@ -71,17 +66,13 @@ For that you can use a timer or do it at the beginning of a scene that is often !!! danger - While you probably want to synchronize the configuration often, do not synchronize it too quickly too often! Else, Firebase will time you out to prevent to be DDoS by all the requests done. - !!! note - You could also use the "set auto update interval" action, but it is not much reliable according to some tests. - We can for example use the button presses here as they will happen often but not too much: ![](/gdevelop5/all-features/firebase/rc8.png) diff --git a/docs/gdevelop5/all-features/firebase/realtime_database.md b/docs/gdevelop5/all-features/firebase/realtime_database.md index 714b914a49..ec3dcb3323 100644 --- a/docs/gdevelop5/all-features/firebase/realtime_database.md +++ b/docs/gdevelop5/all-features/firebase/realtime_database.md @@ -15,12 +15,14 @@ The data is all stored in a JSON tree, which is comparable with a [structure var There are a few key differences though: #### Access of children + Unlike GDevelop variables, where you get the child via `.`, on Realtime Database you get it with a slash: `/`. That means that for dynamic access, you would write the path name as `"structure/" + VariableString(dynamicVariableAccess) + "/specificProperty"`, unlike GDevelop structures where you write it this way: `Variable(structure[VariableString(dynamicVariableAccess)].specificProperty)` #### Nesting of children + While in GDevelop there is no fixed limit of how deep the nesting of children can go, Realtime Database doesn't let you have a higher deepness than 32. @@ -43,6 +45,7 @@ You may not want to allow everyone to write everything. Else, everyone could modify the data of the others! To choose who can access what and how, Firebase has the rules system. It interoperates with [Firebase authentication](/gdevelop5/all-features/firebase/authentication), so that you can write this rule to only let authenticated players write the authonly variable of the database: + ```json { "rules": { @@ -56,6 +59,7 @@ authenticated players write the authonly variable of the database: You could also have a variable with all users, and have for each child (named after the user uid) have their permissions as a map. Here for example, you could allow every user with the "verified" permission to access their own variable named by their user id in the `userdata` variable, every authenticated user to read the `globaldata` variable and every admin to write all variables: + ```json { "rules": { diff --git a/docs/gdevelop5/all-features/firebase/storage.md b/docs/gdevelop5/all-features/firebase/storage.md index 5e4399590b..55febf52c1 100644 --- a/docs/gdevelop5/all-features/firebase/storage.md +++ b/docs/gdevelop5/all-features/firebase/storage.md @@ -2,6 +2,7 @@ title: Firebase Storage --- # Firebase Storage + !!! note GDevelop not supporting binary data (Files/Blobs) as Variable type (yet?), support for this feature is very poor. diff --git a/docs/gdevelop5/all-features/gamepad/index.md b/docs/gdevelop5/all-features/gamepad/index.md index f258041a51..3b87d4acb5 100644 --- a/docs/gdevelop5/all-features/gamepad/index.md +++ b/docs/gdevelop5/all-features/gamepad/index.md @@ -32,10 +32,8 @@ The "Platformer gamepad mapper" behavior can be added to the character to make t !!! tip - Learn more about the [Platform Character behavior](/gdevelop5/behaviors/platformer). - [Open example in GDevelop](https://editor.gdevelop.io/?project=example://platformer){ .md-button .md-button--primary } [![](/gdevelop5/behaviors/platformer/platformer-example.png)](https://editor.gdevelop.io/?project=example://platformer) @@ -60,8 +58,8 @@ Detecting pressed buttons can be done with the **Gamepad button pressed** (or ** Each gamepad connected to the computer or phone is numbered from 1 to 4: -* If your game is single player, you'll usually always use condition for the Gamepad 1. -* If your game is multi player, it's a good idea to use the **Gamepad connected** condition to check which gamepads are connected. You could store in a variable the gamepad number associated to a player. You can also force the first player to use the Gamepad 1, and the other player to use Gamepad 2. + * If your game is single player, you'll usually always use condition for the Gamepad 1. + * If your game is multi player, it's a good idea to use the **Gamepad connected** condition to check which gamepads are connected. You could store in a variable the gamepad number associated to a player. You can also force the first player to use the Gamepad 1, and the other player to use Gamepad 2. ![](gamepad-condition-connected.png) diff --git a/docs/gdevelop5/all-features/leaderboards/index.md b/docs/gdevelop5/all-features/leaderboards/index.md index 60aa1797ac..e2d20df856 100644 --- a/docs/gdevelop5/all-features/leaderboards/index.md +++ b/docs/gdevelop5/all-features/leaderboards/index.md @@ -24,9 +24,9 @@ Use the action **"Save connected player score"** (or **"Save player score"** if ![](/gdevelop5/all-features/leaderboards/pasted/20221202-093231.png) -* If you haven't created a leaderboard yet, do so in the [Leaderboard administration interface](/gdevelop5/interface/games-dashboard/leaderboard-administration). -* Once it is done, you can either select the leaderboard you want to send the score to, or use an expression to define the unique id of the leaderboard (if it is stored in a scene variable for instance). -* Finally, set the score to send. A number field is available for this: you probably want to use a `Variable` expression to read the value of a variable in memory. + * If you haven't created a leaderboard yet, do so in the [Leaderboard administration interface](/gdevelop5/interface/games-dashboard/leaderboard-administration). + * Once it is done, you can either select the leaderboard you want to send the score to, or use an expression to define the unique id of the leaderboard (if it is stored in a scene variable for instance). + * Finally, set the score to send. A number field is available for this: you probably want to use a `Variable` expression to read the value of a variable in memory. ![](/gdevelop5/all-features/leaderboards/pasted/20221202-094705.png) @@ -49,8 +49,8 @@ Use the action "**Display leaderboard**" to load and display a leaderboard on th While it's **loading**, to let the player know that the leaderboard will display soon, you have the choice between 2 options: -- Display **the built-in loader** (using the option available in the action) -- Use the condition "Leaderboard display is loading" to trigger an action (display a text "Loading" for example) + - Display **the built-in loader** (using the option available in the action) + - Use the condition "Leaderboard display is loading" to trigger an action (display a text "Loading" for example) Either case, if there's an error during the display, *it will close automatically*. You can also use the 2 conditions "Leaderboard display has errored" and "Leaderboard display has loaded" if you want to add logic around a possible error. @@ -64,14 +64,14 @@ We recommend that you send back the player to a menu scene or a non gameplay sce In some games, you may want to pause the scene while the leaderboard is displayed. For this, you can use an intermediate scene: -- Suppose you have a scene that is named "Level 1" -- Create a new scene "LeaderboardBackground" - - This scene will run in background when the leaderboard is displayed -- In the events sheet of scene "Level 1", add this event: + - Suppose you have a scene that is named "Level 1" + - Create a new scene "LeaderboardBackground" + - This scene will run in background when the leaderboard is displayed + - In the events sheet of scene "Level 1", add this event: ![](/gdevelop5/all-features/leaderboards/pasted/20220414-154529.png) -- In the events sheet of scene "LeaderboardBackground", add this event to go back to "Level 1" scene: + - In the events sheet of scene "LeaderboardBackground", add this event to go back to "Level 1" scene: ![](/gdevelop5/all-features/leaderboards/pasted/20220414-154906.png) @@ -95,7 +95,6 @@ To help you respect those constraints, the action will apply the expression `Lea | `"aPlayerNameTh4tIsT00LongToBeSaved"` | `"aPlayerNameTh4tIsT00LongToBeSa"` | Name truncated if too long | | `""` (empty) | `"Player89456"` | Random name if input is empty (5-digits-long number) | - ## Reference All actions, conditions and expressions are listed in [the leaderboards reference page](/gdevelop5/all-features/leaderboards/reference/). \ No newline at end of file diff --git a/docs/gdevelop5/all-features/linked-objects/index.md b/docs/gdevelop5/all-features/linked-objects/index.md index be4ea1eca3..eb66d16fad 100644 --- a/docs/gdevelop5/all-features/linked-objects/index.md +++ b/docs/gdevelop5/all-features/linked-objects/index.md @@ -11,10 +11,8 @@ Actions and conditions of "Linked Objects" category allow us to make virtual con !!! tip - Some of the conditions of Linked Objects are available as both, conditions as well as actions. Conditions will be considered as false if no object is picked. If you don't want this behavior, use their action counterparts. - #### Link two objects This action creates links between the object(s) in the first parameter and the object(s) in the second parameter. @@ -52,7 +50,6 @@ In this example, for every existing "Pathfinder" object, a new "Terrain" object !!! tip - To see more advance usages, take a look at the [Linked Objects Tools extension page](/gdevelop5/all-features/extensions/linked-objects-tools) ## Reference diff --git a/docs/gdevelop5/all-features/mouse-touch/index.md b/docs/gdevelop5/all-features/mouse-touch/index.md index 16a9ca6b2f..292614b1ff 100644 --- a/docs/gdevelop5/all-features/mouse-touch/index.md +++ b/docs/gdevelop5/all-features/mouse-touch/index.md @@ -5,13 +5,13 @@ title: Handle mouse and touch events Some [objects](/gdevelop5/objects) and [behaviors](/gdevelop5/behaviors) make mouse and multitouch easier to handle for specific cases: -- [Button](/gdevelop5/objects/button) -- [Multi-touch joystick](/gdevelop5/objects/multitouch-joystick) -- [Slider](/gdevelop5/objects/slider) -- [Toggle switch](/gdevelop5/objects/toggle-switch) -- [Draggable behavior](/gdevelop5/behaviors/draggable) -- [Swipe gesture](/gdevelop5/extensions/swipe-gesture/reference) -- [Pinch gesture](/gdevelop5/extensions/pinch-gesture/reference) + - [Button](/gdevelop5/objects/button) + - [Multi-touch joystick](/gdevelop5/objects/multitouch-joystick) + - [Slider](/gdevelop5/objects/slider) + - [Toggle switch](/gdevelop5/objects/toggle-switch) + - [Draggable behavior](/gdevelop5/behaviors/draggable) + - [Swipe gesture](/gdevelop5/extensions/swipe-gesture/reference) + - [Pinch gesture](/gdevelop5/extensions/pinch-gesture/reference) For more specific cases, mouse and touches events can be accessed directly. @@ -32,17 +32,18 @@ The expressions `CursorX` and `CursorY` give the cursor position in the scene. F **See it in action!** 🎮 [Open this example online](https://editor.gdevelop.io?project=example://balloon-smasher) + ## Handle manually multi-touch gestures (advanced) When only one touch is done at the same times, the mouse events can be used to keep things simple. Indeed, by default touch events are mirrored by mouse events. This can be disabled with the action “De/activate moving the mouse cursor with touches” when handling both multi-touch and mouse events to avoid echo. Multiple touches can happen at the same time. The touch identifier must be used to tell them apart. It can be done by following these steps: -* At the start of a touch, the touch identifier can be get with the `StartedTouchId(Number)` expression. + * At the start of a touch, the touch identifier can be get with the `StartedTouchId(Number)` expression. ![](/gdevelop5/all-features/touchstart.png) -* When the touch moves, the touch identifier is needed to make sure to follow the right touch. A variable can be used to ensure this. + * When the touch moves, the touch identifier is needed to make sure to follow the right touch. A variable can be used to ensure this. ![](/gdevelop5/all-features/touchmoveandend.png) diff --git a/docs/gdevelop5/all-features/network/index.md b/docs/gdevelop5/all-features/network/index.md index 1271f4d58f..05559f9e50 100644 --- a/docs/gdevelop5/all-features/network/index.md +++ b/docs/gdevelop5/all-features/network/index.md @@ -22,13 +22,13 @@ When the server sends the response, it is saved in a variable so that you can re ## How to format the content -* For GET requests, parameters have to be sent in the content in the format of a "query string": + * For GET requests, parameters have to be sent in the content in the format of a "query string": `parameter1=value1¶meter2=value2¶meter3=value3`... You can send data from a variable, for example: `"score=" + VariableString(Score) + "&playerName=" + VariableString(Name)` -* For POST requests, it depends on what is expected by the server, but most of the time the server expects JSON formatted text. + * For POST requests, it depends on what is expected by the server, but most of the time the server expects JSON formatted text. You can either construct it yourself: `"{\"score\": " + VariableString(Score) + " }"` (note the use of backslash before the quote `\"`, to allow the quote to be used inside a text) or use the expression to convert a variable structure to JSON: `ToJSON(VariableWithData)` (see more about this below). @@ -50,7 +50,7 @@ Variables in GDevelop can contain number, strings or be a "structure" containing Structures are useful as they can store all the data concerning something, that can then be sent to a server. To do this, you can convert the structure variable to JSON, using the expression called `ToJSON`. For example: -``` +```javascript ToJSON(Progress) ``` diff --git a/docs/gdevelop5/all-features/p2p/index.md b/docs/gdevelop5/all-features/p2p/index.md index c348c0774a..48f499efc0 100644 --- a/docs/gdevelop5/all-features/p2p/index.md +++ b/docs/gdevelop5/all-features/p2p/index.md @@ -5,10 +5,8 @@ title: Peer-to-peer !!! danger - P2P leaks the client's IP addresses when connecting to them. If someone knows your broker server and P2P ID, they know your IP address and can use it to DDoS or geolocalize you. Make sure to properly inform your players and not to use lobby/matchmaking systems alongside P2P, as those may share the player's P2P ID with unknown peers. - !!! warning This is an experimental feature, it is subject to change and may contain bugs. Your feedback is welcome to improve this feature. @@ -30,7 +28,7 @@ There are two options for setting up a broker server: * Setting up a custom server (recommended), which can be run on a local computer as a test. * Using a default, public server. -#### Set up a custom (local) server +#### Set up a custom (local) server A local server can be set up easily. [Install Node.js](https://nodejs.org/en/download/) will need to be installed. The LTS version is recommended. @@ -44,17 +42,16 @@ After opening a command line, complete the following: - If this is the first time completing these steps, to install the server type **npm install peer -g** - After the server is installed, and every subsequent time (to start the server), type **peerjs -p ** - * Any port that is not already used by the computer can be used. -Other options can be passed to the PeerJS server, see [its website](https://github.com/peers/peerjs-server#config--cli-options) for more information. -After the above has been completed, the **Use custom broker server** action is used to connect to the server. - - * **localhost** can be used as the host address to point to the local server. + * Any port that is not already used by the computer can be used. + - Other options can be passed to the PeerJS server, see [its website](https://github.com/peers/peerjs-server#config--cli-options) for more information. + - After the above has been completed, the **Use custom broker server** action is used to connect to the server. + * **localhost** can be used as the host address to point to the local server. !!! tip Note that this is a local server, so it will only work on your machine. When releasing your game you will need to deploy one to a Node.js compatible hosting, like Heroku. -#### Use the default server +#### Use the default server !!! warning @@ -80,14 +77,13 @@ Once you got connected, you can trigger actions remotely. You can select another You might be wondering what the "data loss" parameter is for. Due to how GDevelop is made, only one occurrence of a remote event can be handled when the event sheet is executed (this happens roughly 60 times per second). To help optimize events execution, we provide the choice to use the dataloss mode. -* With the *no dataloss* mode, every remote event is queued, and on every frame, if there is one in the queue, we take the oldest one and handle it. **This makes sure every data is processed/taken into account.** -* With the *dataloss mode* activated, it doesn't queue the data but only stores the latest occurrence of the remote event. **This means only the latest data is processed and outdated data will be discarded.** - + * With the *no dataloss* mode, every remote event is queued, and on every frame, if there is one in the queue, we take the oldest one and handle it. **This makes sure every data is processed/taken into account.** + * With the *dataloss mode* activated, it doesn't queue the data but only stores the latest occurrence of the remote event. **This means only the latest data is processed and outdated data will be discarded.** Here are two examples: -* if you use a synchronized score counter, you don't want to lose any data, as missing only one point of the counter would *desynchronize* the counters, so the dataloss mode would be deactivated. -* If you want to synchronize positions, only the last position sent is relevant, not older positions. In this case, you would activate the dataloss mode *to prevent delays/lags*. + * if you use a synchronized score counter, you don't want to lose any data, as missing only one point of the counter would *desynchronize* the counters, so the dataloss mode would be deactivated. + * If you want to synchronize positions, only the last position sent is relevant, not older positions. In this case, you would activate the dataloss mode *to prevent delays/lags*. ## Reference diff --git a/docs/gdevelop5/all-features/shopify/index.md b/docs/gdevelop5/all-features/shopify/index.md index 5f22902706..a6a9cd9e5f 100644 --- a/docs/gdevelop5/all-features/shopify/index.md +++ b/docs/gdevelop5/all-features/shopify/index.md @@ -9,28 +9,28 @@ If you have a Shopify powered online store, using this feature can be instrument In Shopify, open your shop administration dashboard. Add an app and note the app identifier (a large number): -* Go in *Apps* in the left menu, -* At the bottom, choose *Manage private apps*, -* Click on "Create a new private app" and enter the required information: + * Go in *Apps* in the left menu, + * At the bottom, choose *Manage private apps*, + * Click on "Create a new private app" and enter the required information: ![](/gdevelop5/all-features/shopify-create-private-app.png) -* When the app is created, note the *app identifier* in the address bar: + * When the app is created, note the *app identifier* in the address bar: ![](/gdevelop5/all-features/shopify-app-identifier.png) -* Also note the "*Storefront access token*". + * Also note the "*Storefront access token*". Then, we need to get the identifiers of the products we want to add to the game. Choose the product that you want to add to your game: -* Choose Products in the left menu, -* Click on the chosen product, -* Note the product identifier in the address bar: + * Choose Products in the left menu, + * Click on the chosen product, + * Note the product identifier in the address bar: ![](/gdevelop5/all-features/shopify-product-identifier.png) -* Verify that your previously created private app is listed in the *sales channels* (click on manage if that's not the case): + * Verify that your previously created private app is listed in the *sales channels* (click on manage if that's not the case): ![](/gdevelop5/all-features/shopify-sales-channels.png) diff --git a/docs/gdevelop5/all-features/storage/index.md b/docs/gdevelop5/all-features/storage/index.md index ef36bdf8f6..1531e86619 100644 --- a/docs/gdevelop5/all-features/storage/index.md +++ b/docs/gdevelop5/all-features/storage/index.md @@ -29,7 +29,9 @@ You can now close the preview window. When running the preview again, the stored On desktop computers, local storage will always be located here: ### Desktop export + #### Windows Path + **:\Users\\AppData\Roaming\\Local Storage\leveldb** e.g. If on Windows 10, the User Profile folder is on the C: drive, the User's account name is BobBobson and the game is set to the name "My GD5 Game" in the game properties, this would be the path: @@ -38,10 +40,12 @@ e.g. If on Windows 10, the User Profile folder is on the C: drive, the User's ac This will vary by Windows version and settings, but can normally be accessed by browsing to **%AppData%** then accessing the folder that matches the game name. -####Linux Path +#### Linux Path + **home//.config//Local Storage/leveldb** ### HTML5 Export + If the game has been exported to an HTML5 build, and uploaded to a host such as Itch.io, local storage will be maintained with the //browser's// local storage. This will mean that each browser will have a unique location, and users will need to refer to that documentation if they want to locate it. This will also mean that most browsers will delete the save data if their local stored data is cleared. diff --git a/docs/gdevelop5/all-features/timers-and-time/index.md b/docs/gdevelop5/all-features/timers-and-time/index.md index 0ad7d1f667..f2a1800fc6 100644 --- a/docs/gdevelop5/all-features/timers-and-time/index.md +++ b/docs/gdevelop5/all-features/timers-and-time/index.md @@ -5,9 +5,9 @@ title: Timers and time Time management is important in a game. GDevelop provides a few different tools: -* Timers can be run using actions inside events. You can then use conditions to check if enough time elapsed before running other actions or resetting the timer. Timers can be attached to scenes or to objects. -* Special actions like "Wait X seconds" can be used to wait before launching the next actions in an event. This is useful for creating cut-scenes, timelines or just effects happening not immediately. -* Finally, there are expressions to get the current time, day and time since the start of the game. + * Timers can be run using actions inside events. You can then use conditions to check if enough time elapsed before running other actions or resetting the timer. Timers can be attached to scenes or to objects. + * Special actions like "Wait X seconds" can be used to wait before launching the next actions in an event. This is useful for creating cut-scenes, timelines or just effects happening not immediately. + * Finally, there are expressions to get the current time, day and time since the start of the game. ## The "Wait X seconds" action @@ -41,7 +41,6 @@ You can use the action to reset the timer to make something repeat on a regular ![](/gdevelop5/all-features/timers/pasted/20220122-162310.png) - ### A more advanced example of a scene timer Here is a more advanced Timer example. The timer is used to briefly protect the player from damage. The amount of time given to protect the player depends on the value of the variable "`player_undestroyable_time`": @@ -59,7 +58,6 @@ In addition to scene timers, you can use timers on the instances of objects. Eac This is useful for having each instance (for example, each spaceship, each enemy, each player...) handle their own timings. For example, this can be the time of invulnerability after a player or an enemy is hit. - Object timers are set up in the same way as scene timers. You have to initialize an object instance timer with the action to start (or reset) a timer. !!! warning diff --git a/docs/gdevelop5/all-features/timers-and-time/wait-action.md b/docs/gdevelop5/all-features/timers-and-time/wait-action.md index 3244857d29..52a71b6c9b 100644 --- a/docs/gdevelop5/all-features/timers-and-time/wait-action.md +++ b/docs/gdevelop5/all-features/timers-and-time/wait-action.md @@ -13,8 +13,8 @@ Use the action to wait a bit before launching an action. For example, here we cr There are a few precautions to take when using a Wait action: -* Avoid running it in an event where conditions are valid for more than one frame. If you use it without conditions, multiple Wait will be stored in memory, and the actions will all be launched later, which will slow down the game. -* Instead, prefer to use conditions like "At the beginning of the scene", a collision condition (with either a "Trigger Once" or an action to delete one of the object), etc... + * Avoid running it in an event where conditions are valid for more than one frame. If you use it without conditions, multiple Wait will be stored in memory, and the actions will all be launched later, which will slow down the game. + * Instead, prefer to use conditions like "At the beginning of the scene", a collision condition (with either a "Trigger Once" or an action to delete one of the object), etc... ### About sub-events diff --git a/docs/gdevelop5/all-features/variables/global-variables.md b/docs/gdevelop5/all-features/variables/global-variables.md index f64994271e..141fe3e4c8 100644 --- a/docs/gdevelop5/all-features/variables/global-variables.md +++ b/docs/gdevelop5/all-features/variables/global-variables.md @@ -5,8 +5,8 @@ title: Global variables Global variables: -- are stored in memory for as long as the game is running -- can be accessed from any scene in the game + - are stored in memory for as long as the game is running + - can be accessed from any scene in the game They're useful for storing data that the entire game needs access to at all times, such as the player's score. They're only deleted from memory when the player quits the game. @@ -30,19 +30,19 @@ You can use global variables in [expressions](/gdevelop5/all-features/expression ### Number -``` +```javascript GlobalVariable() ``` ### Text -``` +```javascript GlobalVariableString() ``` ### Structure -``` +```javascript GlobalVariable(.) GlobalVariableString(.) ``` \ No newline at end of file diff --git a/docs/gdevelop5/all-features/variables/index.md b/docs/gdevelop5/all-features/variables/index.md index a2b3a4710c..c06c067fbf 100644 --- a/docs/gdevelop5/all-features/variables/index.md +++ b/docs/gdevelop5/all-features/variables/index.md @@ -3,7 +3,7 @@ title: Variables --- # Variables -In GDevelop, you can use _variables_ to store temporary data, such as numbers and text. For example, you might use variables to store the player's name, current health, and score. +In GDevelop, you can use *variables* to store temporary data, such as numbers and text. For example, you might use variables to store the player's name, current health, and score. !!! note @@ -13,15 +13,15 @@ In GDevelop, you can use _variables_ to store temporary data, such as numbers an ## Data types -All variables have a _data type_. The data type of a variable determines what type of data the variable can contain. +All variables have a *data type*. The data type of a variable determines what type of data the variable can contain. In GDevelop, variables can contain the following types of data: -- Number -- Text -- Structure -- Boolean -- Array + - Number + - Text + - Structure + - Boolean + - Array Number, Text and Boolean are *primitive types*: they store a value. Structure and Array are *collection types*: they store multiple variables. @@ -32,14 +32,15 @@ A variable with the *Number* data type can contain numeric values, such as `0`, ### Text -A variable with the *Text* data type can contain text, such as the words `Hello world`. In programming languages, this data type is often referred to as a _string_. In this documentation, the terms *text* and *string* are used interchangeably. +A variable with the *Text* data type can contain text, such as the words `Hello world`. In programming languages, this data type is often referred to as a *string*. In this documentation, the terms *text* and *string* are used interchangeably. ### Boolean A variable with the *Boolean* data type contains the simplest form of information: either yes or no, 1 or 0, true or false. They are useful as they can be easily toggled. #### Adding a boolean -A boolean can be added by clicking the wrench** icon→Primitive types→Convert to boolean**. + +A boolean can be added by clicking the wrench **icon→Primitive types→Convert to boolean**. ![](/gdevelop5/tutorials/toggles1.png) @@ -68,11 +69,11 @@ To compare a boolean to another value, text or boolean, you can use **Compare th A Structure variable maps names to variables. For example, a simple structure can map the name "Hello" to one sub-variable and the name "World" to another sub-variable. You can use this data type to organize related variables within a single variable. -In programming languages, this data type is often referred to as an _object_, _map_, _hash_, or *dictionary*. +In programming languages, this data type is often referred to as an *object*, *map*, *hash*, or *dictionary*. ### Array -An Array variable, also sometimes called _list_ in programming languages, is like a list of variables. +An Array variable, also sometimes called *list* in programming languages, is like a list of variables. Each variable in an Array has an index, which defines their position in the array. The indices begin at 0 and go up to however long the array is. !!! danger @@ -81,31 +82,32 @@ The indices begin at 0 and go up to however long the array is. ### Accessing child variables -Variables that exist within a collection variable are known as _child variables_. +Variables that exist within a collection variable are known as *child variables*. To access the value of a child variable, use the following syntax in an [expressions](/gdevelop5/all-features/expressions), replacing the values in angled brackets with variable names: -``` +```javascript . ``` + Assume we have this structure: ![](/gdevelop5/all-features/variables/pasted/20230308-154718.png) To get the value `123` we can write the following expression -``` +```javascript GlobalVariable(players.player1.level1score) ``` Or, using brackets: -``` +```javascript GlobalVariable(players["player1"]["level1score"]) ``` If this variable was a scene variable, `Variable` would be used instead of `GlobalVariable`: -``` +```javascript Variable(players.player1.level1score) ``` @@ -125,36 +127,37 @@ You can use expressions to dynamically access child variables. For example, imagine storing the player's score for each level, called `Level1`, `Level2`, `Level3`. If you want to show the player's score for a specific level, you may store the current level number in a variable called `CurrentLevel`. You could then use the following syntax to access the score: -``` +```javascript Variable(PlayerScore["Level"+ToString(Variable(CurrentLevel))]) ``` + Whatever is inside the square brackets will be interpreted as the name of the child. If you need to use a variable to define part of the child path, all the subsequent children in the path will need to be in square brackets as well. In the above example if you wanted to address a child at PlayerScore.Level1.enemies.killbonus but still define the level dynamically, it would look like this: -``` +```javascript Variable(PlayerScore["Level"+ToString(Variable(CurrentLevel))]["enemies"]["killbonus"]) ``` Note that this is equivalent to writing: -``` +```javascript Variable(PlayerScore["Level"+ToString(Variable(CurrentLevel))].enemies.killbonus) ``` ## Scopes -The _scope_ of a variable determines: +The *scope* of a variable determines: -- where the variable can be accessed from -- how long the variable is stored in memory -- the steps required to create the variable + - where the variable can be accessed from + - how long the variable is stored in memory + - the steps required to create the variable In GDevelop, there are three variable scopes: -- [Global](/gdevelop5/all-features/variables/global-variables) -- [Scene](/gdevelop5/all-features/variables/scene-variables) -- [Object](/gdevelop5/all-features/variables/object-variables) + - [Global](/gdevelop5/all-features/variables/global-variables) + - [Scene](/gdevelop5/all-features/variables/scene-variables) + - [Object](/gdevelop5/all-features/variables/object-variables) Refer to the linked pages for more information about each variable scope. @@ -168,8 +171,8 @@ You don't have to create (declare) variables before using them. For example, if you reference a variable that doesn't exist in an action or condition, GDevelop automatically initializes the variable with a default value. The default value is determined by the data type of the variable: -* Numeric variables are initialized with a value of `0`. -* Text variables are initialized with a value of `""` (an empty string). + * Numeric variables are initialized with a value of `0`. + * Text variables are initialized with a value of `""` (an empty string). But while it's possible use variables without first creating them, we recommend creating them anyway, as it allows GDevelop to generate optimized events and helps you keep track of the variables in your game. diff --git a/docs/gdevelop5/all-features/variables/instance-variables.md b/docs/gdevelop5/all-features/variables/instance-variables.md index b1b02cc753..9c815a1429 100644 --- a/docs/gdevelop5/all-features/variables/instance-variables.md +++ b/docs/gdevelop5/all-features/variables/instance-variables.md @@ -3,5 +3,4 @@ title: Instance Variables --- # Instance Variables - Another term for [object variables](/gdevelop5/all-features/variables/object-variables). \ No newline at end of file diff --git a/docs/gdevelop5/all-features/variables/object-variables.md b/docs/gdevelop5/all-features/variables/object-variables.md index b63e473e76..b7cc969c3b 100644 --- a/docs/gdevelop5/all-features/variables/object-variables.md +++ b/docs/gdevelop5/all-features/variables/object-variables.md @@ -7,8 +7,8 @@ When you add variables to an object, any instance of the object put on the scene Object variables: -- are stored in memory for as long as a specific instance of an object exists. -- can be accessed by the instance of the object. + - are stored in memory for as long as a specific instance of an object exists. + - can be accessed by the instance of the object. They're useful for storing data associated with individual instances of an object, such as the amount of health an enemy has. They're deleted from memory when the instance is removed from the scene. @@ -36,19 +36,19 @@ You can use object variables in [expressions](/gdevelop5/all-features/expression ### Number -``` +```javascript .Variable() ``` ### Text -``` +```javascript .VariableString() ``` ### Structure -``` +```javascript .Variable(.) .VariableString(.) ``` \ No newline at end of file diff --git a/docs/gdevelop5/all-features/variables/scene-variables.md b/docs/gdevelop5/all-features/variables/scene-variables.md index 795aa01841..99a496262f 100644 --- a/docs/gdevelop5/all-features/variables/scene-variables.md +++ b/docs/gdevelop5/all-features/variables/scene-variables.md @@ -5,8 +5,8 @@ title: Scene variables Scene variables: -- are stored in memory for as long as a scene is active -- can only be accessed from within the current scene + - are stored in memory for as long as a scene is active + - can only be accessed from within the current scene They're useful for storing data that doesn't need to be shared between different scenes, such as the number of enemies in the scene. They're deleted from memory when the player changes scenes. @@ -31,19 +31,19 @@ You can use scene variables in [expressions](/gdevelop5/all-features/expressions ### Number -``` +```javascript Variable() ``` ### Text -``` +```javascript VariableString() ``` ### Structure -``` +```javascript Variable(.) VariableString(.) ``` \ No newline at end of file diff --git a/docs/gdevelop5/all-features/window/index.md b/docs/gdevelop5/all-features/window/index.md index c3ef482243..77eb190222 100644 --- a/docs/gdevelop5/all-features/window/index.md +++ b/docs/gdevelop5/all-features/window/index.md @@ -6,9 +6,11 @@ title: Window and game area The window of the game is the area in which the game is displayed. It DOES NOT refer to the system window that includes the toolbar, title bar on the top and a frame on the other three sides. ## Fullscreen + The "De/activate fullscreen" action allows you to toggle the game between fullscreen on/off. When the window is in fullscreen, it will take up as much area as possible. You can control the action using the "YES" and "NO" actions. ## Window margins + The margin of the window is the distance between the side of the window and the game window displayed. Shown below is the preview of a game with 100 px margins on all 4 sides. ![](/gdevelop5/all-features/annotation_2019-06-29_174027.png) diff --git a/docs/gdevelop5/behaviors/anchor/index.md b/docs/gdevelop5/behaviors/anchor/index.md index df5ff1c8c9..948fa95f66 100644 --- a/docs/gdevelop5/behaviors/anchor/index.md +++ b/docs/gdevelop5/behaviors/anchor/index.md @@ -15,13 +15,12 @@ To add an anchor to an object: * Select **Anchor**. * Set your anchor points and click **Apply**. - ![](anchorbehavior.png) - ## Behavior parameters ### Edge anchor + You can choose to what the object will be anchored from 3 main options: * **None**: No anchor will be applied to the selected edge. diff --git a/docs/gdevelop5/behaviors/bounce/index.md b/docs/gdevelop5/behaviors/bounce/index.md index bd31339719..7fd7b49003 100644 --- a/docs/gdevelop5/behaviors/bounce/index.md +++ b/docs/gdevelop5/behaviors/bounce/index.md @@ -22,10 +22,8 @@ GDevelop makes it easy to simulate real bouncing in a game. _Bounce behavior_ ca [![](/gdevelop5/tutorials/breakout-screenshot.png)](https://editor.gdevelop.io/?project=example://breakout) - ## What's the logic behind the behavior? !!! tip - The behavior looks at the object's position and velocity at the time of the collision. It adds a force in the direction of the normal vector between the collided object and the object, and then adds the difference between the normal vector and the previous angle of movement. diff --git a/docs/gdevelop5/behaviors/destroyoutside/index.md b/docs/gdevelop5/behaviors/destroyoutside/index.md index e9d9752c77..2756073d77 100644 --- a/docs/gdevelop5/behaviors/destroyoutside/index.md +++ b/docs/gdevelop5/behaviors/destroyoutside/index.md @@ -7,13 +7,13 @@ This [behavior](/gdevelop5/behaviors) deletes objects, like bullets, that go off This is one way of ensuring that your game's performance doesn't suffer because it's keeping track of bullets or other objects that have left the game scene, and will likely never return. -#### Add behavior to object +#### Add behavior to object To add a behavior to an object, first open the object properties by right-clicking/double clicking on the object that is located in the Objects list. Select "Edit object" from the popup list. Then select the Behaviors tab. Click the "add behavior" button. ![](/gdevelop5/behaviors/AddBehaviorHighlight.png) -#### Destroy when outside of screen +#### Destroy when outside of screen Once you have selected this behavior from the list, it is going to eliminate the object whenever it is outside the screen. You do not need to change this behaviors options, and it will automatically apply to all instances of the object. Press apply in the bottom right corner of the object properties window to confirm this change. diff --git a/docs/gdevelop5/behaviors/draggable/index.md b/docs/gdevelop5/behaviors/draggable/index.md index bc8f2ed598..4440d5db85 100644 --- a/docs/gdevelop5/behaviors/draggable/index.md +++ b/docs/gdevelop5/behaviors/draggable/index.md @@ -8,7 +8,6 @@ title: Draggable Object Behavior **See it in action!** 🎮 [I would rather see the Draggable object behavior examples! Please take me there now.](/#Examples) - The draggable object [behavior](/gdevelop5/behaviors) will make the [object](/gdevelop5/objects) draggable with the mouse or by touching it on a touchscreen. ## Add the Draggable behavior to an object @@ -30,7 +29,6 @@ Using events, you can also check if an object is being dragged: ![](eventcondtiondraggableobject.png) - # Examples !!! tip @@ -44,24 +42,18 @@ Using events, you can also check if an object is being dragged: [![](snaptogrid.png)](https://editor.gdevelop.io/?project=example://snap-object-to-grid) - - **Shoot Bullet in Parabola Pattern** (A parabola is a plane curve which is mirror-symmetrical and is approximately U-shaped. Basically, an object that shoots toward an object in a curved trajectory.) [Open example in GDevelop](https://editor.gdevelop.io/?project=example://shoot-bullet-in-parabola){ .md-button .md-button--primary } [![](shootbulletparabolapattern.png)](https://editor.gdevelop.io/?project=example://shoot-bullet-in-parabola) - - **Save and Load** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://save-load){ .md-button .md-button--primary } [![](/gdevelop5/behaviors/saveandloadexample.png)](https://editor.gdevelop.io/?project=example://save-load) - - **Path Finding Basics** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://pathfinding-basics){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/behaviors/events-based-behaviors/index.md b/docs/gdevelop5/behaviors/events-based-behaviors/index.md index 65cd8a8321..e3d3298403 100644 --- a/docs/gdevelop5/behaviors/events-based-behaviors/index.md +++ b/docs/gdevelop5/behaviors/events-based-behaviors/index.md @@ -45,12 +45,12 @@ By default, a behavior is empty and **does nothing**. To add interactivity, you Predefined lifecycle methods are as such: -* **onCreated**: events inside the function will be run when **a new instance of an object** with the behavior is created. -* **onStepPreEvents**: will be run every time a frame is rendering on the screen **before the "traditional" events** of the scene. Typically in most games, this is done 60 times per second. This is called for **every single object** having the behavior if the behavior is not deactivated. -* **onDestroy**: events that will be run when an instance of the object having the behavior is **deleted** (if multiple objects are removed at the same time, events will be run for each object). This is done even if the behavior is deactivated. -* **onDeActivate**: events that will be run once, after the behavior is deactivated on an object. -* **onActivate**: events that will be run once, after the behavior is activated again on an object. -* **onStepPostEvents**: events that will be run for every single object having the behavior, **after** the "traditional" events of the scene, if the behavior is not deactivated. Typically in most games, this is done 60 times per second. As possible, we recommend to prefer onStepPreEvents, to run your logic before events and give the events in the scene a chance to react to changes that happen on the objects. + * **onCreated**: events inside the function will be run when **a new instance of an object** with the behavior is created. + * **onStepPreEvents**: will be run every time a frame is rendering on the screen **before the "traditional" events** of the scene. Typically in most games, this is done 60 times per second. This is called for **every single object** having the behavior if the behavior is not deactivated. + * **onDestroy**: events that will be run when an instance of the object having the behavior is **deleted** (if multiple objects are removed at the same time, events will be run for each object). This is done even if the behavior is deactivated. + * **onDeActivate**: events that will be run once, after the behavior is deactivated on an object. + * **onActivate**: events that will be run once, after the behavior is activated again on an object. + * **onStepPostEvents**: events that will be run for every single object having the behavior, **after** the "traditional" events of the scene, if the behavior is not deactivated. Typically in most games, this is done 60 times per second. As possible, we recommend to prefer onStepPreEvents, to run your logic before events and give the events in the scene a chance to react to changes that happen on the objects. This is an example of some events inside onStepPreEvents in the case of behavior that automatically deletes objects that are too damaged: @@ -64,8 +64,6 @@ For example, this creates a new action that can be used to add damage to the obj ![](pasted/20210906-235538.png) - - ## Use the behavior on an object ### 1) Add the behavior to an object @@ -109,11 +107,11 @@ To show and add properties to your behavior, edit it and click on the "Propertie Properties can be: -* Number, string (including a color or a choice from a list of options) or booleans (will be displayed as a checkbox). -* They can also be another required behavior - in which case the behavior you're editing will ensure the other specified behavior is present on objects using it. There is a dedicated section later on this page about this. -* They have a default value, that will be used if the value is not changed when adding the behavior to an object. -* They can be visible in the editor, when added to an object, or invisible. -* Finally, they have a label that will be displayed in the editor. + * Number, string (including a color or a choice from a list of options) or booleans (will be displayed as a checkbox). + * They can also be another required behavior - in which case the behavior you're editing will ensure the other specified behavior is present on objects using it. There is a dedicated section later on this page about this. + * They have a default value, that will be used if the value is not changed when adding the behavior to an object. + * They can be visible in the editor, when added to an object, or invisible. + * Finally, they have a label that will be displayed in the editor. ### Use actions and conditions to manipulate the properties @@ -127,6 +125,7 @@ Strings and numbers will also have an expression to get their values. !!! tip These actions/conditions/expressions won't be usable from outside of the behavior. Properties are said to be "private", they can only be manipulated by the behavior. If you want to have them modified by the scene events, create new actions/conditions for this in your behavior. + ## Behaviors using other behaviors as properties It is possible for behaviors to use other "required behaviors" as properties. When this is the case, GDevelop will ensure that any object using your behavior will also use the other one. @@ -144,9 +143,9 @@ To use a behavior based on another, you don't need to do anything special! Just Creating your own behaviors has multiple advantages: -* *Encapsulation*: by adding logic inside a custom behavior, you can keep a clear events sheet, with fewer events so it's easier to read and maintain. Behaviors can have actions/conditions and expressions that run logic, so you don't have to repeat long instructions in the events sheet. You can just use the action/condition the behavior providing as you would normally do with any other behavior. -* *Reusability*: let's say that you created a behavior to have an enemy move and lose a life if hit by the player. If you want to create a slightly different enemy, but based on the same principles, you can create a new object, then add the same behavior with different properties. In a few clicks, you can have a new enemy in your game. -* *Collaboration*: let's say you are working in a team or would like to make your project open-source and invite people to contribute with new features and gameplay. Custom behavior makes it possible for anyone to design and create self-contained features and game logic that we can easily import into a project and used by anyone without prior knowledge required including level and game designers who don't normally work on game logic or at least prefer not to. + * *Encapsulation*: by adding logic inside a custom behavior, you can keep a clear events sheet, with fewer events so it's easier to read and maintain. Behaviors can have actions/conditions and expressions that run logic, so you don't have to repeat long instructions in the events sheet. You can just use the action/condition the behavior providing as you would normally do with any other behavior. + * *Reusability*: let's say that you created a behavior to have an enemy move and lose a life if hit by the player. If you want to create a slightly different enemy, but based on the same principles, you can create a new object, then add the same behavior with different properties. In a few clicks, you can have a new enemy in your game. + * *Collaboration*: let's say you are working in a team or would like to make your project open-source and invite people to contribute with new features and gameplay. Custom behavior makes it possible for anyone to design and create self-contained features and game logic that we can easily import into a project and used by anyone without prior knowledge required including level and game designers who don't normally work on game logic or at least prefer not to. !!! note @@ -156,19 +155,18 @@ Creating your own behaviors has multiple advantages: You can imagine tons of different behaviors. Here are a few examples: -* A behavior to **manage the health of an enemy or a boss**. - - * There can be an action "Hit the object", a condition "Is the object dead?". The behavior will take care of updating the object variables to track the life of the enemy (for example, when the enemy is hit, you remove some life. - * Then, life is regenerated progressively at each frame of the game) and the condition "Is the object dead?" will be able to check if the life reached 0 or not. + * A behavior to **manage the health of an enemy or a boss**. -* Another idea can be to put the events to make **an enemy move following a complex pattern** on the screen inside a behavior. + * There can be an action "Hit the object", a condition "Is the object dead?". The behavior will take care of updating the object variables to track the life of the enemy (for example, when the enemy is hit, you remove some life. + * Then, life is regenerated progressively at each frame of the game) and the condition "Is the object dead?" will be able to check if the life reached 0 or not. - * You can add actions/conditions to change the movement, change the speed, etc... All of this will be in a behavior that can be added to any other object in a few clicks. + * Another idea can be to put the events to make **an enemy move following a complex pattern** on the screen inside a behavior. + * You can add actions/conditions to change the movement, change the speed, etc... All of this will be in a behavior that can be added to any other object in a few clicks. -* A behavior can **automatically update the Score** in your game when enemies are destroyed, or items collected. + * A behavior can **automatically update the Score** in your game when enemies are destroyed, or items collected. - * You can create a behavior that increases the "Score" variable when the object is destroyed. You can then create items, collectibles or enemies that have this behavior, and when they are collected or killed, the score will automatically increase. + * You can create a behavior that increases the "Score" variable when the object is destroyed. You can then create items, collectibles or enemies that have this behavior, and when they are collected or killed, the score will automatically increase. !!! tip diff --git a/docs/gdevelop5/behaviors/index.md b/docs/gdevelop5/behaviors/index.md index 4418a9d250..5c2c26c5d4 100644 --- a/docs/gdevelop5/behaviors/index.md +++ b/docs/gdevelop5/behaviors/index.md @@ -7,9 +7,9 @@ In GDevelop, _behaviors_ add significant features to [objects](/gdevelop5/object For example, behaviors can: -* Automatically remove objects from a scene when they move outside the edges of the screen. -* Make objects move in a realistic way by following the laws of physics. -* Allow players to move an object with the arrow keys. + * Automatically remove objects from a scene when they move outside the edges of the screen. + * Make objects move in a realistic way by following the laws of physics. + * Allow players to move an object with the arrow keys. You can also customize behaviors to make your game feel unique and use [events](/gdevelop5/events) to manipulate behaviors. @@ -19,21 +19,21 @@ You can also customize behaviors to make your game feel unique and use [events]( This section lists the different types of behaviors, each of which is useful for adding different types of features to objects. -- [Anchor](/gdevelop5/behaviors/anchor) -- [Bounce](/gdevelop5/behaviors/bounce) -- [Destroy outside screen](/gdevelop5/behaviors/destroyoutside) -- [Draggable](/gdevelop5/behaviors/draggable) -- [Pathfinding](/gdevelop5/behaviors/pathfinding) -- [Physics 2](/gdevelop5/behaviors/physics2) -- [Platformer objects and platforms](/gdevelop5/behaviors/platformer) -- [Top-down movement](/gdevelop5/behaviors/topdown) -- [Tween](/gdevelop5/behaviors/tween) + - [Anchor](/gdevelop5/behaviors/anchor) + - [Bounce](/gdevelop5/behaviors/bounce) + - [Destroy outside screen](/gdevelop5/behaviors/destroyoutside) + - [Draggable](/gdevelop5/behaviors/draggable) + - [Pathfinding](/gdevelop5/behaviors/pathfinding) + - [Physics 2](/gdevelop5/behaviors/physics2) + - [Platformer objects and platforms](/gdevelop5/behaviors/platformer) + - [Top-down movement](/gdevelop5/behaviors/topdown) + - [Tween](/gdevelop5/behaviors/tween) Refer to the linked pages to learn more about each type of behavior. ### Deprecated behaviors -- [Old Physics](/gdevelop5/behaviors/physics) + - [Old Physics](/gdevelop5/behaviors/physics) ## Adding a behavior to an object @@ -56,13 +56,12 @@ To search for and install community-created behaviors: 1. Right click an object in the **Objects** panel. 2. Select **Edit behaviors**. -4. Click the **Add a behavior to the object** icon. -5. Switch to the **Search new behaviors** tab. -6. Search for a behavior. -7. Select a behavior. -8. Click **Install in project**. +3. Click the **Add a behavior to the object** icon. +4. Switch to the **Search new behaviors** tab. +5. Search for a behavior. +6. Select a behavior. +7. Click **Install in project**. Installed behaviors appear in the **Installed behaviors** tab: ![](pasted/20230305-105029.png) - diff --git a/docs/gdevelop5/behaviors/pathfinding/index.md b/docs/gdevelop5/behaviors/pathfinding/index.md index 7089d3fa87..2a2fffdad1 100644 --- a/docs/gdevelop5/behaviors/pathfinding/index.md +++ b/docs/gdevelop5/behaviors/pathfinding/index.md @@ -66,8 +66,6 @@ If you want to change how the object moves during the game, these properties can [![](pathfindinggeneral.png)](https://editor.gdevelop.io/?project=example://pathfinding) - - **Path Finding Basics** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://pathfinding-basics){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/behaviors/physics/index.md b/docs/gdevelop5/behaviors/physics/index.md index 633db584a4..efa437ccdb 100644 --- a/docs/gdevelop5/behaviors/physics/index.md +++ b/docs/gdevelop5/behaviors/physics/index.md @@ -7,18 +7,18 @@ title: Physics behavior This is the documentation of the old Physics behavior. [Read the new documentation here](/gdevelop5/behaviors/physics2)! -**[I would rather see the Physics behavior examples! Please take me there now.](/#Examples) -** +**[I would rather see the Physics behavior examples! Please take me there now.](/#Examples)** The "Physics" behavior allows objects to behave according to the laws of physics. Physics behavior applies real world physics to your game objects. Game objects can move, fall, roll, bounce and collide. - ## Add behavior to object + To add physics behavior to an object, open the object properties by right clicking on the created object in the Objects Editor. Then, select "Edit object" from the popup list that appears. Finally, select the Behaviors tab and click the "add behavior" button. Choose the "Physics engine": ![](physics-behavior-inlist.png) ## Properties + Once the behavior is added to the object, there is a number of options to customize: ![](physics-behavior-options.png) @@ -59,7 +59,6 @@ Consider dropping a ball on a table. A value of zero means the ball won't bounce _inelastic collision._ A value of one means the ball's velocity will be exactly reflected. This is called a _perfectly elastic collision_. - # Examples !!! tip @@ -73,16 +72,12 @@ _perfectly elastic collision_. [![](hingeleverdemo.png)](https://editor.gdevelop.io/?project=example://physics) - - **Car Physics** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://car-physics){ .md-button .md-button--primary } [![](carphysics.png)](https://editor.gdevelop.io/?project=example://car-physics) - - **Object Gravity** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://object-gravity){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/behaviors/physics2/index.md b/docs/gdevelop5/behaviors/physics2/index.md index 3737533f2e..a21873ed7e 100644 --- a/docs/gdevelop5/behaviors/physics2/index.md +++ b/docs/gdevelop5/behaviors/physics2/index.md @@ -17,7 +17,7 @@ The behavior is composed of three big concepts: the world that hold the bodies ( ![](pasted/20230304-145455.png) -##World +## World The world is the place where simulations run, bodies and joints are attached to a world to interact with other entities. This corresponds to the scene in GDevelop. Like GDevelop scenes size, the world size is infinite, so you don't have to care where your objects are. They will always follow the laws of physics once they have the physics behavior added and enabled. @@ -38,7 +38,7 @@ Bodies are the life of the Physics extension; they define how your object will m When you add the Physics behavior to an object, you can set the body configuration right from the IDE. There are many options to play with. They have been categorized below. -. + ### Body Type GDevelop supports three basic body types: @@ -98,7 +98,6 @@ Layers and masks are the way to filter collisions between objects. Physics collision layers are not related to layers that are used to place objects in a scene. - This system allows you to build up complex interactions between a variety of objects. For example: imagine you're building a zombie game, and you want your player to collide with the ground, and want the zombies to collide with the player and with the ground as well, but you don't want zombies to collide with other zombies. In this case, you use collision filters layers and mask. There is just a single rule to remember: *two objects A and B can collide if any layer of A matches any mask of B, **and** any layer of B matches any mask of A*. @@ -132,12 +131,12 @@ After setting up your objects, it's time to start the simulation: gravity will b Remember that GDevelop force related actions are not suited for the Physics behavior. To move an object using the Physics behavior, use the actions specific to the Physics behavior. -* **Forces**: Forces change an object's movement and are meant to be used for some time to generate an appreciable effect. The velocity the object gains, when you apply on it a force depends on the force's magnitude and the object mass. A heavy object will move slower than a lighter one if the same force is applied on both the masses. -* **Torques**: Analogous of forces but for rotation. A torque will generate an angular acceleration on the object, making it rotate faster or slower along the time. -* **Impulses**: Like forces, but not depending on the time step, instead, adding an "amount" of velocity instantly. They're meant to be used a single time. An usage can be to simulate jumps: each time the jump button is pressed, add an impulse upwards. -* **Angular Impulses**: Analogous of impulses but for rotation. Change the rotation speed of an object instantly. -* **Velocity**: You can modify the velocity of an object directly. For example, you can make your character walk with constant speed and then change the velocity while a movement button is pressed. -* **Angular Velocity**: You can set the angular velocity (rotation speed) directly too. + * **Forces**: Forces change an object's movement and are meant to be used for some time to generate an appreciable effect. The velocity the object gains, when you apply on it a force depends on the force's magnitude and the object mass. A heavy object will move slower than a lighter one if the same force is applied on both the masses. + * **Torques**: Analogous of forces but for rotation. A torque will generate an angular acceleration on the object, making it rotate faster or slower along the time. + * **Impulses**: Like forces, but not depending on the time step, instead, adding an "amount" of velocity instantly. They're meant to be used a single time. An usage can be to simulate jumps: each time the jump button is pressed, add an impulse upwards. + * **Angular Impulses**: Analogous of impulses but for rotation. Change the rotation speed of an object instantly. + * **Velocity**: You can modify the velocity of an object directly. For example, you can make your character walk with constant speed and then change the velocity while a movement button is pressed. + * **Angular Velocity**: You can set the angular velocity (rotation speed) directly too. !!! warning @@ -165,10 +164,10 @@ Usually, you will need two objects to define a joint (in the previous example, t Here is a list of properties, conditions, and actions common for all types of joints: -* **Joint first/second object**: Conditions that let you pick objects if they are the first or second object the joint is attached to. -* **Joint first/second anchor X/Y**: Expressions to get the position of the first or second object anchor point the joint is attached at. -* **Joint reaction force/torque**: Conditions and expressions to check the joint reaction force or torque; this value is a measure of how far away is the joint from its equilibrium state. If the joint reaction force is too high, it means the joint has been separated from the equilibrium position through a considerable force. Useful to make breakable joints. -* **Remove joint**: Action to remove the specified joint. If the joint is one of the gear joint children, the gear will be also removed. If any of the objects the joint is attached to is deleted, the joint will be deleted. + * **Joint first/second object**: Conditions that let you pick objects if they are the first or second object the joint is attached to. + * **Joint first/second anchor X/Y**: Expressions to get the position of the first or second object anchor point the joint is attached at. + * **Joint reaction force/torque**: Conditions and expressions to check the joint reaction force or torque; this value is a measure of how far away is the joint from its equilibrium state. If the joint reaction force is too high, it means the joint has been separated from the equilibrium position through a considerable force. Useful to make breakable joints. + * **Remove joint**: Action to remove the specified joint. If the joint is one of the gear joint children, the gear will be also removed. If any of the objects the joint is attached to is deleted, the joint will be deleted. There are many kinds of joints, each one with unique behaviors and properties; they are listed below. @@ -323,8 +322,8 @@ A very specified joint, when you need wheels, you'll want this joint, and it's h You can think of the wheel joint as a revolute plus a prismatic joint: -* The revolute joint is used to make the second object (the wheel) rotate, and, as the classic revolute joint, it supports a motor to simulate the vehicle motor, causing the wheel to rotate. -* The prismatic joint function is to simulate the vehicle wheel suspension, and, as the classic prismatic joint, you can set the axis angle to define the wheel translation direction. Generally, the axis direction is vertical, but, for example, motorbikes have a front-wheel suspension direction different (and in some cases very far) from vertical. + * The revolute joint is used to make the second object (the wheel) rotate, and, as the classic revolute joint, it supports a motor to simulate the vehicle motor, causing the wheel to rotate. + * The prismatic joint function is to simulate the vehicle wheel suspension, and, as the classic prismatic joint, you can set the axis angle to define the wheel translation direction. Generally, the axis direction is vertical, but, for example, motorbikes have a front-wheel suspension direction different (and in some cases very far) from vertical. !!! warning diff --git a/docs/gdevelop5/behaviors/platformer/index.md b/docs/gdevelop5/behaviors/platformer/index.md index 1526946e63..004bb6ef47 100644 --- a/docs/gdevelop5/behaviors/platformer/index.md +++ b/docs/gdevelop5/behaviors/platformer/index.md @@ -19,11 +19,12 @@ After selecting the "Platform" option, you will see the Platform behavior option By clicking on the platform behavior, you can choose from 3 different platform types. -* **Platform:** this is the default option. The default behavior sets the object as a traditional platform. The character can collide with the platform and/or walk on it. -* **Jumpthru platform:** by choosing this option, the character can collide with the platform and walk on it, but the character can also jump thru the platform from below. -* **Ladder:** as its name suggests, this option turns our object into a ladder. The character object cannot collide with the ladder object. It can not walk on the ladder object, but, when the character object overlaps the ladder object, the character is able to climb up and get down using the ladder object. + * **Platform:** this is the default option. The default behavior sets the object as a traditional platform. The character can collide with the platform and/or walk on it. + * **Jumpthru platform:** by choosing this option, the character can collide with the platform and walk on it, but the character can also jump thru the platform from below. + * **Ladder:** as its name suggests, this option turns our object into a ladder. The character object cannot collide with the ladder object. It can not walk on the ladder object, but, when the character object overlaps the ladder object, the character is able to climb up and get down using the ladder object. ### Grab the ledge + The ledge of our platform can be grabbed by default. "Grab the ledge" means that when the character object jumps close enough to the edge of the platform, the ledge can be grabbed. If you don't need this functionality, make sure this option is unticked/unchecked. If you do need it, make sure the box is ticked/checked. ![](ledges-canbe-grabbed-option.png) @@ -38,7 +39,6 @@ The offset option allows us to change the position of the grab to fit the animat The platform behavior can be added to tilemap collision mask objects. Learn more about it on the [tilemap](/gdevelop5/objects/tilemap#handle_collisions) page. - ## Use the Platformer character behavior for your player, enemies or moving objects By selecting the "Platformer character" behavior, you can turn an object into a "Platformer character". @@ -89,9 +89,9 @@ By changing this value, we can set the maximum angle of a slope that the player The walking speed of a character is configured with: -- an acceleration -- a deceleration -- a maximum speed + - an acceleration + - a deceleration + - a maximum speed Choosing a low acceleration and deceleration will make the character slide. @@ -101,10 +101,10 @@ Choosing a low acceleration and deceleration will make the character slide. How high a character jumps depends on: -- **Jump speed** is the speed at the beginning of the jump. -- **Jump sustain time** is how long the jump speed can be kept to the initial value while players hold the jump key. -- **Gravity** is how fast the speed change to go down. -- **Max. falling speed** to avoid characters going faster and faster because of gravity. + - **Jump speed** is the speed at the beginning of the jump. + - **Jump sustain time** is how long the jump speed can be kept to the initial value while players hold the jump key. + - **Gravity** is how fast the speed change to go down. + - **Max. falling speed** to avoid characters going faster and faster because of gravity. All theses values can also be changed at any time during the game using [events](/gdevelop5/events). @@ -120,14 +120,14 @@ It's not easy to know how these values change the jump trajectory. The best is t [![](platformer-jump-evaluator.png)](https://editor.gdevelop.io/?project=example://platformer-jump-evaluator) -#### Make characters wall jump +#### Make characters wall jump The [advanced platformer movements](/gdevelop5/extensions/advanced-jump/reference) extension contains behaviors for: -* Wall jump -* Double jump -* Coyote time (also known as ledge tolerance) -* Dashes + * Wall jump + * Double jump + * Coyote time (also known as ledge tolerance) + * Dashes ## Examples @@ -142,9 +142,6 @@ The [advanced platformer movements](/gdevelop5/extensions/advanced-jump/referenc [![](platformer-example.png)](https://editor.gdevelop.io/?project=example://platformer) - - - **Parallax Scrolling Behavior** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://parallax-scrolling){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/behaviors/topdown/index.md b/docs/gdevelop5/behaviors/topdown/index.md index 547a83ffb1..429008491e 100644 --- a/docs/gdevelop5/behaviors/topdown/index.md +++ b/docs/gdevelop5/behaviors/topdown/index.md @@ -8,8 +8,7 @@ title: Top-Down Movement behavior **See it in action!** 🎮 [I would rather see the Top Down Movement behavior examples! Please take me there now.](/#Examples) - -#### Add "Top-Down Movement" behavior +#### Add "Top-Down Movement" behavior The "Top-Down Movement" [behavior](/gdevelop5/behaviors) allows the additional functionality of moving an [object](/gdevelop5/objects) in either 4 or 8 directions. @@ -19,13 +18,13 @@ After selecting the behavior, we should immediately see the available options: ![](topdown-movement-options.png) -#### Change the speed of movement and rotation +#### Change the speed of movement and rotation By changing the value of Acceleration, Deceleration and Max speed, we can change how fast our object is going to move. By changing the value of Rotation speed, we can change how fast our object is going to rotate or if it going to rotate at all. I'll explain more about rotation, below. -#### Change angle offset +#### Change angle offset By default, the facing angle of our sprite is 0 which is the right side of our sprite, but we can change the way that our object is facing by changing the value of Angle offset. Here is an image to help you understand the coordinates in GDevelop: @@ -34,15 +33,16 @@ By default, the facing angle of our sprite is 0 which is the right side of our s !!! note Note that some expressions like `AngleBetweenPositions` can gives you a result between -180 and 180. This is equivalent to this schema. An angle of -45 degrees is equivalent to an angle of 270 degrees. -#### Allows diagonals + +#### Allows diagonals ![](allow-diagonals-box.png) This option is enabled by default. We allow our object to move diagonally in 8 directions. By disabling this option, we don't allow diagonal movement. When disabled, we can move only in 4 directions: left, right, up and down. Diagonal movement is no longer allowed. -#### Controls +#### Controls -#### Move characters with keyboards +#### Move characters with keyboards ![](top-down-movement-default-controls-box.png) @@ -50,15 +50,15 @@ The "top-down movement" behavior comes with default keys set to control the char ![](top-down-movement-events.png) -#### Move characters with gamepads +#### Move characters with gamepads The "top-down gamepad mapper" behavior from the [gamepad extension](/gdevelop5/all-features/gamepad) can be added to character to make them move according to players inputs automatically. -#### Move characters with multi-touch controls +#### Move characters with multi-touch controls The "top-down multitouch controller mapper" behavior from the [multi-touch joystick extension](/gdevelop5/objects/multitouch-joystick) can be added to characters to make them move according to players touches automatically. -#### Rotate object +#### Rotate object ![](top-down-movement-rotateobject-box.png) @@ -66,8 +66,6 @@ By default, our object will rotate toward the direction of movement. The object All theses values can also be changed at any time during the game using [events](/gdevelop5/events). - - # Examples !!! tip @@ -81,8 +79,6 @@ All theses values can also be changed at any time during the game using [events] [![](spaceshooter.png)](https://editor.gdevelop.io/?project=example://space-shooter) - - **Isometric Game** (creates an illusion of 3D graphics within a 2D graphics game) [Open example in GDevelop](https://editor.gdevelop.io/?project=example://isometric-game){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/behaviors/tween/index.md b/docs/gdevelop5/behaviors/tween/index.md index c3983521e5..89b30c6a36 100644 --- a/docs/gdevelop5/behaviors/tween/index.md +++ b/docs/gdevelop5/behaviors/tween/index.md @@ -21,25 +21,25 @@ Tweens can be played in a sequence if you want to create more complex animations **Tween exists** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use This condition checks if the given tween has been defined and returns true if it already exists. **Tween has finished playing** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use This condition checks if the given tween has reached its end position and thus finished playing. Be aware that this condition will not work if you enable the "Destroy this object when tween finishes" setting on the tween action. **Tween is playing** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use This condition checks if the given tween has been started and is currently playing. @@ -47,170 +47,170 @@ This condition checks if the given tween has been started and is currently playi **Add object angle tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to angle**: The target angle that the object should reach -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to angle**: The target angle that the object should reach + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts an angle tween and rotates the object from its current angle to the target angle. **Add object color tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to color**: The target color to apply to the object's tint as a text (string) with values separated by semicolons. "255;255;255" means the original color of the sprite (no tint at all) -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to color**: The target color to apply to the object's tint as a text (string) with values separated by semicolons. "255;255;255" means the original color of the sprite (no tint at all) + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a color tween and interpolates the object tint from its current color to the target color. **Add object opacity tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to opacity**: The target opacity to apply to the objects as a number between 0 (invisible) and 255 (completely visible) -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to opacity**: The target opacity to apply to the objects as a number between 0 (invisible) and 255 (completely visible) + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts an opacity tween and interpolates the object's opacity from its current value to the target opacity. **Add object position tween** -- **object**: The object the animation should be played applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to X**: The target position on the X-axis that the object should reach -- **to Y**: The target position on the Y-axis that the object should reach -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be played applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to X**: The target position on the X-axis that the object should reach + - **to Y**: The target position on the Y-axis that the object should reach + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a position tween and moves the object from its current position to the target position. **Add object position X tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to X**: The target position on the X-axis that the object should reach -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to X**: The target position on the X-axis that the object should reach + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a tween for the object's X position and moves the object from its current X position to the target X position. **Add object position Y tween** -- **object**: The object the animation should be played applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to Y**: The target position on the Y-axis, that the object should reach -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be played applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to Y**: The target position on the Y-axis, that the object should reach + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a tween for the object's Y position and moves the object from its current Y position to the target Y position. **Add object scale tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to scale X**: The target scale on the X-axis that the object should reach. One is the original scale, two means double scale, and 0.5 is half scale. -- **to scale Y**: The target scale on the Y-axis, that the object should reach. One is the original scale, two means double scale, and 0.5 is half scale. -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to scale X**: The target scale on the X-axis that the object should reach. One is the original scale, two means double scale, and 0.5 is half scale. + - **to scale Y**: The target scale on the Y-axis, that the object should reach. One is the original scale, two means double scale, and 0.5 is half scale. + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a scale tween and scales the object from its current scale to the target scale. **Add object scale X tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to scale X**: The target scale on the X-axis, that the object should reach. 1 is the original scale, 2 means double scale and 0.5 is half scale. -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to scale X**: The target scale on the X-axis, that the object should reach. 1 is the original scale, 2 means double scale and 0.5 is half scale. + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a tween for the object's X scale and scales the object from its current X scale to the target X scale. **Add object scale Y tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to scale Y**: The target scale on the Y-axis, that the object should reach. One is the original scale, two means double scale, and 0.5 is half scale. -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to scale Y**: The target scale on the Y-axis, that the object should reach. One is the original scale, two means double scale, and 0.5 is half scale. + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a tween for the object's Y scale and scales the object from its current Y scale to the target Y scale. **Add object variable tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **object variable**: The variable holding the numeric value to be tweened -- **from value**: The start value (can be any numerical value) -- **to value**: The end value (can be any numerical value) -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object variable**: The variable holding the numeric value to be tweened + - **from value**: The start value (can be any numerical value) + - **to value**: The end value (can be any numerical value) + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a tween for an object's variable and interpolates the value from start to end. **Add text size tween** -- **object**: The text object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **to character size**: The target character size of the text object. -- **easing**: A predefined mathematical function to be used to calculate the value between start and end. -- **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end -- **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. + - **object**: The text object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **to character size**: The target character size of the text object. + - **easing**: A predefined mathematical function to be used to calculate the value between start and end. + - **duration**: The time in milliseconds (ms) in which the tween animation will be played from start to end + - **destroy this object when tween finishes**: The object can be destroyed automatically when the tween reaches its end value. This action starts a tween for the text object's character size and resizes it from its current character size to the target size. \Warning: this tween causes the text to be recalculated each frame and can cause lag if used on lots of objects simultaneously. **Pause a tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use This action pauses the given tween at its current value. The tween can later be resumed via the corresponding action. **Remove a tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use This action removes the given tween from the object. Use this action when you want to chain tween animations to remove the old tween before starting the next one.\Warning: This instruction is crucial. If the condition "has finished playing" doesn't seem to trigger your chains, make sure to remove the previous tween before starting the new one. **Resume a tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use This action resumes a previously paused tween. **Stop a tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use -- **jump to end**: Check "Yes" to immediately set the current value equals the end value or "No" to stop the tween in place + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **jump to end**: Check "Yes" to immediately set the current value equals the end value or "No" to stop the tween in place This action stops the given tween. Depending on the chosen value in "jump to end", the property will be set to the end value in case of "Yes" or stay at its current value if "No" was chosen. @@ -218,9 +218,9 @@ This action stops the given tween. Depending on the chosen value in "jump to end **Progress of a tween** -- **object**: The object the animation should be applied to -- **behavior**: The tween behavior that is applied to the object -- **identifier**: A text (string) that is used to identify a tween animation on an object for later use + - **object**: The object the animation should be applied to + - **behavior**: The tween behavior that is applied to the object + - **identifier**: A text (string) that is used to identify a tween animation on an object for later use This expression returns the tween's current progress between the start value (0) and end value (1). If the tween's duration were, for example, 1000ms, it would return a progress of 0.5 after 500ms. Use this expression to chain tweens from multiple objects after a certain time has passed. @@ -238,15 +238,12 @@ This expression returns the tween's current progress between the start value (0) [![](tweentest.png)](https://editor.gdevelop.io/?project=example://tween-test) - - **Tween Animations** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://tween-animations){ .md-button .md-button--primary } [![](tweenanimations.png)](https://editor.gdevelop.io/?project=example://tween-animations) - **Pairs** [Open example in GDevelop](https://editor.gdevelop.io/?project=example://pairs){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/community/contribute-to-the-assets-store.md b/docs/gdevelop5/community/contribute-to-the-assets-store.md index 3b1484508f..297b9a6a49 100644 --- a/docs/gdevelop5/community/contribute-to-the-assets-store.md +++ b/docs/gdevelop5/community/contribute-to-the-assets-store.md @@ -8,7 +8,6 @@ Assets have to be submitted into category and sub-category folders. Images, audi GDevelop creators can add assets to the project without having to worry about editing. This means that submitted art, has to follow a number of technical constraints: - ## For images (animated sprites, tiled sprites or GUI): In a nutshell: these are the basic rules to submit video game asset images. Make sure that your files respect the following guidelines: @@ -22,7 +21,6 @@ In a nutshell: these are the basic rules to submit video game asset images. Make Sprite sheets **are not supported**! Each animation frame must **be a separate image**. GDevelop does not support image the origin point for different animations yet. - GDevelop's most common sizes for animation assets are: * Mobile: 720x1280 @@ -32,10 +30,11 @@ GDevelop's most common sizes for animation assets are: If you're looking for "an easy way" to prepare your assets for the Asset Store, [Entropy](https://gd.games/Entropy) has created a solution to upload, name, and [license](https://wiki.gdevelop.io/gdevelop5/community/sell-asset-pack-store/) your Assets. Go to [this GitHub page](https://github.com/Entr0py404/GDev-Asset-Store-Tool/releases/tag/v1.4) to download the Windows app, and [watch his Twitch](https://www.twitch.tv/videos/1641376379?t=00h02m50s) to see how to use the tool. ### Naming assets + For unanimated sprites, a single image with the name of the object is enough. On the contrary, animated sprites require multiple animated frames, which have to be named properly. While writing your file names, it is important that you follow a specific naming structure: -``` +```text BaseName_AnimationState_frame#.png ``` @@ -43,42 +42,40 @@ For a character called "Red Hero", with 4 frames of a Running animation ![](/gdevelop5/community/anim1.png) -``` +```text RedHero_Run_1.png RedHero_Run_2.png RedHero_Run_3.png RedHero_Run_4.png ``` - If the same character is caring a prop, the naming should appear on the Animation State. Not on the Character name. ![](/gdevelop5/community/anim2.png) -``` + +```text RedHero_RunJewel_1.png RedHero_RunJewel_2.png RedHero_RunJewel_3.png RedHero_RunJewel_4.png ``` - - !!! note **A note on animation states:** If the **animated** object only has one animation state, there is no need to specify if the animation is "Walk, Idle, Climb, Death..." on the name. An animation index will do: `Jewel_1.png`, `Jewel_2.png`, `Jewel_3.png`. + - If you want to create a **[Tiled sprite](/gdevelop5/objects/tiled_sprite)** (for backgrounds or repeating patterns): + - Prefix the *base name* by `tiled_`. For example: `tiled_Grass Background.png` -- If you want to create a **[Tiled sprite](/gdevelop5/objects/tiled_sprite)** (for backgrounds or repeating patterns): - - Prefix the *base name* by `tiled_`. For example: `tiled_Grass Background.png` - -- If you want to add a **[9-Patch (Panel Sprite)](/gdevelop5/objects/panel_sprite)** object that can be stretched with the center and the border repeated: - - In an image software slice your image in 9 different images, and name them: `9patch_BaseName_gravity.png` with gravity being: `southwest`, `southeast`, `south`, `northwest`, `northeast`, `north`, `west` and `east`. + - If you want to add a **[9-Patch (Panel Sprite)](/gdevelop5/objects/panel_sprite)** object that can be stretched with the center and the border repeated: + - In an image software slice your image in 9 different images, and name them: `9patch_BaseName_gravity.png` with gravity being: `southwest`, `southeast`, `south`, `northwest`, `northeast`, `north`, `west` and `east`. All these files will be used by our server to generate a unique texture used in the 9-Patch object. For example: -``` + +```text 9patch_Grass_center.png 9patch_Grass_east.png 9patch_Grass_north.png @@ -94,11 +91,11 @@ For example: To specify FPS and looping for an animation, you'll need to add a METADATA file to your folder by creating a .json file (a text file) and pasting this structure: -``` - { - "timeBetweenFrames": 0.2, - "loop": false - } +```json +{ + "timeBetweenFrames": 0.2, + "loop": false +} ``` If you are not sure about the number that "time between frames" will represent,[this article](http://www.stopmotionworks.com/stopwatch.htm) explains it: @@ -108,11 +105,11 @@ If you are not sure about the number that "time between frames" will represent,[ Save the .json file as the **METADATA** of your object with the following structure: `BaseName_METADATA.json` -- If you have **multiple animation status** and **each must have a different speed**, create a .json file **per animation state**, using this name: `BaseName_AnimationState_METADATA.json`. + - If you have **multiple animation status** and **each must have a different speed**, create a .json file **per animation state**, using this name: `BaseName_AnimationState_METADATA.json`. For example: -``` +```text Spaceship_Idle_METADATA.json Spaceship_Flying_METADATA.json Spaceship_Destroyed_METADATA.json @@ -123,7 +120,6 @@ Your file should look something like this: ![](https://user-images.githubusercontent.com/1280130/103412855-78836300-4b77-11eb-99ec-ac8287372ece.png) - ## Adding tags to your assets Tags allow creators to search your assets. These tags can be things like "side view", "pixel art" and so on. @@ -134,11 +130,10 @@ Start the file by one of these tags (depending on the type of pack): `top-down`, For example: -``` +```text side view, pirate, ship, sea ``` - !!! tip Folder names will be read as tags. Make sure to use plain English for each folder. @@ -166,13 +161,12 @@ Put your .aac or .wav files (prefer .aac) directly in a folder, with the name to A great tool to convert audio files to AAC format is [fre:ac](https://www.freac.org/). fre:ac is free, open-source, and cross-platform. It can process batches of files, with many options on how they are named and put into folders. -- Choose the encoder called "Fraunhofer FDK AAC Encoder". -- Select "File format > AAC" -- Select "Quality > Set Quality > 3" + - Choose the encoder called "Fraunhofer FDK AAC Encoder". + - Select "File format > AAC" + - Select "Quality > Set Quality > 3" This will create high-quality audio files, but using a variable bit rate that won't exceed 96 kbps (assuming stereo input). - ![Screenshot 2021-03-11 112608](https://user-images.githubusercontent.com/8879811/110835883-9bf41980-825c-11eb-93c8-ef795b0379a2.jpg) ![Screenshot 2021-03-11 112527](https://user-images.githubusercontent.com/8879811/110835884-9c8cb000-825c-11eb-9b8d-f22228a71329.jpg) @@ -197,7 +191,7 @@ Like images and audio, put your fonts in folders. `.ttf` and `.otf` files are su Create a file with extension `.asset.json`, for example: `My Particle Effect.asset.json`. The format of this asset is: -``` +```json { "id": "", "name": "", @@ -235,8 +229,8 @@ Put all images with the name that you put in the `resources` array next to your Finally, add: -- a file with the same name but with the extension `.preview.png` that will be shown in the assets store -- an empty filed called `IGNORED_FOR_IMAGE_ASSETS.md` so that the importer will ignore the images and won't try to create objects automatically :) + - a file with the same name but with the extension `.preview.png` that will be shown in the assets store + - an empty filed called `IGNORED_FOR_IMAGE_ASSETS.md` so that the importer will ignore the images and won't try to create objects automatically :) For example: diff --git a/docs/gdevelop5/community/contribute-to-the-wiki.md b/docs/gdevelop5/community/contribute-to-the-wiki.md index b8f887ac7f..a3f0dc7546 100644 --- a/docs/gdevelop5/community/contribute-to-the-wiki.md +++ b/docs/gdevelop5/community/contribute-to-the-wiki.md @@ -49,9 +49,9 @@ Instead, write this: There are three types of documentation: -- **Concept** - Explains what something is. -- **Task** - Explains how to do something. -- **Reference** - Provides a list of facts without (much) explanation. + - **Concept** - Explains what something is. + - **Task** - Explains how to do something. + - **Reference** - Provides a list of facts without (much) explanation. Generally speaking, it's best not to blend different types of documentation on a single page. You shouldn't, for instance, provide a detailed explanation of [what expressions are](/gdevelop5/all-features/expressions) (concept) on the same page that you provide [a list of all the expressions](/gdevelop5/all-features/expressions-reference) (reference). diff --git a/docs/gdevelop5/community/events.md b/docs/gdevelop5/community/events.md index b34e972224..f12d124b71 100644 --- a/docs/gdevelop5/community/events.md +++ b/docs/gdevelop5/community/events.md @@ -5,20 +5,20 @@ title: GDevelop events (game jams, conferences...) ## Conferences -* **Beyond Web-Apps: React, Javascript and WebAssembly to Port Legacy Native Apps**. Talk about GDevelop 5 at: - * [JS Conf US](https://2019.jsconf.us/speakers/florian-rival) 2019 [Video](https://www.youtube.com/watch?v=lttAKhlKuyM) - * [React Boston](http://www.reactboston.com/) 2018. - * [React Conf](https://conf.reactjs.org/event.html?FlorianRival) 2018 [Video](https://www.youtube.com/watch?v=6La7jSCnYyk6) - * [React Next](https://react-next.com/) 2018. - -* **Native Web-Apps**. Talk about technologies used in GDevelop 5: - * [CodeFest 2019 (Novosibirsk)](https://www.youtube.com/watch?v=5YzncpxA2og) - * Typeof Conf 2019 (Porto) - * React Amsterdam 2019 - * [Intersection Conference 2019](https://intersection-conference.eu/schedule) - * **[Reactive Conf 2019 (Video)](https://www.youtube.com/watch?v=sMfNWIbWUb0)** - -* **Are you making a conference about GDevelop?** You're welcome to do so. Please add it here! + * **Beyond Web-Apps: React, Javascript and WebAssembly to Port Legacy Native Apps**. Talk about GDevelop 5 at: + * [JS Conf US](https://2019.jsconf.us/speakers/florian-rival) 2019 [Video](https://www.youtube.com/watch?v=lttAKhlKuyM) + * [React Boston](http://www.reactboston.com/) 2018. + * [React Conf](https://conf.reactjs.org/event.html?FlorianRival) 2018 [Video](https://www.youtube.com/watch?v=6La7jSCnYyk6) + * [React Next](https://react-next.com/) 2018. + + * **Native Web-Apps**. Talk about technologies used in GDevelop 5: + * [CodeFest 2019 (Novosibirsk)](https://www.youtube.com/watch?v=5YzncpxA2og) + * Typeof Conf 2019 (Porto) + * React Amsterdam 2019 + * [Intersection Conference 2019](https://intersection-conference.eu/schedule) + * **[Reactive Conf 2019 (Video)](https://www.youtube.com/watch?v=sMfNWIbWUb0)** + + * **Are you making a conference about GDevelop?** You're welcome to do so. Please add it here! ## Game jams diff --git a/docs/gdevelop5/community/faq.md b/docs/gdevelop5/community/faq.md index 62136652da..110873a8f9 100644 --- a/docs/gdevelop5/community/faq.md +++ b/docs/gdevelop5/community/faq.md @@ -33,6 +33,7 @@ GD 4.0.97, 3 Apr 2018 The GDevelop discord is open since December 14, 2016 ## Why is GDevelop can not export directly to mobile and desktop and why use an online build service instead? + Building games as stand-alone executables for Windows, macOS, Linux or for a mobile platform like Android need large, heavyweight SDKs to be downloaded and properly installed (for example, the Android SDK). Things can break easily in case of misconfiguration. Instead, GDevelop can do all the packaging automatically - without having to install, configure or do anything - using the one click exports (that are powered by an online build service). @@ -40,6 +41,7 @@ Instead, GDevelop can do all the packaging automatically - without having to ins Note that it’s perfectly possible to export and do manual compilation using technologies like Electron or Cordova - but this requires to install these development tools and others. ## Is GDevelop trying to copy and be a free alternative to Construct (they look and feel very similar)? + No, GDevelop was started roughly at the same time as Construct 1. The ideas behind both softwares are similar - because Construct team and GDevelop authors naturally found similar concepts to work. In particular, behaviors and events have been “discovered” by both teams separately as a superior alternative to any other kind of visual programming. Such concepts can then have been integrated into other game engines, or the other way, GDevelop or Construct can have been inspired by each other or by other game engines. @@ -54,14 +56,14 @@ It's open source, meaning you can check all the code online. GDevelop is a 2D-centric engine, we strive to provide a fast and easy to use engine for everyone. There are many things left to do in 2D, exploring the totally different world of 3D is not yet planned. -If you're looking for a 3D game engine here's a list: https://en.wikipedia.org/wiki/List_of_game_engines +If you're looking for a 3D game engine here's a list: ## I saw an update being announced, but GDevelop isn't auto-updating. When an update is published, we do not directly mark it as latest for the auto-updater, as we don't want to make everyone update in case the new version has an important issue. Note that it sometimes happen that the auto-updater breaks, you'll need to manually download the next version in that case. To download a new version that just got published, download it on GDevelop's GitHub releases page: -https://github.com/4ian/GDevelop/releases/ + ## The text objects are blurry when scaled, how can I fix that? @@ -71,6 +73,7 @@ Sadly, that is a known issue with the renderer and its way of scaling. Fortunate No, as the GDevelop team doesn't have the time/devices to test efficiently releases on raspberry pi, and it is too much trouble to support a full other platform more than the 3 main ones. Don't worry though, you should be able to build it yourself with those commands: + ```sh sudo apt-get update sudo apt-get install npm git @@ -85,32 +88,32 @@ npm run build -- -l AppImage --arm64 ## Where can I find the latest nightly build? You can find it here: -https://gdevelop-releases.s3.amazonaws.com/master/latest/GDevelop%205%20Setup%205.0.0-beta103.exe + You may need to replace the "beta103" with the latest released version of GDevelop. -For more details, see this document: https://github.com/4ian/GDevelop/blob/master/newIDE/docs/Nightly-Builds-and-continuous-deployment.md +For more details, see this document: ## How can I make multiplayer? You can do networking in GDevelop using the P2P, MQTT or Firebase extension. Using those, you can communicate data over the internet from one game instance to the other. By sending data like player position and the general state of the game, you can make multiplayer. -P2P docs: http://wiki.compilgames.net/doku.php/gdevelop5/all-features/p2p -MQTT docs: http://wiki.compilgames.net/doku.php/gdevelop5/extensions#mqtt_client_advanced -Firebase docs: http://wiki.compilgames.net/doku.php/gdevelop5/all-features/firebase -P2P example: https://editor.gdevelop.io/?project=example://p2p-networking -Firebase example: https://editor.gdevelop.io/?project=example://firebase-example - +P2P docs: +MQTT docs: +Firebase docs: +P2P example: +Firebase example: ## How can I contribute to GDevelop? Any kind of work that spreads the word about GDevelop or improves the user experience is a contribution. Some examples of valuable contributions: -- Help edit the documentation wiki -- Answer questions on the forum/discord -- Build example games -- Create tutorials and other GDevelop content -- Build extensions -- Test and search for bugs in new features in nightly builds -- Provide good bug reports -- Talk about GDevelop to big group of people/schools -- Help translate the project on Crowdin -- Create a good game and leave the "Made with GDevelop splash screen" -- And of course writing code for the engine itself \ No newline at end of file + + - Help edit the documentation wiki + - Answer questions on the forum/discord + - Build example games + - Create tutorials and other GDevelop content + - Build extensions + - Test and search for bugs in new features in nightly builds + - Provide good bug reports + - Talk about GDevelop to big group of people/schools + - Help translate the project on Crowdin + - Create a good game and leave the "Made with GDevelop splash screen" + - And of course writing code for the engine itself \ No newline at end of file diff --git a/docs/gdevelop5/community/guide-for-submitting-an-example.md b/docs/gdevelop5/community/guide-for-submitting-an-example.md index 086381ab18..fbdd09e25d 100644 --- a/docs/gdevelop5/community/guide-for-submitting-an-example.md +++ b/docs/gdevelop5/community/guide-for-submitting-an-example.md @@ -31,97 +31,94 @@ You will have to make sure the example can be MIT licensed and make sure the res #### Naming conventions -- Names should describe its use well and clearly. Example: a variable for storing player's health can be named `PlayerHealth`. The object name can be `Player`, but avoid crytic/shorthand names like `PyrObj`. + - Names should describe its use well and clearly. Example: a variable for storing player's health can be named `PlayerHealth`. The object name can be `Player`, but avoid crytic/shorthand names like `PyrObj`. -- Names should not have spaces in them. Example: use `PlayerName` instead of `Player Name`. + - Names should not have spaces in them. Example: use `PlayerName` instead of `Player Name`. - - -- `PascalCase` is recommended, but using other styles is fine. + - `PascalCase` is recommended, but using other styles is fine. #### Variables -- Variables should be initialized in the variable editor. It is ok to leave them uninitialized for some situations, but it's generally recommended. + - Variables should be initialized in the variable editor. It is ok to leave them uninitialized for some situations, but it's generally recommended. -- Unused variables should be deleted + - Unused variables should be deleted #### Extensions -- If custom extensions are used, add proper comments, description to the events see [Extension best practices](/gdevelop5/extensions/best-practices) for more info + - If custom extensions are used, add proper comments, description to the events see [Extension best practices](/gdevelop5/extensions/best-practices) for more info #### Structuring events -- Related events should be added into a group with proper naming. + - Related events should be added into a group with proper naming. - - Color code your groups to allow differentiating them quickly. + - Color code your groups to allow differentiating them quickly. -- If the same events are used in multiple places, you can use external events or a function in an extension. + - If the same events are used in multiple places, you can use external events or a function in an extension. -- Remove empty events. + - Remove empty events. -- Remove disabled events or events that were used for testing. + - Remove disabled events or events that were used for testing. -- Unfold any events so that they are easily visible, except groups events, which should be folded to allow getting a quick overview of all systems in the example. + - Unfold any events so that they are easily visible, except groups events, which should be folded to allow getting a quick overview of all systems in the example. #### Documenting events -- Use comments to document events. + - Use comments to document events. -- You can change the color of the comments according to its use (for example, green for a tip, orange for a warning). Otherwise, just keep the default color. + - You can change the color of the comments according to its use (for example, green for a tip, orange for a warning). Otherwise, just keep the default color. -- If the example needs a wiki page, create one in this wiki and when it's done, add a link to it in the example. + - If the example needs a wiki page, create one in this wiki and when it's done, add a link to it in the example. #### Resources -- Remove unused resources from both the [resource manager](/gdevelop5/interface/project-manager/resources) and then from the project folder + - Remove unused resources from both the [resource manager](/gdevelop5/interface/project-manager/resources) and then from the project folder -- It is recommended to add all the resources in a folder called `assets`, and add sub-folders according to the use of the assets (GUI, Player, Power-ups) if needed. + - It is recommended to add all the resources in a folder called `assets`, and add sub-folders according to the use of the assets (GUI, Player, Power-ups) if needed. -- The images should not be too large (2000x2000 is a maximum). + - The images should not be too large (2000x2000 is a maximum). -- You will have to confirm that this example and all of its resources can be integrated to the GitHub repository (where all the example are stored), distributed and MIT licensed. + - You will have to confirm that this example and all of its resources can be integrated to the GitHub repository (where all the example are stored), distributed and MIT licensed. #### Keep everything clean -- Remove any unnecessary scenes, external events, external layouts -- Remove unused variables -- Remove unused resources, images, sounds, fonts, from the project folder -- Remove any unnecessary events from the event sheet + - Remove any unnecessary scenes, external events, external layouts + - Remove unused variables + - Remove unused resources, images, sounds, fonts, from the project folder + - Remove any unnecessary events from the event sheet #### Projects folder -- the `.json` file and the project folder's name should be renamed to the example's name, with `-` instead of spaces. For example: an example with `Not a vania` as name should have `not-a-vania` as its folder name and its `.json` filename. + - the `.json` file and the project folder's name should be renamed to the example's name, with `-` instead of spaces. For example: an example with `Not a vania` as name should have `not-a-vania` as its folder name and its `.json` filename. -- The project should not be using multiple files for saving (using a single JSON file). + - The project should not be using multiple files for saving (using a single JSON file). -- The project should have a `README.md` file with a text describing the example (see *Submitting examples* section for more information). + - The project should have a `README.md` file with a text describing the example (see *Submitting examples* section for more information). #### Project Properties + - The project properties should be properly filled out. -- The project properties should be properly filled out. - -- *Project Name* The project name should be the example name. + - *Project Name* The project name should be the example name. -- *Package Name* The package name should follow `com.example.`. In PascalCase, e.g: `com.example.RotateSprite` + - *Package Name* The package name should follow `com.example.`. In PascalCase, e.g: `com.example.RotateSprite` -- *Version* The version that is added to the library (after review) should be `1.0.0`, and incremented as changes are added after it's added. + - *Version* The version that is added to the library (after review) should be `1.0.0`, and incremented as changes are added after it's added. -- *Author* is your username. An account will have to be registered and a proper username will be needed to be able to add the username. Type the username and pick the username from the drop-down menu + - *Author* is your username. An account will have to be registered and a proper username will be needed to be able to add the username. Type the username and pick the username from the drop-down menu ##### Game Resolution - - Game resolution shouldn't exceed **1920x1080** so that the example can run on all devices without any performance issues . - - If the example uses pixel art with small assets, "nearest neighbor" rendering is recommended. + - Game resolution shouldn't exceed **1920x1080** so that the example can run on all devices without any performance issues . + - If the example uses pixel art with small assets, "nearest neighbor" rendering is recommended. ## Thumbnail and example description -- You can include a `thumbnail.png` which is the icon for the example and will be shown in the examples library + - You can include a `thumbnail.png` which is the icon for the example and will be shown in the examples library -- The project folder should include a `README.md` file that has a description of the example. + - The project folder should include a `README.md` file that has a description of the example. You can create a `.md` file by opening any text editor (like Notepad on Windows), writing the description and saving the files with the name `README.md`. -- Both the thumbnail and the Readme.md file should be in the main folder and not in any sub-folders. + - Both the thumbnail and the Readme.md file should be in the main folder and not in any sub-folders. ## Submitting the example @@ -144,15 +141,15 @@ You can submit the example to the [Example repository](https://github.com/GDevel - Under `## Describe the example` in the textbox, add a proper description about the example, feel free to add any screenshots. - You will also be given a checklist of what is necessary. If you have done them, add `x` in the in brackets against each checklist. - ``` - - [ ] My Game has a proper name in the game properties. - - [ ] My Game package name begins with 'com.examples'. - - [ ] My Game has all events unfolded. - - [ ] I've added myself as the author in the game properties. - - [ ] I've included a file called 'README.md' with a description in proper English, explaining what this example is doing. - - [ ] I confirm that this game and all its resources can be integrated to this Github repository, distributed and MIT licensed. - - [ ] I've cleaned unused resources in the project. - ``` +```md +- [ ] My Game has a proper name in the game properties. +- [ ] My Game package name begins with 'com.examples'. +- [ ] My Game has all events unfolded. +- [ ] I've added myself as the author in the game properties. +- [ ] I've included a file called 'README.md' with a description in proper English, explaining what this example is doing. +- [ ] I confirm that this game and all its resources can be integrated to this Github repository, distributed and MIT licensed. +- [ ] I've cleaned unused resources in the project. +``` - Under `## Game folder`, add a zip of your project and drag and drop it into the text box. - Now click `Submit Issue`. diff --git a/docs/gdevelop5/community/guide-to-reporting-a-bug.md b/docs/gdevelop5/community/guide-to-reporting-a-bug.md index 7ccd80d09b..877afd5326 100644 --- a/docs/gdevelop5/community/guide-to-reporting-a-bug.md +++ b/docs/gdevelop5/community/guide-to-reporting-a-bug.md @@ -33,27 +33,24 @@ Here are some things that you will most likely need in a report. Do remember tha First see if you are using the web version or the desktop version (you will have to add that info to the report). -* if you are using the desktop version: - * On the top toolbar, go to Help→About GDevelop + * if you are using the desktop version: + * On the top toolbar, go to Help→About GDevelop A window will open showing the version. It should go something like GDevelop-beta110. #### Some screenshots of the bug - This might not be applicable to all the bugs or crashes, but it would help a lot in identifying the problem and fixing it. -* If you are using a _Windows_ OS, you can use the snipping tool that comes with it or press **Alt+PrtScn** (It will take a + * If you are using a _Windows_ OS, you can use the snipping tool that comes with it or press **Alt+PrtScn** (It will take a screenshot of the active window). -* If you are using a _MacOS_, press **Shift+Command+3** + * If you are using a _MacOS_, press **Shift+Command+3** -* If you are using a _Linux_ distro, it should come with a screenshot tool built-in or press **Alt+PrtScn** (It will take a + * If you are using a _Linux_ distro, it should come with a screenshot tool built-in or press **Alt+PrtScn** (It will take a screenshot of the active window) - -* If needed, edit the image and add some markers to show the bug - + * If needed, edit the image and add some markers to show the bug #### Instructions to reproduce the bug @@ -62,13 +59,11 @@ might be causing the bug. For example: -``` - +```md * Go to Scene events * Right click on an event * Click edit * The window should now be going crazy - ``` #### What you were doing when the issue occurred @@ -79,12 +74,11 @@ If it was a crash, you will have to describe what you were doing when it happene Some errors logs can hint the problem. So, do check (If possible) if there was any error in the developer tool kit. -- Press **Ctrl+Shift+I**, a tab should open - -- Open the **Console** tab and check if there was any error shown + - Press **Ctrl+Shift+I**, a tab should open + - Open the **Console** tab and check if there was any error shown -* Also, check the **sources** for call stacks + * Also, check the **sources** for call stacks !!! note @@ -94,14 +88,17 @@ Some errors logs can hint the problem. So, do check (If possible) if there was a Here is a template you can use when writing a report. -``` +```md ## Describe the bug + A clear and concise description of what the bug is. Any error or console logs ## To Reproduce + Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -111,12 +108,12 @@ Steps to reproduce the behavior: * If applicable, add screenshots to help explain your problem. ## Other details + * Include any OS/browser version/smartphone that you're using * Which version of GDevelop are you using? The desktop app or the web-app? * Add any other context about the problem here. ``` - **Here is an example of a report that might not be helpful** ![](/gdevelop5/community/exampleofbadreport.png) @@ -126,9 +123,6 @@ Steps to reproduce the behavior: > > ![](/gdevelop5/community/exampleofgoodreport.png) - - - ## Where to report a bug? A bug can be reported on the [official forum](https://forum.gdevelop.io) or on [GDevelop's Github repo as an issue](https://github.com/4ian/GDevelop/issues). @@ -141,11 +135,11 @@ A bug can be reported on the [official forum](https://forum.gdevelop.io) or on [ The first and foremost option you should chose to report a bug is on the [official forum](https://forum.gdevelop.io). -- Go to the forum, click on** + New Topic** + - Go to the forum, click on **+ New Topic** -- A panel should open, select **Bug reports** from the categories and now you can start describing your issue. + - A panel should open, select **Bug reports** from the categories and now you can start describing your issue. -- When you are done, don't forget to click on **+ Create Topic** + - When you are done, don't forget to click on **+ Create Topic** ![](/gdevelop5/community/rg5.png) @@ -155,10 +149,9 @@ You can also report it on [GDevelop's Github repo as an issue](https://github.co ![](/gdevelop5/community/rb1.png) + - Click on **New Issue**. -- Click on **New Issue**. - -- You will be asked if the issue is a bug report or a feature request. Click on Bug Report. + - You will be asked if the issue is a bug report or a feature request. Click on Bug Report. ![](/gdevelop5/community/rb2.png) @@ -167,4 +160,3 @@ Now you will be given a space where you can describe your bug. There will be som Ex: if there is a sentence "A clear and concise description of what the bug is.", remove that sentence and add a description about the bug. ![](/gdevelop5/community/rg6.png) - diff --git a/docs/gdevelop5/community/index.md b/docs/gdevelop5/community/index.md index b79ff7d405..a21bd0fa2b 100644 --- a/docs/gdevelop5/community/index.md +++ b/docs/gdevelop5/community/index.md @@ -12,23 +12,22 @@ We have written various *guides* that allow everyone to improve and submit quali ## I would like to help on... -* [Contribute to the codebase of GDevelop](https://gdevelop.io/contribute/), see the [list of ideas](https://trello.com/b/qf0lM7k8/gdevelop-roadmap) -* [GDevelop's assets store](/gdevelop5/community/contribute-to-the-assets-store), see the [list of ideas](https://trello.com/b/xoOCKFOf/gdevelop-assets) -* [GDevelop's extensions](/gdevelop5/extensions/share), see the [list of ideas](https://trello.com/b/AftjL2v1/gdevelop-extensions) -* [Make an example for the example library](https://github.com/GDevelopApp/GDevelop-examples/issues), see the [guide for submitting an example](/gdevelop5/community/guide-for-submitting-an-example) -* [GDevelop's documentation](/gdevelop5/community/contribute-to-the-wiki), see the [list of ideas](https://trello.com/b/3D1PXrga/gdevelop-documentation) -* Contribute to the editor, see the [readme on Github](https://github.com/4ian/GDevelop/blob/master/newIDE/README.md) -* Report bugs/crashes, see the [guide to reporting a bug](/gdevelop5/community/guide-to-reporting-a-bug) - + * [Contribute to the codebase of GDevelop](https://gdevelop.io/contribute/), see the [list of ideas](https://trello.com/b/qf0lM7k8/gdevelop-roadmap) + * [GDevelop's assets store](/gdevelop5/community/contribute-to-the-assets-store), see the [list of ideas](https://trello.com/b/xoOCKFOf/gdevelop-assets) + * [GDevelop's extensions](/gdevelop5/extensions/share), see the [list of ideas](https://trello.com/b/AftjL2v1/gdevelop-extensions) + * [Make an example for the example library](https://github.com/GDevelopApp/GDevelop-examples/issues), see the [guide for submitting an example](/gdevelop5/community/guide-for-submitting-an-example) + * [GDevelop's documentation](/gdevelop5/community/contribute-to-the-wiki), see the [list of ideas](https://trello.com/b/3D1PXrga/gdevelop-documentation) + * Contribute to the editor, see the [readme on Github](https://github.com/4ian/GDevelop/blob/master/newIDE/README.md) + * Report bugs/crashes, see the [guide to reporting a bug](/gdevelop5/community/guide-to-reporting-a-bug) ## Network Follow us and find a fantastic community everywhere on our communities and social media accounts. -* [Community forum](http://forum.gdevelop.io) -* [Discord chat](https://discord.gg/rjdYHvj) -* [Twitter](http://twitter.com/gdevelopapp) -* [Reddit](https://www.reddit.com/r/gdevelop/) -* [Github](https://github.com/4ian/GDevelop/) -* [Facebook](https://www.facebook.com/GDevelopApp/) -* [GameJolt](https://gamejolt.com/c/Gdev-au7mxt) + * [Community forum](http://forum.gdevelop.io) + * [Discord chat](https://discord.gg/rjdYHvj) + * [Twitter](http://twitter.com/gdevelopapp) + * [Reddit](https://www.reddit.com/r/gdevelop/) + * [Github](https://github.com/4ian/GDevelop/) + * [Facebook](https://www.facebook.com/GDevelopApp/) + * [GameJolt](https://gamejolt.com/c/Gdev-au7mxt) diff --git a/docs/gdevelop5/community/season-of-docs/index.md b/docs/gdevelop5/community/season-of-docs/index.md index 903cd1e8c8..5c0ba00bef 100644 --- a/docs/gdevelop5/community/season-of-docs/index.md +++ b/docs/gdevelop5/community/season-of-docs/index.md @@ -23,7 +23,7 @@ GDevelop is an *open-source* **game development** software allowing anyone to cr **Design the optimal learning experience for beginners 🤓** - * Assess the quality of [the pages](/gdevelop5/getting_started) to get started with GDevelop, as well as the most read articles, then design and (re)write the pages to give the new users an optimal experience. + * Assess the quality of [the pages](/gdevelop5/getting_started) to get started with GDevelop, as well as the most read articles, then design and (re)write the pages to give the new users an optimal experience. * The recommended read for beginners is currently to start on [this page](/gdevelop5/getting_started). * GDevelop is all about being accessible to everyone... so the onboarding process is hugely important! @@ -31,7 +31,7 @@ GDevelop is an *open-source* **game development** software allowing anyone to cr **A tutorial about making custom behaviors in GDevelop** - * Write a new step-by-step tutorial explaining how to make a "behavior". What's a behavior? It's a way to create new logic for game objects! There is a [page already about it](/gdevelop5/tutorials/how-to-make-behavior), but it's quite basic. + * Write a new step-by-step tutorial explaining how to make a "behavior". What's a behavior? It's a way to create new logic for game objects! There is a [page already about it](/gdevelop5/tutorials/how-to-make-behavior), but it's quite basic. * Behaviors are important in GDevelop because they allow to quickly prototype and give ability to objects. As part of this new tutorial, you can create your own behaviors, using the easy-to-learn events system that is used in GDevelop. > This project is a good way to learn more about game making! @@ -44,13 +44,13 @@ GDevelop is an *open-source* **game development** software allowing anyone to cr **A brand new tutorial 🚀** - * Write a new step-by-step tutorial explaining how to create a game. We have two complete tutorials on the wiki already, but they are fairly basic. + * Write a new step-by-step tutorial explaining how to create a game. We have two complete tutorials on the wiki already, but they are fairly basic. * See one of the [existing tutorials as an example](http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platform-game/start). * The theme of the game can be anything that sounds interesting: space shooter, endless running game, castlevania-like, beat'em up etc... Mentors will help you get started with the software and the game making. > It will be important to find a fairly small game so that a tutorial can cover it from start to finish - but it needs to look good and be interesting (there are asset packs on websites like *itch.io* or *opengameart.org* that we can use)! -**Improved extension developer guide ** +**Improved extension developer guide** * Extensions are an important part of GDevelop. They provide the most features that users use in their games. Improve the documentation on [GitHub](https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md) to explain how to create a new extension for the software. * Also see this [wiki page](http://wiki.compilgames.net/doku.php/gdevelop5/extending-gdevelop). This will help encourage new people to contribute to the game engine. @@ -60,10 +60,8 @@ GDevelop is an *open-source* **game development** software allowing anyone to cr * Create more documentation about publishing games on marketplaces, gaming websites and app stores. This is a very important topic. Users like to create games, but a game is not finished if it's not published! * There is already some [documentation on the wiki](http://wiki.compilgames.net/doku.php/gdevelop5/publishing), but more step-by-step tutorials and detailed explanations about marketplaces (Kongregate, Itch.io, Facebook Instant Games...) or app stores would be very useful! - > These articles/documentation can even be tightly integrated into the GDevelop app itself. Mentors will be able to do updates in GDevelop. - ## Result of the 2020 and 2019 edition The 2020 edition had Deniz Karakay and David Turnbull as technical writers. Deniz made a [new tutorial explaining how to make a Space Shooter game](/gdevelop5/tutorials/space-shooter). David reworked many pages of the documentation and rewrote the [platformer tutorial](/gdevelop5/tutorials/platformer). See [their reports here](/gdevelop5/community/season-of-docs/results). @@ -94,17 +92,17 @@ Yes! You'll get familiar with GDevelop as you use it before the project official **How should I express my interest in contributing towards a project and whom should I express it towards?** -Submit an official application! Find the link here: https://developers.google.com/season-of-docs/docs/tech-writer-guide +Submit an official application! Find the link here: Please contact us (find the email on the [organizations list](https://developers.google.com/season-of-docs/docs/participants) on GSoD website) to discuss more in details your project idea. **What should be in the proposal? What is the format of the proposal?** -First, read the guide here: https://developers.google.com/season-of-docs/docs/tech-writer-application-hints +First, read the guide here: -* A bit of information about your experience and who you are. Tell us if you have experience with **GDevelop** (existing tutorials, games, etc...) or **game development** in general :) -* Description of what you want to do, why it's interesting, what you will include, etc... -* The GDevelop project for GSoD will surely be *standard-length*. -* No particular format - **you** are the technical writer, so it's up to you to judge what's best :) + * A bit of information about your experience and who you are. Tell us if you have experience with **GDevelop** (existing tutorials, games, etc...) or **game development** in general :) + * Description of what you want to do, why it's interesting, what you will include, etc... + * The GDevelop project for GSoD will surely be *standard-length*. + * No particular format - **you** are the technical writer, so it's up to you to judge what's best :) **Will there be enough help given that I will be contributing towards the documentation rather than the project?** @@ -122,14 +120,14 @@ Make yourself an idea by browsing the wiki, the tutorials, try GDevelop and thin Programming skills are not required (Season of Docs is not about programming, but about writing documentation). You'll need: -* Perfect ability to write English in a readable manner without mistakes -* Autonomy -* Good interactions with the game making community (GDevelop or the broader game development community) + * Perfect ability to write English in a readable manner without mistakes + * Autonomy + * Good interactions with the game making community (GDevelop or the broader game development community) It's even better if you: -* Have some game creation skills (with or without GDevelop) - will be important for example to create a new, interesting tutorial. -* Know well GDevelop - at least make sure to be familiar with the main concepts of the editor. + * Have some game creation skills (with or without GDevelop) - will be important for example to create a new, interesting tutorial. + * Know well GDevelop - at least make sure to be familiar with the main concepts of the editor. **Can you guide me toward what I should exactly include in the proposal?** diff --git a/docs/gdevelop5/community/season-of-docs/results.md b/docs/gdevelop5/community/season-of-docs/results.md index 0d3b59fd5b..1c14e1743c 100644 --- a/docs/gdevelop5/community/season-of-docs/results.md +++ b/docs/gdevelop5/community/season-of-docs/results.md @@ -32,18 +32,18 @@ The chapters in the tutorial covers: ### Links: - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/2-move-player - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/3-shoot-and-health - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/4-background-and-camera - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/5-enemies - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/6-enemy-mechanics - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/7-meteors - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/8-powerups - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/9-ui - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/10-sound-effects-music - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/11-visual-effects - * http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/space-shooter/12-levels + * + * + * + * + * + * + * + * + * + * + * + * ## Design the optimal learning experience for beginners @@ -53,33 +53,33 @@ The chapters in the tutorial covers: I started by conducting a content audit to identify: -* the current structure of the documentation -* the essential concepts that new users of GDevelop needed to understand -* the most obvious opportunities for improving the onboarding experience + * the current structure of the documentation + * the essential concepts that new users of GDevelop needed to understand + * the most obvious opportunities for improving the onboarding experience This is a link to the audit: -https://docs.google.com/spreadsheets/d/1Ai3GZp3LCfqikWlB-g5rZL-KmEet0OH8M-W9XU3btug/edit#gid=1093585766 + I spent the rest of my time rewriting a number of pages from scratch, including GDevelop's most popular tutorial, to improve the readability, structure, and completeness of the content. A lot of this work involved reducing duplication, using a wider variety of structural elements (eg. headings and bullet points), and ensuring that concepts are introduced at the most relevant moment. ### Links -* http://wiki.compilgames.net/doku.php/gdevelop5/start -* http://wiki.compilgames.net/doku.php/gdevelop5/getting_started -* http://wiki.compilgames.net/doku.php/gdevelop5/objects -* http://wiki.compilgames.net/doku.php/gdevelop5/behaviors -* http://wiki.compilgames.net/doku.php/gdevelop5/events -* http://wiki.compilgames.net/doku.php/gdevelop5/all-features/expressions -* http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables -* http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables/global-variables -* http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables/scene-variables -* http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables/object-variables -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/start -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/part-2 -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/part-3 -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/part-4 -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/part-5 -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/part-6 -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/part-7 -* http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/platformer/part-8 \ No newline at end of file + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * + * \ No newline at end of file diff --git a/docs/gdevelop5/community/sell-asset-pack-store.md b/docs/gdevelop5/community/sell-asset-pack-store.md index 02f6b332e9..dfcdbbca5d 100644 --- a/docs/gdevelop5/community/sell-asset-pack-store.md +++ b/docs/gdevelop5/community/sell-asset-pack-store.md @@ -10,13 +10,12 @@ By providing easy-to-use and high-quality assets we're allowing creators to get It contains 2 types of asset packs: -- **Free** to use art, accessible to anyone, royalty-free, and open for any type of modification -- **Premium art**, carefully selected by the GDevelop team for a more unique game style + - **Free** to use art, accessible to anyone, royalty-free, and open for any type of modification + - **Premium art**, carefully selected by the GDevelop team for a more unique game style This page provides information on how to sell your assets on GDevelop's Asset Store. You can also directly **[open this form to sell premium assets on GDevelop's store](https://forms.gle/rqQajpDWEF3Em8HS6)**. If we've already contacted us or want to know more, just keep reading! - ## Asset Pack pricing The price of every asset pack is defined by its creator. @@ -32,16 +31,15 @@ When an asset pack is sold on GDevelop's Asset Store, the purchase is distribute ![](/gdevelop5/community/sell-asset-pack-store/pasted/20221126-203013.png) - !!! tip Earnings from GDevelop paying services (including [premium licenses](https://gdevelop.io/pricing)) are re-invested in internet hosting fees, engine development, product research, and feature development. Note that: -- The VAT and payment providers fees might amount to something larger than 27%. In this case, **you still keep 40%** and it's us, GDevelop, *who will have our margin reduced*. -- A cut of 33% might sound a bit higher than some other stores - but when these stores expressed their percent, they don't mention VAT. So the real percent you are earning is less than what they advertise. For example, if a store says they takes 30%, it does not include the VAT and payment process fee, so you will earn way less than 70% (probably something between 25% and 45% of the total price after VAT and additional fees). -- An interesting feature of the GDevelop asset store is that it gives **ready-to-use objects** for creator games. This means the value someone is getting when buying an asset in GDevelop is higher: they get something we prepared as an object ready to be used (no manual work is involved). + - The VAT and payment providers fees might amount to something larger than 27%. In this case, **you still keep 40%** and it's us, GDevelop, *who will have our margin reduced*. + - A cut of 33% might sound a bit higher than some other stores - but when these stores expressed their percent, they don't mention VAT. So the real percent you are earning is less than what they advertise. For example, if a store says they takes 30%, it does not include the VAT and payment process fee, so you will earn way less than 70% (probably something between 25% and 45% of the total price after VAT and additional fees). + - An interesting feature of the GDevelop asset store is that it gives **ready-to-use objects** for creator games. This means the value someone is getting when buying an asset in GDevelop is higher: they get something we prepared as an object ready to be used (no manual work is involved). ## Discounts and coupons (coming soon) @@ -51,6 +49,7 @@ The following rules apply to prevent marketplace abuse: - Discounts and coupons will be valid for a maximum of 31 days, after which they'll automatically expire. - Coupons will only be valid to purchase assets from the creator that released the coupon. - Only one coupon can be applied to a single asset pack purchase. + Creators will always have the choice to participate (or not) in GDevelop discounts like "Black Fridays" or "Cyber Mondays", as well as the packs that they'll make available for those events. ## Creator tips (coming soon) @@ -90,8 +89,8 @@ GDevelop's Asset Store is built as a marketplace: GDevelop hosts a digital solut Here is what happens when a buyer purchases a product on the asset store: -* GDevelop buys the product from the seller -* GDevelop resells it to the buyer + * GDevelop buys the product from the seller + * GDevelop resells it to the buyer From the accounting point of view, the seller should create an invoice addressed to GDevelop. To avoid obliging sellers to create such invoices, GDevelop will create self-billing invoices that you will be able to retrieve. @@ -102,8 +101,8 @@ As a seller, by selling your products on GDevelop's Asset Store, you accept that All Asset Packs are safely stored on GDevelop's cloud. This way we ensure that the files are available for instant purchase and in-app use. -Every asset pack has to be uploaded and submitted following [GDevelop's art submission standards](https://wiki.gdevelop.io/gdevelop5/community/contribute-to-the-assets-store) -. +Every asset pack has to be uploaded and submitted following [GDevelop's art submission standards](https://wiki.gdevelop.io/gdevelop5/community/contribute-to-the-assets-store). + ## Submitting premium assets First and foremost, we want to ensure the Asset Store remains a place of high quality and safe for everyone's use. @@ -117,7 +116,6 @@ If you're an artist and wish to submit your assets to the store, contact us and For this, use **[this form to sell premium assets on GDevelop's store](https://forms.gle/rqQajpDWEF3Em8HS6)**. Thank you! - ## Disclaimer !!! warning diff --git a/docs/gdevelop5/community/summer-of-code/contributor-guidance.md b/docs/gdevelop5/community/summer-of-code/contributor-guidance.md index be25ecc90a..493691d576 100644 --- a/docs/gdevelop5/community/summer-of-code/contributor-guidance.md +++ b/docs/gdevelop5/community/summer-of-code/contributor-guidance.md @@ -7,12 +7,12 @@ Thanks for considering **GDevelop** for this GSoC edition! Here is a **suggested** structure for your proposal: -- A title and quick explanation about the idea you want to work on in a few sentences. -- A larger description, that includes the main points of what you'd like to make/improve/fix (you can include an estimation of time if you have one). -- If you identify risks or unknowns, be sure to include them. You can also list quick wins! -- If there are any [cards on the roadmap](https://trello.com/b/qf0lM7k8/gdevelop-roadmap) that are part of your proposal, list them in your description. -- A few words about you, if you want to. -- Your favorite video game :) (or, if it's too hard to choose, you can choose 2!) + - A title and quick explanation about the idea you want to work on in a few sentences. + - A larger description, that includes the main points of what you'd like to make/improve/fix (you can include an estimation of time if you have one). + - If you identify risks or unknowns, be sure to include them. You can also list quick wins! + - If there are any [cards on the roadmap](https://trello.com/b/qf0lM7k8/gdevelop-roadmap) that are part of your proposal, list them in your description. + - A few words about you, if you want to. + - Your favorite video game :) (or, if it's too hard to choose, you can choose 2!) !!! tip diff --git a/docs/gdevelop5/community/summer-of-code/index.md b/docs/gdevelop5/community/summer-of-code/index.md index 21b92bbe25..0824bbec9e 100644 --- a/docs/gdevelop5/community/summer-of-code/index.md +++ b/docs/gdevelop5/community/summer-of-code/index.md @@ -19,15 +19,14 @@ In 2020, GDevelop was one of the mentoring organizations. We're candidating to b Those ideas are *not* exhaustive. Feel free to suggest your own idea! Or combine ideas into your own. The descriptions are generic enough so that you can suggest different approaches, goals and stretch goals. Mentor(s) are available for all ideas listed already. - ### Allow to edit tilemaps directly in the editor GDevelop supports tilemaps that are built using Tiled or LDtk - two editors specially made for creating large tilemaps. But for a lot of users, having the ability to edit tilemaps directly in GDevelop would be more intuitive. Beginners could start drawing an entirely new map directly in the scene editor. Advanced users could make quick fixes to their maps inside GDevelop, and continue to use an external editors for larger changes. This project will aim to bring a very simple Tilemap edition feature to GDevelop. This is a feature that is asked by a lot of users! -* **Skills:** JavaScript -* **Difficulty:** medium + * **Skills:** JavaScript + * **Difficulty:** medium ### Implement a global undo redo in the interface @@ -35,44 +34,44 @@ In this project, you design and set up a global undo/redo system in the whole ap This is also a good opportunity to investigate "Conflict-free replicated data type", as this notion is linked to the changes needed for a global undo/redo system. -* **Skills:** JavaScript, C++ -* **Difficulty:** hard + * **Skills:** JavaScript, C++ + * **Difficulty:** hard ### Refactor the game engine to run in a web worker This project is about reworking the game engine so that it can run in a web worker. The rendering with PixiJS can be decoupled from logic (it's also partially done in the engine!). Once it's done, the logic could be run in a web-worker, improving the performance of all games. Later games could even be run on a server for multiplayer using this approach - which is a highly requested feature by users. -* **Skills:** JavaScript -* **Difficulty:** medium + * **Skills:** JavaScript + * **Difficulty:** medium ### Improve interactive tutorials so that the community can create their own We’ve created a framework to run interactive tutorials directly inside GDevelop (you can try it in the “Getting started”). In this project, tutorials could be listed in GDevelop in the interface, and when one is chosen, it would be played. The community will be able to create new tutorials by submitting tutorials in JSON format. -* **Skills:** JavaScript -* **Difficulty:** easy + * **Skills:** JavaScript + * **Difficulty:** easy ### Improved Debugger and Profiler GDevelop has a debugger and profiler that can be used when previewing a game. The debugger can list the objects, expose things like variables and allow to edit them. The profiler can measure the time for each part of the game. Both are still quite raw, so we could improve the UI to make it easier to filter objects, add export/import of data, show information in real time, show charts... -* **Skills:** React.js (for the editor), JavaScript (for the engine), WebSockets (communication between editor and games) -* **Difficulty:** Easy + * **Skills:** React.js (for the editor), JavaScript (for the engine), WebSockets (communication between editor and games) + * **Difficulty:** Easy ### Refactored collision and object positions handling -A dedicated module to handle object position and collisions (as well as raycast and other algorithms) was started in this PR: https://github.com/4ian/GDevelop/pull/1393 (the idea is to be able to port this module to WebAssembly in the future - this can be a stretch goal). It's not finished though: the project will consist in finishing the implementation, check the performance, the integration in the game engine and adapt the extensions (Pathfinding, Platformer, Lights) to use it. +A dedicated module to handle object position and collisions (as well as raycast and other algorithms) was started in this PR: (the idea is to be able to port this module to WebAssembly in the future - this can be a stretch goal). It's not finished though: the project will consist in finishing the implementation, check the performance, the integration in the game engine and adapt the extensions (Pathfinding, Platformer, Lights) to use it. -* **Skills:** JavaScript -* **Type:** Exploratory -* **Difficulty:** medium + * **Skills:** JavaScript + * **Type:** Exploratory + * **Difficulty:** medium ### Refactored and faster code generation Code generation is a very important point in GDevelop. This project would rework the code generation of events to make it clearer, faster and unlock potential new features like improved object handlings to avoid unnecessary work and get runtime performance boost. This can be seen as a work on a lightweight compiler - which can be fun to then later work on larger ones! -* **Skills:** C++ (mandatory to dig into the existing codebase), JavaScript (for the generated code), good understanding of algorithms and data structures. -* **Difficulty:** medium + * **Skills:** C++ (mandatory to dig into the existing codebase), JavaScript (for the generated code), good understanding of algorithms and data structures. + * **Difficulty:** medium ### Animation support for 9 Panel Sprite and Tiled Sprite objects @@ -80,8 +79,8 @@ These "Panel Sprite" and "Tiled Sprite" objects can't be animated. We'd like to This will allow for nice effects like animated platforms, background, lava floors... This will involve refactoring the animation classes in the game engine and refactor animation components in the editor codebase. -* **Skills:** JavaScript (Pixi.js knowledge is a bonus) and React. -* **Difficulty:** Medium + * **Skills:** JavaScript (Pixi.js knowledge is a bonus) and React. + * **Difficulty:** Medium ### Your own idea @@ -91,21 +90,20 @@ Your own ideas and variations on the existing one are very welcome! Remember to You'll need two things! -* First, become a bit familiar with GDevelop. One way to do so is by using the app. You can also try investigating or working an issue (or adding a simple new feature) on the GitHub Issue Tracker. Take a look at the [Good First Issues](https://github.com/4ian/GDevelop/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8Cgood+first+issue%22). - * You'll need to set up your development environment. The *README* will explain everything! - * Find an issue that looks interesting to you. Might be a [Good First Issue](https://github.com/4ian/GDevelop/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8Cgood+first+issue%22) or another one. - * Do some research, try things, and if you need help ask on the forum or on the GitHub issue itself. - * If you have something interesting, comment on the issue or open a *Pull Request*! Prepare it with all the required tests and checks, explain what you've done and a reviewer should give you some feedback. + * First, become a bit familiar with GDevelop. One way to do so is by using the app. You can also try investigating or working an issue (or adding a simple new feature) on the GitHub Issue Tracker. Take a look at the [Good First Issues](https://github.com/4ian/GDevelop/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8Cgood+first+issue%22). + * You'll need to set up your development environment. The *README* will explain everything! + * Find an issue that looks interesting to you. Might be a [Good First Issue](https://github.com/4ian/GDevelop/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8Cgood+first+issue%22) or another one. + * Do some research, try things, and if you need help ask on the forum or on the GitHub issue itself. + * If you have something interesting, comment on the issue or open a *Pull Request*! Prepare it with all the required tests and checks, explain what you've done and a reviewer should give you some feedback. -* Searching to solve an issue is a good first step that will actually help you in the second part: making a proposal! - * Read [this page describing a suggested structure for your proposal](/gdevelop5/community/summer-of-code/contributor-guidance). - * Prepare your proposal on the Google Summer of Code website 🤓. + * Searching to solve an issue is a good first step that will actually help you in the second part: making a proposal! + * Read [this page describing a suggested structure for your proposal](/gdevelop5/community/summer-of-code/contributor-guidance). + * Prepare your proposal on the Google Summer of Code website 🤓. !!! tip A good proposal will show that you understood at least the big principles and are able to dive more in the problem. Read also [this thread](https://forum.gdevelop.io/t/how-to-make-your-proposal/23400). - ## Frequently Asked Questions ### Where can I talk with others about GSoC? What are the communication channels? @@ -124,6 +122,6 @@ Yes, it's a good idea, if you participated or contributed already to GDevelop, t ## More links -- Forum [section about GSoC](https://forum.gdevelop.io/c/community/gsoc-2020) -- [GDevelop GitHub repository](https://github.com/4ian/GDevelop) -- [Good First Issues](https://github.com/4ian/GDevelop/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8Cgood+first+issue%22), to start coding with GDevelop. \ No newline at end of file + - Forum [section about GSoC](https://forum.gdevelop.io/c/community/gsoc-2020) + - [GDevelop GitHub repository](https://github.com/4ian/GDevelop) + - [Good First Issues](https://github.com/4ian/GDevelop/issues?q=is%3Aissue+is%3Aopen+label%3A%22%F0%9F%91%8Cgood+first+issue%22), to start coding with GDevelop. \ No newline at end of file diff --git a/docs/gdevelop5/community/summer-of-code/results.md b/docs/gdevelop5/community/summer-of-code/results.md index 52e2f8b14c..8581448a95 100644 --- a/docs/gdevelop5/community/summer-of-code/results.md +++ b/docs/gdevelop5/community/summer-of-code/results.md @@ -58,29 +58,27 @@ to find a bug related to rendering glitches. * One of the possible improvement is to use the [separating axis theorem](https://en.wikipedia.org/wiki/Hyperplane_separation_theorem) to minimize the number of rays to be cast. - * We've tried to find a solution for edge cases that expands the bounding box. It works well for a lot of cases, but there are + * We've tried to find a solution for edge cases that expands the bounding box. It works well for a lot of cases, but there are still some cases remaining to be handled correctly. * We need to have better tests and benchmarks that account for the edge cases as well. - - ## Command Palette and Revamped Shortcuts ##### Student: Nilay Majorwar This project focuses on boosting users' efficiency and productivity by: -- **Building a fully featured command palette**, akin to code editors like Visual Studio Code and other productivity apps. This allows the user to quickly access a lot of the app's main functionalities via the keyboard. -- **Adding support for customizable keyboard shortcuts**. Earlier the app only supported some standard shortcuts for the scene and events editor - the new shortcuts would allow the user to do almost anything via a shortcut press. + - **Building a fully featured command palette**, akin to code editors like Visual Studio Code and other productivity apps. This allows the user to quickly access a lot of the app's main functionalities via the keyboard. + - **Adding support for customizable keyboard shortcuts**. Earlier the app only supported some standard shortcuts for the scene and events editor - the new shortcuts would allow the user to do almost anything via a shortcut press. ### The Structure The rough workings of the system we decided are fairly simple: -- each command has mainly a name and a callback handler. The callback handler for a command is provided dynamically by the relevant React component. -- a React context acts as the central store for all commands registered at any time. Custom hooks allow any React component to dynamically register and deregister commands easily. The command palette UI gets the list of commands from the central store and displays it. -- These commands can also have a corresponding keyboard shortcut. An event listener listens for keypresses, checks if an identified shortcut is pressed, and calls the respective command. + - each command has mainly a name and a callback handler. The callback handler for a command is provided dynamically by the relevant React component. + - a React context acts as the central store for all commands registered at any time. Custom hooks allow any React component to dynamically register and deregister commands easily. The command palette UI gets the list of commands from the central store and displays it. + - These commands can also have a corresponding keyboard shortcut. An event listener listens for keypresses, checks if an identified shortcut is pressed, and calls the respective command. ### Timeline @@ -88,26 +86,26 @@ The project was divided into broadly three phases: 1. [PR: GDevelop#1821](https://github.com/4ian/GDevelop/pull/1821): **Basic command palette** - This phase was for setting up the basic framework of commands - React context for storage, custom hooks for registration and deregistration and the UI for the command palette. + This phase was for setting up the basic framework of commands - React context for storage, custom hooks for registration and deregistration and the UI for the command palette. 2. [PR: GDevelop#1864](https://github.com/4ian/GDevelop/pull/1864): **Adding advanced commands** - In this phase, I worked on adding more powerful commands like "Edit object...", that allow the user to select an object to edit, right from the command palette dropdown. This was probably the most difficult part of the project, as maintaining handlers for each option was slightly tough to do right. + In this phase, I worked on adding more powerful commands like "Edit object...", that allow the user to select an object to edit, right from the command palette dropdown. This was probably the most difficult part of the project, as maintaining handlers for each option was slightly tough to do right. 3. [PR: GDevelop#1938](https://github.com/4ian/GDevelop/pull/1938): **Customizable keyboard shortcuts** - Finally, I worked on adding support for customizable keyboard shortcuts. Since the command system was completely ready, this phase was quite straightforward, with only a few hitches regarding single-key shortcuts and Electron. + Finally, I worked on adding support for customizable keyboard shortcuts. Since the command system was completely ready, this phase was quite straightforward, with only a few hitches regarding single-key shortcuts and Electron. There was also a [minor PR](https://github.com/4ian/GDevelop/pull/1896) for adding a command and fixing some existing ones. ### Challenges -- **Storing options of commands with options**: Storing and dynamically updating an array of options for each such command was hard, especially for React components that have slightly tricky lifecycles. This was solved by instead storing a function that generates the list of options for the command, right from the project or layout object - which meant this function would give up-to-date results whenever and wherever it's called. -- **Single-key shortcuts**: Single-key shortcuts are slightly tricky because they can clash with the user typing. To solve that, I used a bit of vanilla JS to check whether the user is currently typing, and if it is so, ignore any shortcut keypresses. -- **Commands overlapping with Electron**: Some commands like "Save Project" overlap with menu items in Electron's app menu. This means on pressing "Ctrl+S", both Electron and the in-house shortcut system would have tried to save the project. So on the Electron app, we pass on these overlapping command and allow Electron to do the job. + - **Storing options of commands with options**: Storing and dynamically updating an array of options for each such command was hard, especially for React components that have slightly tricky lifecycles. This was solved by instead storing a function that generates the list of options for the command, right from the project or layout object - which meant this function would give up-to-date results whenever and wherever it's called. + - **Single-key shortcuts**: Single-key shortcuts are slightly tricky because they can clash with the user typing. To solve that, I used a bit of vanilla JS to check whether the user is currently typing, and if it is so, ignore any shortcut keypresses. + - **Commands overlapping with Electron**: Some commands like "Save Project" overlap with menu items in Electron's app menu. This means on pressing "Ctrl+S", both Electron and the in-house shortcut system would have tried to save the project. So on the Electron app, we pass on these overlapping command and allow Electron to do the job. ### Possible Improvements -- There's a **lack of tab-related commands and shortcuts**, like "Next tab". These shortcuts are really helpful and quite ubiquitous in productivity apps. Such commands and shortcuts can be added to the app. -- There is still quite a bit of keyboard productivity remaining to be added to the app - for instance, the **events editor does not support navigating with arrow keys**. Adding this would make keyboard control much more intuitive. -- The detect shortcut dialog works great but it's **not very helpful to the user in telling why a certain shortcut is not allowed**, or whether some shortcut may cause problems like clashing with the browser. This can be improved to show a help message in such cases. \ No newline at end of file + - There's a **lack of tab-related commands and shortcuts**, like "Next tab". These shortcuts are really helpful and quite ubiquitous in productivity apps. Such commands and shortcuts can be added to the app. + - There is still quite a bit of keyboard productivity remaining to be added to the app - for instance, the **events editor does not support navigating with arrow keys**. Adding this would make keyboard control much more intuitive. + - The detect shortcut dialog works great but it's **not very helpful to the user in telling why a certain shortcut is not allowed**, or whether some shortcut may cause problems like clashing with the browser. This can be improved to show a help message in such cases. \ No newline at end of file diff --git a/docs/gdevelop5/community/teams.md b/docs/gdevelop5/community/teams.md index eb25fba72b..51895b432c 100644 --- a/docs/gdevelop5/community/teams.md +++ b/docs/gdevelop5/community/teams.md @@ -5,18 +5,14 @@ title: GDevelop teams !!! note - This is a proposal that is being tried currently. It may change or be retracted in the future if it doesn't meet the expectations. - GDevelop has multiple areas where users can contribute. GDevelop teams allow a contributor to specialize in one or more sectors of GDevelop's development and maintenance. This document explains the rules and concepts associated with a GDevelop team. !!! tip - Team membership is not required when contributing to GDevelop, but it is recommended to ultimately join one if you contribute a lot to one field of development. - ## Concepts ### Team @@ -31,12 +27,12 @@ Each team is also given an announcement channel on discord, only usable by the t The main goals of a team are to: - - Allow for organization and communication between contributors in a field of contribution in order to prevent duplicate work. - - Allow for all contributors of a specific area to be mentioned on the forum or discord to be notified of bugs in extensions, to get asked for help about contributing to their field of contribution, and to discuss the current state of their field of contribution. - - Having a list of people involved in a field of development of GDevelop to discuss the evolution of that field of development with. - - Put the people that contributed a lot to a part of GDevelops ecosystem forward as important community members. - - Work on making it easier to contribute to their field of contribution. - - Track what work has been done more effectively to provide feedback to the community concerning the new additions and changes. + - Allow for organization and communication between contributors in a field of contribution in order to prevent duplicate work. + - Allow for all contributors of a specific area to be mentioned on the forum or discord to be notified of bugs in extensions, to get asked for help about contributing to their field of contribution, and to discuss the current state of their field of contribution. + - Having a list of people involved in a field of development of GDevelop to discuss the evolution of that field of development with. + - Put the people that contributed a lot to a part of GDevelops ecosystem forward as important community members. + - Work on making it easier to contribute to their field of contribution. + - Track what work has been done more effectively to provide feedback to the community concerning the new additions and changes. ### Team leaders @@ -54,9 +50,9 @@ Once a team member joins, the GDevelop company is responsible for giving them th As a team member, you have no direct responsibilities, but you are expected to - - Participate in discussions about the team or field of contribution covered by the team - - Contribute to the field of contribution covered by the team - - Be somewhat active on either Discord, the forum, or Github + - Participate in discussions about the team or field of contribution covered by the team + - Contribute to the field of contribution covered by the team + - Be somewhat active on either Discord, the forum, or Github A team leader may give additional permissions or kick a team member out of the team if they have a good reason to, like not meeting the expectations listed above. @@ -74,37 +70,37 @@ GDevelop has a lot of downloadable semi-official extensions made with events. Th #### 🙋 Requirements for contributing/joining - - Knowing [the extensions best practices](http://wiki.compilgames.net/doku.php/gdevelop5/extensions/best-practices) (to create a high-quality extension) - - Knowing how to write events in GDevelop (to be able to work with extensions) - - Knowing how to open an issue on GitHub (to submit an extension) - - (Optional) Knowing JavaScript (to work on extensions that use JavaScript events) - - (Optional) Knowing how to use git (to repair a broken submission if the bot does a mistake) + - Knowing [the extensions best practices](http://wiki.compilgames.net/doku.php/gdevelop5/extensions/best-practices) (to create a high-quality extension) + - Knowing how to write events in GDevelop (to be able to work with extensions) + - Knowing how to open an issue on GitHub (to submit an extension) + - (Optional) Knowing JavaScript (to work on extensions that use JavaScript events) + - (Optional) Knowing how to use git (to repair a broken submission if the bot does a mistake) #### 🚩 Team leaders - - [arthuro555](https://forum.gdevelop.io/u/arthuro555/summary) - - [Tristan](https://forum.gdevelop.io/u/tristanrhodes/summary) + - [arthuro555](https://forum.gdevelop.io/u/arthuro555/summary) + - [Tristan](https://forum.gdevelop.io/u/tristanrhodes/summary) #### 👥 Team members - - D8H - - add00 - - VegeTato + - D8H + - add00 + - VegeTato #### 🙇 Responsibilities - - Making new extensions - - Maintaining (new features, bug fixes) old extensions - - Managing the [extensions repository](https://github.com/GDevelopApp/GDevelop-extensions) - - Assigning maintainers to widely used extensions - - Keeping the [extensions best practices guide](http://wiki.compilgames.net/doku.php/gdevelop5/extensions/best-practices) up-to-date - - Keeping the documentation about [contributing extensions](http://wiki.compilgames.net/doku.php/gdevelop5/extensions/share) and extensions contribution workflows up-to-date - - Reviewing extensions submissions + - Making new extensions + - Maintaining (new features, bug fixes) old extensions + - Managing the [extensions repository](https://github.com/GDevelopApp/GDevelop-extensions) + - Assigning maintainers to widely used extensions + - Keeping the [extensions best practices guide](http://wiki.compilgames.net/doku.php/gdevelop5/extensions/best-practices) up-to-date + - Keeping the documentation about [contributing extensions](http://wiki.compilgames.net/doku.php/gdevelop5/extensions/share) and extensions contribution workflows up-to-date + - Reviewing extensions submissions #### 🔐 Extra permissions - - (Leader only) Push access to the main branch on the GitHub repository (modify the "live" extension repository)/merging pull requests to it. - - Push access to all branches that are not the main one in the GitHub repository (for collaboration or changing someone else's extension as part of the review process). + - (Leader only) Push access to the main branch on the GitHub repository (modify the "live" extension repository)/merging pull requests to it. + - Push access to all branches that are not the main one in the GitHub repository (for collaboration or changing someone else's extension as part of the review process). ### Asset store team @@ -114,22 +110,22 @@ The GDevelop assets store is not magic: the assets need to be added by community #### Requirements for contributing/joining - - Knowing how to use your system file explorer (to create the asset pack) - - Knowing how to open an issue on GitHub (to submit the asset pack) + - Knowing how to use your system file explorer (to create the asset pack) + - Knowing how to open an issue on GitHub (to submit the asset pack) #### Team leaders - - Leo Red + - Leo Red #### Team members - - None + - None #### Responsibilities - - Check licenses of assets for the asset store - - Add new asset packs on the asset store - - Ensure the metadata is entered correctly for each asset + - Check licenses of assets for the asset store + - Add new asset packs on the asset store + - Ensure the metadata is entered correctly for each asset ### Moderation team @@ -139,28 +135,28 @@ GDevelop has multiple groups for the community to talk and share about GDevelop, #### Requirements for contributing/joining - - Knowing the moderation tools available (kicks, bans, warns, logs, etc) (for efficient moderation) - - Not being someone who likes to argue (to calm down arguments instead of joining them) - - Being often online (to be able to react fast in case of a spammer before too much damage is done) + - Knowing the moderation tools available (kicks, bans, warns, logs, etc) (for efficient moderation) + - Not being someone who likes to argue (to calm down arguments instead of joining them) + - Being often online (to be able to react fast in case of a spammer before too much damage is done) #### Team leaders - - [Silver-Streak](https://forum.gdevelop.io/u/silver-streak/summary) + - [Silver-Streak](https://forum.gdevelop.io/u/silver-streak/summary) #### Team members - - arthuro555 - - Bouh - - Jurfix - - Greench - - 4ian + - arthuro555 + - Bouh + - Jurfix + - Greench + - 4ian #### Responsibilities - - Keep track of suspicious users - - Ensure the respect of the rules - - Calm down heated arguments - - Ban spam/scam bots and trolls + - Keep track of suspicious users + - Ensure the respect of the rules + - Calm down heated arguments + - Ban spam/scam bots and trolls ### Examples team @@ -170,12 +166,12 @@ This team is about making and maintaining examples for GDevelop. #### Requirements for contributing/joining - - Knowing how to use all of GDevelop (since an example can use any feature from GDevelop) - - Knowing the [examples best practices](http://wiki.compilgames.net/doku.php/gdevelop5/community/guide-for-submitting-an-example#best_practices) + - Knowing how to use all of GDevelop (since an example can use any feature from GDevelop) + - Knowing the [examples best practices](http://wiki.compilgames.net/doku.php/gdevelop5/community/guide-for-submitting-an-example#best_practices) #### Team leaders - - [Leo red](https://forum.gdevelop.io/u/Midhil/summary) + - [Leo red](https://forum.gdevelop.io/u/Midhil/summary) #### Team members @@ -183,12 +179,12 @@ This team is about making and maintaining examples for GDevelop. #### Responsibilities - - Create new examples - - Maintain current examples - - Managing the [examples repository](https://github.com/GDevelopApp/GDevelop-examples) - - Keep [the best practices](http://wiki.compilgames.net/doku.php/gdevelop5/community/guide-for-submitting-an-example#best_practices) guide up-to-date - - Keeping the documentation about [contributing examples](http://wiki.compilgames.net/doku.php/gdevelop5/community/guide-for-submitting-an-example#submitting_the_example) up-to-date - - Reviewing examples submissions + - Create new examples + - Maintain current examples + - Managing the [examples repository](https://github.com/GDevelopApp/GDevelop-examples) + - Keep [the best practices](http://wiki.compilgames.net/doku.php/gdevelop5/community/guide-for-submitting-an-example#best_practices) guide up-to-date + - Keeping the documentation about [contributing examples](http://wiki.compilgames.net/doku.php/gdevelop5/community/guide-for-submitting-an-example#submitting_the_example) up-to-date + - Reviewing examples submissions ### Communication team @@ -198,20 +194,20 @@ This team is about marketing of GDevelop and communicating with it's target audi #### Requirements for contributing/joining - - Being a serious and trustworthy person (since we do not want GDevelop to get a bad image because of 1 person) - - Be a long time community member (since being the public figure of GDevelop requires trust) - - Being somewhat active on most social media (to be able to use them and post on all of them) - - (Optional) Know Markdown and Git (as those technologies are necessary to make blog posts) + - Being a serious and trustworthy person (since we do not want GDevelop to get a bad image because of 1 person) + - Be a long time community member (since being the public figure of GDevelop requires trust) + - Being somewhat active on most social media (to be able to use them and post on all of them) + - (Optional) Know Markdown and Git (as those technologies are necessary to make blog posts) #### Team leaders - - Bouh + - Bouh #### Team members -- [Helper Wesley](https://www.youtube.com/channel/UC8RsU74-hU1pfNKHNMfiFfw) + - [Helper Wesley](https://www.youtube.com/channel/UC8RsU74-hU1pfNKHNMfiFfw) #### Responsibilities -- Manage the GDevelop accounts on different platforms (Twitter, Instagram, TikTok, etc..) -- Advertise GDevelop to the target audience + - Manage the GDevelop accounts on different platforms (Twitter, Instagram, TikTok, etc..) + - Advertise GDevelop to the target audience diff --git a/docs/gdevelop5/events/async.md b/docs/gdevelop5/events/async.md index dc3a6585b1..23825e860e 100644 --- a/docs/gdevelop5/events/async.md +++ b/docs/gdevelop5/events/async.md @@ -15,9 +15,9 @@ Asynchronous events are special actions that will not execute when called. Inste What you do **not** need to watch out for: - - Object picking - object picking works like normal events, previously picked objects will still be picked afterward. Objects deleted in the meantime will be unpicked. - - Using results of the event in actions or subevents after the asynchronous actions - If an action is just after an asynchronous action, or in a subevent of the event it was used in, it will only get executed once the asynchronous action is done with its work, so you can use + - Object picking - object picking works like normal events, previously picked objects will still be picked afterward. Objects deleted in the meantime will be unpicked. + - Using results of the event in actions or subevents after the asynchronous actions - If an action is just after an asynchronous action, or in a subevent of the event it was used in, it will only get executed once the asynchronous action is done with its work, so you can use What you **do** need to watch out for: - - Using the results of the asynchronous action or side effects of actions/subevents following it in a sibling event - uniquely actions following the asynchronous one in the same event, and events that are subevents of the event using the asynchronous action will be queued for execution after the asynchronous action has finished its job. The others will be executed synchronously. \ No newline at end of file + - Using the results of the asynchronous action or side effects of actions/subevents following it in a sibling event - uniquely actions following the asynchronous one in the same event, and events that are subevents of the event using the asynchronous action will be queued for execution after the asynchronous action has finished its job. The others will be executed synchronously. \ No newline at end of file diff --git a/docs/gdevelop5/events/callback-variables.md b/docs/gdevelop5/events/callback-variables.md index f6f57c5635..4f72f5a1b1 100644 --- a/docs/gdevelop5/events/callback-variables.md +++ b/docs/gdevelop5/events/callback-variables.md @@ -2,10 +2,13 @@ title: Callback Variables --- # Callback Variables + ## What are they? + Callback variables are **variables** passed to an **action** for passing a result to the user. ## Why do they exist? + Some actions have a very long execution time. So, to not block the game, they are designed in an **asynchronous** way. That means that they are being executed for a little while every frame until they are completed. Normally, you would use **[expressions](/gdevelop5/all-features/expressions)** for getting a value, diff --git a/docs/gdevelop5/events/foreach-child-variable/index.md b/docs/gdevelop5/events/foreach-child-variable/index.md index 4dc78d195e..bb68a37c3f 100644 --- a/docs/gdevelop5/events/foreach-child-variable/index.md +++ b/docs/gdevelop5/events/foreach-child-variable/index.md @@ -9,15 +9,15 @@ This event stores the value of each child variable (as a string or number) and t ## Example -- Define a structure variable (Fruits) with multiple child variables (Apple, Avocado, Banana) + - Define a structure variable (Fruits) with multiple child variables (Apple, Avocado, Banana) ![](foreverchildvariables.png) -- Loop through the child objects and change the text to show the name and value of the child object. + - Loop through the child objects and change the text to show the name and value of the child object. ![](foreverchildevents.png) -- The game preview will now show the correct values. + - The game preview will now show the correct values. ![](foreverchildouput.png) diff --git a/docs/gdevelop5/events/foreach/index.md b/docs/gdevelop5/events/foreach/index.md index d14c524762..1e03e6017f 100644 --- a/docs/gdevelop5/events/foreach/index.md +++ b/docs/gdevelop5/events/foreach/index.md @@ -15,9 +15,9 @@ Most of the time, a "For Each" event is not required because conditions and acti There are specific circumstances that do require using a "For Each" event, including: -- [Collisions](/gdevelop5/all-features/collisions) that need to be handled individually, even if they happen at the same time (such as keeping score or picking up resources) -- Actions that use an object property or [variable](/gdevelop5/all-features/variables/object-variables) that is different for each instance -- When using [linked objects](/gdevelop5/all-features/linked-objects) + - [Collisions](/gdevelop5/all-features/collisions) that need to be handled individually, even if they happen at the same time (such as keeping score or picking up resources) + - Actions that use an object property or [variable](/gdevelop5/all-features/variables/object-variables) that is different for each instance + - When using [linked objects](/gdevelop5/all-features/linked-objects) In the example below, the goal is to create an explosion at the position of every enemy. When the player is in a collision with an object called "KillAllEnemyBonus", a "For Each" event is used to create a new object located at the position of each enemy. If a "For Each" event is not used, a single explosion would be created at the position of the first enemy only. diff --git a/docs/gdevelop5/events/functions/index.md b/docs/gdevelop5/events/functions/index.md index 7dc6c1ae47..9132234aa4 100644 --- a/docs/gdevelop5/events/functions/index.md +++ b/docs/gdevelop5/events/functions/index.md @@ -43,12 +43,12 @@ When a function is selected, on the top, you can see the configuration of the fu ![](/gdevelop5/events/functions/pasted/20221118-093605.png) -* The first parameter is the type of the function: "Action", "Condition", "Expression" or "String Expression". If you choose Action or Condition, you'll find the function in the list of actions and conditions, when editing your events in the game. If you choose Expression (or String Expression), you'll find it in the list of expressions when you edit a formula. -* You can then configure the name that will be displayed in the list. -* Enter the description that will be given in the window, when choosing the parameters for the function. -* For Action or Condition, you can enter the sentence that will be displayed in the events sheet. In case your function takes parameters (see below to learn more about these), you can include them by writing `PARAMx` between underscores, replacing `x` by the parameter number (starting at 1): + * The first parameter is the type of the function: "Action", "Condition", "Expression" or "String Expression". If you choose Action or Condition, you'll find the function in the list of actions and conditions, when editing your events in the game. If you choose Expression (or String Expression), you'll find it in the list of expressions when you edit a formula. + * You can then configure the name that will be displayed in the list. + * Enter the description that will be given in the window, when choosing the parameters for the function. + * For Action or Condition, you can enter the sentence that will be displayed in the events sheet. In case your function takes parameters (see below to learn more about these), you can include them by writing `PARAMx` between underscores, replacing `x` by the parameter number (starting at 1): -``` +```text Rotate objects _PARAM1_ ``` @@ -78,11 +78,11 @@ For example, we can add a parameter, that would return the objects to be rotated When your function is configured, you can add events to it. These events will be launched when the condition, action or expression is used in the rest of the game. -* You can use all the existing events, actions, conditions and expressions, but you are limited to the **objects that you entered as parameters**. This is to ensure that your function is only acting on them, and has no "side-effects" on the rest of the game - which would be a bad practice and make functions hard to reuse and to generate. + * You can use all the existing events, actions, conditions and expressions, but you are limited to the **objects that you entered as parameters**. This is to ensure that your function is only acting on them, and has no "side-effects" on the rest of the game - which would be a bad practice and make functions hard to reuse and to generate. -* Note that functions can be reused everywhere, and are not limited to a scene. You **won't have the list of variables of your scenes** in them. You can still manipulate them by using the usual actions and manually writing the variable you want to modify. + * Note that functions can be reused everywhere, and are not limited to a scene. You **won't have the list of variables of your scenes** in them. You can still manipulate them by using the usual actions and manually writing the variable you want to modify. -* **Links** are not available in functions, because a function is autonomous and is in theory not even tied to a project. + * **Links** are not available in functions, because a function is autonomous and is in theory not even tied to a project. #### Object parameter @@ -106,10 +106,6 @@ Here is an example of a text parameter that will get the name and use it in an a ![](/gdevelop5/events/function_text_expression.png) - - - - ## Using the function in your game When you have configured and created the events for your function, you can use it in the rest of your game. @@ -122,14 +118,12 @@ That's it! The function is used like any other condition, action or expression i !!! tip - The **Object Groups** feature, while creating functions, helps grouping similar object parameters. This way you can apply an action/condition to a group of object parameters (parameters pointing at objects) at once. ## Advanced usages This page gave a basic overview of what functions are. They are one of the more powerful features of GDevelop, as you can extend the events by using them, enabling to create very readable and concise events sheets. By using them, you can reduce the amounts of events that you write for your game, avoid copy-pasting them and even reduce bugs by ensuring that functions are always used for common tasks on your objects. - ### Recursive functions A function can call itself! In the events of a function, you can use the same action/condition/expression as in the rest of the game. This is called a "recursive" function. @@ -148,7 +142,6 @@ Functions can be shared across projects (like actions/conditions that are built See [an example of replacing external events by a function](/gdevelop5/events/functions/replace-external-events), which is reusable and shareable. You can also **[automatically extract events to a function](/gdevelop5/events/functions/extract-events)**. - ## References of parameters Parameters in function can be various: @@ -170,15 +163,14 @@ Parameters in function can be various: | [Object animation](/gdevelop5/objects/sprite/#adding-an-animation) | Text | The name of an animation from an object | | [Identifier](/gdevelop5/events/functions#identifier-parameter) | Text | Allow the auto-complete to suggest previously used values | - ### Identifier parameter This parameter enables auto-completion for previously entered values from other events with the same identifier name and scope. #### Scopes -- **Object** - To suggest previously used values on the same object. -- **Scene** - To suggest previously used values from the scene events. + - **Object** - To suggest previously used values on the same object. + - **Scene** - To suggest previously used values from the scene events. #### Identifier name diff --git a/docs/gdevelop5/events/index.md b/docs/gdevelop5/events/index.md index fbf76976e3..f0fb6434c9 100644 --- a/docs/gdevelop5/events/index.md +++ b/docs/gdevelop5/events/index.md @@ -32,6 +32,7 @@ Events can have multiple conditions and multiple actions. For example, an event You can use events to create custom conditions, actions, and [expressions](/gdevelop5/all-features/expressions). For more information, refer to [Functions](/gdevelop5/events/functions). ## Event Execution Logic + ### Execution order **Events** run in the order they are listed from top to bottom. The order of events can have a significant effect on what happens when an event is executed. @@ -77,6 +78,7 @@ This action also increments a variable in every frame, but the value of the vari ## Creating an event ### Adding an event to the event sheet + 1. Open the **Event Sheet**. 2. Select the **Choose and add an event** icon. 3. Select the type of event. @@ -105,8 +107,8 @@ This action also increments a variable in every frame, but the value of the vari Some types of events can have sub-events. Sub-events are events that exist within other events. These types of events only run when: -- The conditions of the parent event are true. -- The actions of the parent event have been processed. + - The conditions of the parent event are true. + - The actions of the parent event have been processed. To add a sub-event to an event: @@ -124,15 +126,14 @@ Sub-events appear nested within their parent events. This section lists the different types of events, each of which is useful for adding different types of logic to a game. If you're not familiar with the concept of events, refer to the previous sections. -- [Standard events](/gdevelop5/events/standard) -- [For each object events](/gdevelop5/events/foreach) -- [For each child variable events](/gdevelop5/events/foreach-child-variable) -- [Repeat events](/gdevelop5/events/repeat) -- [While events](/gdevelop5/events/while) -- [Group events](/gdevelop5/events/group) -- [Link events](/gdevelop5/events/link) -- [JavaScript events](/gdevelop5/events/js-code) - + - [Standard events](/gdevelop5/events/standard) + - [For each object events](/gdevelop5/events/foreach) + - [For each child variable events](/gdevelop5/events/foreach-child-variable) + - [Repeat events](/gdevelop5/events/repeat) + - [While events](/gdevelop5/events/while) + - [Group events](/gdevelop5/events/group) + - [Link events](/gdevelop5/events/link) + - [JavaScript events](/gdevelop5/events/js-code) Refer to the linked pages to learn more about each type of event. diff --git a/docs/gdevelop5/events/js-code/index.md b/docs/gdevelop5/events/js-code/index.md index 5cd8c81745..c4d34b8134 100644 --- a/docs/gdevelop5/events/js-code/index.md +++ b/docs/gdevelop5/events/js-code/index.md @@ -43,7 +43,6 @@ This array is exactly like what an action or a condition would use. For example, * Read **[the game engine documentation](https://docs.gdevelop-app.com/GDJS%20Runtime%20Documentation/)** to get started. * You can also browse directly the **[GDJS game engine source code](https://github.com/4ian/GD/tree/master/GDJS/Runtime)**. - ## Code examples ### Read and change the value of a variable @@ -130,6 +129,7 @@ Equivalent events would be: ![](/gdevelop5/events/change-animation-according-to-behavior-conditions.png) ### Set the position of the camera to the position of an object + ```javascript if (!objects.length) return; diff --git a/docs/gdevelop5/events/link/index.md b/docs/gdevelop5/events/link/index.md index 209c42142e..89c4fb9457 100644 --- a/docs/gdevelop5/events/link/index.md +++ b/docs/gdevelop5/events/link/index.md @@ -15,7 +15,7 @@ To create a link event, either click the "Add" at the bottom right side of the e ![](/gdevelop5/events/link/pasted/20230313-201145.png) -After adding a Link event, click on "" to have a drop-down menu display the scenes and external event sheets you can pick from for this link event. Linking the event sheet from another scene in your game to the current one can be useful when creating new levels, you can link the logic from the first level over to all of the future levels and not need to rewrite or copy over the events for every level. +After adding a Link event, click on "\" to have a drop-down menu display the scenes and external event sheets you can pick from for this link event. Linking the event sheet from another scene in your game to the current one can be useful when creating new levels, you can link the logic from the first level over to all of the future levels and not need to rewrite or copy over the events for every level. Linked events can also be moved around your event sheet, disabled, and changed to subevents.(As seen below) diff --git a/docs/gdevelop5/events/object-picking/index.md b/docs/gdevelop5/events/object-picking/index.md index 697000aafe..36b62638eb 100644 --- a/docs/gdevelop5/events/object-picking/index.md +++ b/docs/gdevelop5/events/object-picking/index.md @@ -16,10 +16,10 @@ The object picking rules are as follows: ## Special exceptions -- The "Pick all instances" action will restore the picked objects lists to having all instances on the scene picked. -- The "Pick a random instance" action will pick a single random instance out of the picked instances. -- The "Create an object" action will add to the list of picked objects the newly created instance. **If you use it on an object that was not subject to object picking so far, only the created instance will be picked.** -- The "Take into account objects linked to" condition will unpick objects that are not linked to the picked instances of the other object. + - The "Pick all instances" action will restore the picked objects lists to having all instances on the scene picked. + - The "Pick a random instance" action will pick a single random instance out of the picked instances. + - The "Create an object" action will add to the list of picked objects the newly created instance. **If you use it on an object that was not subject to object picking so far, only the created instance will be picked.** + - The "Take into account objects linked to" condition will unpick objects that are not linked to the picked instances of the other object. ## Examples diff --git a/docs/gdevelop5/events/standard/index.md b/docs/gdevelop5/events/standard/index.md index e975f76c13..535ca1f431 100644 --- a/docs/gdevelop5/events/standard/index.md +++ b/docs/gdevelop5/events/standard/index.md @@ -21,7 +21,8 @@ In the example below, GDevelop checks if the player has landed on top of a slime ![](/gdevelop5/events/eventconditiontf.jpg) Remember that conditions also select *which* objects are affected by the actions of the event. In the example above, if there are multiple "Slime" objects in the scene, only the Slimes that are in collision with the "Player" will be affected by the actions on the right. The same is true for "Player" objects if there are multiple instances of them. -### Example + +### Example Here is an event that will destroy the "Square" objects whose have a X position which is less than 100 pixels: diff --git a/docs/gdevelop5/getting_started/batch-install-gdevelop-company-university.md b/docs/gdevelop5/getting_started/batch-install-gdevelop-company-university.md index 0bf4e018a5..e1dd9bc056 100644 --- a/docs/gdevelop5/getting_started/batch-install-gdevelop-company-university.md +++ b/docs/gdevelop5/getting_started/batch-install-gdevelop-company-university.md @@ -37,7 +37,7 @@ You should be able to install GDevelop using the provided AppImage or the Flatpa GDevelop requires an internet connection to access services such as: exporting a game, games examples, tutorials, cloud saves etc. See below for a list of domains that need to be whitelisted for the services to work fully. -``` +```text *.gdevelop.io *.liluo.io *.gd.games diff --git a/docs/gdevelop5/getting_started/index.md b/docs/gdevelop5/getting_started/index.md index 8394da624f..362e32cbe0 100644 --- a/docs/gdevelop5/getting_started/index.md +++ b/docs/gdevelop5/getting_started/index.md @@ -19,29 +19,29 @@ The installation instructions depend on the operating system. **Windows**: - * Double-click on the executable. - * Click on the Next button several times, until the installation begins. This installs GDevelop, launches the app, and adds an icon to the Desktop. + * Double-click on the executable. + * Click on the Next button several times, until the installation begins. This installs GDevelop, launches the app, and adds an icon to the Desktop. **macOS**: - * Open the DMG file. - * Drag "GDevelop.app" into the "~/Applications" directory. + * Open the DMG file. + * Drag "GDevelop.app" into the "~/Applications" directory. **Linux (flatpak)**: - * Open a terminal. - * Follow the command line instructions at the bottom of the [GDevelop Flathub page](https://flathub.org/apps/details/io.gdevelop.ide) + * Open a terminal. + * Follow the command line instructions at the bottom of the [GDevelop Flathub page](https://flathub.org/apps/details/io.gdevelop.ide) **Linux (AppImage)**: - * Open a terminal. - * Make the AppImage file executable by typing `chmod a+x GDevelop*.AppImage`. - * Run it: `./GDevelop*.AppImage` (or double-click on the file). + * Open a terminal. + * Make the AppImage file executable by typing `chmod a+x GDevelop*.AppImage`. + * Run it: `./GDevelop*.AppImage` (or double-click on the file). **Phone, tablets, and Chromebooks**: - * Open your browser and go to [editor.gdevelop.io](https://editor.gdevelop.io). - * If you are on Android or a Chromebook, choose the option to "Add to Homescreen". + * Open your browser and go to [editor.gdevelop.io](https://editor.gdevelop.io). + * If you are on Android or a Chromebook, choose the option to "Add to Homescreen". !!! tip diff --git a/docs/gdevelop5/getting_started/open-gdevelop-4-project/index.md b/docs/gdevelop5/getting_started/open-gdevelop-4-project/index.md index c5e3f4e058..2e1314b76a 100644 --- a/docs/gdevelop5/getting_started/open-gdevelop-4-project/index.md +++ b/docs/gdevelop5/getting_started/open-gdevelop-4-project/index.md @@ -5,13 +5,13 @@ title: Open a game made with GDevelop 4 GDevelop 5 is based on the same engine as GDevelop 4 and games are compatible. You must still ensure that: - * Your GDevelop 4 game is based on the **HTML5 platform**. Native games are not supported for now by GDevelop 5. - * A **few extensions/features** are still not supported in GDevelop 5. + * Your GDevelop 4 game is based on the **HTML5 platform**. Native games are not supported for now by GDevelop 5. + * A **few extensions/features** are still not supported in GDevelop 5. To open your game with GDevelop 5, open it with GDevelop 4 and save it in a json file: - * In the ribbon menu, choose **File > Save as...**. - * Choose a folder, then enter a filename finishing by **.json**. For example: + * In the ribbon menu, choose **File > Save as...**. + * Choose a folder, then enter a filename finishing by **.json**. For example: ![](/gdevelop5/getting_started/screenshot_2017-12-25_23.14.09.png) diff --git a/docs/gdevelop5/index.md b/docs/gdevelop5/index.md index 7dc4c82152..696d84f72b 100644 --- a/docs/gdevelop5/index.md +++ b/docs/gdevelop5/index.md @@ -12,6 +12,6 @@ GDevelop is a free, open-source, and cross-platform game creation tool that anyo ## Next steps -* [Download GDevelop](https://gdevelop.io/download) and read the [Getting Started](/gdevelop5/getting_started) guide. -* If you've never made a game before, read the [Basic game-making concepts](/gdevelop5/tutorials/basic-game-making-concepts) guide. -* If you're ready to start making a game, watch the [Official Intro Tutorial Video Series](https://www.youtube.com/watch?v=bR2BjT7JG0k&list=PL3YlZTdKiS89Kj7IQVPoNElJCWrjZaCC8) or [browse the tutorials](/gdevelop5/tutorials). + * [Download GDevelop](https://gdevelop.io/download) and read the [Getting Started](/gdevelop5/getting_started) guide. + * If you've never made a game before, read the [Basic game-making concepts](/gdevelop5/tutorials/basic-game-making-concepts) guide. + * If you're ready to start making a game, watch the [Official Intro Tutorial Video Series](https://www.youtube.com/watch?v=bR2BjT7JG0k&list=PL3YlZTdKiS89Kj7IQVPoNElJCWrjZaCC8) or [browse the tutorials](/gdevelop5/tutorials). diff --git a/docs/gdevelop5/interface/command-palette-and-shortcuts.md b/docs/gdevelop5/interface/command-palette-and-shortcuts.md index 97ee51b5e1..d8d216efe9 100644 --- a/docs/gdevelop5/interface/command-palette-and-shortcuts.md +++ b/docs/gdevelop5/interface/command-palette-and-shortcuts.md @@ -9,7 +9,7 @@ GDevelop provides keyboard shortcuts that allow you to quickly get to places. Yo Some shortcuts like **Closing GDevelop**(Ctrl+Shift+Q) won't work on the web app -##Customising keyboard +## Customising keyboard **On web version**: @@ -35,7 +35,7 @@ You can't use a key combination that is already utilized by another command. A e ![](/gdevelop5/interface/shortcuts2.png) -##Command palette +## Command palette The command palette shows all the command you can do in the current menu. This can allow you to quickly access tools. @@ -54,7 +54,3 @@ Press **ESC** or click outside the list to exit the command palette Some commands/shortcuts can have sub-sections (Ex: Edit Objects) ![](/gdevelop5/interface/commandpalette.png) - - - - diff --git a/docs/gdevelop5/interface/debugger/index.md b/docs/gdevelop5/interface/debugger/index.md index 65cc337b7b..efcc1c591d 100644 --- a/docs/gdevelop5/interface/debugger/index.md +++ b/docs/gdevelop5/interface/debugger/index.md @@ -9,10 +9,8 @@ The *Profiler* is a tool that measures the time spent on different aspects of yo !!! note - This is an advanced feature of GDevelop. If you use it, we would like you to show your support for GDevelop by [getting a subscription](/gdevelop5/interface/profile)! - ![](/gdevelop5/interface/debugger/pasted/20230304-171835.png) ## Launch the debugger @@ -80,7 +78,6 @@ Like other fields, you can **click on the value of the variable** to change it. Variables can also be **structures**, meaning that they hold other variables. In this case, instead of seeing the value (number or text) of the variable, you will see a sub-list containing the children variables: - Here is an example of a variable named "Options", containing children variables to store the options of a game: ![](/gdevelop5/interface/structure-variable-inspector.png) diff --git a/docs/gdevelop5/interface/debugger/profile-your-game.md b/docs/gdevelop5/interface/debugger/profile-your-game.md index d07fd676b0..94ee105d60 100644 --- a/docs/gdevelop5/interface/debugger/profile-your-game.md +++ b/docs/gdevelop5/interface/debugger/profile-your-game.md @@ -20,18 +20,18 @@ When you stop running the profiler, the new results will be displayed. The time spent on different aspects of your game is displayed in sections: -* Objects (pre-events) - The time spent running behaviors before the events -* Events - The time spent running the events. If you have added *groups* to your events, you will see them displayed as sub-sections. Which is a good way to see how each part of your events are performing. -* Objects (post-events) - The time spent running behaviors after the events (behaviors can be run after events, if set up that way). -* Objects (visibility) - The time spent checking which objects will be rendered on the screen -* Render - The time spent for the CPU issuing rendering calls to the GPU. + * Objects (pre-events) - The time spent running behaviors before the events + * Events - The time spent running the events. If you have added *groups* to your events, you will see them displayed as sub-sections. Which is a good way to see how each part of your events are performing. + * Objects (post-events) - The time spent running behaviors after the events (behaviors can be run after events, if set up that way). + * Objects (visibility) - The time spent checking which objects will be rendered on the screen + * Render - The time spent for the CPU issuing rendering calls to the GPU. Note that actual rendering on the GPU is not measured here. For each section, you can see: the total time spent on this section while the profiler was running, the percent of time spent on this section compared to the parent, and the percent of time spent in this section compared to the total time. -* It's a good idea to run the profiler to see which parts of your game are consuming the most resources. In particular, take a look at the events to see if some groups of events are consuming more resources than others. -* If some behaviors take a lot of time, it can be a good idea to see if you can reduce the number of objects with this behavior, or deactivate the behavior if it's not needed. + * It's a good idea to run the profiler to see which parts of your game are consuming the most resources. In particular, take a look at the events to see if some groups of events are consuming more resources than others. + * If some behaviors take a lot of time, it can be a good idea to see if you can reduce the number of objects with this behavior, or deactivate the behavior if it's not needed. !!! tip diff --git a/docs/gdevelop5/interface/events-editor/index.md b/docs/gdevelop5/interface/events-editor/index.md index 4c5bd16ad8..8d666a4607 100644 --- a/docs/gdevelop5/interface/events-editor/index.md +++ b/docs/gdevelop5/interface/events-editor/index.md @@ -61,13 +61,13 @@ There are some common actions like copying, pasting, cutting, deleting, undoing, ![](/gdevelop5/interface/events-editor/pasted/20230313-181706.png) -###Toggle disabled +### Toggle disabled Disables the selected event and it's sub-events. When disabled, the event and all sub-events will be ignored while the game is running. The disabled events will have strike-through text on the actions and conditions. ![](/gdevelop5/interface/events-editor/pasted/20230313-182023.png) -###Add an Event Below +### Add an Event Below **Add a New Event Below** @@ -81,25 +81,25 @@ Adds an empty sub-event under the selected event. Allows you to add other event blocks like a comment, group, while, repeat for each, etc.. -###Extract Events to a Function +### Extract Events to a Function Extracts the selected event and it's sub-events into a function. Read more about how to [extracts events](/gdevelop5/events/functions/extract-events). -###Move events into a group +### Move events into a group Makes a new group and moves the selected event and it's sub-events into that group. Read more about [groups](/gdevelop5/events/group). -###Analyse Objects Used in this Event +### Analyse Objects Used in this Event Analyses and shows a list of all the objects, object groups and behaviours used in the selected events and it's sub-events. ![](/gdevelop5/interface/events-editor/pasted/20230313-182932.png) -###Changing the colour of comments and groups +### Changing the colour of comments and groups You can change the colour of **comments** and **event group** by right-clicking and selecting **Edit**. @@ -116,11 +116,13 @@ By clicking the Delete selected events button, selected events will be removed f ![](/gdevelop5/interface/events-editor/pasted/20230313-183632.png) ## Undo/Redo changes + Any change can be undone or redone with these buttons toolbar buttons. (or by using keyboard shortcuts ctrl+ Z/Y) ![](/gdevelop5/interface/events-editor/pasted/20230313-183819.png) ## Search in events + The "search in events" button opens a panel at the bottom of the screen. You can search for a specific term in the parameters of the conditions and actions. You can also enter a replacement parameter and replace all the occurrences of the text in the events. ![](/gdevelop5/interface/events-editor/pasted/20230313-184033.png) diff --git a/docs/gdevelop5/interface/games-dashboard/leaderboard-administration.md b/docs/gdevelop5/interface/games-dashboard/leaderboard-administration.md index d96a0b9ff2..7bc6897674 100644 --- a/docs/gdevelop5/interface/games-dashboard/leaderboard-administration.md +++ b/docs/gdevelop5/interface/games-dashboard/leaderboard-administration.md @@ -8,7 +8,6 @@ title: Leaderboard Administration Once you created a leaderboard, you can configure it. See more below on how to achieve that. To learn about how to send a score to a leaderboard and then display it, see [leaderboards](/gdevelop5/all-features/leaderboards). - To manage leaderboards, start by opening the GDevelop application and clicking on "File" -> "Games Dashboard". Find the game you want to manage and click "Manage game". Next, click on the tab named "Leaderboards". ![](/gdevelop5/interface/games-dashboard/leaderboard-administration/pasted/20220429-164150.png) @@ -30,10 +29,12 @@ There are a few settings that you can change to manage your leaderboard's sort o ![](/gdevelop5/interface/games-dashboard/leaderboard-administration/pasted/20220519-110604.png) ### Choose the sort order of your leaderboard + A leaderboard can be sorted in ascending order (lower is better - for speed runs for example) or in descending order (higher is better - for collecting coins for instance). ![](/gdevelop5/interface/games-dashboard/leaderboard-administration/pasted/20220519-110104.png) ### Limit the value of submitted score + If you have a rough idea of the extreme achievable score (minimum score for lower is better configuration and maximum score for higher is better configuration), it is advised to set a score limit that will prevent any score submission that go past this limit from being saved in your leaderboard, thus avoiding obvious cheaters with impossible values. ![](/gdevelop5/interface/games-dashboard/leaderboard-administration/pasted/20220519-110035.png) @@ -112,12 +113,12 @@ Here is more details on the 2 options you have to format the score: #### 1.Custom display -* Configure a custom display so that scores have a prefix and a suffix -* Choose the number of decimal places you want to be displayed -* Here are a few examples for you to see what you can achieve with these settings: - * `$150` - * `96 coins` - * `250.60` + * Configure a custom display so that scores have a prefix and a suffix + * Choose the number of decimal places you want to be displayed + * Here are a few examples for you to see what you can achieve with these settings: + * `$150` + * `96 coins` + * `250.60` #### 2.Display as time diff --git a/docs/gdevelop5/interface/preview.md b/docs/gdevelop5/interface/preview.md index aa3d98c371..543b8c98b2 100644 --- a/docs/gdevelop5/interface/preview.md +++ b/docs/gdevelop5/interface/preview.md @@ -55,7 +55,6 @@ You can now close the pop-up window in the editor and continue to edit your game You can also hit the "Reload" button of your device browser to restart the preview from the beginning. - ## Launch a preview with the Debugger and the Profiler The **Debugger** is a tool that can be used to inspect the content of your game (values of variables, existing instances, and their properties...) and can even be used for some real-time editing. The **Profiler** is a tool to inspect the performance of your game. diff --git a/docs/gdevelop5/interface/profile.md b/docs/gdevelop5/interface/profile.md index be9a281990..e97575b2c7 100644 --- a/docs/gdevelop5/interface/profile.md +++ b/docs/gdevelop5/interface/profile.md @@ -10,21 +10,19 @@ You can see your account details or, if you don't have one, create a new one for ## Create an account - 1. Start by going to the **Home** screen. - 2. In the top-right corner click on **Create account**. +1. Start by going to the **Home** screen. +2. In the top-right corner click on **Create account**. -![](/gdevelop5/interface/profile/home not logged.png) + ![](/gdevelop5/interface/profile/home not logged.png) - 3. Enter your username, fill in your email address, and choose a password. - 4. Then click **Create account**. - 5. To confirm your account creation, you will receive an email with a link to click on. +3. Enter your username, fill in your email address, and choose a password. +4. Then click **Create account**. +5. To confirm your account creation, you will receive an email with a link to click on. ![](/gdevelop5/interface/profile/account-create-details.png) - Once you're logged into your account, you can see your profile. You can then use GDevelop's online services, like packaging your game in a single click! - ### Customize your profile You can customize your public profile information directly from the GDevelop interface to share more about yourself as a game creator. The details filled will all be displayed on GDevelop's game hosting platform [gd.games](https://gd.games/) and on your GDevelop user page that appears if someone clicks on your name on one of your contributions such as extensions, examples, and assets. @@ -33,12 +31,12 @@ You can customize your public profile information directly from the GDevelop int Profiles have different properties: -- **An username**. Your unique username on GDevelop's websites and services. -- **A biography**. Introduce yourself in a few words, tell us who you are and what you do. -- **A donation link**. Useful for linking your Patreon, Paypal, Ko-fi, or any URL. -- If your subscription to the **GDevelop Newsletter** is active. -- If your subscription to **the analytics of your games** is active. -- The current **GDevelop subscription** running on your account. + - **An username**. Your unique username on GDevelop's websites and services. + - **A biography**. Introduce yourself in a few words, tell us who you are and what you do. + - **A donation link**. Useful for linking your Patreon, Paypal, Ko-fi, or any URL. + - If your subscription to the **GDevelop Newsletter** is active. + - If your subscription to **the analytics of your games** is active. + - The current **GDevelop subscription** running on your account. ### Changing your profile picture @@ -53,12 +51,10 @@ If you find yourself needing more exports each day or a higher number of leaderb See the [pricing page](https://gdevelop.io/pricing) to know more about the advantages of the Silver, Gold, School, and Business subscriptions compared to the free plan. - !!! note ✨ By taking a subscription you help the future development of GDevelop. Thank you for your support! - Once you're logged in, go to your profile as described earlier in the page. Scroll down, and click on the **Choose a subscription** button beneath **My online services subscriptions**. @@ -88,9 +84,8 @@ Cancelling your subscription at any time is easy. ![](/gdevelop5/interface/profile/cancel your subscription.png) !!! note - - If you want, you can later subscribe again to another subscription. In any case, you won't lose any of your games or work! + If you want, you can later subscribe again to another subscription. In any case, you won't lose any of your games or work! ### Redeem a code @@ -108,14 +103,12 @@ If you’re lost, click on the link below to open your subscription panel in you ![](/gdevelop5/interface/profile/redeem a code.jpg) - Enter your code and press **Redeem**. It’s then applied in a few seconds to your account. ![](/gdevelop5/interface/profile/confirming your subscription.png) That’s it, the confirmation of your account will be shown. You’re ready to create incredible games! - ## Contributions Here is a list of contributions you've made with extensions, examples, and assets that are available in the application. Each contribution is public and visible to the public through GDevelop by clicking on your username. diff --git a/docs/gdevelop5/interface/project-manager/index.md b/docs/gdevelop5/interface/project-manager/index.md index 6769e373dd..a81e3a87a6 100644 --- a/docs/gdevelop5/interface/project-manager/index.md +++ b/docs/gdevelop5/interface/project-manager/index.md @@ -22,5 +22,3 @@ You can fold and unfold each category by clicking on the small arrow next to eac * **External events:** [External events](/gdevelop5/interface/events-editor/External-events) are event sheets that are not linked to any particular scene. You can create an external event sheet and then link to it anywhere in your game's events. This allows developers to create their game logic once, and then reuse that logic throughout their project. * **External layouts:** Similar to external events, you can create an external layout for anything you want to use throughout your project(like UI and menu set ups), and then load them into any scene you choose. See [External Layouts](/gdevelop5/interface/scene-editor/external-layouts) to learn how to use them. - - diff --git a/docs/gdevelop5/interface/project-manager/properties.md b/docs/gdevelop5/interface/project-manager/properties.md index d8ae6698a1..1632d72619 100644 --- a/docs/gdevelop5/interface/project-manager/properties.md +++ b/docs/gdevelop5/interface/project-manager/properties.md @@ -9,23 +9,22 @@ When you click on Properties in the [Project Manager](/gdevelop5/interface/proje It is in these properties, you can find: -* **Game name:** The name given to your game (will be the application name). -* **Game description:** The description for your game that will be used if you upload to GDevelop's game hosting platform, [gd.games](https://gd.games/). -* **Author name:** Enter your name, or the name of your company. This field can be used for applications generated on Windows, macOS or Linux. As well as when publishing to GDevelop's game hosting platform, [gd.games](https://gd.games/). -* **Device orientation (for iOS and Android):** Choose if the game should run in portrait or landscape mode on mobile devices. -* **Package name (for iOS and Android):** [Read about this here](/gdevelop5/publishing/android_and_ios#make_sure_that_your_game_is_ready_for_packaging). -* **Version number:** Each time you're releasing a new version, you should incrementally increase this version number. This is mandatory to do on some stores, like the Google Play Store or the App Store. -* **Publisher name:** The name that will be used when packaging and submitting your application to stores. -* **Game resolution width:** The width of the game area and default window width. -* **Game resolution height:** The height of the game area and default window height. -* **Game resolution resize mode:** Adjusting the rendering area to the game window to fit the size of the screen it's in. You can choose to adjust the game's width or height, or to not change the game's rendering area.(in which case, the game will run with black margins) -* **Minimum FPS:** By default, 20 is the minimum number of frames per second. If the game doesn't run over this framerate (because of lag, or the device/computer is not powerful enough), the game will be slowed down. -* **Maximum FPS:** By default, 60 is the maximum number of frames per second. If this value is set to 0, the game will run at the highest framerate the device/computer it's running on can handle. -* **Scale mode (also called "Sampling"):** when set to linear, textures will be antialiased, meaning that their edges will be smoothed and the image will render well even if resized. Set to "nearest" to keep pixels visible, without any interpolation. This is the setting for games that use pixel art, or games are pixel perfect. -* **Project file type:** By default, your game is saved in a single file. You can also choose to save it as multiple files: each scene, external layout, and external event sheet will be saved in a different file. This is perfect for working on a large game in a team and sharing your game in a version control system like Github or Mercurial. -* **AdMob application ID (for iOS and Android):** ID number used to connect your game with your AdMob account. Only required if you're running ads in your game. [Read more about AdMob](/gdevelop5/all-features/admob). -* **Firebase configuration string:** The mandatory authentication key for use with Firebase events. Only required if you're using Firebase in your project. [Read more about Firebase](https://wiki.gdevelop.io/gdevelop5/all-features/firebase/quickstart). - + * **Game name:** The name given to your game (will be the application name). + * **Game description:** The description for your game that will be used if you upload to GDevelop's game hosting platform, [gd.games](https://gd.games/). + * **Author name:** Enter your name, or the name of your company. This field can be used for applications generated on Windows, macOS or Linux. As well as when publishing to GDevelop's game hosting platform, [gd.games](https://gd.games/). + * **Device orientation (for iOS and Android):** Choose if the game should run in portrait or landscape mode on mobile devices. + * **Package name (for iOS and Android):** [Read about this here](/gdevelop5/publishing/android_and_ios#make_sure_that_your_game_is_ready_for_packaging). + * **Version number:** Each time you're releasing a new version, you should incrementally increase this version number. This is mandatory to do on some stores, like the Google Play Store or the App Store. + * **Publisher name:** The name that will be used when packaging and submitting your application to stores. + * **Game resolution width:** The width of the game area and default window width. + * **Game resolution height:** The height of the game area and default window height. + * **Game resolution resize mode:** Adjusting the rendering area to the game window to fit the size of the screen it's in. You can choose to adjust the game's width or height, or to not change the game's rendering area.(in which case, the game will run with black margins) + * **Minimum FPS:** By default, 20 is the minimum number of frames per second. If the game doesn't run over this framerate (because of lag, or the device/computer is not powerful enough), the game will be slowed down. + * **Maximum FPS:** By default, 60 is the maximum number of frames per second. If this value is set to 0, the game will run at the highest framerate the device/computer it's running on can handle. + * **Scale mode (also called "Sampling"):** when set to linear, textures will be antialiased, meaning that their edges will be smoothed and the image will render well even if resized. Set to "nearest" to keep pixels visible, without any interpolation. This is the setting for games that use pixel art, or games are pixel perfect. + * **Project file type:** By default, your game is saved in a single file. You can also choose to save it as multiple files: each scene, external layout, and external event sheet will be saved in a different file. This is perfect for working on a large game in a team and sharing your game in a version control system like Github or Mercurial. + * **AdMob application ID (for iOS and Android):** ID number used to connect your game with your AdMob account. Only required if you're running ads in your game. [Read more about AdMob](/gdevelop5/all-features/admob). + * **Firebase configuration string:** The mandatory authentication key for use with Firebase events. Only required if you're using Firebase in your project. [Read more about Firebase](https://wiki.gdevelop.io/gdevelop5/all-features/firebase/quickstart). ## Branding and Loading screen diff --git a/docs/gdevelop5/interface/project-manager/resources.md b/docs/gdevelop5/interface/project-manager/resources.md index 9d3636f9d3..1e5ed7fdd9 100644 --- a/docs/gdevelop5/interface/project-manager/resources.md +++ b/docs/gdevelop5/interface/project-manager/resources.md @@ -3,7 +3,6 @@ title: Resources --- # Resources - You can find the resource manager at **Project manager** → **Game settings** → **Resources**. ![](/gdevelop5/interface/project-manager/resources/pasted/20230309-205340.png) @@ -22,9 +21,9 @@ This tab has a **properties panel**, with options based on the type of resource The toolbar will be different inside of this tab, with buttons aligned to the right side of the toolbar, that allow you to: -* **Open the project folder** with the button on the left. -* **Toggle the properties panel visibility** with the button in the middle. -* **Remove the selected resource** with the button on the right. + * **Open the project folder** with the button on the left. + * **Toggle the properties panel visibility** with the button in the middle. + * **Remove the selected resource** with the button on the right. ![](/gdevelop5/interface/project-manager/resources/pasted/20230309-210717.png) @@ -46,39 +45,34 @@ Images can appear blurry if they're scaled to a ratio they were not meant to be, ![](/gdevelop5/interface/project-manager/resources/pasted/20230310-180753.png) -- Sprite with **smoothing enabled**: + - Sprite with **smoothing enabled**: ![](/gdevelop5/interface/project-manager/resources/pasted/20230310-181104.png) -- Sprite with **smoothing disabled**: + - Sprite with **smoothing disabled**: ![](/gdevelop5/interface/project-manager/resources/pasted/20230310-181038.png) ### Always loaded in memory - !!! note Currently the **Always loaded in memory** option is not yet supported. All the resources (except audio) are always loaded at the startup of the game during the loading. ### Preload as sound/music - This allows you to preload audio files as music/sound, making them start quickly as you don't have to wait for the audio to load. If the appropriate toggle isn't checked, the first time this audio file is played it may be distorted as it's loaded in. ![](/gdevelop5/interface/project-manager/resources/pasted/20230310-181721.png) ### Some other options/tools - - For more options related to each resource file, you can open a drop-down menu by clicking on the three dots to the right of the resource name, or right click on the resource. ![](/gdevelop5/interface/project-manager/resources/pasted/20230310-182803.png) ### Renaming - Allows you to rename the resources. The name is the path to the resource by default. You may need to re-open the resource manager to apply the changes to the UI. ### Removing @@ -89,25 +83,20 @@ Removes the selected resource from the project. Removing a resource only removes it from the game, it doesn't delete the file from the project folder, you will have to do it manually - ### Open the file - Lets you open the selected resource in a player/viewer (Uses the default software for that file type on your system) ### Locate file - Opens the selected resource in the file manager of your system. ### Copy file path - Copies the file path of the resource to your clipboard, which you can then paste somewhere else. ### Scan for images/audio/fonts/videos - If there are files that exist in the project folder, but are not used by your project, you can add those files by selecting this option. It scans the project folder and adds them to your project. ### Remove unused images/audio/fonts diff --git a/docs/gdevelop5/interface/scene-editor/external-layouts.md b/docs/gdevelop5/interface/scene-editor/external-layouts.md index 79bedb6786..8f6c25e1a7 100644 --- a/docs/gdevelop5/interface/scene-editor/external-layouts.md +++ b/docs/gdevelop5/interface/scene-editor/external-layouts.md @@ -5,12 +5,11 @@ title: External layouts An external layout can be used to create a layout of objects, in the same way you would in a scene editor. Objects in an external layout can then be dynamically loaded into a scene using the action **Create objects from an external layout**. - This can be useful to : -* Create entire levels in different external layouts, and then load them into the scene containing the game. -* Create complex layouts of objects (for example, a fleet of spaceships) and then insert them into a scene. -* Create UI for your game, so you don't need to make the same UI layout in every scene of your game. + * Create entire levels in different external layouts, and then load them into the scene containing the game. + * Create complex layouts of objects (for example, a fleet of spaceships) and then insert them into a scene. + * Create UI for your game, so you don't need to make the same UI layout in every scene of your game. The following videos is a quick explanation of external layouts and how to use them: @@ -35,9 +34,9 @@ The external layout can now be edited as if it was a traditional scene: During the game, you can load a layout into a scene using the **Create objects from an external layout** action: -* Enter the name of the layout, inside double quotes. For example: `"My External Layout"`. + * Enter the name of the layout, inside double quotes. For example: `"My External Layout"`. -* You can specify the X and Y position of the origin of the layout. Setting this value to anything other than `0;0` is treated as an offset for objects of the external layout. + * You can specify the X and Y position of the origin of the layout. Setting this value to anything other than `0;0` is treated as an offset for objects of the external layout. The origin(0,0) of the external layout will align with the coordinates given in this action when loaded into the game. So for example, if an object is at position `100;100` in the external layout and if, when creating the objects in the scene, the action uses `50;50` as the position, then the object will be created at position `150;150`. diff --git a/docs/gdevelop5/interface/scene-editor/index.md b/docs/gdevelop5/interface/scene-editor/index.md index 547df0aed9..261bfd73ff 100644 --- a/docs/gdevelop5/interface/scene-editor/index.md +++ b/docs/gdevelop5/interface/scene-editor/index.md @@ -33,8 +33,8 @@ You can find the **Instance Properties panel** on the left side of the Scene Edi An object that you put on the scene _is called **an instance**_. The Properties panel allows you to change the properties of the selected instance(s): -* This can be the instance coordinates on the scene, scale, and Z-order. All objects share common properties (as well as common actions and conditions in events). **You can [learn about these here](/gdevelop5/objects/base_object)**. -* Some objects can also have special properties. For example, a [Sprite object](/gdevelop5/objects/sprite) allow you to set the initial animation of each instance on the scene (the default animation being the first). Read about [objects](/gdevelop5/objects) to see all the objects that you can use in GDevelop. + * This can be the instance coordinates on the scene, scale, and Z-order. All objects share common properties (as well as common actions and conditions in events). **You can [learn about these here](/gdevelop5/objects/base_object)**. + * Some objects can also have special properties. For example, a [Sprite object](/gdevelop5/objects/sprite) allow you to set the initial animation of each instance on the scene (the default animation being the first). Read about [objects](/gdevelop5/objects) to see all the objects that you can use in GDevelop. !!! tip @@ -90,15 +90,16 @@ By clicking the grid button in the toolbar, you get multiple options: ![](/gdevelop5/interface/scene-editor/pasted/20230307-154726.png) -* **Show mask**: this option displays or hides a black border on the scene. It represents the size of the game window. -* **Show grid:** this option turns the grid off or on within the scene editor. Having a grid is useful when we need to place objects accurately. -* **Setup grid:** this option opens a window that allows you to set up the size and position of the grid. + * **Show mask**: this option displays or hides a black border on the scene. It represents the size of the game window. + * **Show grid:** this option turns the grid off or on within the scene editor. Having a grid is useful when we need to place objects accurately. + * **Setup grid:** this option opens a window that allows you to set up the size and position of the grid. ### Change editor zoom By clicking on the zoom button, you can change the zoom level inside the scene editor: ![](/gdevelop5/interface/scene-editor/pasted/20230307-154849.png) + ## Launch a preview of the scene By clicking on the "Preview" button, you can launch a preview of your game. diff --git a/docs/gdevelop5/interface/scene-editor/layer-effects.md b/docs/gdevelop5/interface/scene-editor/layer-effects.md index 4515b29595..13463e0e5b 100644 --- a/docs/gdevelop5/interface/scene-editor/layer-effects.md +++ b/docs/gdevelop5/interface/scene-editor/layer-effects.md @@ -57,13 +57,12 @@ In this example, the Advanced bloom effect is called "Effect" and has several pa ![](/gdevelop5/interface/scene-editor/layer-effects/pasted/20230310-204831.png) - You can then add an event with an action called "Effect Parameter": -* Enter first the layer name (be sure to add quotation marks). For the base layer, enter an empty string (`""`). -* Enter the name of the effect, in this case `"Effect"`. -* Enter the name of the parameter, in this case `"bloomScale"`. -* Finally, enter the new value to be set for this parameter. + * Enter first the layer name (be sure to add quotation marks). For the base layer, enter an empty string (`""`). + * Enter the name of the effect, in this case `"Effect"`. + * Enter the name of the parameter, in this case `"bloomScale"`. + * Finally, enter the new value to be set for this parameter. !!! danger @@ -77,7 +76,7 @@ You can then add an event with an action called "Effect Parameter": While most effects are intuitive enough to be used directly, some might require a bit more knowledge to understand what they do. This section explains some of the advanced effects. -#### Color map +#### Color map Applies a color-map effect on an object or layer. @@ -104,13 +103,13 @@ color-map-model-3.png : ![](/gdevelop5/interface/scene-editor/color-map-model-3. Don't forget to make changes to the colors of this file using an image editor. Otherwise, no changes will be visible (as the original colors won't be changed). -#### CRT +#### CRT Applies a CRT effect, simulating an old cathode-ray tube television. ![](/gdevelop5/interface/scene-editor/crt-effect.png) -#### Displacement +#### Displacement This effect uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object or layer. @@ -124,30 +123,29 @@ You can use this effect to apply all manner of warping effects. Currently, the ` > It uses the values of the displacement map to look up the correct pixels to output. This means it's not moving the original. Instead, it's starting from the original output and displays the screen differently based on the displacement map. For example, if a displacement map pixel has red = 1 and the filter scale is 20, this filter will output the pixel approximately 20 pixels to the right of the original. - -#### Drop shadow +#### Drop shadow Add a drop shadow under your object's visible on the layer. ![](/gdevelop5/interface/scene-editor/drop-shadow-effect.png) -#### God rays +#### God rays Cast rays of light from the top of the screen. **This won't work well if shown on top of the background color of the scene**. Be sure to use an object acting as a background or a floor. ![](/gdevelop5/interface/scene-editor/godray-effect.gif) -#### Kawase blur +#### Kawase blur This is a faster version of the traditional "Blur" effect. It's recommended that you use this one rather than the "Gaussian" blur effect. -#### Outline +#### Outline Add an outline on all objects of the layer having the effect. **This won't work well if shown on top of the background color of the scene**. Be sure to use an object acting as a background or a floor. ![](/gdevelop5/interface/scene-editor/outline-effect.png) -#### Pixelate +#### Pixelate Applies a pixelated effect, making display objects appear 'blocky'. @@ -157,13 +155,13 @@ Applies a pixelated effect, making display objects appear 'blocky'. For pixel-perfect or 8-bitgames, you can change the **Scale mode** options in your [game properties](/gdevelop5/interface/project-manager/properties) instead of using this effect. -#### RGB split +#### RGB split Separate each component's RGB(red, green, blue) colors and display them on the screen with an offset: ![](/gdevelop5/interface/scene-editor/rgb-effect.png) -#### Tilt shift +#### Tilt shift Add blur to the top and bottom of the entire layer or object. Perfect to simulate a tiny world or a camera focus effect. diff --git a/docs/gdevelop5/interface/scene-editor/layers-and-cameras.md b/docs/gdevelop5/interface/scene-editor/layers-and-cameras.md index bd2a372e21..98aed31b44 100644 --- a/docs/gdevelop5/interface/scene-editor/layers-and-cameras.md +++ b/docs/gdevelop5/interface/scene-editor/layers-and-cameras.md @@ -7,12 +7,12 @@ title: Layers and cameras A layer is a virtual container of objects in a scene. Layers serve multiple purposes, including: - * Determine the position of objects in the scene - * Front-to-back ordering of object instances (similar to Z-order) - * Layers can be hidden, which affects all objects in the layer - * Changing the time scale for all objects in a layer - * Apply visual effects to all objects on the layer - * Each layer has a camera that can be moved, rotated, and zoomed + * Determine the position of objects in the scene + * Front-to-back ordering of object instances (similar to Z-order) + * Layers can be hidden, which affects all objects in the layer + * Changing the time scale for all objects in a layer + * Apply visual effects to all objects on the layer + * Each layer has a camera that can be moved, rotated, and zoomed Each scene can have multiple layers, but objects can only exist on one layer at a time. By default, objects added to a scene will be placed on the "base layer". @@ -62,9 +62,9 @@ While the game is running, each layer has its own virtual camera. These cameras There are two actions to position the camera on an object: -* If you want an object to always stay in the view of the camera, you can use the action **Center the camera on an object**. This will make the camera follow the object wherever it goes in the scene. + * If you want an object to always stay in the view of the camera, you can use the action **Center the camera on an object**. This will make the camera follow the object wherever it goes in the scene. -* To prevent the camera from going out of bounds, you can use the action **Center the camera on an object within limits**. This will let the camera follow the object while preventing the center of the camera from leaving the boundaries described in the action. + * To prevent the camera from going out of bounds, you can use the action **Center the camera on an object within limits**. This will let the camera follow the object while preventing the center of the camera from leaving the boundaries described in the action. ![](/gdevelop5/interface/scene-editor/layers-and-cameras/pasted/20230310-202341.png) @@ -86,10 +86,10 @@ Many games use a moving camera but they also must prevent the camera from displa There are also several [useful expressions](https://wiki.gdevelop.io/gdevelop5/all-features/camera/reference#expressions) that provide the current boundaries of the camera: -- CameraBorderTop(layer, number) -- CameraBorderBottom(layer, number) -- CameraBorderLeft(layer, number) -- CameraBorderRight(layer, number) + - CameraBorderTop(layer, number) + - CameraBorderBottom(layer, number) + - CameraBorderLeft(layer, number) + - CameraBorderRight(layer, number) ## Reference diff --git a/docs/gdevelop5/monetization.md b/docs/gdevelop5/monetization.md index a9ac02be71..feea7a569c 100644 --- a/docs/gdevelop5/monetization.md +++ b/docs/gdevelop5/monetization.md @@ -7,5 +7,5 @@ GDevelop allows you to monetize your games without paying any kind of royalties The following tutorials provided step-by-step walkthroughs of monetization options: -* [monetize](/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize) -* [admob](/gdevelop5/all-features/admob) \ No newline at end of file + * [monetize](/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize) + * [admob](/gdevelop5/all-features/admob) \ No newline at end of file diff --git a/docs/gdevelop5/objects/3d-model/index.md b/docs/gdevelop5/objects/3d-model/index.md index bb599c8834..f3228702a5 100644 --- a/docs/gdevelop5/objects/3d-model/index.md +++ b/docs/gdevelop5/objects/3d-model/index.md @@ -29,9 +29,9 @@ GDevelop supports 3D models saved in the **GLB (.glb) format**. It is a standard Large 3D models can impact your game as they will have: -- A larger size, making your game bigger and slower to download (especially on mobile phones or without broadband), -- A larger impact on the loading time (which will be slower, especially on low end devices), -- A negative impact on game performance, as the player device graphics card will need to spend more time rendering all the triangles composing the 3D model. + - A larger size, making your game bigger and slower to download (especially on mobile phones or without broadband), + - A larger impact on the loading time (which will be slower, especially on low end devices), + - A negative impact on game performance, as the player device graphics card will need to spend more time rendering all the triangles composing the 3D model. !!! tip @@ -47,5 +47,5 @@ This section will be enhanced with various solutions to build your 3D models. You can find free or premium 3D models suitable for your games on some website like: -- [Kenney.nl](https://www.kenney.nl/assets/category:3D). -- [Quaternius.com](https://quaternius.com/index.html). + - [Kenney.nl](https://www.kenney.nl/assets/category:3D). + - [Quaternius.com](https://quaternius.com/index.html). diff --git a/docs/gdevelop5/objects/bitmap_text/index.md b/docs/gdevelop5/objects/bitmap_text/index.md index 77eb0b90e6..62f3042096 100644 --- a/docs/gdevelop5/objects/bitmap_text/index.md +++ b/docs/gdevelop5/objects/bitmap_text/index.md @@ -11,24 +11,23 @@ It's especially useful for scores, titles, button labels, pixel-art games... As all characters are designed in an external editor, and a texture is generated with these characters, a Bitmap Text is more performant to render but also way less flexible, in particular if you want to display a text entered by a user in any language. If that's the case, take a look at the [Text object](/gdevelop5/objects/text) or at the [BBtext object](/gdevelop5/objects/bbtext). - ![](pasted/20210510-003631.png) ## Creating "Bitmap Font" files A font is represented by two files: -- **Bitmap Atlas image** : This file is the image which contains all characters that can be drawn. File format must be PNG. -- **Bitmap Font** : This file contains the data related to characters that can be draw, the engine use these data for knowing which characters render on screen. File format must be FNT or XML. + - **Bitmap Atlas image** : This file is the image which contains all characters that can be drawn. File format must be PNG. + - **Bitmap Font** : This file contains the data related to characters that can be draw, the engine use these data for knowing which characters render on screen. File format must be FNT or XML. These two files can be created with an external editor to generate bitmap fonts, for example: -* **[snowb](https://snowb.org/)** (Web) Export with **.fnt (BMFont TEXT)** + * **[snowb](https://snowb.org/)** (Web) Export with **.fnt (BMFont TEXT)** -* **[bmFont](https://www.angelcode.com/products/bmfont/)** (Windows) -* **[bmGlyph](https://www.bmglyph.com/)** (macOS) + * **[bmFont](https://www.angelcode.com/products/bmfont/)** (Windows) + * **[bmGlyph](https://www.bmglyph.com/)** (macOS) -* **[Hiero](https://github.com/libgdx/libgdx/wiki/Hiero)** (Windows/Linux/OS X) + * **[Hiero](https://github.com/libgdx/libgdx/wiki/Hiero)** (Windows/Linux/OS X) ## Font size and scale diff --git a/docs/gdevelop5/objects/button/index.md b/docs/gdevelop5/objects/button/index.md index e9efda8746..6568711b10 100644 --- a/docs/gdevelop5/objects/button/index.md +++ b/docs/gdevelop5/objects/button/index.md @@ -18,9 +18,9 @@ The [Buttons asset pack](https://gdevelop.io/asset-store/free/menu-buttons-menu- When creating a button from scratch, 3 images are usually needed, one for each state of the button: -- Idle -- Hovered -- Pressed + - Idle + - Hovered + - Pressed The object automatically shows the right image according to taps on a touchscreen or the mouse cursor. diff --git a/docs/gdevelop5/objects/custom-objects-prefab-template.md b/docs/gdevelop5/objects/custom-objects-prefab-template.md index aacad0c054..236f62dfb3 100644 --- a/docs/gdevelop5/objects/custom-objects-prefab-template.md +++ b/docs/gdevelop5/objects/custom-objects-prefab-template.md @@ -11,9 +11,9 @@ For example, the **[multitouch joysticks](/gdevelop5/objects/multitouch-joystick Custom objects contain other objects, which are called "child objects". They can display on screen one or more instances of these "child objects" and can offer: -* custom conditions, -* custom actions, -* custom expressions. + * custom conditions, + * custom actions, + * custom expressions. !!! warning diff --git a/docs/gdevelop5/objects/effects/index.md b/docs/gdevelop5/objects/effects/index.md index 98c34129fb..bca305a7bd 100644 --- a/docs/gdevelop5/objects/effects/index.md +++ b/docs/gdevelop5/objects/effects/index.md @@ -45,10 +45,10 @@ In this example, the Dark Night effect is called "Effect" and has two parameters You can then add an event with an action called "Effect Parameter": -* Enter first the layer name (don't forget the quotes). For the base layer, enter an empty string (`""`). -* Enter the name of the effect, for example `"Effect"`. -* Enter the name of the parameter, for example `"opacity"` or `"intensity"`. -* Finally, enter the new value to be set for this parameter. + * Enter first the layer name (don't forget the quotes). For the base layer, enter an empty string (`""`). + * Enter the name of the effect, for example `"Effect"`. + * Enter the name of the parameter, for example `"opacity"` or `"intensity"`. + * Finally, enter the new value to be set for this parameter. !!! danger diff --git a/docs/gdevelop5/objects/index.md b/docs/gdevelop5/objects/index.md index b2cd6395ab..2f4530d04b 100644 --- a/docs/gdevelop5/objects/index.md +++ b/docs/gdevelop5/objects/index.md @@ -13,28 +13,28 @@ Objects can have [behaviors](/gdevelop5/behaviors) attached to them, adding to o This section lists the different types of objects, each of which serves a unique purpose. -- General: - - [Sprite](/gdevelop5/objects/sprite) - - [Tiled sprite](/gdevelop5/objects/tiled_sprite) - - [Panel Sprite ("9-patch")](/gdevelop5/objects/panel_sprite) -- Display a text (score, name, explanation): - - [Text](/gdevelop5/objects/text) - - [Bitmap text](/gdevelop5/objects/bitmap_text) - - [BBText](/gdevelop5/objects/bbtext) -- Build user interfaces: - - [Text input](/gdevelop5/objects/text_input) - - [Button](/gdevelop5/objects/button) - - [Multi-touch joystick](/gdevelop5/objects/multitouch-joystick) - - [Slider](/gdevelop5/objects/slider) - - [Toggle switch](/gdevelop5/objects/toggle-switch) - - [Resource bar](/gdevelop5/objects/resource-bar) - - [Video](/gdevelop5/objects/video) -- Make visual effects: - - [Particles emitter](/gdevelop5/objects/particles_emitter) - - [Light](/gdevelop5/objects/light) - - [Shape painter](/gdevelop5/objects/shape_painter) -- Advanced effects or rendering: - - [Tilemap](/gdevelop5/objects/tilemap) + - General: + - [Sprite](/gdevelop5/objects/sprite) + - [Tiled sprite](/gdevelop5/objects/tiled_sprite) + - [Panel Sprite ("9-patch")](/gdevelop5/objects/panel_sprite) + - Display a text (score, name, explanation): + - [Text](/gdevelop5/objects/text) + - [Bitmap text](/gdevelop5/objects/bitmap_text) + - [BBText](/gdevelop5/objects/bbtext) + - Build user interfaces: + - [Text input](/gdevelop5/objects/text_input) + - [Button](/gdevelop5/objects/button) + - [Multi-touch joystick](/gdevelop5/objects/multitouch-joystick) + - [Slider](/gdevelop5/objects/slider) + - [Toggle switch](/gdevelop5/objects/toggle-switch) + - [Resource bar](/gdevelop5/objects/resource-bar) + - [Video](/gdevelop5/objects/video) + - Make visual effects: + - [Particles emitter](/gdevelop5/objects/particles_emitter) + - [Light](/gdevelop5/objects/light) + - [Shape painter](/gdevelop5/objects/shape_painter) + - Advanced effects or rendering: + - [Tilemap](/gdevelop5/objects/tilemap) ## Learn about some objects with this video tutorial @@ -50,7 +50,6 @@ This section lists the different types of objects, each of which serves a unique ![](pasted/20230221-180825.png) - ## Choosing a name for your object Objects are given a default name when they are created. You can change this from the object editor or using the context menu on the object in the objects list. @@ -58,7 +57,7 @@ Objects are given a default name when they are created. You can change this from Note that there are limitations on how you name your object: you can only use alphanumeric characters and no spaces. You can use an underscore if you want to make a separation between words (though usually, games are using casing to separate words. For example: `EnemyBullet`). This is to make sure your object will be recognized properly when used in [expressions](/gdevelop5/all-features/expressions). -Some good exampless of names are: `Player`, `RedEnemy`, `Red_Enemy`, `Car1`, `FinalBoss`, `Final_Boss`, `Wall`... Giving a descriptive name is useful to make sure you can quickly identify objects in the events. +Some good examples of names are: `Player`, `RedEnemy`, `Red_Enemy`, `Car1`, `FinalBoss`, `Final_Boss`, `Wall`... Giving a descriptive name is useful to make sure you can quickly identify objects in the events. ## Adding an instance of an object to a scene @@ -145,6 +144,7 @@ By default, object instances are all marked as visible, meaning that they are di !!! tip Some objects, like Sprite or Text objects, can also have an **opacity**. The opacity, between 0 and 255, defines how transparent an object is (0 being fully transparent, 255 is the fully opaque and is the default). This can be changed independently from the visibility. + ## Adding effects to objects You can add extra visual effects to objects. For example, you could use the "Outline" effect to make an object to pick up or to use more visible. You can also use more advanced visual effects that change the shape of the object or create interesting visual results. @@ -161,8 +161,8 @@ Read [this page to learn more about adding effects to your objects](/gdevelop5/o You can change and manipulate the properties of an instance of an object, or of multiple instances, using events during the game. This is even what game making is all about in GDevelop: to manipulate objects in real-time as we play the game. As the events and events editor are out of the scope of this page, refer to [the basic game making concepts](/gdevelop5/tutorials/basic-game-making-concepts) page to get started. -* All objects share the **same common features** (like position, angle and everything that is written on this page), and there are a lot of conditions and actions that you can use for all objects. -* Objects can also provides you with specific feature. For example, [Sprite objects](/gdevelop5/objects/sprite) can have animations, and the animation being played can be changed using an action. Find more information in the page of each specific object. + * All objects share the **same common features** (like position, angle and everything that is written on this page), and there are a lot of conditions and actions that you can use for all objects. + * Objects can also provides you with specific feature. For example, [Sprite objects](/gdevelop5/objects/sprite) can have animations, and the animation being played can be changed using an action. Find more information in the page of each specific object. ### Organizing objects into groups for events diff --git a/docs/gdevelop5/objects/light/index.md b/docs/gdevelop5/objects/light/index.md index 30bb2025a7..a5691ae5c3 100644 --- a/docs/gdevelop5/objects/light/index.md +++ b/docs/gdevelop5/objects/light/index.md @@ -6,9 +6,9 @@ title: Light Light objects simulate light sources in 2D and cast shadows on other objects. Light objects can be customized with several properties: -- a light color -- a light radius -- a texture to give a shape to the light + - a light color + - a light radius + - a texture to give a shape to the light ## How does it work? @@ -20,23 +20,18 @@ Light rays will take into account the custom collisions masks on the objects wit The light texture property allows to create a custom shape for the light. - For instance, a flashlight effect can be achieved by using a cone-shaped texture. | ![The light texture used in the object.](Cone_Light.png) | ![The result of a light texture in game](result_light_texture.png) | |---|---| | The light texture used in the object. | The result in game. | - !!! tip For example, a light texture can be used to make a headlight bulbs for a car or a flashlight that illuminate only in one direction. Open the following example to see how light custom shapes can be used. - - - ## Examples [Open example in GDevelop](https://editor.gdevelop.io/?project=example://lights){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/objects/multitouch-joystick/index.md b/docs/gdevelop5/objects/multitouch-joystick/index.md index 8f360b110d..e16736a514 100644 --- a/docs/gdevelop5/objects/multitouch-joystick/index.md +++ b/docs/gdevelop5/objects/multitouch-joystick/index.md @@ -49,7 +49,7 @@ The "Platformer multitouch controller mapper" behavior can be added to the chara A multitouch controller button can be created in a few steps: -- Create a sprite object - Attach a "Multitouch button" behavior to it + - Create a sprite object - Attach a "Multitouch button" behavior to it The multitouch button behavior allows the developer to choose a button name. The same name must also be set in the mapper behavior for the jump. diff --git a/docs/gdevelop5/objects/panel_sprite/index.md b/docs/gdevelop5/objects/panel_sprite/index.md index 89ab70942c..49b10a03b8 100644 --- a/docs/gdevelop5/objects/panel_sprite/index.md +++ b/docs/gdevelop5/objects/panel_sprite/index.md @@ -25,7 +25,7 @@ The texture is split into 9 segments, 1 to 9. Each of those segments will be sca While the normal sprite object's image is scaled uniformly, the 9 patch sprite object's image is scaled as different segments, maintaining their proportion and the image's quality. -### Using a Panel sprite +### Using a Panel sprite To use the Panel Sprite, create a new object from the Objects panel on the right. Once you've created the object, you can set the size of the margins for each border around the object. Margins are the top, left, right, and bottom lines that separate each segment. The default width and height in the object properties should represent the size of the total image used, in pixels. diff --git a/docs/gdevelop5/objects/particles_emitter/index.md b/docs/gdevelop5/objects/particles_emitter/index.md index beb21ea7d4..0b6b78d9b5 100644 --- a/docs/gdevelop5/objects/particles_emitter/index.md +++ b/docs/gdevelop5/objects/particles_emitter/index.md @@ -8,18 +8,18 @@ Particle emitters can be used to display a large number of small particles. They The Particles Emitter object parameters can be configured in multiple different ways to create a specific desired effect.
- +
## Particle types There are 3 rendering modes available for Particle Emitters: Circles, Lines and Images. -* Circle mode, will display circles with the specified size. -* Line mode, will display lines with the specified length and thickness. -* Image mode, will display an image of the specified size. + * Circle mode, will display circles with the specified size. + * Line mode, will display lines with the specified length and thickness. + * Image mode, will display an image of the specified size. ## Colors @@ -29,15 +29,15 @@ You can choose a starting color for particles, and a color to fade to. You can a Particles will be emitted in the direction represented by the angle of the emitters on the scene. You can change the angle of *the spray cone*, which is also represented in the scene editor as two lines: a large value for this "spray cone" will result in an emission of particles in a larger number of directions. A value of 0 will emit particles only in a single direction. -* Particles appear in a circle around the position of the emitter object. You can change the radius of the circle. -* Gravity can be applied on particles on X and Y axis. For example, a negative value on the Y-axis will cause the particles to go up in the air. -* Rotation can be applied to particles, particles will rotate at a value between the minimum and maximum values set. + * Particles appear in a circle around the position of the emitter object. You can change the radius of the circle. + * Gravity can be applied on particles on X and Y axis. For example, a negative value on the Y-axis will cause the particles to go up in the air. + * Rotation can be applied to particles, particles will rotate at a value between the minimum and maximum values set. ## Lifetime -* Each particle has a limited lifetime that is chosen randomly between two values. These two values can be changed. -* The number of particles contained in the emitter ("tank") can be unlimited or fixed to a number. If the emitter is fixed to a number, the emitter will stop emitting after reaching the set number of particles. -* The flow is the number of particles created every second. You can enter -1 to fire all particles at once. + * Each particle has a limited lifetime that is chosen randomly between two values. These two values can be changed. + * The number of particles contained in the emitter ("tank") can be unlimited or fixed to a number. If the emitter is fixed to a number, the emitter will stop emitting after reaching the set number of particles. + * The flow is the number of particles created every second. You can enter -1 to fire all particles at once. You can also change the maximum number of particles rendered by the object on the screen. Note that this number changes the memory taken by the emitter. **If this number is too big, it can cause the game to crash.** @@ -48,12 +48,10 @@ You can also change the maximum number of particles rendered by the object on th **See it in action!** 🎮 Open these examples online. - [![](Examples1ParticleEmitterExplosions.png)](https://editor.gdevelop.io/?project=example://particles-explosions) [Open example in GDevelop](https://editor.gdevelop.io/?project=example://particles-explosions){ .md-button .md-button--primary } - [![](Examples2ParticleEmitterWishForge.png)](https://editor.gdevelop.io/?project=https://resources.gdevelop-app.com/examples/particle-effects-demo/particle-effects-demo.json) [Open example in GDevelop](https://editor.gdevelop.io/?project=https://resources.gdevelop-app.com/examples/particle-effects-demo/particle-effects-demo.json){ .md-button .md-button--primary } diff --git a/docs/gdevelop5/objects/resource-bar/index.md b/docs/gdevelop5/objects/resource-bar/index.md index c28bf1c42c..018e08b04f 100644 --- a/docs/gdevelop5/objects/resource-bar/index.md +++ b/docs/gdevelop5/objects/resource-bar/index.md @@ -17,16 +17,16 @@ The [Resource Bars asset pack](https://gdevelop.io/asset-store/free/resource-bar A resource bar can also be created from scratch. There are 2 kinds of resource bars: -- one with icons that are repeated -- one that fills with a texture + - one with icons that are repeated + - one that fills with a texture ## Create a bar with icons Bars with icons need 3 images: -- a filled icon -- an empty icon -- a background (optional) + - a filled icon + - an empty icon + - a background (optional) This is an example with a background: @@ -46,9 +46,9 @@ Make sure to fill the "Unit width" with the dimension of the icon plus the margi Bars with icons need 3 images for: -- a filled bar -- a buffer bar (optional) -- a background + - a filled bar + - a buffer bar (optional) + - a background The buffer keeps the old value until no damage happens. This is useful to catch the attention of players and let them know they are losing a lot of heath. It's common on versus fighting games. diff --git a/docs/gdevelop5/objects/shape_painter/index.md b/docs/gdevelop5/objects/shape_painter/index.md index 842ef3b1e7..d7f6e91aa6 100644 --- a/docs/gdevelop5/objects/shape_painter/index.md +++ b/docs/gdevelop5/objects/shape_painter/index.md @@ -66,7 +66,3 @@ Like most objects, collisions can be detected by the shape painter object. Shap ## Reference All actions, conditions and expressions are listed in [the shape painter reference page](/gdevelop5/all-features/primitive-drawing/reference/). - - - - diff --git a/docs/gdevelop5/objects/slider/index.md b/docs/gdevelop5/objects/slider/index.md index 69ec594d2c..a3b8dd726e 100644 --- a/docs/gdevelop5/objects/slider/index.md +++ b/docs/gdevelop5/objects/slider/index.md @@ -23,9 +23,9 @@ The [Settings UI asset pack](https://gdevelop.io/asset-store/free/settings-ui-se Sliders need 3 images: -- the thumb, that is dragged by user on the bar, -- the filled part of the bar, -- the background or frame of the bar, + - the thumb, that is dragged by user on the bar, + - the filled part of the bar, + - the background or frame of the bar, When the slider is made larger in the editor, the thumb remains the same size. The default size of the thumb must be changed if necessary. diff --git a/docs/gdevelop5/objects/sprite/edit-points/index.md b/docs/gdevelop5/objects/sprite/edit-points/index.md index c24bcfe195..074961747f 100644 --- a/docs/gdevelop5/objects/sprite/edit-points/index.md +++ b/docs/gdevelop5/objects/sprite/edit-points/index.md @@ -5,8 +5,8 @@ title: Edit Points Points are reference locations that refer to a specific location around a sprite. Every sprite starts with two default points, named "**Origin**" and "**Center**". Each of these points can be moved from their default locations. -* **Origin** point is created at the top-left corner of the sprite image. This point is used to position the image of the sprite object on the scene. -* **Center** point is created at the halves of the dimensions of the image. The **Center** point, also called "anchor" or "pivot" in other game engines, is the point around which the image is rotated or flipped. + * **Origin** point is created at the top-left corner of the sprite image. This point is used to position the image of the sprite object on the scene. + * **Center** point is created at the halves of the dimensions of the image. The **Center** point, also called "anchor" or "pivot" in other game engines, is the point around which the image is rotated or flipped. !!! tip @@ -26,14 +26,12 @@ The **Share same points for all sprites of this animation** switch can be unchec ![](point-editor.png){ .align-center } - ## Use custom points in events Custom points can be used in events with the `PointX` and `PointY` [expressions](/gdevelop5/all-features/expressions/). Custom point names must be surrounded by double quotation marks. ![](custom-point-expression.png){ .align-center } - ## Editing the default origin and center points If the sprite images are not centered, or the image should rotate around a specific position, you can change the position of the **Origin** and **Center** point. By default, the center point position is automatically computed. If you want to change its position, click on the Pen icon next to it: diff --git a/docs/gdevelop5/objects/sprite/index.md b/docs/gdevelop5/objects/sprite/index.md index 7132316d33..efc07361e1 100644 --- a/docs/gdevelop5/objects/sprite/index.md +++ b/docs/gdevelop5/objects/sprite/index.md @@ -63,7 +63,6 @@ Above each animation in this window, you will see a field to the right of "Anima ![](./animation_name.png) - !!! tip For objects with multiple animations, you may find it difficult to differentiate between animations without names. It is generally a good practice to use animation names for objects with multiple animations. @@ -116,7 +115,7 @@ You can also change animations using the number associated with that animation u You can use the current animation of a sprite object as the condition for an event, either with its animation name or number, as well as a particular frame of the animation. -When using an animation's name, write the name between quotation marks. For examples: "Animation" +When using an animation's name, write the name between quotation marks. For examples: "Animation" ![](./ChangeAnimationCondition.png) diff --git a/docs/gdevelop5/objects/text/index.md b/docs/gdevelop5/objects/text/index.md index b9aab87d03..84e2fb97f9 100644 --- a/docs/gdevelop5/objects/text/index.md +++ b/docs/gdevelop5/objects/text/index.md @@ -30,20 +30,20 @@ You can choose from bold and italic, as well as choosing a custom font for the t ### Additional effects -* You can create **gradients** using the action "gradient". You can choose available gradient types from the provided list and select up to four colors to use. + * You can create **gradients** using the action "gradient". You can choose available gradient types from the provided list and select up to four colors to use. ![](textgradient.png) -* You can set a **Shadow** using the action "text shadow/show shadow". When changing the shadow, you can choose the color, distance, blur, and angle. This can also be used to create a glow effect with bright colors. + * You can set a **Shadow** using the action "text shadow/show shadow". When changing the shadow, you can choose the color, distance, blur, and angle. This can also be used to create a glow effect with bright colors. ![](showtextshadow.png) ![](changetextshadow.png) -* **Opacity** of the object can be changed. + * **Opacity** of the object can be changed. ![](changetextopacity.png) -* **Scaling** of the object can be changed. There are three options: "Scale" (constrains proportions to scale on both X and Y axis), "Scale on X axis" (width), and "Scale on Y axis" (height). + * **Scaling** of the object can be changed. There are three options: "Scale" (constrains proportions to scale on both X and Y axis), "Scale on X axis" (width), and "Scale on Y axis" (height). ![](textscaling.png) ![](modifytextscale.png) diff --git a/docs/gdevelop5/objects/text_input/index.md b/docs/gdevelop5/objects/text_input/index.md index 12516a78d6..a1f801a0d6 100644 --- a/docs/gdevelop5/objects/text_input/index.md +++ b/docs/gdevelop5/objects/text_input/index.md @@ -19,9 +19,9 @@ Because the object is not rendered by the same hardware accelerated renderer as This means: -- You can't change the **Z order** of the object. -- You can't use **effects** with the object. -- Be careful if you use the object in a scene with a moving camera or if you rotate/move the object. It might be slightly desynchronized from the rest of the rendered game. This can create a weird effect for the player. + - You can't change the **Z order** of the object. + - You can't use **effects** with the object. + - Be careful if you use the object in a scene with a moving camera or if you rotate/move the object. It might be slightly desynchronized from the rest of the rendered game. This can create a weird effect for the player. In general, prefer to use the object on **a static screen** and ensure that the keyboard on mobile devices won't hide critical information. @@ -29,9 +29,9 @@ In general, prefer to use the object on **a static screen** and ensure that the The field can be: -* A **single line** text input (default) -* A **multiline** text input (also called a "text area") -* Or a special single line text input: *password, email, search field, number, phone number, url*. + * A **single line** text input (default) + * A **multiline** text input (also called a "text area") + * Or a special single line text input: *password, email, search field, number, phone number, url*. According to the type, some devices might display visual aids or **a different keyboard** to the user (especially on mobile). Password inputs will also hide the character that the user is writing. @@ -44,5 +44,5 @@ After adding a Text Input object, put an instance on the scene. You can then use You can set, either from the object properties or using actions, the field as : -* Read-only. Text can still be selected and usually the appearance of the field does not change, but the text can't be modified. -* Disabled. Text usually can't be selected, nor modified, and some devices or platforms will gray the input. + * Read-only. Text can still be selected and usually the appearance of the field does not change, but the text can't be modified. + * Disabled. Text usually can't be selected, nor modified, and some devices or platforms will gray the input. diff --git a/docs/gdevelop5/objects/tiled_sprite/index.md b/docs/gdevelop5/objects/tiled_sprite/index.md index c96292dca0..deaafb808c 100644 --- a/docs/gdevelop5/objects/tiled_sprite/index.md +++ b/docs/gdevelop5/objects/tiled_sprite/index.md @@ -9,23 +9,23 @@ A tiled sprite object can be used to create platforms in a platform game, health ![](tiled-sprite-object.png) -#### Add a tiled sprite object +#### Add a tiled sprite object To create a new Tiled Sprite object, click the "Add a new object" button at the bottom of the Objects list, and select "Tiled Sprite" from the window that opens. Alternatively, you can search through the asset store to add an already made tiled sprite object to the scene. ![](AddTiledSprite.png) -#### Open object properties +#### Open object properties After creating the object or adding it to your game from the asset store, you can examine the object's properties.To open the newly created object's properties, right-click on the object and selecting "Edit object" from the popup list that appears, or double click on the object. -#### Add an image +#### Add an image With the object's properties window open, you can add an image to the object by clicking in to the "Select an image" text field. From the drop down menu that appears you can chose where the image will come from. Chose the source of the image, and select the image you want to add. The selected image will be displayed in the preview window on the left. ![](AddImageToTiledSprite.png) -#### Change default size +#### Change default size We can change the default size of the tiled sprite object by changing the Default width and Default height value in the object's properties window. This size will determine the size, in pixels, that the object will appear in game when placed. @@ -33,7 +33,7 @@ This will not scale or alter the original image in any way, just the default siz ![](ChangeDefaultSizeTiledSprite.png) -#### Scale the object +#### Scale the object The size of the tiled sprite effects how much of your image is going to be visible in your game. If the image used in the tiled sprite object is larger than the size it's scaled to in scene, only a portion of the image will be visible. diff --git a/docs/gdevelop5/objects/tilemap/index.md b/docs/gdevelop5/objects/tilemap/index.md index e816e94a94..99e77a67bf 100644 --- a/docs/gdevelop5/objects/tilemap/index.md +++ b/docs/gdevelop5/objects/tilemap/index.md @@ -29,16 +29,18 @@ This object is still experimental and will be improved in the future * Tiled Map Maker specific limitations: * Maps made in tiled **must** have a fixed size. Tilemaps set to "Infinite" will not function. * Only collisions from Tiled are supported - for LDtk you will need to manually create them as separate invisible objects in GDevelop. - * **Tilemaps made with Tiled Map Maker using more than one tilesets** are not supported. One tileset per Tiled tilemap is supported for now. LDtk tilemaps support multiple tilesets per map, but do not support swapping out Tileset atlases. + * **Tilemaps made with Tiled Map Maker using more than one tilesets** are not supported. One tileset per Tiled tilemap is supported for now. LDtk tilemaps support multiple tilesets per map, but do not support swapping out Tileset atlases. !!! tip Don't resize your atlas (image file) after you've started making a tilemap in Tiled: GDevelop won't render it, because its texture size and the one that is set in the Tiled file are different. If you need to resize your tileset, **create a new map** in Tiled (where you can copy your existing map). ## LDtk: Create a new tilemap step by step + !!! danger Please note that at this time, LDtk maps cannot be imported into Cloud projects or the web-app, as the tileset resources will not upload along with them. + ### Create the map file - Launch LDtk. @@ -54,11 +56,12 @@ This object is still experimental and will be improved in the future - Select the desired image, then click **Open**. The tileset will be displayed. - Modify the **Tiles layout** section as needed for the respective tile size (e.g. 16x16, 32x32, etc) and any needed spacing. ![](pasted/20221229-111205.png) + ### Create the tile layer - Click the **Layers** button or press **L** on the keyboard. The **Project Layers** window will display. - Click the plus **+** button to add a new layer. A selection menu will display. - * While there are many layer types, this tutorial will only cover the standard Tiles layer. Entities are not imported at this time, whiel IntGrid and Auto-Layers are much more advanced and should be learned about at [ldtk.io](https://ldtk.io) + * While there are many layer types, this tutorial will only cover the standard Tiles layer. Entities are not imported at this time, while IntGrid and Auto-Layers are much more advanced and should be learned about at [ldtk.io](https://ldtk.io) - Click the **Tiles** option. - Within the **Layer identifier** field, type a name. - Select the desired tileset from the dropdown list. @@ -66,6 +69,7 @@ This object is still experimental and will be improved in the future - For most use cases, all other settings can be left default. - When you close the layers window, the various tiles from the tilemap will display on the left, and the tilemap can be painted. ![](pasted/20221229-111715.png) + ### Export the Tilemap - Once the map is complete, click the **Project Settings** button, or press **P** on the keyboard. @@ -74,7 +78,7 @@ This object is still experimental and will be improved in the future - Click **Save as**. A file browser will display. - Browse to somewhere to save the map. - Name the map file and click **Save**. - * Note, while the main ldtk project file can be used as a map file in GDevelop, it is safer to save a copy separately so the map can keep revisions, especially if a version control system like Github is being used. + * Note, while the main ldtk project file can be used as a map file in GDevelop, it is safer to save a copy separately so the map can keep revisions, especially if a version control system like Github is being used. ### Importing into GDevelop @@ -90,7 +94,6 @@ This object is still experimental and will be improved in the future - Click **Apply**. The tilemap object is now created, and can be dragged to the scene. ![](pasted/20221229-112838.png) - ## Tiled tutorial: Create a new tilemap step by step Start by finding or creating your tileset and save it in a PNG file. For this example, we'll use the *Cavernas* public domain tileset that can be [downloaded here](https://adamatomic.itch.io/cavernas). Save the file in your project folder. @@ -193,8 +196,8 @@ Finally, choose the tileset file in GDevelop, in addition to choosing the atlas Internally, GDevelop will work as follow: -* If you set a tileset JSON file in the object, this tileset will be used. Note that if at the same time, another tileset is bundled in your Tilemap JSON file, the external tileset JSON file will still be used by the object: the bundled tileset will be ignored. -* If you do not provide a tileset JSON file, the object will look for a tileset inside the Tilemap JSON and load it if present. + * If you set a tileset JSON file in the object, this tileset will be used. Note that if at the same time, another tileset is bundled in your Tilemap JSON file, the external tileset JSON file will still be used by the object: the bundled tileset will be ignored. + * If you do not provide a tileset JSON file, the object will look for a tileset inside the Tilemap JSON and load it if present. ## Animate tiles diff --git a/docs/gdevelop5/objects/toggle-switch/index.md b/docs/gdevelop5/objects/toggle-switch/index.md index cfcddf3f26..cf992d3dad 100644 --- a/docs/gdevelop5/objects/toggle-switch/index.md +++ b/docs/gdevelop5/objects/toggle-switch/index.md @@ -7,9 +7,9 @@ title: Toggle Switch ![type:video](https://www.youtube.com/embed/plkHd4uPI4U) -### Add a toggle switch to a game +### Add a toggle switch to a game -#### Get a toggle switch from asset store +#### Get a toggle switch from asset store The [Settings UI asset pack](https://gdevelop.io/asset-store/free/settings-ui-settings-ui) from the asset store contains free and read-to-use toggle switches. @@ -19,7 +19,7 @@ The [Settings UI asset pack](https://gdevelop.io/asset-store/free/settings-ui-se This pack also contains [sliders](/gdevelop5/objects/slider). -#### Create a toggle switch from scratch +#### Create a toggle switch from scratch Toggle switches need one image for each state: checked or unchecked. @@ -27,7 +27,7 @@ Toggle switches need one image for each state: checked or unchecked. The states transition can be animated. It works the same way as [Sprites](/gdevelop5/objects/sprite). -### Get toggle switch states +### Get toggle switch states Toggle switch states can be checked with the "Is checked" condition. diff --git a/docs/gdevelop5/objects/video/index.md b/docs/gdevelop5/objects/video/index.md index 1346eb13f8..ee7f0631ba 100644 --- a/docs/gdevelop5/objects/video/index.md +++ b/docs/gdevelop5/objects/video/index.md @@ -16,9 +16,8 @@ Videos can be controlled using events: timing, state (play/paused), audio volume Support for videos can vary according to the device or browser running the game. It's recommended for a broad compatibility that the file is in **.mp4** format, encoded as: -* **H264** for the video, -* **AAC** for the audio. - + * **H264** for the video, + * **AAC** for the audio. ## Set up a video @@ -31,12 +30,11 @@ The video object has several objects: Click on the field "Video resource", and then "Choose a new video file". For compatibility with most browsers, follow these pieces of advice for the video format: !!! warning - + To ensure good compatibility, use the **.mp4** format encoded as: * **H264** for the video, * **AAC** for the audio. - You can also choose: @@ -104,7 +102,6 @@ You can also set the volume of a video using GDevelop. To compare the volume of To set the volume of a video, use the `Set volume` condition. You can set it to any number between 0 to 100. The default volume is set to 100. - ## Example [![](pasted/Examples1VideoPlayer.png)](https://editor.gdevelop.io/?project=example://video-player) diff --git a/docs/gdevelop5/preferences.md b/docs/gdevelop5/preferences.md index e5bb524d0b..ce9dd2d369 100644 --- a/docs/gdevelop5/preferences.md +++ b/docs/gdevelop5/preferences.md @@ -5,7 +5,7 @@ title: Preferences You can change how GDevelop looks and acts to your liking. -##Opening Preferences +## Opening Preferences On the **web app**: Projects manager → Preferences @@ -17,7 +17,7 @@ The preferences window will look like this: ![](/gdevelop5/preferences.png) -##Changing the theme +## Changing the theme ![](/gdevelop5/properties-appearance.png) @@ -31,7 +31,7 @@ Themes allow you to change how the interface looks There are multiple themes you can choose from. You can also create your own themes! See, [how you can make one](https://github.com/4ian/GDevelop/blob/master/newIDE/README-themes.md) -##Changing backdrop click behaviour +## Changing backdrop click behaviour ![](/gdevelop5/properties-dialogue.png) @@ -43,8 +43,7 @@ If **Cancel changes** is selected, the changes done in the current window will b If **Apply changes**(Default) is selected, the changes done in the current window will be **applied**(Only happens in some windows) - -##Hints and Explanations +## Hints and Explanations GDevelop shows some hints/explanations for some features in the UI. You can toggle them off if you don't want them to be shown. @@ -72,6 +71,3 @@ Some language might not be fully supported, you can see the estimate of how much You can help translate GDevelop to your language and report any mistakes. It would be much appreciated. ![](/gdevelop5/changinglanguage2.png) - - - diff --git a/docs/gdevelop5/publishing/android_and_ios/index.md b/docs/gdevelop5/publishing/android_and_ios/index.md index d90c10e45a..9fe93cc594 100644 --- a/docs/gdevelop5/publishing/android_and_ios/index.md +++ b/docs/gdevelop5/publishing/android_and_ios/index.md @@ -20,15 +20,14 @@ In the File menu, choose Export. Then choose **Publish on Stores**, and select ![](/gdevelop5/publishing/publish-mobile-locate.gif) - ### Create an account if you don't have one To use the packaging for Android, you need a [GDevelop account](/gdevelop5/interface/profile). If you don't have one, click on "Create my account", enter your email and choose a password. Choose if you want to create an **APK** or an **Android App Bundle**: -- An **APK** allows you to send the generated file to your phone and install it. It's ideal to quickly **test your game on your Android device**. -- An **Android App Bundle** (also shorten to "AAB") is the format required to [publish to Google Play](/gdevelop5/publishing/android_and_ios/play-store). When you create a game on the Google Play Developer Console, you'll need to upload an AAB file. + - An **APK** allows you to send the generated file to your phone and install it. It's ideal to quickly **test your game on your Android device**. + - An **Android App Bundle** (also shorten to "AAB") is the format required to [publish to Google Play](/gdevelop5/publishing/android_and_ios/play-store). When you create a game on the Google Play Developer Console, you'll need to upload an AAB file. ![](/gdevelop5/publishing/publish-mobile-options.png) @@ -46,23 +45,21 @@ In the end, you'll have a **Download** button to get the APK file that can be in Plug your Android phone/tablet into your computer and put the APK file somewhere in a folder of the device. Alternatively, you can also store the APK on cloud storage ([Dropbox](https://www.dropbox.com/), [Google Drive](http://drive.google.com/), [OneDrive](https://onedrive.live.com/about/en-in/)...) and download it on your device. -Before installing the APK, go in Settings > Security and activate *Unknown sources*. This will enable you to [install the APK file](https://developer.android.com/studio/publish#publishing-unknown) even if it is not yet registered on the Google Play Store. +Before installing the APK, go in Settings > Security and activate _Unknown sources_. This will enable you to [install the APK file](https://developer.android.com/studio/publish#publishing-unknown) even if it is not yet registered on the Google Play Store. -Finally, open a *File Manager*, go in the folder containing your APK and touch it to start the installation: +Finally, open a _File Manager_, go in the folder containing your APK and touch it to start the installation: ![](/gdevelop5/publishing/android-file-manager.png) -The application is installed. Click *Open* to run it: +The application is installed. Click _Open_ to run it: ![](/gdevelop5/publishing/android-app-installed.png) - ### Play the game The game is now nicely installed on your phone! Launch it like any other app or game. -You've created a *game for Android* directly from GDevelop! You can update it easily: just export and package the game again, send the APK to your phone or tablet and install it. - +You've created a _game for Android_ directly from GDevelop! You can update it easily: just export and package the game again, send the APK to your phone or tablet and install it. ## Subscribe to allow more packaging each day. diff --git a/docs/gdevelop5/publishing/android_and_ios/play-store/index.md b/docs/gdevelop5/publishing/android_and_ios/play-store/index.md index f9a07b78ef..b44061f0eb 100644 --- a/docs/gdevelop5/publishing/android_and_ios/play-store/index.md +++ b/docs/gdevelop5/publishing/android_and_ios/play-store/index.md @@ -24,7 +24,7 @@ Download it and store it somewhere on your computer. ## Create the app and fill in the app details -Connect to the Play Store Developer Console (https://play.google.com/apps/publish/). On the pages listing your applications, click on **Create Application**: +Connect to the Play Store Developer Console (). On the pages listing your applications, click on **Create Application**: ![](/gdevelop5/publishing/android_and_ios/play-store/pasted/20210721-144512.png) @@ -60,8 +60,8 @@ In **What's new in this release?**, enter the release notes that should be displ If there is an error telling you that the upload failed, read the error message to know more about what went wrong. Usually, it means that: -* The package name is not correct. In GDevelop, using [the project manager](http://wiki.compilgames.net/doku.php/gdevelop5/interface/project-manager), enter a new, unique package name -* Or you used the same package name as an existing application. Choose another in the [the project manager](http://wiki.compilgames.net/doku.php/gdevelop5/interface/project-manager) and package again your game to create a new AAB. + * The package name is not correct. In GDevelop, using [the project manager](http://wiki.compilgames.net/doku.php/gdevelop5/interface/project-manager), enter a new, unique package name + * Or you used the same package name as an existing application. Choose another in the [the project manager](http://wiki.compilgames.net/doku.php/gdevelop5/interface/project-manager) and package again your game to create a new AAB. !!! note @@ -77,7 +77,6 @@ Before making your game public, you must finish the enter all the details about Once you've completed everything, entered a nice description, set up beautiful screenshots and uploaded the Android App Bundle of your game, you can go back to the **Release** section. Click on **Production** and create a release for it. - ## Congratulations! The game is on the Play Store. **Congrats!** You've made it and published your game. @@ -87,5 +86,4 @@ Remember to tell about it on social medias, on the Discord and on the forum to l !!! tip - Later, if you want to publish an upload, be sure to increase the version number (in the game properties in GDevelop). Otherwise, the Play Store will reject the new Android App Bundle if it has the same version number as an existing one. diff --git a/docs/gdevelop5/publishing/android_and_ios/play-store/upgrading-from-apk-to-aab.md b/docs/gdevelop5/publishing/android_and_ios/play-store/upgrading-from-apk-to-aab.md index a650748fea..c55a89882c 100644 --- a/docs/gdevelop5/publishing/android_and_ios/play-store/upgrading-from-apk-to-aab.md +++ b/docs/gdevelop5/publishing/android_and_ios/play-store/upgrading-from-apk-to-aab.md @@ -42,8 +42,8 @@ If you have not enabled Play App Signing, you need to enable it. You will be ask Send an email to `contact.gdevapp@gmail.com` with: -* "Upgrade to Google Play Signing" as the subject -* In the body, give the **email of your GDevelop account**, and the **link to the page on the Google Play Store of your game**. + * "Upgrade to Google Play Signing" as the subject + * In the body, give the **email of your GDevelop account**, and the **link to the page on the Google Play Store of your game**. We'll send you back by email the **two files** (encrypted private key and certificate file) that you need for the next step. @@ -57,17 +57,17 @@ Click on the **Opt In** button when you are on the screen to *create a new relea ![](/gdevelop5/publishing/android_and_ios/play-store/upgrading-from-apk-to-aab/pasted/20210721-133413.png) -In the next screen, choose ** Export and upload a key from Java keystore**, and then upload 2 files (see next section). +In the next screen, choose **Export and upload a key from Java keystore**, and then upload 2 files (see next section). ![](/gdevelop5/publishing/android_and_ios/play-store/upgrading-from-apk-to-aab/pasted/20210721-162525.png) ### 2.3: Upload the two files -After choosing ** Export and upload a key from Java keystore**: +After choosing **Export and upload a key from Java keystore**: -- Click **Upload Private Key** and choose the "encrypted-private-key" file sent to you. -- Click **Show instructions** next to *"For increased security, create a new upload key"* (this is mandatory to do!). -- Click **Upload your upload key certificate** and choose the "upload-key-certificate.pem" file sent to you. + - Click **Upload Private Key** and choose the "encrypted-private-key" file sent to you. + - Click **Show instructions** next to *"For increased security, create a new upload key"* (this is mandatory to do!). + - Click **Upload your upload key certificate** and choose the "upload-key-certificate.pem" file sent to you. !!! warning @@ -101,7 +101,6 @@ Click on **Upload** and choose the Android App Bundle (.aab) file that was gener After uploading the Android App Bundle file, it will be displayed: ![](/gdevelop5/publishing/android_and_ios/play-store/upgrading-from-apk-to-aab/pasted/20210721-170030.png) - You can then complete the informations and publish the release as usual (enter the release notes, click **Save** then click **Review release**). !!! note diff --git a/docs/gdevelop5/publishing/android_and_ios_with_cordova.md b/docs/gdevelop5/publishing/android_and_ios_with_cordova.md index 12a3a2776d..51e1892da9 100644 --- a/docs/gdevelop5/publishing/android_and_ios_with_cordova.md +++ b/docs/gdevelop5/publishing/android_and_ios_with_cordova.md @@ -49,7 +49,7 @@ You need to install: To be able to build the exported Cordova project, you also need to have **[Node.js](https://nodejs.org/en/)** installed on your system. Finally, you need to install Cordova by typing on the command prompt or terminal: -``` +```sh npm install -g cordova ``` @@ -71,26 +71,24 @@ Once you have specified what platform you want your game to be exported to, you !!! tip - ![](/gdevelop5/publishing/android-build-tool.png) Cordova may need a specific version of the Android build tool. It can be installed with the SDK Manager. Ensure you have the Android SDKs of version 30 and 31. - ## Testing on emulators or Android/iOS devices ## Testing on Android -You can run `cordova run android` to run the compiled application, or `cordova run android --device` to run on an Android device. Make sure that the device has the *developer mode* activated, is connected and recognized by the computer. +You can run `cordova run android` to run the compiled application, or `cordova run android --device` to run on an Android device. Make sure that the device has the _developer mode_ activated, is connected and recognized by the computer. You can also open Android Studio and open the project (choose the `platforms/android` folder). Then you can see in the top right the list of connected devices (or installed emulators) and run the app. ## Testing on iOS -* You can list iOS simulators installed on your Mac with `cordova emulate ios --list`. -* You can run the app on a specific simulator using `target`: `cordova run ios --target="iPhone-8"`. + * You can list iOS simulators installed on your Mac with `cordova emulate ios --list`. + * You can run the app on a specific simulator using `target`: `cordova run ios --target="iPhone-8"`. -* To test on an iOS device, it's recommended to launch XCode and open your project (`open platforms/ios/YourProject.xcworkspace`). You'll need to set up a "Development Team" and choose your device. This is because each device must be added to your "Development Team" before it can run development applications. + * To test on an iOS device, it's recommended to launch XCode and open your project (`open platforms/ios/YourProject.xcworkspace`). You'll need to set up a "Development Team" and choose your device. This is because each device must be added to your "Development Team" before it can run development applications. ## Exporting to the stores @@ -98,11 +96,11 @@ You can also open Android Studio and open the project (choose the `platforms/and For Android, you can compile your app as a **release AAB** (that can be uploaded on the Play Store), with `cordova build`. The command line should look like this: -``` +```sh cordova build android --release -- --keystore=/path/to/keystore --storePassword=KEYSTORE_STORE_PASSWORD --alias=KEYSTORE_ALIAS --password=KEYSTORE_PASSWORD --packageType bundle ``` -You can also use Android Studio (open it, then open the *platforms/android* folder) for building a *release APK* or *Android App Bundle*. Choose **Build > Generate Signed Bundle / APK...**. +You can also use Android Studio (open it, then open the _platforms/android_ folder) for building a _release APK_ or _Android App Bundle_. Choose **Build > Generate Signed Bundle / APK...**. ![](/gdevelop5/publishing/android_and_ios_with_cordova/pasted/20210117-174059.png) diff --git a/docs/gdevelop5/publishing/crazy-games/index.md b/docs/gdevelop5/publishing/crazy-games/index.md index 08d2eec056..19c9f6b039 100644 --- a/docs/gdevelop5/publishing/crazy-games/index.md +++ b/docs/gdevelop5/publishing/crazy-games/index.md @@ -7,11 +7,10 @@ Games made with GDevelop can be published on [CrazyGames](https://crazygames.com Some games made with GDevelop that have been published on CrazyGames: -- [Ball Challenge 2](https://gd.games/andre_holtz/ball-challenge-2) + - [Ball Challenge 2](https://gd.games/andre_holtz/ball-challenge-2) ![Ball Challenge 2 on CrazyGames](crazy_games_ball_challenge_2.png) !!! tip - You're welcome to contribute by adding a step-by-step explanation of the process. diff --git a/docs/gdevelop5/publishing/index.md b/docs/gdevelop5/publishing/index.md index cca051b990..735da86532 100644 --- a/docs/gdevelop5/publishing/index.md +++ b/docs/gdevelop5/publishing/index.md @@ -25,12 +25,12 @@ You can customise the link to your game, activate feedbacks and benefit from the * **[Web (for web gaming platforms)](/gdevelop5/publishing/html5_game_in_a_local_folder):** this option allows you to export your game in to a folder and upload it manually. This is perfect to share your game on [Poki](./poki), [Crazy Games](./crazy-games), Newgrounds, [Game Jolt](/gdevelop5/publishing/publishing-to-gamejolt-store), [Itch.io](/gdevelop5/publishing/publishing-to-itch-io) or other web-based gaming platforms. * **[Mobile (iOS, Android...)](/gdevelop5/publishing/android_and_ios):** this prepares your game for Android (iOS support is coming soon). Once ready, you get a link to play it on Android and [publish it to the Play Store](/gdevelop5/publishing/android_and_ios/play-store) (or App Store later for iOS) or on the [Amazon App Store](/gdevelop5/publishing/publishing-to-amazon-app-store). * **[Desktop (standalone executable, Steam...)](/gdevelop5/publishing/windows-macos-linux)**: this option bundles your game as a Windows, macOS or Linux application, perfect for [Steam](/gdevelop5/publishing/publish-to-steam) or other stores. - * **[Facebook Instant Games (Messenger)](/gdevelop5/publishing/publishing-to-facebook-instant-games):** this prepare your game so that it can be uploaded on Facebook Instant Games and played on Messenger, shared with your friends and then published worldwide. + * **[Facebook Instant Games (Messenger)](/gdevelop5/publishing/publishing-to-facebook-instant-games):** this prepare your game so that it can be uploaded on Facebook Instant Games and played on Messenger, shared with your friends and then published worldwide. ### Publish manually There export options will require some manual work on your part, and are intended for advanced users: - * **[Web](/gdevelop5/publishing/html5_game_in_a_local_folder):** this option is the same as in the prior category. - * **[Mobile](/gdevelop5/publishing/android_and_ios_with_cordova):** this option is going to export your game ready to be used as a Cordova project. You can then use Cordova command line tools to build your game for Android and iOS. - * **[Desktop](/gdevelop5/publishing/windows-macos-linux-with-electron):** this option is going to export your game ready to be used as an Electron project. You can then use command line tools to build your game for Windows, macOS or Linux. + * **[Web](/gdevelop5/publishing/html5_game_in_a_local_folder):** this option is the same as in the prior category. + * **[Mobile](/gdevelop5/publishing/android_and_ios_with_cordova):** this option is going to export your game ready to be used as a Cordova project. You can then use Cordova command line tools to build your game for Android and iOS. + * **[Desktop](/gdevelop5/publishing/windows-macos-linux-with-electron):** this option is going to export your game ready to be used as an Electron project. You can then use command line tools to build your game for Windows, macOS or Linux. diff --git a/docs/gdevelop5/publishing/poki/index.md b/docs/gdevelop5/publishing/poki/index.md index 921e93e6a3..de73081b28 100644 --- a/docs/gdevelop5/publishing/poki/index.md +++ b/docs/gdevelop5/publishing/poki/index.md @@ -7,12 +7,11 @@ Games made with GDevelop can be published on [Poki](https://poki.com/). With ove Some games made with GDevelop that have been published on Poki: -- [Spectrum](https://poki.com/en/g/spectrum) -- [Spent Shells](https://poki.com/en/g/spent-shells) + - [Spectrum](https://poki.com/en/g/spectrum) + - [Spent Shells](https://poki.com/en/g/spent-shells) ![Spectrum on Poki](poki_spectrum.png) !!! tip - You're welcome to contribute by adding a step-by-step explanation of the process. diff --git a/docs/gdevelop5/publishing/publish-to-steam/index.md b/docs/gdevelop5/publishing/publish-to-steam/index.md index 4ca82d4a7b..0bed69b1d6 100644 --- a/docs/gdevelop5/publishing/publish-to-steam/index.md +++ b/docs/gdevelop5/publishing/publish-to-steam/index.md @@ -6,9 +6,9 @@ title: Publish to Steam Start by export your game for desktop: -* For Windows, export as a ZIP file. -* For macOS, export as a ZIP file too. -* For Linux, build as an AppImage and extract it - or build manually as a zip file. + * For Windows, export as a ZIP file. + * For macOS, export as a ZIP file too. + * For Linux, build as an AppImage and extract it - or build manually as a zip file. ## Open an account on Steamworks and prepare your product page. @@ -29,12 +29,12 @@ You then configure a "Build" that is using the "depots". You can use the web int ### Issue when uploading a macOS build There is an issue making the macOS application not working after uploading the macOS zip file (this is because [the Steam web uploader breaks the symlinks](https://github.com/electron-userland/electron-builder/issues/5767#issuecomment-813920169)). -Instead, you must use the **steamcmd** command line tool to upload your macOS files. +Instead, you must use the **steamcmd** command line tool to upload your macOS files. -- Start by extracting the macOS zip file somewhere. Use Linux or macOS - Windows will break the "symlinks" when extracting the zip file. Extract the files in a folder called `mac`. You should have a single folder, "Your Game.app" inside this `mac` folder. -- Create a [Build Config file](https://partner.steamgames.com/doc/sdk/uploading) called `steam-upload-config.vdf`. Put it next to the folder called `mac`. This is an example: + - Start by extracting the macOS zip file somewhere. Use Linux or macOS - Windows will break the "symlinks" when extracting the zip file. Extract the files in a folder called `mac`. You should have a single folder, "Your Game.app" inside this `mac` folder. + - Create a [Build Config file](https://partner.steamgames.com/doc/sdk/uploading) called `steam-upload-config.vdf`. Put it next to the folder called `mac`. This is an example: -``` +```text "AppBuild" { "AppID" "1234560" // your AppID @@ -58,8 +58,8 @@ Instead, you must use the **steamcmd** command line tool to upload your macOS fi } ``` -- Install [steamcmd](https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD). -- Using a command line, run steamcmd: `steamcmd +login +run_app_build ./steam-upload-config.vdf +quit` + - Install [steamcmd](https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD). + - Using a command line, run steamcmd: `steamcmd +login +run_app_build ./steam-upload-config.vdf +quit` The **steamcdm** utility will upload the macOS app that you extracted in the `mac` folder, and it will now work correctly when you install it on a mac from the Steam client. You still need to configure the Launch Options - see the next section. @@ -67,8 +67,8 @@ The **steamcdm** utility will upload the macOS app that you extracted in the `ma In **Installation > General Installation** menu, you can configure the "Launch Options". The executable are: -- "YourGame.exe" for Windows (replace *YourGame* by the executable name - check in the zip file if necessary) -- "yourgame" for Linux (replace *yourgame* by the executable name - check in the zip file if necessary) -- "Your Game.app" for macOS (replace *Your Game.app* by the folder name - check in the zip file if necessary) + - "YourGame.exe" for Windows (replace *YourGame* by the executable name - check in the zip file if necessary) + - "yourgame" for Linux (replace *yourgame* by the executable name - check in the zip file if necessary) + - "Your Game.app" for macOS (replace *Your Game.app* by the folder name - check in the zip file if necessary) ![](./launch-options.png) diff --git a/docs/gdevelop5/publishing/publishing-to-amazon-app-store.md b/docs/gdevelop5/publishing/publishing-to-amazon-app-store.md index c05963a336..6210c73da5 100644 --- a/docs/gdevelop5/publishing/publishing-to-amazon-app-store.md +++ b/docs/gdevelop5/publishing/publishing-to-amazon-app-store.md @@ -5,8 +5,8 @@ title: Publish your game to the Amazon App Store After building your game with Android (either using the [one-click build for Android](/gdevelop5/publishing/android_and_ios) or [the manual process with Cordova for advanced users](/gdevelop5/publishing/android_and_ios_with_cordova)), you can publish it on the Amazon App Store. - ## Create your Amazon App Store Developer account + Go to the [Developer Console](https://developer.amazon.com/)and click **Sign In** in the upper-right corner. If you have an Amazon Account you can use it to sign to the Amazon Developer section, else create your account. ![](/gdevelop5/1_developer_sign.png) @@ -19,14 +19,12 @@ Next open the [Dashboard page](https://developer.amazon.com/home.html) for your Package your game as explained in the documentation. In the end, you'll have a **Download button** to get the .apk file that can be installed on Android. Download this APK and keep it somewhere on your computer. - ## Create the app and fill in the app details After you click on **Android**, a New App Submission page appears for you to enter basic information about your app. ![](/gdevelop5/6_amazon_app_submission.png) - In the next stages of information, you will have to fill the following stages ![](/gdevelop5/7_amazon_app_details.png) diff --git a/docs/gdevelop5/publishing/publishing-to-crimsongames.md b/docs/gdevelop5/publishing/publishing-to-crimsongames.md index 89a8577eab..f7506ce1cb 100644 --- a/docs/gdevelop5/publishing/publishing-to-crimsongames.md +++ b/docs/gdevelop5/publishing/publishing-to-crimsongames.md @@ -11,13 +11,13 @@ title: Publish your game to crimsongames.io ## Why crimsongames.io? -- It is completely **free** -- Easy to **prepare the content** for upload -- Easy to **update** the uploaded files -- No quality requirements, anything can be shared -- **SEO friendly**, anything you upload can be easily found in Search Engines. -- We can share HTML5 games played in the browser. -- **No annoying Ads** on Browser games + - It is completely **free** + - Easy to **prepare the content** for upload + - Easy to **update** the uploaded files + - No quality requirements, anything can be shared + - **SEO friendly**, anything you upload can be easily found in Search Engines. + - We can share HTML5 games played in the browser. + - **No annoying Ads** on Browser games ## Building the Package @@ -43,7 +43,12 @@ Once you have an crimsongames.io account, you want to login and you want to go t Once your game is added you will be able to see the game data such as API keys and game id. -* **Title:** this is the title of your game. * **Short description:** this is the short description of your game. * **Description:** this is the description of your game some HTML is allowed. * **Game category:** this is the category of your game. * **Game thumbnail:**this is the thumbnail or icon of your game. (thumbnail must be a (PNG or JPG) (max: 512x512px)) * **Game image for showcase:**this is a screenshot of your game. (Image must be a (PNG or JPG) (max:1920x1080px)) + * **Title:** this is the title of your game. + * **Short description:** this is the short description of your game. + * **Description:** this is the description of your game some HTML is allowed. + * **Game category:** this is the category of your game. + * **Game thumbnail:**this is the thumbnail or icon of your game. (thumbnail must be a (PNG or JPG) (max: 512x512px)) + * **Game image for showcase:**this is a screenshot of your game. (Image must be a (PNG or JPG) (max:1920x1080px)) After you fill in all the required data click the button **Add game** ![](/gdevelop5/publishing/crimsongames-add-game-save.png) @@ -55,7 +60,9 @@ After you fill in all the required data click the button **Add game** ![](/gdeve In crimsongames.io we can set our game in three kinds of hosting types: -* **Image:** is the default setting to only display the image of your game. * **Self-hosted game:**means that you have the game hosted outside Crimson Games * **Hosted by Us game:** means that we host your files on our servers. If you choose Hosted by Us, the .zip you upload must be named: game.zip otherwise the upload will fail. + * **Image:** is the default setting to only display the image of your game. + * **Self-hosted game:**means that you have the game hosted outside Crimson Games. + * **Hosted by Us game:** means that we host your files on our servers. If you choose Hosted by Us, the .zip you upload must be named: game.zip otherwise the upload will fail. ![](/gdevelop5/publishing/crimsongames-hosting-type.png) Once you decide which kind of game you want just click on the Save Changes button, note that each section has its own Save changes button, this is important because the information referent of each block is saved separately. diff --git a/docs/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize.md b/docs/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize.md index d1a7ac0d26..fc599d5972 100644 --- a/docs/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize.md +++ b/docs/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize.md @@ -15,9 +15,8 @@ Note that ads will only work on mobile: as indicated on the [Facebook documentat To begin, you need to create an ad placement. For this you need to: -* Have Facebook Audience Network into your app: -go to https://business.facebook.com/pub/start -* Have an ad placement created: go to https://www.facebook.com/help/publisher/355647874927053/ and follow the instructions. + * Have Facebook Audience Network into your app: go to + * Have an ad placement created: go to and follow the instructions. In the end, copy the **ad placement id** (click on Copy ID when you are shown the *Placement ID*). @@ -27,8 +26,8 @@ After getting the ad placement id, you can now load (preferably at the beginning GDevelop will provide you with two actions to do it. -* Add an event with a single condition "Add the beginning of the scene". -* Add an action "Load and prepare an interstitial ad" (in "Facebook Instant Games", "Ads"). + * Add an event with a single condition "Add the beginning of the scene". + * Add an action "Load and prepare an interstitial ad" (in "Facebook Instant Games", "Ads"). In the parameter, set your **ad placement id** (don't forget the **double quotes** around it). @@ -36,8 +35,8 @@ In the parameter, set your **ad placement id** (don't forget the **double quotes This will load the ad. We still need to tell Facebook to actually show the ad later. As an example, we're going to show the ad when the user touch the screen. In a real game, replace the condition by something more useful: -* Add a new event at the end of the events sheet. Add two conditions: "Touch or Left mouse button is down" and then "Trigger Once". -* Add an action and this time choose "Show the loaded interstitial ad". + * Add a new event at the end of the events sheet. Add two conditions: "Touch or Left mouse button is down" and then "Trigger Once". + * Add an action and this time choose "Show the loaded interstitial ad". This is how it should look like: @@ -57,7 +56,6 @@ For showing a reward video ad, do the same as the interstitial but use the actio If things are not working, double check that you've loaded the interstitial or video, using the proper placement id (with double quotes around it). - ## Examples !!! tip diff --git a/docs/gdevelop5/publishing/publishing-to-gamejolt-store.md b/docs/gdevelop5/publishing/publishing-to-gamejolt-store.md index c716e2ad7a..9d05d9a03e 100644 --- a/docs/gdevelop5/publishing/publishing-to-gamejolt-store.md +++ b/docs/gdevelop5/publishing/publishing-to-gamejolt-store.md @@ -39,7 +39,7 @@ This is the page where you will be handling your game releases. To add your firs ![](/gdevelop5/publishing/screenshot_20190610212747.png) -Two options, namely, `Upload Downloadable Build` and `Upload Browser Build`, will be available here. The downloadable build is for distributing executable files that can run on the system. Since you want your game to be playable in the browser, click on `Browse` under the `Upload Browser Build` option and select the ` .zip` HTML5 package that you had created before. +Two options, namely, `Upload Downloadable Build` and `Upload Browser Build`, will be available here. The downloadable build is for distributing executable files that can run on the system. Since you want your game to be playable in the browser, click on `Browse` under the `Upload Browser Build` option and select the `.zip` HTML5 package that you had created before. ![](/gdevelop5/publishing/screenshot_20190610213123.png) diff --git a/docs/gdevelop5/publishing/publishing-to-itch-io.md b/docs/gdevelop5/publishing/publishing-to-itch-io.md index 3412b68b77..733f9468b8 100644 --- a/docs/gdevelop5/publishing/publishing-to-itch-io.md +++ b/docs/gdevelop5/publishing/publishing-to-itch-io.md @@ -12,20 +12,20 @@ Creators have access to detailed analytics and about how people discover, downlo ## Why itch.io? -- It is completely **free** -- Easy to **prepare the content** for upload -- Easy to **update** the uploaded files -- A Devlog can be shared -- You can set up a **Community Forum** or **Allow Comments** only or **none** -- No quality requirements, anything can be shared -- **SEO friendly**, anything you upload can be easily found in Search Engines. -- You can share downloadable games for Windows, Linux, Mac, Android and also HTML5 games played in the browser. -- You can**make money**without starting your own business and pay taxes. itch.io can collect the money, deal with refund requests and pay the required taxes on your behalf and you can request a payout any time. -- In case you do want to start your own business, itch.io can take care of the transaction for you and transfer each purchase directly to you, but then you need to take care of Refunds and Taxes -- You can **set a fixed price** for your content, **share it freely** or accept a donation. You can also set an unique option where payment is necessary but the amount is decided by the user himself. -- Revenue share is also flexible which makes itch.io the most unique, you can decide how much revenue share you want to pay to itch.io and yes you can set this value to 0 if you want and pay nothing yet itch.io still happy to host your content for free and hope if you are successful you are going to consider to pay something to them. -- **No annoying Ads** on Browser games -- You can now also connect itch.io with Patreon and offer access to content to those who support you through Patreon. + - It is completely **free** + - Easy to **prepare the content** for upload + - Easy to **update** the uploaded files + - A Devlog can be shared + - You can set up a **Community Forum** or **Allow Comments** only or **none** + - No quality requirements, anything can be shared + - **SEO friendly**, anything you upload can be easily found in Search Engines. + - You can share downloadable games for Windows, Linux, Mac, Android and also HTML5 games played in the browser. + - You can**make money**without starting your own business and pay taxes. itch.io can collect the money, deal with refund requests and pay the required taxes on your behalf and you can request a payout any time. + - In case you do want to start your own business, itch.io can take care of the transaction for you and transfer each purchase directly to you, but then you need to take care of Refunds and Taxes + - You can **set a fixed price** for your content, **share it freely** or accept a donation. You can also set an unique option where payment is necessary but the amount is decided by the user himself. + - Revenue share is also flexible which makes itch.io the most unique, you can decide how much revenue share you want to pay to itch.io and yes you can set this value to 0 if you want and pay nothing yet itch.io still happy to host your content for free and hope if you are successful you are going to consider to pay something to them. + - **No annoying Ads** on Browser games + - You can now also connect itch.io with Patreon and offer access to content to those who support you through Patreon. ## Building the Package @@ -49,12 +49,12 @@ Once you have an itch.io account, you want to login and you want to go to your D After clicking the button, you can setup your project, I go through only the most important options required to share your game. -- **Title:** this is the title of your game -- **Project URL:** this is the URL where your game can be found at itch.io, it normally takes the form of yourname.itch.io/your-game-title. The game title in the URL can be anything, it is up to you what you going to choose but it must be unique, can not be the same as other game titles in your library. -- **Classification:** here you can choose what kind of content you want to upload, a game or a book maybe. we obviously want to select game here -- **Kind of project:** here you can select what kind of project you want to upload, is it downloadable or a HTML or Flash game, in this case we want to choose the HTML. Later you can add downloadable files that can be purchased or downloaded for free -- **Pricing**: this is where you can set if your game needs to be purchased or you accept a donation or you don't want any payment. If you do want payment, you can set how much your game cost or how much donation you recommend -- **Uploads:** this is the section where you can actually upload your project and you want to click on the Upload files button + - **Title:** this is the title of your game + - **Project URL:** this is the URL where your game can be found at itch.io, it normally takes the form of yourname.itch.io/your-game-title. The game title in the URL can be anything, it is up to you what you going to choose but it must be unique, can not be the same as other game titles in your library. + - **Classification:** here you can choose what kind of content you want to upload, a game or a book maybe. we obviously want to select game here + - **Kind of project:** here you can select what kind of project you want to upload, is it downloadable or a HTML or Flash game, in this case we want to choose the HTML. Later you can add downloadable files that can be purchased or downloaded for free + - **Pricing**: this is where you can set if your game needs to be purchased or you accept a donation or you don't want any payment. If you do want payment, you can set how much your game cost or how much donation you recommend + - **Uploads:** this is the section where you can actually upload your project and you want to click on the Upload files button ![](/gdevelop5/itchio-upload-files-button.png) Once you clicked the button, you want to browse and select the ZIP file we have created earlier and it is going to be uploaded to itch.io. Once the upload is done, you can choose from several options ![](/gdevelop5/ithio-upload-file-options.png) diff --git a/docs/gdevelop5/publishing/publishing-to-kongregate-store.md b/docs/gdevelop5/publishing/publishing-to-kongregate-store.md index 0502f58f39..d7d6cf03e0 100644 --- a/docs/gdevelop5/publishing/publishing-to-kongregate-store.md +++ b/docs/gdevelop5/publishing/publishing-to-kongregate-store.md @@ -11,15 +11,15 @@ title: Publishing your Game to Kongregate ## Kongregate FAQ -- **Who can submit a game?** + - **Who can submit a game?** Games can only be uploaded by their legal owner, and all uploaders must agree to Kongregate's Game License Uploading terms. -- **Earn money without giving up the farm** + - **Earn money without giving up the farm** Kongregate shares up to 50% of advertising revenue with developers and sponsors monthly contests where you can earn thousands more. You retain the full rights to your game by uploading it onto Kongregate, and you may request that it be removed at any time. -- **APIs improved experience & payouts** + - **APIs improved experience & payouts** API integration enables your players to appear on our leaderboards, earn badges, and enjoy card challenges. @@ -31,7 +31,7 @@ You can know more about Kongregate [here](https://kong.zendesk.com/hc/en-us/cate ## Making the Package Ready to Publish -Our aim is to make the game playable in the web browser in the form of a HTML5 game. In order to upload the files to the web, we must archive it in a` .zip` file. **Firstly**, open the folder and move the `index.html` file out of there. We need that file separately. Make sure there is no remaining `index.html` file inside that folder. Now we need to archive the folder data. +Our aim is to make the game playable in the web browser in the form of a HTML5 game. In order to upload the files to the web, we must archive it in a `.zip` file. **Firstly**, open the folder and move the `index.html` file out of there. We need that file separately. Make sure there is no remaining `index.html` file inside that folder. Now we need to archive the folder data. To archive your game folder, you are going to need an archiving tool. There are several free options available. We will be using [7-Zip](http://www.7-zip.org) in this tutorial. Make sure you have downloaded and installed 7Zip using the link given. @@ -55,23 +55,23 @@ In the game upload page, you'll need to input basic information, like the `game Below that are a few specialized sections: -- **Collaborators**: You can designate up to 3 additional Kongregate usernames to be "collaborators". These users will have access to the unpublished version of the game, will be able to make free purchases for testing, and will show up in the game details as a collaborator. + - **Collaborators**: You can designate up to 3 additional Kongregate usernames to be "collaborators". These users will have access to the unpublished version of the game, will be able to make free purchases for testing, and will show up in the game details as a collaborator.   -- **API Callback URL**: If your game is going to be utilizing one of our server APIs that requires a callback URL, this is where you will enter it. + - **API Callback URL**: If your game is going to be utilizing one of our server APIs that requires a callback URL, this is where you will enter it.   -- **Bug Reports**: We can add a "report a bug" button next to your game and send them via email to you. If you select this you will have the option to specify the target email address. + - **Bug Reports**: We can add a "report a bug" button next to your game and send them via email to you. If you select this you will have the option to specify the target email address. ![](/gdevelop5/7d244ad-2016-07-21_16-12-58.png) On the following page you will first select the type of game upload: -- **Flash/HTML5/WebGL**: In these cases, you'll upload your files directly to our server and Kongregate will take care of hosting them. -- **Unity Web Player**: This is a special case in which we will host a .unity3d file and optionally also a WebGL version for players using NPAPI-disabled browsers. By the end of 2016 nearly all browsers will be NPAPI-disabled, so we don't recommend this option if you can help it. -- **iFrame**: In this case, you'll give us a URL to point to and you will be able to host and serve the game files on your own server. + - **Flash/HTML5/WebGL**: In these cases, you'll upload your files directly to our server and Kongregate will take care of hosting them. + - **Unity Web Player**: This is a special case in which we will host a .unity3d file and optionally also a WebGL version for players using NPAPI-disabled browsers. By the end of 2016 nearly all browsers will be NPAPI-disabled, so we don't recommend this option if you can help it. + - **iFrame**: In this case, you'll give us a URL to point to and you will be able to host and serve the game files on your own server. ![](/gdevelop5/e268f86-2016-07-21_16-27-31.png) diff --git a/docs/gdevelop5/publishing/publishing-to-windows-store.md b/docs/gdevelop5/publishing/publishing-to-windows-store.md index 45a3ebd148..0f2987aa2c 100644 --- a/docs/gdevelop5/publishing/publishing-to-windows-store.md +++ b/docs/gdevelop5/publishing/publishing-to-windows-store.md @@ -6,7 +6,5 @@ title: Publish your GDevelop game on the Microsoft Store Games made with GDevelop have been published to the Microsoft Store. !!! tip - - + You're welcome to contribute by adding a step-by-step explanation of the process. - \ No newline at end of file diff --git a/docs/gdevelop5/publishing/web.md b/docs/gdevelop5/publishing/web.md index 35aa57fc78..705a7a14ee 100644 --- a/docs/gdevelop5/publishing/web.md +++ b/docs/gdevelop5/publishing/web.md @@ -24,11 +24,9 @@ To post your game publicly on gd.games, click on the "publish this build to the From here you are given a new link and some new options for sharing your game through social media. !!! tip - - + Games published can be submitted to [[https://docs.google.com/forms/d/e/1FAIpQLScntknY_lCidaFbUFveLjpTRh0vOv5RrjWklIkAzEvjuipZCg/viewform |this form]] to get curated on gd.games homepage! - ![](/gdevelop5/publishing/web/pasted/20220202-225818.png) diff --git a/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md b/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md index 5c16a8c613..4e34edd984 100644 --- a/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md +++ b/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md @@ -24,7 +24,9 @@ You can then use [Electron Builder](https://www.electron.build/) to package your See the [other export options](/gdevelop5/publishing) to learn how to publish your game on other platforms! ## Steps to Build the Project Manually + ### Pre-requisite: Download and Install Yarn + ![](/gdevelop5/publishing/untitlewweewrwered-1.jpg) Before building the project, you _must_ have a package installer on your machine. For this tutorial we will be using **Yarn**. Download the latest build of Yarn [here](https://yarnpkg.com/en/docs/install). You can install Yarn using any method provided on that page. @@ -34,17 +36,15 @@ Before building the project, you _must_ have a package installer on your machine - Use the Change directory command (**cd**) to the directory of the folder of your exported game (or navigate to that folder using Explorer and press Shift + Right Click -> Open Command Prompt/Powershell for Windows) - In the Command Prompt, write: -``` +```sh yarn && yarn build ``` !!! note - If you are using an older version of GDevelop, you might need to use this instead: `yarn add -D electron-builder && yarn electron-builder` - **Note:** If your custom icon doesn’t show up, just rename buildResources to “build”. These steps will create a sub-folder named `dist`. The executable installer is in this sub-directory. The `win-unpacked` sub-folder contains the executable game files which you can archive and distribute. @@ -55,9 +55,9 @@ These steps will create a sub-folder named `dist`. The executable installer is i You can pass additional options to electron-builder. - - The `-w` option let you build for windows - - The `-l` option let you build for linux - - The `-m` option let you build for mac + - The `-w` option let you build for windows + - The `-l` option let you build for linux + - The `-m` option let you build for mac Those options all accept an additional packaging format. You can find those on the [electron-builder homepage](https://electron.build/): ![](/gdevelop5/publishing/windows-macos-linux-with-electron/pasted/20210219-123031.png) @@ -66,7 +66,7 @@ You may combine them (for example `-wl` for windows and linux) but then they wil #### Examples: -``` +```sh # Build for windows only: yarn build -w # Build a windows portable executable: diff --git a/docs/gdevelop5/publishing/windows-macos-linux.md b/docs/gdevelop5/publishing/windows-macos-linux.md index 4c74dc6b5e..4221929d34 100644 --- a/docs/gdevelop5/publishing/windows-macos-linux.md +++ b/docs/gdevelop5/publishing/windows-macos-linux.md @@ -5,7 +5,6 @@ title: Publish your game to Windows, macOS and Linux GDevelop can publish games to Windows, macOS, and even Linux! - ## Make sure that your game is ready for packaging! It is important to verify that your game is ready to be exported as an executable: @@ -43,9 +42,9 @@ When finished, you will see a download button for each platform that was selecte ### Play the game -* On Windows, double click on the executable file with the name of your game to launch it. -* On macOS, extract the archive and double click on the app to launch it. -* On Linux, [install the AppImage](https://appimage.org/) to run the game + * On Windows, double click on the executable file with the name of your game to launch it. + * On macOS, extract the archive and double click on the app to launch it. + * On Linux, [install the AppImage](https://appimage.org/) to run the game !!! note diff --git a/docs/gdevelop5/tutorials/asteroids/index.md b/docs/gdevelop5/tutorials/asteroids/index.md index cbe6f3d34c..cd7431d9eb 100644 --- a/docs/gdevelop5/tutorials/asteroids/index.md +++ b/docs/gdevelop5/tutorials/asteroids/index.md @@ -16,7 +16,7 @@ title: Asteroids ## Download art -The art used in this example is from https://www.kenney.nl/assets/space-shooter-redux +The art used in this example is from Download the art and familiarize yourself with what the pack contains. diff --git a/docs/gdevelop5/tutorials/asteroids/screen_wrap.md b/docs/gdevelop5/tutorials/asteroids/screen_wrap.md index 1b245ef0f0..c3155fe64a 100644 --- a/docs/gdevelop5/tutorials/asteroids/screen_wrap.md +++ b/docs/gdevelop5/tutorials/asteroids/screen_wrap.md @@ -29,12 +29,14 @@ Go in to the event sheet, create a new event group, and call it "Screen wrap". In this event group, create a "For each object" event, and select the newly created object group "Everything". Then give this event the following conditions/actions: Condition: -- "Or" which will allow you to add sub events, and if any of the subevents inside the "Or" condition is true, the "Or" condition will be true. With the subconditions: - - "Center X position" of the object group "Everything" is "Greater than" 830. - - "Center X position" of the object group "Everything" is "Less than" 830. + + - "Or" which will allow you to add sub events, and if any of the subevents inside the "Or" condition is true, the "Or" condition will be true. With the subconditions: + - "Center X position" of the object group "Everything" is "Greater than" 830. + - "Center X position" of the object group "Everything" is "Less than" 830. Action: -- "X position" of the Everything object group, with modification sign =(set to), (Everything.X()*-0.95). + + - "X position" of the Everything object group, with modification sign =(set to), (Everything.X()*-0.95). And then recreate this event for the Y position, making sure to use 630 instead of 830, because Y is the height of the screen. diff --git a/docs/gdevelop5/tutorials/asteroids/setting_scene.md b/docs/gdevelop5/tutorials/asteroids/setting_scene.md index 199ed40c29..d4783a285d 100644 --- a/docs/gdevelop5/tutorials/asteroids/setting_scene.md +++ b/docs/gdevelop5/tutorials/asteroids/setting_scene.md @@ -19,12 +19,14 @@ title: Asteroids Create an event group, and call it "Beginning of scene".\\ Inside this group, create an event with the following conditions/actions: Condition: -- "At the beginning of the scene". + + - "At the beginning of the scene". Action: -- "Camera center X position" with modification sign "= (set to)" and the value 0. (Leave layer and camera number as they are) -- "Camera center Y position" with modification sign "= (set to)" and the value 0. (Leave layer and camera number as they are) -- "Change camera zoom" with a value of 0.5. (Leave layer and camera number as they are) + + - "Camera center X position" with modification sign "= (set to)" and the value 0. (Leave layer and camera number as they are) + - "Camera center Y position" with modification sign "= (set to)" and the value 0. (Leave layer and camera number as they are) + - "Change camera zoom" with a value of 0.5. (Leave layer and camera number as they are) ![](/gdevelop5/tutorials/asteroids/camera_settings/pasted/20220119-172243.png) diff --git a/docs/gdevelop5/tutorials/basic-game-making-concepts.md b/docs/gdevelop5/tutorials/basic-game-making-concepts.md index f578a95c63..d838eaa8de 100644 --- a/docs/gdevelop5/tutorials/basic-game-making-concepts.md +++ b/docs/gdevelop5/tutorials/basic-game-making-concepts.md @@ -7,7 +7,7 @@ The basic concepts of GDevelop are simple. Read the following information to get ## Showing things on the screen: Objects -Everything that is *displayed on the screen* is called an **"Object"**. Different kinds of objects can be used to display different game elements on the screen. For example, most game graphics are "Sprite" objects, text can be displayed with "Text" objects, and special effects like fire or explosions can be created with "Particle Emitters". +Everything that is _displayed on the screen_ is called an **"Object"**. Different kinds of objects can be used to display different game elements on the screen. For example, most game graphics are "Sprite" objects, text can be displayed with "Text" objects, and special effects like fire or explosions can be created with "Particle Emitters". Read more about [Objects](https://wiki.gdevelop.io/gdevelop5/objects#objects). @@ -45,8 +45,8 @@ The video below shows both of these concepts inside GDevelop. The position of t Events are used to create the logic of your game. They are composed of conditions and actions. Conditions can be thought of as "if" statements and actions can be thought of as "then" statements. "If" the conditions are true/met, "then" the actions will happen. Most conditions and actions refer to objects: -* Conditions run a **test** on the objects. -* Actions **affect** the objects that matched the conditions. They can change the object's position, appearance, etc... + * Conditions run a **test** on the objects. + * Actions **affect** the objects that matched the conditions. They can change the object's position, appearance, etc... An event without any conditions will always perform the actions. In the video below, the ship object will continuously rotate at the speed set in the **Rotate Ship** action. @@ -54,7 +54,6 @@ An event without any conditions will always perform the actions. In the video be If a condition is added to the event, the actions will only be performed when the condition is true. - In this example, a condition for **The cursor/touch is on Ship** is added. Now the **Rotate Ship** action will only happen "if" the mouse cursor is on the ship object. ![](/gdevelop5/tutorials/gifs_for_wiki_showing_an_event_with_a_condition.gif) @@ -70,7 +69,6 @@ For example, this event has no conditions so it will delete all objects called " Once a condition has been added that mentions an object, all following actions will affect only objects that matched the previous conditions. - The event below has a condition that checks the horizontal (X) position of the Ship. The action will delete **only** the "Ship" objects with an X position that is less than (to the left of) the mouse cursor. !!! tip @@ -96,8 +94,8 @@ Events are processed from the top down. so events at the top are executed first. ![](/gdevelop5/tutorials/basic-game-making-concepts/pasted/20220123-203822.png) -* In the top example, the first event creates a "Ship" object at coordinates X: 100. Y: 200 (100;200) on the base layer. Then the next event deletes that created ship immediately. This pair of events **will not** display a ship on the screen, because the ship is deleted right after being created. -* In the bottom example, the first event deletes all the "Ship" objects from the scene/screen. It then creates one "Ship" at the coordinates X: 100, Y: 200 (100;200) on the base layer. This pair of events **will** display a single ship on the screen. + * In the top example, the first event creates a "Ship" object at coordinates X: 100. Y: 200 (100;200) on the base layer. Then the next event deletes that created ship immediately. This pair of events **will not** display a ship on the screen, because the ship is deleted right after being created. + * In the bottom example, the first event deletes all the "Ship" objects from the scene/screen. It then creates one "Ship" at the coordinates X: 100, Y: 200 (100;200) on the base layer. This pair of events **will** display a single ship on the screen. (Behind the scenes, the ship is being deleted and recreated on every frame, which is not something you would want to do in a real game.) !!! tip @@ -105,16 +103,14 @@ Events are processed from the top down. so events at the top are executed first. Events are processed about 60 times per second. Each iteration through the events is called a **frame**, **tick**, or **game loop**. - - ## Behaviors: Game logic for objects -**Behaviors** enhance an object with some *pre-defined logic*. They can be used to automate simple tasks, but they also have the power to perform much more advanced tasks. For example: +**Behaviors** enhance an object with some _pre-defined logic_. They can be used to automate simple tasks, but they also have the power to perform much more advanced tasks. For example: -* A behavior can be used to *automatically* remove an object from the game when it *goes out of the screen* (limiting the game memory usage). -* Another behavior can be used to *move objects on the screen with the keyboard arrows*. -* Yet another behavior can be used to allow the object to be *dragged on screen* with the mouse or by touching the object. -* The *Physics* behavior is an example of an advanced behavior which make your objects move in a realistic way, following the laws of physics. + * A behavior can be used to _automatically_ remove an object from the game when it _goes out of the screen_ (limiting the game memory usage). + * Another behavior can be used to _move objects on the screen with the keyboard arrows_. + * Yet another behavior can be used to allow the object to be _dragged on screen_ with the mouse or by touching the object. + * The _Physics_ behavior is an example of an advanced behavior which make your objects move in a realistic way, following the laws of physics. **Behaviors** will often come with their own variables that can be changed to customize the task it performs, but they can also be manipulated using events that are specific to that behavior. @@ -132,10 +128,10 @@ Moving objects can be achieved with **forces**. Forces are used to "push" object You can specify: -* The speed of movement on both the X (horizontal) and Y (vertical) axis, in pixels per second -* The angle to move towards and the speed, in pixels per second -* An instant force will only move the object for one frame -* A permanent force will move the object every frame until it is stopped + * The speed of movement on both the X (horizontal) and Y (vertical) axis, in pixels per second + * The angle to move towards and the speed, in pixels per second + * An instant force will only move the object for one frame + * A permanent force will move the object every frame until it is stopped ### Example @@ -173,20 +169,17 @@ Variables are used to store **data** in the format of a **number** or **text**. !!! tip - Conditions are used to **check** the value of a variable. Actions are used to **change** the value of a variable. - #### Where are variables stored? (variable "scope") The _scope_ of a variable determines the place a variable can be accessed. In GDevelop, there are three variable scopes are available: -* **Global** variables are accessible from all the game scenes. For instance, they can be used to store the player's score across different levels/scenes. -* **Scene** variables are only accessible from the scene they are created in. They can be used for data that only concerns one scene. A Scene variable would be able to access the time remaining to complete the level/scene. -* **Object** variables only concern one object. For example, a hero can have a "Health" or "Ammo" variable. - + * **Global** variables are accessible from all the game scenes. For instance, they can be used to store the player's score across different levels/scenes. + * **Scene** variables are only accessible from the scene they are created in. They can be used for data that only concerns one scene. A Scene variable would be able to access the time remaining to complete the level/scene. + * **Object** variables only concern one object. For example, a hero can have a "Health" or "Ammo" variable. ![](/gdevelop5/tutorials/gif_for_wiki_showing_where_the_variables_are.gif) diff --git a/docs/gdevelop5/tutorials/breakout.md b/docs/gdevelop5/tutorials/breakout.md index 0b19385235..f9a77e0a8e 100644 --- a/docs/gdevelop5/tutorials/breakout.md +++ b/docs/gdevelop5/tutorials/breakout.md @@ -15,7 +15,6 @@ With this tutorial, you will learn some basic tasks in GDevelop while creating a ![](/gdevelop5/tutorials/breakout-screenshot.png) - ---- !!! tip @@ -30,6 +29,7 @@ With this tutorial, you will learn some basic tasks in GDevelop while creating a Click **Create a new project** on the start page. Scroll down and choose a folder for your project, then select **Empty game**. ![](/gdevelop5/tutorials/create_empty_project.png) + ## Add game assets !!! tip @@ -49,7 +49,6 @@ Or you can download the assets used in the tutorial, ---- - ## Add a new scene _Scenes_ are the screens of your game. For example, different levels of a game are often created as different scenes, as are start menus or pause menus. @@ -66,10 +65,10 @@ To add a new scene: ![](/gdevelop5/tutorials/breakout-game/blank_scene.jpg) - ---- ## Create the paddle object + Start by adding the paddle to the scene. The player moves this paddle left and right in a straight line in order to bounce the ball and prevent it from dropping out of play. - On the **Objects** panel on the right, click **+** to add an object. @@ -97,7 +96,6 @@ Right now, your sprite object has no animations, or associated images. ![](/gdevelop5/tutorials/paddle_animation.jpg) - - In the **Object Name** field, type **Paddle** to rename your object. - Click **Apply** to save and close the editor. @@ -106,7 +104,6 @@ Right now, your sprite object has no animations, or associated images. Object names are case sensitive, as are other elements in GDevelop. Be consistent in your naming to avoid easy mistakes like typing "Paddle" when you mean "paddle". Same goes for animation names like "Run" or "run" - it doesn't matter what naming convention you use as long as you're consistent. - ---- ### Add the paddle object to the scene @@ -143,7 +140,6 @@ You will need to add three instances of your barrier object to your scene - a le Move and resize objects with precision by using the **Properties panel** that opens when you click on an object instance. - - Drag and drop the first instance of the barrier onto the scene. - Click the barrier. Resize it to 15 x 585 with the Properties panel or by dragging the handle on the bottom right. Place it on the left side of the screen at (15, 15). - Create a matching barrier on the right side and position it at (770,15). @@ -153,7 +149,6 @@ You will need to add three instances of your barrier object to your scene - a le ---- - ## Set the paddle movement The player will control the paddle using the left and right arrows on the keyboard. You can create these controls using _events_ (actions that occur if conditions are true). @@ -200,7 +195,6 @@ Now you need to add a corresponding action to the condition. The paddle should m ---- - Use the preview feature to verify your work. Click the **Launch a preview of the scene** button.![](/gdevelop5/tutorials/breakout-game/preview-button.jpg) Press your left arrow to move the paddle. You will find the paddle doesn't stop when it reaches the barrier - it just continues off screen. You can fix this by closing the preview window and adding another condition to the paddle movement. @@ -221,7 +215,6 @@ To add another condition to stop the paddle: ![](/gdevelop5/tutorials/breakout-game/x_position.jpg) - Preview your game again. The paddle should stop upon hitting the left barrier. You now need to create the same event for the right side. Try it yourself before reading the process below. @@ -231,6 +224,7 @@ You now need to create the same event for the right side. Try it yourself before * Click **Keyboard > Key pressed**. * In the **Key** field, type **Right**. * Click **OK**. + ---- * Click **Add action**. @@ -239,6 +233,7 @@ You now need to create the same event for the right side. Try it yourself before * In the **Angle** field, type **0**. * In the **Speed (in pixels per second)** field, type **300**. * Click **OK**. + ---- * Click **Add condition**. @@ -248,18 +243,16 @@ You now need to create the same event for the right side. Try it yourself before * In the **X position** field, type the X coordinate of the left side of the right barrier. In this example, it is 770. * Click **OK**. - Preview your game to make sure it works. !!! tip Do you find your paddle is still passing the barrier on the right? That is because GDevelop uses the upper-leftmost point of an object when comparing X positions. An easy way to solve this problem is to subtract the width of the paddle from your barrier X coordinate. In our example, the paddle is 58 px wide, so the new X position to stop the paddle on the right side should be **< 712** (770 - 58). Change it now. - ---- - ## Add comments to the Events Editor + As you work in your Events Editor, it is a good practice to add comments for each set of events. You will be able to quickly find and understand your events as your game grows if you catalogue them as you work. - To add a comment line, click **Add a comment**. ![](/gdevelop5/tutorials/breakout-game/add_a_comment.jpg) @@ -268,10 +261,8 @@ As you work in your Events Editor, it is a good practice to add comments for eac ![](/gdevelop5/tutorials/breakout-game/moved_comment.jpg) - ---- - ## Move the ball - Part 1 Next step will be to add the ball object to the scene. As you did with the paddle, add the ball object as a sprite using ball-1.png as the animation. Drag and drop the ball right above the paddle in the scene. @@ -283,21 +274,14 @@ When you think about the game, the ball will need to do four things: * Break bricks and bounce when it collides with bricks * End the game when it falls off-screen below the paddle - ### Start the ball in motion - To make the ball move when the player presses the space bar to start: - - * From the **NewScene (Events)** tab, click **Add a new empty event**. - - * Click **Add condition**. - - * Click **Keyboard > Key pressed**. - - * In the **Key** field, type **Space** and click **OK**. - + * From the **NewScene (Events)** tab, click **Add a new empty event**. + * Click **Add condition**. + * Click **Keyboard > Key pressed**. + * In the **Key** field, type **Space** and click **OK**. ![](/gdevelop5/tutorials/breakout-game/space_bar.jpg) @@ -320,10 +304,8 @@ To make the ball move when the player presses the space bar to start: This is a good time to add a comment, save and preview your game. The ball should move when the spacebar is pressed. - ---- - ### Bounce the ball off the barrier and the paddle For good gameplay, your ball needs to bounce realistically whenever it collides with the barrier, the paddle, or a brick. GDevelop has an easy bounce behavior that you can apply to any object to simulate real bouncing. @@ -335,9 +317,10 @@ To add a bounce behavior to your ball object: * From the **NewScene** tab, click **⋮** next to your "Ball" object and click **Edit object**. * Click the **Behaviors** tab. * Click **+** to add a new behavior to the object. - * The Bounce behavior is not an installed behavior, so you need to find it. Click the** Search New Behaviors** tab. + * The Bounce behavior is not an installed behavior, so you need to find it. Click the **Search New Behaviors** tab. * From the list at the bottom, select **Bounce** and click **Install in project**. -![](/gdevelop5/tutorials/breakout-game/add_bounce_behaviour.png) + + ![](/gdevelop5/tutorials/breakout-game/add_bounce_behaviour.png) * You can now add the new behavior to the object. Scroll down, select **Bounce**, and click **Apply**. @@ -379,15 +362,12 @@ You now need to do the exact same thing to make the ball bounce off the paddle. You can right-click and copy a previous condition or action, and then right-click to paste it into a new event. It is an easy way to save time and effort, especially when you're dealing with similar events! - Save and preview your game. It's starting to get fun... - ---- ## Add the bricks - Your ball has to break something! Next step will be to add bricks to the scene. To learn about external layouts, this tutorial will have the bricks appear in different layouts. To add your bricks: @@ -424,14 +404,12 @@ To create an external layout: ![](/gdevelop5/tutorials/breakout-game/duplicating_objects.gif) - * Create two or more new layouts and name them Layout1, Layout2, etc. !!! warning Follow the naming convention Layout1, Layout2, etc. It will be tied to a variable shortly. - ---- ### Make a random brick layout appear @@ -478,7 +456,6 @@ To add a random layout of bricks to the beginning of the scene: ![](/gdevelop5/tutorials/breakout-game/random_layout_selection.jpg) - ---- You can add interest by making the brick colour random at the start of each scene. @@ -494,7 +471,6 @@ To choose a random brick colour: ![](/gdevelop5/tutorials/modify_scene_variable_value2.png) - ---- * Add one last new sub-event for the beginning of the scene, then click **Add action**. @@ -508,13 +484,10 @@ To choose a random brick colour: Save and preview your game. A player will now see a randomly-selected external layout with bricks in a random colour whenever the game is started. - ---- - ## Move the ball - Part 2 - ### Bounce the ball off the bricks Now that you have bricks on the scene, you want the ball to bounce away from the bricks when it hits them. Exactly as you did with the paddle and the barrier, you will need to: @@ -564,7 +537,6 @@ To add a text object to the scene: * Drag and drop your Congratulations object into the middle of the scene. - ---- To hide your text object at the start of the scene: @@ -577,7 +549,6 @@ To hide your text object at the start of the scene: ![](/gdevelop5/tutorials/breakout-game/hide_congratulations.jpg) - ---- To make your text object appear when all the bricks are destroyed: @@ -655,7 +626,6 @@ Add a corresponding action to make the GameOver object visible. You should also ![](/gdevelop5/tutorials/breakout-game/player_misses_ball.png) - Save and preview your game. ---- diff --git a/docs/gdevelop5/tutorials/change-event-editor-mode.md b/docs/gdevelop5/tutorials/change-event-editor-mode.md index 10aed87ad3..9fb1b84663 100644 --- a/docs/gdevelop5/tutorials/change-event-editor-mode.md +++ b/docs/gdevelop5/tutorials/change-event-editor-mode.md @@ -2,11 +2,13 @@ title: How to Change the Event Sheet's Action and Condition Editor Mode --- # How to Change the Event Sheet's Action and Condition Editor Mode + GDevelop has two different modes, one mode which lists all conditions or actions in the engine, and a new mode that filters the condition or action list by a selected object. Currently the engine defaults to the new mode, but some users may find the full list easier to work with, or may be following a tutorial that doesn't use the new mode. Switching this mode is relatively simple. !!! tip No matter what mode the main condition/action editor is set to, you can always access the new editor by right-clicking on the **Add condition** or **Add action** links within any event. The new editor will display in a small pop-up "modal" window. + ## Changing the mode - Within GDevelop, click the **File** tab. @@ -15,9 +17,15 @@ GDevelop has two different modes, one mode which lists all conditions or actions - Click **Close**. The event editor mode will now be updated. ## Examples + ### New Event Editor - Object type must be selected first + ![](/gdevelop5/tutorials/change-event-editor-mode/pasted/20201011-080646.png) + ### Full List Event Editor - All Events Listed even if not Applicable + ![](/gdevelop5/tutorials/change-event-editor-mode/pasted/20201011-080622.png) + ### Right-click version of the New Event Editor + ![](/gdevelop5/tutorials/change-event-editor-mode/pasted/20201011-080716.png) \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/endless-runner.md b/docs/gdevelop5/tutorials/endless-runner.md index 2bca35a83c..54fa9cc54b 100644 --- a/docs/gdevelop5/tutorials/endless-runner.md +++ b/docs/gdevelop5/tutorials/endless-runner.md @@ -3,7 +3,7 @@ title: A Beginner's Tutorial to an Endless Runner Game --- # A Beginner's Tutorial to an Endless Runner Game -> ![](/gdevelop5/tutorials/endlessrunnergame_intro.png) This tutorial will help you get familiar with the way GDevelop works. In this tutorial, we are going to create a very basic endless runner game where the **platforms are generated randomly** and the player has to move to prevent being pushed outside the screen. There is also a **score system** which updates the score when the player is in action. +> ![](/gdevelop5/tutorials/endlessrunnergame_intro.png) This tutorial will help you get familiar with the way GDevelop works. In this tutorial, we are going to create a very basic endless runner game where the **platforms are generated randomly** and the player has to move to prevent being pushed outside the screen. There is also a **score system** which updates the score when the player is in action. > To know the basics of how the software works, you can refer [](/gdevelop5/getting_started) for more information. @@ -67,7 +67,7 @@ Click on the scene that we had made in the previous step to open the **Scene Edi You should see the **Object** tab and the **Properties** tab. ![](/gdevelop5/tutorials/screenshot_20190523182052.png) ![](/gdevelop5/tutorials/screenshot_20190523182628.png) If by any chance, you cannot see those tabs, click on the icon shown on the left to open the "Objects" tab. Similarly, click on the icon on the right to open the "Properties" tab. -> The latest version of GDevelop will warn you if you try to load an asset which is not in your game project location. Make sure to always put your images in the same folder as the game (or a subfolder). Otherwise, if you move your game, it will break the links to the images. Uncompress the provided archive in the folder of the game and use those images. tip +> The latest version of GDevelop will warn you if you try to load an asset which is not in your game project location. Make sure to always put your images in the same folder as the game (or a subfolder). Otherwise, if you move your game, it will break the links to the images. Uncompress the provided archive in the folder of the game and use those images. tip ## Step 4: Creating a Player Sprite @@ -215,7 +215,7 @@ Create a new event. In this event, we are going to make the platforms **endless* As you can see, the X position of the last tile is *1550* for me. Don't worry if it's different for you. Whatever be the value, we will use that value to make the platforms endless. Now, `Add a condition` for this new event. Find **Common conditions for all object**-\>**Position**-\>**Compare X position of an object**. Choose the object "Platform" with Modification sign **≤ (less or equal to)** and value let's say **-200**. -We are checking and **comparing** the X position of the **first** tile of the platform here. The condition is if the X position of the Platform is ≤-200, then the corresponding action will be executed. Now you may be wondering why the value __ -200__? Well, our scene space X position starts from the value *0*. We need to detect when the leftmost tile of our platform exits the scene space. We chose -200 as an arbitrary X position, which is out of the scene space. +We are checking and **comparing** the X position of the **first** tile of the platform here. The condition is if the X position of the Platform is ≤-200, then the corresponding action will be executed. Now you may be wondering why the value **-200**? Well, our scene space X position starts from the value *0*. We need to detect when the leftmost tile of our platform exits the scene space. We chose -200 as an arbitrary X position, which is out of the scene space. ![](/gdevelop5/tutorials/screenshot_20190614211353.png) @@ -223,21 +223,21 @@ Once the condition is in place, we are going to **Add an action**. Find **Common ![](/gdevelop5/tutorials/bandicam20190614211720602_1_.gif) What we did in this event was that we set up a **Loop** for out Obstacle/Platform tiles. As soon as a tile went out of bounds, that is out of the scene space, it was **teleported** to an X position(*1550* in my case) towards the right. Thus, the Obstacle tiles keep on looping and the game runs endlessly. ---- +------------------------------------------------------------------------ ## Game States We will now add **states** to our game. States describe the status of our game. It can be considered as a flag, to detect when the character is in action or when the character has fallen off the platform. This is needed to decide a "Game Over" state and therefore, restarting the game. We can record the state by simply creating a **scene variable**. There will be 3 states for our game. -- First state or the initial state is when the game hasn't started yet and it requires the user to start the game. We are going to refer to this state using the value **0**. + - First state or the initial state is when the game hasn't started yet and it requires the user to start the game. We are going to refer to this state using the value **0**.   -- Second state is when the character or Player Sprite is in action. We are going to refer to this state using the value **1**. + - Second state is when the character or Player Sprite is in action. We are going to refer to this state using the value **1**.   -- The third state is the "Game Over" state when the character falls off the platform. We are going to refer to this state using the value **2**. + - The third state is the "Game Over" state when the character falls off the platform. We are going to refer to this state using the value **2**. ![](/gdevelop5/tutorials/0endlessrunner_flow.jpg) @@ -269,7 +269,7 @@ We need the user to start the game by pressing a key. To do that, add a new even ![](/gdevelop5/tutorials/screenshot_20190524233235.png) -> Hint: For the first condition, we need to check the value of the scene variable state. Click on **Add a condition**→**Variables**→**Value of a scene variable**. Set it to check if the value is equal to **0**. For the second condition, **Add a condition**-\>**Keyboard**-\>**Key pressed**, then set it to check for the **Up** key. tip +> Hint: For the first condition, we need to check the value of the scene variable state. Click on **Add a condition**→**Variables**→**Value of a scene variable**. Set it to check if the value is equal to **0**. For the second condition, **Add a condition**-\>**Keyboard**-\>**Key pressed**, then set it to check for the **Up** key. tip Now, we add the action to change the game state. We want to change the value of the scene variable to 1. Click **Add an action**-\>**Variables**-\>**Value of a scene variable**. Then name your variable something, **state** for example and set it to **1**. It will look something like this. @@ -283,7 +283,7 @@ Now, we need to work on the third state, i.e, when the game ends due to the char In this event, we use the concept of a condition and a sub-condition. Before we get more into the logic, let's first set up this condition-sub-condition ladder. **Add a condition**-\>**Advanced**-\>**Or**. This is the main condition we use. After you have confirmed and made this condition, you will notice, you can now add **sub-conditions**. Try to do it by yourself by seeing the image above. -> Hint: Find **Common conditions for all object**-\>**Position**-\>**Compare X position of an object**. Choose the object "Player" with Modification sign **≤ (less or equal to)** and value let's say **-69**. Similarly for the next sub-condition, find **Common conditions for all object**-\>**Position**-\>**Compare Y position of an object**. Choose the object "Player" with Modification sign **≥ (greater or equal to)** and value let's say **-550**. tip +> Hint: Find **Common conditions for all object**-\>**Position**-\>**Compare X position of an object**. Choose the object "Player" with Modification sign **≤ (less or equal to)** and value let's say **-69**. Similarly for the next sub-condition, find **Common conditions for all object**-\>**Position**-\>**Compare Y position of an object**. Choose the object "Player" with Modification sign **≥ (greater or equal to)** and value let's say **-550**. tip Now, let's understand what we did here. The condition we added specifies a rule such that if even one of the sub-conditions is true, then the action associated with this event will be executed. Since the game ends if he falls down (Y position) **or** gets pushed outside the screen(X position), so we check for the X position and the Y position. @@ -291,13 +291,13 @@ Now we want to change the state of the game when this happens, so we add an acti ![](/gdevelop5/tutorials/bandicam20190525005610196.gif) You can now test the game. You will notice that if you fall down or get pushed out, the movement of the obstacles stops. This shows that the game has successfully reached the **Game Over** state. In our next event, we will work on **restarting** the game, when the user presses a key. ---- +------------------------------------------------------------------------ ## Restarting the Game ![](/gdevelop5/tutorials/screenshot_20190526175455.png) We want the game to restart once the user presses a button after reaching the **Game Over** state. To achieve this, let's create a new event. We want to check whether the state of the game is **2**. If it is, then we want the user to press the **Enter/Return** key to restart the game. For this, we add two conditions, one for checking the value of the state variable and another for checking whether the Enter key is pressed. Try to add the conditions yourself or see the hint if you are stuck. -> Hint: For the first condition, we need to check the value of the scene variable state. Click **Add a condition**→**Variables**→**Value of a scene variable**. Set it to check if the value is equal to **2**. For the second condition, **Add a condition**-\>**Keyboard**-\>**Key pressed**, then set it to check for the **Return** key pressed. tip +> Hint: For the first condition, we need to check the value of the scene variable state. Click **Add a condition**→**Variables**→**Value of a scene variable**. Set it to check if the value is equal to **2**. For the second condition, **Add a condition**-\>**Keyboard**-\>**Key pressed**, then set it to check for the **Return** key pressed. tip Next, we need to add an action to restart the game or **scene**. To do this, **Add an action**-\> **Scene**-\> **Change the scene**. Then specify the name of our scene within quotes. Select the **Stop any other paused scenes** option. This option is not necessary for our game since it only contains one scene, but it may be beneficial for increasing the performance for games having a large number of scenes. @@ -313,7 +313,7 @@ You can now test your game and notice the change in states. All that is left now A Score system is a necessary element in every game. Adding this to our game is very easy as we don't need to add any new events. We are going to edit some of the events that we have already created to accommodate this system. We want the score to start from 0 every time the game starts. The score keeps updating until the Game Over state is reached. First, let's make an **object variable** to store this score value. -> You can also use other types of Variables like **Scene variables** and **Global variables** instead of object variables that we are using here. The way these variables differ is that they have different *scopes* for the game. You can learn more about Variables [here](/gdevelop5/all-features/variables) tip +> You can also use other types of Variables like **Scene variables** and **Global variables** instead of object variables that we are using here. The way these variables differ is that they have different *scopes* for the game. You can learn more about Variables [here](/gdevelop5/all-features/variables) tip Go to the Objects tab in the Scene Editor panel. Choose any object of your choice. We choose **Platform** here. Click the **three dots** beside the Platform Object tab and choose **Edit Object Variables**. A new dialog box opens up where we can add and configure variables for an object. Click the big Plus button to add a new variable. Then customize the variable name and value as shown below. diff --git a/docs/gdevelop5/tutorials/follow-player-with-camera/index.md b/docs/gdevelop5/tutorials/follow-player-with-camera/index.md index d10152bbda..0a9be4b63b 100644 --- a/docs/gdevelop5/tutorials/follow-player-with-camera/index.md +++ b/docs/gdevelop5/tutorials/follow-player-with-camera/index.md @@ -13,7 +13,6 @@ This article includes instructions for implementing this functionality either wi Learn more about [layers and cameras](https://wiki.gdevelop.io/gdevelop5/interface/scene-editor/layers-and-cameras/#cameras) and [how to keep UI objects on screen](/gdevelop5/tutorials/keep-ui-on-screen). - ## Follow an object smoothly Adding the **Smooth Camera** [behavior](https://wiki.gdevelop.io/gdevelop5/behaviors#adding_a_behavior_to_an_object) to the character make the camera follow it automatically. The **Move camera closer** action can still be used to avoid a 1-frame delay. @@ -22,14 +21,12 @@ Adding the **Smooth Camera** [behavior](https://wiki.gdevelop.io/gdevelop5/behav Learn [how to install new extensions](/gdevelop5/extensions/search) by following a step-by-step guide. - ## Move several layers together Games can contain a lot of objects and using several layers is a good solution to organize a project. All layers (except for UI layers) should likely be moved the same way when a character is followed. The [copy camera settings](https://wiki.gdevelop.io/gdevelop5/extensions/copy-camera-settings/) extension allows to copy a camera position to another one. The camera that follows the player can be copied to any other camera layers. - ## Keep an object at the exact center of the screen To configure the camera to follow an object, go to the [event sheet](https://wiki.gdevelop.io/gdevelop5/events) and **add an Action** *(no need to set a Condition)* called **"Center the camera on an object"**. @@ -40,7 +37,6 @@ The **Action** should look like this: ![](pasted/20230316-155732.png) - ## Make a custom camera following To add camera inertia and a smoother transition watch [this video tutorial](https://youtu.be/yUNisggNh7s?t=84) to learn how to use the Camera Center positions on the X and Y axis, along with `lerp` expressions and formulas. \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/geometry-monster/4-desktop-and-mobile-controls.md b/docs/gdevelop5/tutorials/geometry-monster/4-desktop-and-mobile-controls.md index eadeddd89d..bd1541eaeb 100644 --- a/docs/gdevelop5/tutorials/geometry-monster/4-desktop-and-mobile-controls.md +++ b/docs/gdevelop5/tutorials/geometry-monster/4-desktop-and-mobile-controls.md @@ -139,8 +139,8 @@ Now add a sub-condition. Select Monster, then "X position", and enter `\> (greater than)` as the "Sign of the test" and `MouseX() + 5` as the "X position". -* `MouseX()` is an "expression" (also called function, like mathematical functions). It returns the position of the mouse, or touch on a touchscreen, in pixels on the X axis. -* The `5` is an offset in pixels, so the Monster won't be jumping between both states if it will be clicked or touched in the center (you'll see how it's useful by doing the next event). + * `MouseX()` is an "expression" (also called function, like mathematical functions). It returns the position of the mouse, or touch on a touchscreen, in pixels on the X axis. + * The `5` is an offset in pixels, so the Monster won't be jumping between both states if it will be clicked or touched in the center (you'll see how it's useful by doing the next event). ![](/gdevelop5/tutorials/geometry-monster/56_5.png) diff --git a/docs/gdevelop5/tutorials/geometry-monster/index.md b/docs/gdevelop5/tutorials/geometry-monster/index.md index 313450bdb2..4b0f7e74ab 100644 --- a/docs/gdevelop5/tutorials/geometry-monster/index.md +++ b/docs/gdevelop5/tutorials/geometry-monster/index.md @@ -27,13 +27,10 @@ From creating the main character and animating it, through adding controls and c 12. [Main menu](/gdevelop5/tutorials/geometry-monster/12-main-menu) 13. [Juice it!](/gdevelop5/tutorials/geometry-monster/13-juice-it) - ## Get the sources [Open the project online](https://editor.gdevelop.io/?project=example://geometry-monster) or get the [sources of the Geometry Monster game](/gdevelop5/tutorials/geometry-monster-sources.zip) containing all the images you need to finish the game, and the old project's json file used to write this tutorial if you'd like to check everything yourself. - - ## Play the game You can also try the game and play it online right now if you're curious of the gameplay - it can be launched by visiting [geometry.enclavegames.com](https://geometry.enclavegames.com/). \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/how-to-debug-poor-performance.md b/docs/gdevelop5/tutorials/how-to-debug-poor-performance.md index d33192db17..7762d95f5a 100644 --- a/docs/gdevelop5/tutorials/how-to-debug-poor-performance.md +++ b/docs/gdevelop5/tutorials/how-to-debug-poor-performance.md @@ -7,15 +7,15 @@ Game optimization is an important concept of game development. Good optimization If your game is running slowly, it's a good idea to look at these common consumers: -* Do you have a lot of **particle emitters**? Particles can be costly to render, consider reducing the number used. -* Do you have a **lot of logic going on** in the events? Launch [the profiler](/gdevelop5/interface/debugger/profile-your-game) and run it on your game. Then, take a look at the results. Are there any groups of events that take a lot of time? If yes, consider checking the events inside this group for costly sections that could be rearranged or changed. - * Chances are that these events are being applied to **a lot of objects**. Consider refining the number of objects by grouping the events as sub-events of one event, with a condition that excludes objects that don't need to be acted upon.(i.e NPCs that are off-screen or objects not in range of the player.) + * Do you have a lot of **particle emitters**? Particles can be costly to render, consider reducing the number used. + * Do you have a **lot of logic going on** in the events? Launch [the profiler](/gdevelop5/interface/debugger/profile-your-game) and run it on your game. Then, take a look at the results. Are there any groups of events that take a lot of time? If yes, consider checking the events inside this group for costly sections that could be rearranged or changed. + * Chances are that these events are being applied to **a lot of objects**. Consider refining the number of objects by grouping the events as sub-events of one event, with a condition that excludes objects that don't need to be acted upon.(i.e NPCs that are off-screen or objects not in range of the player.) -* After running the profiler, check if a lot of time is spent in the **Rendering** step. If yes, maybe you have too many objects on the screen, or that need complex rendering. Consider reducing the number of objects. If you have a lot of layers with large backgrounds, maybe you can reduce overlap. Doing multiple passes of rendering, especially for objects that are hidden behind others, can be costly. Consider hiding or destroying objects that are hidden behind others. + * After running the profiler, check if a lot of time is spent in the **Rendering** step. If yes, maybe you have too many objects on the screen, or that need complex rendering. Consider reducing the number of objects. If you have a lot of layers with large backgrounds, maybe you can reduce overlap. Doing multiple passes of rendering, especially for objects that are hidden behind others, can be costly. Consider hiding or destroying objects that are hidden behind others. -* Do you have a lot of objects with the **physics engine** or **platform behaviors** applied? If yes, consider disabling the behaviors for objects that are not on the screen, or destroying objects that are far from the player. + * Do you have a lot of objects with the **physics engine** or **platform behaviors** applied? If yes, consider disabling the behaviors for objects that are not on the screen, or destroying objects that are far from the player. -* Do you use effects on your layers? If yes, having too many effects can slow down your game rendering, especially on mobile phones. + * Do you use effects on your layers? If yes, having too many effects can slow down your game rendering, especially on mobile phones. ## FPS counter @@ -65,7 +65,6 @@ To fix that we can use the **Trigger once** condition: Now, the condition will trigger only once while it is true. That means that the event will fire only once every time it's condition goes from unfulfilled to fulfilled. It resolves the problem above as the condition will fire only the first frame of the click, and will wait for the click to end before letting the click event fire again. - ### Deactivate unused behaviors Behaviors take performance, especially the _Pathfinding_ and _Physic Engine 2.0_ behaviors. Remember to disable them when they are not needed. @@ -97,8 +96,6 @@ The best solution is to delete the bullets that are off-screen. The behavior **"Destroy when outside of the screen"** does just that. Attach it to an object, and all bullets that go off-screen will be deleted. - - ## A note on optimizations already in the engine GDevelop has built in optimizations, like _culling_, the process of automatically hiding off-screen objects. That way less object instances are rendered and the rendering is faster. diff --git a/docs/gdevelop5/tutorials/how-to-display-big-background.md b/docs/gdevelop5/tutorials/how-to-display-big-background.md index 69544ba0f7..eca2a555d5 100644 --- a/docs/gdevelop5/tutorials/how-to-display-big-background.md +++ b/docs/gdevelop5/tutorials/how-to-display-big-background.md @@ -5,6 +5,6 @@ title: How to display a big background in your game Really big images can reduce the performance of a game, as they are costly to transfer and store in the graphics card memory. They are also weighting more in your game package, making the download and loading longer for players. -* As possible, try to stick to smaller images. Avoid anything larger than 1024x1024 or 2048x2048. If possible, repeat the image, using a [Tiled Sprite](/gdevelop5/objects/tiled_sprite) object. Tiled Sprite can be as large as necessary without any impact on performances. + * As possible, try to stick to smaller images. Avoid anything larger than 1024x1024 or 2048x2048. If possible, repeat the image, using a [Tiled Sprite](/gdevelop5/objects/tiled_sprite) object. Tiled Sprite can be as large as necessary without any impact on performances. -* If you still want to display a very large, high resolution image, it's in this case a good idea to split it into multiple, smaller images, and display an object for every image. You can also use a Sprite, and have a different image in each animation. Then, put multiple instances of the object on the scene and change the animation of each instance to recompose the original image. \ No newline at end of file + * If you still want to display a very large, high resolution image, it's in this case a good idea to split it into multiple, smaller images, and display an object for every image. You can also use a Sprite, and have a different image in each animation. Then, put multiple instances of the object on the scene and change the animation of each instance to recompose the original image. \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/how-to-make-behavior.md b/docs/gdevelop5/tutorials/how-to-make-behavior.md index 02daad5e18..9f0e743db1 100644 --- a/docs/gdevelop5/tutorials/how-to-make-behavior.md +++ b/docs/gdevelop5/tutorials/how-to-make-behavior.md @@ -47,8 +47,8 @@ The function is now visible in the list of behavior functions: We can now add events inside. In this example, we're adding two events: -* one to change the background color of the scene when space is pressed -* one to play a sound when a button is pressed + * one to change the background color of the scene when space is pressed + * one to play a sound when a button is pressed ![](/gdevelop5/tutorials/how-to-make-behavior/pasted/20200329-162214.png) @@ -134,7 +134,6 @@ Here is the result: ![](/gdevelop5/tutorials/how-to-make-behavior/pasted/20200329-182802.png) - If you run the game, you'll now see that when the player collides with the enemy, a sound is played. Not bad for a single event in the scene events sheet! And we could add more objects and make the behavior more complex. Or we can reuse it for another object that should behave the same as player. We can even disable this behavior if we want the player not to play a sound when colliding with enemies. diff --git a/docs/gdevelop5/tutorials/how-to-move-objects.md b/docs/gdevelop5/tutorials/how-to-move-objects.md index 5257212fc7..53ae195a28 100644 --- a/docs/gdevelop5/tutorials/how-to-move-objects.md +++ b/docs/gdevelop5/tutorials/how-to-move-objects.md @@ -5,17 +5,17 @@ title: How to move objects in your game Moving objects on screen is an essential part of any game. This can includes: -* Moving a character on screen: player, non-player characters (NPC), vehicles, spaceships... -* Animate items: bullets, lasers, obstacles, backgrounds... -* Animate the interface: buttons, cursors, remaining lives... + * Moving a character on screen: player, non-player characters (NPC), vehicles, spaceships... + * Animate items: bullets, lasers, obstacles, backgrounds... + * Animate the interface: buttons, cursors, remaining lives... Every situation is different: this page explains the different solutions when using GDevelop. There are three different ways of changing an object position in GDevelop: -* By using the actions to change the X and Y coordinates, -* By adding a force on an object (this work on all objects), -* By using a behavior (which internally will either change the coordinates or use forces!). + * By using the actions to change the X and Y coordinates, + * By adding a force on an object (this work on all objects), + * By using a behavior (which internally will either change the coordinates or use forces!). ## No movement: change an object position @@ -35,10 +35,8 @@ Here is an example to set the position of the Player object in a platform game: !!! tip - The [sticker extension](/gdevelop5/extensions/sticker/reference) allows to follow the position, angle and dimension of another object. - ## Make a cursor: change the position and use "MouseX()";"MouseY()" Want an object to act as a cursor? Change its position to set it to `MouseX()` on X axis and `MouseY()` on Y axis. @@ -59,11 +57,11 @@ The easiest way to move an object, continuously or when something happens like t Forces have been introduced in [basic game making concepts](/gdevelop5/tutorials/basic-game-making-concepts) page. You can imagine forces as virtual arrows (also called "vectors") that are pushing an object. The longer the arrow, the fastest the object will move. Forces can be either *instant* or *permanent*: -* An **instant** force moves an object "a bit" (the force will only act on the object while the action is being executed): + * An **instant** force moves an object "a bit" (the force will only act on the object while the action is being executed): ![](/gdevelop5/tutorials/instant-force-example.png) -* a **permanent** force will move an object forever, unless an action to stop the object is used. This action will clear the forces acting on the object (effectively stopping it - unless some behavior is used or its position is changed by other events). For example, this couple of events will animate a platform between two markers: + * a **permanent** force will move an object forever, unless an action to stop the object is used. This action will clear the forces acting on the object (effectively stopping it - unless some behavior is used or its position is changed by other events). For example, this couple of events will animate a platform between two markers: ![](/gdevelop5/tutorials/animate-platform-permanent-forces.png) @@ -81,8 +79,8 @@ Permanent forces are akin to launching a music: you only want to start a music o If your object is a character in a platformer game, the [platformer behavior](/gdevelop5/behaviors/platformer) will allow to use a ready-made platformer engine in your game. -* Add **Platformer Character** behavior to the player or objects that must move on platforms, -* Add **Platform** behavior to the objects that must act as platforms. + * Add **Platformer Character** behavior to the player or objects that must move on platforms, + * Add **Platform** behavior to the objects that must act as platforms. You can edit the properties of the behaviors and use events to customize the way platformer characters work. @@ -125,4 +123,5 @@ With the [Anchor behavior](/gdevelop5/behaviors/anchor), you can set your object This is very useful for **visual controls** for mobile games and for **user interface**/control panels to show on the screen. ## Find other movement extensions + There are many more behaviors that move objects listed in the [extensions](/gdevelop5/extensions#movement) page. \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/how-to-rotate-objects.md b/docs/gdevelop5/tutorials/how-to-rotate-objects.md index 0cb8c1f66b..1ffb4d1f28 100644 --- a/docs/gdevelop5/tutorials/how-to-rotate-objects.md +++ b/docs/gdevelop5/tutorials/how-to-rotate-objects.md @@ -9,9 +9,8 @@ title: How to rotate objects An object can be instantly rotated with the **Angle** action. The action needs an angle value. This value can be calculated with the expression: -- **Object.AngleToObject(object)** to face an object -- **Object.AngleToPosition(x, y)** to face a position. - + - **Object.AngleToObject(object)** to face an object + - **Object.AngleToPosition(x, y)** to face a position. ### Rotate an object over time @@ -31,12 +30,10 @@ To follow a moving target and still give a smooth feeling to the rotation, the * Some behaviors like the [Top-down movement](/gdevelop5/behaviors/topdown) or the [Pathfinding](/gdevelop5/behaviors/pathfinding) can be setup to rotate objects to face the movement angle automatically. It's usually a **Rotate** checkbox. - ## Move an object on a circle The [Ellipse movement behavior](/gdevelop5/extensions/ellipse-movement/reference) makes objects move in a circle. It's a community extension that can be [installed](/gdevelop5/extensions/search). - ## Compare angles Angles could be compared as any other number but we often want to consider 90° and -270° as the same for instance. The **AngleDifference(number, number)** expression give the difference using the shortest way. To go back to the previous example, `AngleDifference(90, -270)` equals `0`. The `Compare two numbers` condition can be used with `AngleDifference` to check if 2 angles are the same. diff --git a/docs/gdevelop5/tutorials/how-to-use-gdevelop-as-a-team.md b/docs/gdevelop5/tutorials/how-to-use-gdevelop-as-a-team.md index fbcb17f015..c30d29027a 100644 --- a/docs/gdevelop5/tutorials/how-to-use-gdevelop-as-a-team.md +++ b/docs/gdevelop5/tutorials/how-to-use-gdevelop-as-a-team.md @@ -9,9 +9,9 @@ As a team of multiple developers, you probably want to activate the option to sa Organize then your project to ensure that as many things as possible can be saved in these different files: -* Make sure to separate your scene events into external events for a good organization. -* Try if possible to make your events into custom extension actions/conditions or custom behaviors. -* Use external layouts for the levels (load them with a scene that serves as the main game scene). + * Make sure to separate your scene events into external events for a good organization. + * Try if possible to make your events into custom extension actions/conditions or custom behaviors. + * Use external layouts for the levels (load them with a scene that serves as the main game scene). !!! note @@ -25,10 +25,9 @@ Organize then your project to ensure that as many things as possible can be save You then have multiple solutions to work with these multiple files: -* Ideally, if you know a bit about version control like [git](https://git-scm.com/), [mercurial](https://www.mercurial-scm.org/) or [subversion (a.k.a "svn")](https://subversion.apache.org/), it's strongly recommended to use it. A version control system allows you to inspect changes you made on the files (and even only select some to share), then "push" these changes in a common repository. -* Otherwise, you can have a Dropbox/OneDrive/Cloud storage service where you have a "master project" folder. You create a copy of this folder when starting to work. Then you can periodically copy files back to this master project when you're done with some work on a level. - * If using Dropbox, OneDrive, or something like Google Drive, ensure that they are not actively monitoring the project folder. The way these systems sync files constantly can cause file corruption in the project json file, and prevent bundled tools like Piskel from working correctly. - + * Ideally, if you know a bit about version control like [git](https://git-scm.com/), [mercurial](https://www.mercurial-scm.org/) or [subversion (a.k.a "svn")](https://subversion.apache.org/), it's strongly recommended to use it. A version control system allows you to inspect changes you made on the files (and even only select some to share), then "push" these changes in a common repository. + * Otherwise, you can have a Dropbox/OneDrive/Cloud storage service where you have a "master project" folder. You create a copy of this folder when starting to work. Then you can periodically copy files back to this master project when you're done with some work on a level. + * If using Dropbox, OneDrive, or something like Google Drive, ensure that they are not actively monitoring the project folder. The way these systems sync files constantly can cause file corruption in the project json file, and prevent bundled tools like Piskel from working correctly. !!! warning diff --git a/docs/gdevelop5/tutorials/index.md b/docs/gdevelop5/tutorials/index.md index 8bfd2e7e5f..fd3a60e4c0 100644 --- a/docs/gdevelop5/tutorials/index.md +++ b/docs/gdevelop5/tutorials/index.md @@ -15,7 +15,6 @@ These tutorials are step-by-step guides that explain how to create a game from s * **[Create a platform game](/gdevelop5/tutorials/platformer)** * **[Create a space shooter game](/gdevelop5/tutorials/space-shooter)** - Community tutorials: * [Understand and use the Noise generator extension for procedural Generation](/gdevelop5/tutorials/procedural-generation) @@ -25,7 +24,6 @@ Community tutorials: * [Create a simple Breakout game](/gdevelop5/tutorials/breakout) * [Create a top down shooter game](/gdevelop5/tutorials/topdown-shooter) - Recommended reads to go further: * **[How to create a behavior for an object](/gdevelop5/tutorials/how-to-make-behavior)** @@ -33,6 +31,7 @@ Recommended reads to go further: ---- # GDevelop short guides ("how to") + The following guides provide explanations for certain parts of GDevelop. They also show you some advanced mechanics for designing your games: * **[How to create a behavior for an object](/gdevelop5/tutorials/how-to-make-behavior)** @@ -51,6 +50,7 @@ The following guides provide explanations for certain parts of GDevelop. They al * [How to align text](/gdevelop5/tutorials/aligning-text) * [How to follow the player (or an object) with the camera?](/gdevelop5/tutorials/follow-player-with-camera) * [How to rotate objects?](/gdevelop5/tutorials/how-to-rotate-objects) + ---- # GDevelop video tutorials @@ -59,22 +59,23 @@ Check out the [official GDevelop Channel here](https://www.youtube.com/channel/U * See the [full list of video tutorials](/gdevelop5/tutorials/videos) - ---- # Other guides + The guides below provide game development related explanations. They are not specific to GDevelop. - * [Build .apk of your games with cordova](http://wiki.compilgames.net/doku.php/gdevelop5/publishing/android_and_ios_with_cordova) - * [Publish your game to itch.io](/gdevelop5/publishing/publishing-to-itch-io) - * [publishing to amazon app store](/gdevelop5/publishing/publishing-to-amazon-app-store) - * [publishing to gamejolt store](/gdevelop5/publishing/publishing-to-gamejolt-store) - * [publishing to kongregate store](/gdevelop5/publishing/publishing-to-kongregate-store) - * [Before publishing your game](http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/before-publishing-your-game) + * [Build .apk of your games with cordova](http://wiki.compilgames.net/doku.php/gdevelop5/publishing/android_and_ios_with_cordova) + * [Publish your game to itch.io](/gdevelop5/publishing/publishing-to-itch-io) + * [publishing to amazon app store](/gdevelop5/publishing/publishing-to-amazon-app-store) + * [publishing to gamejolt store](/gdevelop5/publishing/publishing-to-gamejolt-store) + * [publishing to kongregate store](/gdevelop5/publishing/publishing-to-kongregate-store) + * [Before publishing your game](http://wiki.compilgames.net/doku.php/gdevelop5/tutorials/before-publishing-your-game) ---- # Resources + Links to 3rd party websites where you can find sprites, music and sound effects for your games and game examples, templates and software to help you with game development. * [resources](/gdevelop5/tutorials/resources) \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/leaderboards.md b/docs/gdevelop5/tutorials/leaderboards.md index 781a73968a..ee68845350 100644 --- a/docs/gdevelop5/tutorials/leaderboards.md +++ b/docs/gdevelop5/tutorials/leaderboards.md @@ -12,12 +12,14 @@ This guide will explain how to add leaderboards to your game via Firebase Cloud ## 1. Chose a data structure The first step when making a project that interacts with an online database is to decide the shape in which the data is stored. Firebase is good at querying (filtering by data) documents in collections, so we will put each score as a document in a collection named "scores". Each document will have to be a structure variable with this shape: -``` + +```text { - name: "A user name", - score: 23, + name: "A user name", + score: 23, } ``` + That way, we can query documents by score and then get the username bound to each document directly. In this case, we do not care about the name of the document, so we will let Firebase assign random names to those. ## 2. Writing security rules @@ -29,7 +31,8 @@ Now that we have a data structure defined, we need to write security rules to ma ### 2.2 The security rules Here, I will use the following rules: -``` + +```text rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { @@ -47,13 +50,13 @@ service cloud.firestore { } } ``` + ![](/gdevelop5/tutorials/leaderboards-1.png) To set security rules, navigate to the editor via the [Firebase console](https://console.firebase.google.com/). - ### 2.3 Walking through the security rules - * **match /scores/{document}**: Only add rules for documents inside scores. This already makes it more secure, as all rules are false by default so this makes sure only the collection and the documents we need are accessible. + * **match /scores/{document}**: Only add rules for documents inside scores. This already makes it more secure, as all rules are false by default so this makes sure only the collection and the documents we need are accessible. * **allow read;**: We always want the database to be readable. Therefore, we do not add any condition. @@ -99,6 +102,4 @@ This allows to access the document via the variable `doc` inside that event and ![](/gdevelop5/tutorials/leaderboards/pasted/20210530-215054.png) - - And voilà, you have a functioning realtime leaderboard in your game! \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/nilarjun-space-shooter-draft.md b/docs/gdevelop5/tutorials/nilarjun-space-shooter-draft.md index ada6e349da..29181c4299 100644 --- a/docs/gdevelop5/tutorials/nilarjun-space-shooter-draft.md +++ b/docs/gdevelop5/tutorials/nilarjun-space-shooter-draft.md @@ -5,7 +5,7 @@ title: A Beginner's Tutorial to a Space Shooter Game ![](/gdevelop5/tutorials/bandicam20g190529161603928.gif) This tutorial will help you to get familiar with the way GDevelop works. In this tutorial, we are going to create a very basic space shooter game where the **enemies are generated randomly** and the player has to destroy them in order to get a higher score. There will be a target score for each level, which on being reached will take you to the next level. -To know the basics of how the software works, you can refer [](/gdevelop5/getting_started) for more information. In this tutorial, we will use separate scenes to build a start screen and the level scene. *The first part of this tutorial aims at creating the **Game Menu**. * +To know the basics of how the software works, you can refer [](/gdevelop5/getting_started) for more information. In this tutorial, we will use separate scenes to build a start screen and the level scene. *The first part of this tutorial aims at creating the **Game Menu**.* ## Download GDevelop @@ -47,7 +47,7 @@ Click on the area where it says "Click to add a Scene" to create your first empt You can customize the name of your scene by clicking on the **three dots** next to the created scene and clicking on **Rename**. Make sure to create **2** scenes. If you haven't renamed them, they will appear as **NewScene** and **NewScene2**. -> Every game needs assets or resources to be used in the game. For this game, the **Resources** are already provided to you in the source file mentioned above.tip +> Every game needs assets or resources to be used in the game. For this game, the **Resources** are already provided to you in the source file mentioned above.tip ## Step 3: Getting Started with the Scene @@ -57,7 +57,7 @@ In this part of the tutorial, we are going to create a Staring Menu for our game You should see the **Object** tab and the **Properties** tab. ![](/gdevelop5/tutorials/screenshot_20190523182052.png) ![](/gdevelop5/tutorials/screenshot_20190523182628.png) If by any chance, you cannot see those tabs, click on the icon shown on the left to open the "Objects" tab. Similarly, click on the icon on the right to open the "Properties" tab. -> The game menu we are going to create, will have some **text objects** to display the name of the game, and a **button** to start the game. tip +> The game menu we are going to create, will have some **text objects** to display the name of the game, and a **button** to start the game. tip ## Step 4: Creating the Game Menu diff --git a/docs/gdevelop5/tutorials/piskel-sprite-sheets.md b/docs/gdevelop5/tutorials/piskel-sprite-sheets.md index 414e6662ad..2c6fdfdcfe 100644 --- a/docs/gdevelop5/tutorials/piskel-sprite-sheets.md +++ b/docs/gdevelop5/tutorials/piskel-sprite-sheets.md @@ -2,6 +2,7 @@ title: How to Import a Sprite Sheet using Piskel --- # How to Import a Sprite Sheet using Piskel + When working with art assets, there may be times when an asset file has numerous sprites on a single image. This can mean there will be a need to manually slice the file up into multiple images, or isolate each frame of the animation separately. However, GDevelop has the Piskel sprite editor built in to the editor, which can help avoid this manual effort. Piskel natively supports importing sprite sheets and can simplify this process. @@ -10,6 +11,7 @@ However, GDevelop has the Piskel sprite editor built in to the editor, which can This process will split the sprite sheet into separate images automatically. It _will not_ keep the sprite sheet as a single image ### Requirements + To complete this method, the following requirements must be met: * The sprite sheet file must be in jpg, gif, or png format. diff --git a/docs/gdevelop5/tutorials/platform-game/2-player-animations.md b/docs/gdevelop5/tutorials/platform-game/2-player-animations.md index b592165710..fb28131385 100644 --- a/docs/gdevelop5/tutorials/platform-game/2-player-animations.md +++ b/docs/gdevelop5/tutorials/platform-game/2-player-animations.md @@ -46,6 +46,7 @@ Our object is now ready, click "Apply" in the bottom right corner. ## Use events to change animations ### The first event: animate when jumping + !!! tip Please note that this tutorial shows screenshots using the Full List editor mode rather than the Object-specific (new) editor mode. [Click here to see examples of each editor mode and how to switch.](/gdevelop5/tutorials/change-event-editor-mode) @@ -163,6 +164,7 @@ You can launch a preview of your game and see that the player animation is chang A small improvement we can do is to set the animation to Jumping when the player is falling ​too (otherwise ​the Running ​animation ​keeps playing ​when the player ​reaches the end of a platform). ![](/gdevelop5/tutorials/platform-game/screen_shot_2017-09-26_at_22.23.10.png) + ## Next step: have the camera follow the player For now, it's hard to build a large level to explore because the player can quickly walk outside of the screen! The next part of the tutorial will show how to make the camera follow the player. It's really simple, a single event will be enough! diff --git a/docs/gdevelop5/tutorials/platform-game/4-add-backgrounds-objects.md b/docs/gdevelop5/tutorials/platform-game/4-add-backgrounds-objects.md index d5f1f15c62..4e22b749b1 100644 --- a/docs/gdevelop5/tutorials/platform-game/4-add-backgrounds-objects.md +++ b/docs/gdevelop5/tutorials/platform-game/4-add-backgrounds-objects.md @@ -47,4 +47,4 @@ Launch a preview to check that everything is working well! Let's add a goal for the player: to collect as many coins as possible! To do this, we're going to use events to remember the player score, play sounds and remove the collected coins! -➡️ Read **[the next part of the tutorial here](/gdevelop5/tutorials/platform-game/5-add-coins-and-number-of-collected-coins)**! \ No newline at end of file +➡️ Read **[the next part of the tutorial here](/gdevelop5/tutorials/platform-game/5-add-coins-and-number-of-collected-coins)**! \ No newline at end of file diff --git a/docs/gdevelop5/tutorials/platform-game/5-add-coins-and-number-of-collected-coins.md b/docs/gdevelop5/tutorials/platform-game/5-add-coins-and-number-of-collected-coins.md index a2e06c7b4a..658532134f 100644 --- a/docs/gdevelop5/tutorials/platform-game/5-add-coins-and-number-of-collected-coins.md +++ b/docs/gdevelop5/tutorials/platform-game/5-add-coins-and-number-of-collected-coins.md @@ -68,9 +68,9 @@ We're going to use a variable to update and remember the score of the player. Variables are containers that we can use to store and remember certain information such as numbers and strings (text). In GDevelop there are different types of variables: - * __**Object variables**__ are private variables, specific to each instance of an object. This means that each instance can store its very own values, without them being shared with the other instances. It can, for example, be useful if we want to change the life of each enemy. - * __**Scene variables**__ (the most used ones) are variables attached to a scene. This means that their values are not shared with other scenes in our game. It is useful to store information only relevant to the currently played scene. For example, the life of the player or a score. - * __**Global variables**__, as the name suggests, are global in the whole game. Values are shared with all scenes in the entire game. It is useful if we would like to store information that we want to share between all scenes such as the amount of bullet or amount of money the player has. + * **Object variables** are private variables, specific to each instance of an object. This means that each instance can store its very own values, without them being shared with the other instances. It can, for example, be useful if we want to change the life of each enemy. + * **Scene variables** (the most used ones) are variables attached to a scene. This means that their values are not shared with other scenes in our game. It is useful to store information only relevant to the currently played scene. For example, the life of the player or a score. + * **Global variables**, as the name suggests, are global in the whole game. Values are shared with all scenes in the entire game. It is useful if we would like to store information that we want to share between all scenes such as the amount of bullet or amount of money the player has. The variable we're going to use is a Scene variable and will be called "Score". @@ -198,7 +198,6 @@ Now run the game, and you will see that if you gather two coins at the same time You can check the proper working of this by putting two coins at the same position in the scene. - ## Next step: add enemies Every platform game comes with enemies that you have to avoid or kill by jumping on them! Let's add some and see how we can make them move. diff --git a/docs/gdevelop5/tutorials/platform-game/6-add-enemies.md b/docs/gdevelop5/tutorials/platform-game/6-add-enemies.md index b920a86f4c..1b259fe826 100644 --- a/docs/gdevelop5/tutorials/platform-game/6-add-enemies.md +++ b/docs/gdevelop5/tutorials/platform-game/6-add-enemies.md @@ -143,10 +143,8 @@ The events of this tutorial so far should look like this: Now if you run a preview, the left and right object with the arrow should be hidden, the slime should move left and right constantly. We are able to kill the slime by jumping on the top of it and the slime should be able to kill the player when it collides with it while the player is on the floor. - ## Next step: add checkpoints For now, the "death" of the player is a bit brutal: we just delete it. Let's make him reappear instead to the last checkpoint he crossed. Checkpoints are essential in a platformer game if you don't want to force your player to start again from the beginning when he dies (which can be interesting, but also frustrating!). ➡️ Read **[7 checkpoints](/gdevelop5/tutorials/platform-game/7-checkpoints)**! - diff --git a/docs/gdevelop5/tutorials/platform-game/7-checkpoints.md b/docs/gdevelop5/tutorials/platform-game/7-checkpoints.md index 6ffd776233..d00c93be91 100644 --- a/docs/gdevelop5/tutorials/platform-game/7-checkpoints.md +++ b/docs/gdevelop5/tutorials/platform-game/7-checkpoints.md @@ -26,7 +26,6 @@ We start with a condition to check to see if there is a collision between the "p ![](/gdevelop5/tutorials/platform-game/checkpoint_Var.png) - ![](/gdevelop5/tutorials/platform-game/checkpoint_event.png) Above, we are using _expressions_ to get the X and Y position of the "checkpoint" object sprite. This is done in a similar manner to the way that we updated the score text. @@ -45,7 +44,6 @@ Above, we are using _expressions_ to get the X and Y position of the "checkpoint ![](/gdevelop5/tutorials/platform-game/expression-editor.png) - The condition now stores the X and Y position of the "checkpoint" object with which our "Player" object has collided. So, instead of deleting the "Player" sprite object, we set its X and Y positions using the variables. ![](/gdevelop5/tutorials/platform-game/expression_playerPosition.png) diff --git a/docs/gdevelop5/tutorials/platform-game/index.md b/docs/gdevelop5/tutorials/platform-game/index.md index fa6191a7a9..1ebbe4922f 100644 --- a/docs/gdevelop5/tutorials/platform-game/index.md +++ b/docs/gdevelop5/tutorials/platform-game/index.md @@ -18,7 +18,6 @@ If you do not have **GDevelop 5**, download it from the [official website](https Always download GDevelop from this page to be sure to have the latest version. Install (or extract) GDevelop and launch it. - ![](/gdevelop5/tutorials/platform-game/screen_shot_2017-09-24_at_22.57.02.png) ## Create a new game @@ -27,7 +26,7 @@ Click on `Create a new project` on the start page. In the window, choose a folde ![](/gdevelop5/tutorials/platform-game/screenshot_20190604200258.png) -For making our game, we will need to have assets that we can use (the player character, a few platforms, items to collect...). You can download resources here: http://www.compilgames.net/dl/PlatformerTutorialResources.zip. +For making our game, we will need to have assets that we can use (the player character, a few platforms, items to collect...). You can download resources here: . Once you have downloaded this file, extract its content in the folder where you created the project. diff --git a/docs/gdevelop5/tutorials/platformer/index.md b/docs/gdevelop5/tutorials/platformer/index.md index e1759d02cc..ed4f06a5a0 100644 --- a/docs/gdevelop5/tutorials/platformer/index.md +++ b/docs/gdevelop5/tutorials/platformer/index.md @@ -7,9 +7,9 @@ This tutorial explains how to create a platformer game with GDevelop. If you've You'll learn how to: -- Design a level with platforms, enemies, and collectible coins. -- Create a playable character that can move, jump, and kill enemies. -- Return the playable to checkpoints when they die. + - Design a level with platforms, enemies, and collectible coins. + - Create a playable character that can move, jump, and kill enemies. + - Return the playable to checkpoints when they die. ## Series @@ -30,11 +30,11 @@ If you haven't already, download and install GDevelop. You can find the full ins ## Step 2: Download the game's assets -The term *assets* refers to a game's audio and visual media, such as sound effects and sprites. Every game needs assets and, to make your life that little bit easier, this tutorial provides the assets you need to create the game. +The term _assets_ refers to a game's audio and visual media, such as sound effects and sprites. Every game needs assets and, to make your life that little bit easier, this tutorial provides the assets you need to create the game. You can download the assets via the following URL: -http://www.compilgames.net/dl/PlatformerTutorialResources.zip + !!! note @@ -125,8 +125,8 @@ To stop the preview, close the preview window. It's also good to get into the habit of regularly saving your games. You can save the game via the **File** menu or by using a keyboard shortcut: -- `CTRL` + `S` on Windows -- `CMD` + `S` on macOS + - `CTRL` + `S` on Windows + - `CMD` + `S` on macOS ## Next step diff --git a/docs/gdevelop5/tutorials/platformer/part-2.md b/docs/gdevelop5/tutorials/platformer/part-2.md index e73afec18c..2db0b32ab2 100644 --- a/docs/gdevelop5/tutorials/platformer/part-2.md +++ b/docs/gdevelop5/tutorials/platformer/part-2.md @@ -7,9 +7,9 @@ This part of the tutorial explains how to add a playable character to the game. You'll learn how to: -- Create an object that represents the playable character. -- Let the player control the object using the arrow keys. -- Follow the playable character with the camera. + - Create an object that represents the playable character. + - Let the player control the object using the arrow keys. + - Follow the playable character with the camera. ## Series diff --git a/docs/gdevelop5/tutorials/platformer/part-3.md b/docs/gdevelop5/tutorials/platformer/part-3.md index e4be42db43..3d5c67f009 100644 --- a/docs/gdevelop5/tutorials/platformer/part-3.md +++ b/docs/gdevelop5/tutorials/platformer/part-3.md @@ -7,8 +7,8 @@ This part of the tutorial explains how to add platforms to the game. This provid You'll learn how to: -* Create Tiled Sprite objects. -* Make a platform behave like a platform. + * Create Tiled Sprite objects. + * Make a platform behave like a platform. ## Series @@ -23,7 +23,6 @@ You are reading **Part 3** of the [Platformer Tutorial](/gdevelop5/tutorials/pla 7. [Part 7: Make Enemies Kill the Player (and the Player Kill the Enemies)](/gdevelop5/tutorials/platformer/part-7) 8. [Part 8: Add Checkpoints to the Game](/gdevelop5/tutorials/platformer/part-8) - ## Step 1: Create an object The first step is to create an object for the platform. If you followed the first and second parts of this tutorial, this is a similar -- but not identical -- process. @@ -72,8 +71,8 @@ To create a platform with the **Jumpthru platform** behavior: 2. Use the "bridgeLogs.png" asset as the object's image. 3. Open the **Behaviors** tab. 4. Select **Platform behavior**. -6. From the **Type** dropdown, select **Jumpthru platform**. -7. Click **Apply**. +5. From the **Type** dropdown, select **Jumpthru platform**. +6. Click **Apply**. Then drag some instances of the object into the scene. diff --git a/docs/gdevelop5/tutorials/platformer/part-4.md b/docs/gdevelop5/tutorials/platformer/part-4.md index a44655b70f..4a93db3354 100644 --- a/docs/gdevelop5/tutorials/platformer/part-4.md +++ b/docs/gdevelop5/tutorials/platformer/part-4.md @@ -7,8 +7,8 @@ This part of the tutorial explains how to animate the playable character. You'll learn how to: -- Add animations to an object. -- Use events to trigger animations. + - Add animations to an object. + - Use events to trigger animations. ## Series @@ -23,7 +23,6 @@ You are reading **Part 4** of the [Platformer Tutorial](/gdevelop5/tutorials/pla 7. [Part 7: Make Enemies Kill the Player (and the Player Kill the Enemies)](/gdevelop5/tutorials/platformer/part-7) 8. [Part 8: Add Checkpoints to the Game](/gdevelop5/tutorials/platformer/part-8) - ## Step 1: Add a jumping animation to the player In GDevelop, you can add animations to an object and trigger those animations when something happens (such as when a player jumps). @@ -107,12 +106,11 @@ If you preview the game, the "Player" object resets to the "Idle" animation afte 1. Add an animation named "Running" to the "Player" object. 2. From the file chooser, select all of the following assets: - - - p1_walk03.png - - p1_walk04.png - - p1_walk05.png - - p1_walk06.png - - p1_walk07.png + - p1_walk03.png + - p1_walk04.png + - p1_walk05.png + - p1_walk06.png + - p1_walk07.png 3. Enable the **Loop** option. When enabled, the animation continually plays for as long as it's active (rather than playing once and stopping). 4. Click **Apply**. diff --git a/docs/gdevelop5/tutorials/platformer/part-5.md b/docs/gdevelop5/tutorials/platformer/part-5.md index ca4ff1f9e8..414e57264a 100644 --- a/docs/gdevelop5/tutorials/platformer/part-5.md +++ b/docs/gdevelop5/tutorials/platformer/part-5.md @@ -7,9 +7,9 @@ This part of the tutorial explains how to add collectible coins to the game. You'll learn how to: -- Delete an object (and play a sound) when a player collides with it. -- Keep track of data with variables. -- Add text to a scene. + - Delete an object (and play a sound) when a player collides with it. + - Keep track of data with variables. + - Add text to a scene. ## Series @@ -24,7 +24,6 @@ You are reading **Part 5** of the [Platformer Tutorial](/gdevelop5/tutorials/pla 7. [Part 7: Make Enemies Kill the Player (and the Player Kill the Enemies)](/gdevelop5/tutorials/platformer/part-7) 8. [Part 8: Add Checkpoints to the Game](/gdevelop5/tutorials/platformer/part-8) - ## Step 1: Create a collectible coin The first step is to create a coin that the player can collect. You can break this step into two parts: creating an object for the coin and then making the coin collectible by using an event to detect when the player collides with it. @@ -62,9 +61,9 @@ A variable is a container that can store data. If you've ever done algebra, then In GDevelop, there are three types of variables: -* Object variables -* Scene variables -* Global variables + * Object variables + * Scene variables + * Global variables An explanation of each variable type is beyond the scope of this tutorial, but the differences are explored in [Scope of variables](http://wiki.compilgames.net/doku.php/gdevelop5/all-features/variables#scope_of_variables). In this case, scene variables are the most relevant. These are variables that exist for the duration of a scene. @@ -101,13 +100,13 @@ In GDevelop, expressions are similar to spreadsheet formulas or functions in a p For example, the `Variable` expression can retrieve the value of the "Score" variable: -``` +```javascript Variable(Score) ``` Because the "Score" variable contains a number, this expression returns a number. You can convert that number into a string with the `ToString` expression: -``` +```javascript ToString(Variable(Score)) ``` @@ -137,7 +136,6 @@ If you preview the game, the number of collected coins appears on the screen. ![](/gdevelop5/tutorials/platform-game/expression-editor.png) - ### Move the text to a different layer There's a problem with the "Score" object: the number of collected coins is only visible if the player is standing in certain positions. diff --git a/docs/gdevelop5/tutorials/platformer/part-6.md b/docs/gdevelop5/tutorials/platformer/part-6.md index f0b8c3fba1..8ab861f3cb 100644 --- a/docs/gdevelop5/tutorials/platformer/part-6.md +++ b/docs/gdevelop5/tutorials/platformer/part-6.md @@ -18,7 +18,6 @@ You are reading **Part 6** of the [Platformer Tutorial](/gdevelop5/tutorials/pla 7. [Part 7: Make Enemies Kill the Player (and the Player Kill the Enemies)](/gdevelop5/tutorials/platformer/part-7) 8. [Part 8: Add Checkpoints to the Game](/gdevelop5/tutorials/platformer/part-8) - ## Step 1: Create an object for the enemy 1. Create a Sprite object named "Slime". @@ -38,9 +37,9 @@ If you preview the game, an animated enemy appears on screen. The previous part of this tutorial mentioned that there were three types of variables: -- Object -- Scene -- Global + - Object + - Scene + - Global An _object_ variable is tied to a specific object. This means the variable holds a value that is only available to -- and only relevant to -- the associated object. @@ -123,7 +122,7 @@ This step focuses on creating the "Left" object. When the enemy collides with th 1. Add the **Flip the object horizontally** action to the event. 2. Set the **Activate flipping** option as **Yes**. -This ensures that the "Slime" object changes *and* faces a different direction, rather than just changing directions. +This ensures that the "Slime" object changes _and_ faces a different direction, rather than just changing directions. ### Change the enemy's direction @@ -154,9 +153,9 @@ If you preview the game, the enemy appears to change direction by their own "cho After the enemy collides with the "Left" object, they start moving right and never stop moving right. To ensure they change direction again, create an object named "RIght". This object should be the same as the "Left" object, except for the following details: -- Use the "right.png" asset. -- When the "Player" object collides with the "Slime" object, set the "direction" variable to "right". -- For the **Flip the object horizontally** action, set **Activate flipping** to **No**. + - Use the "right.png" asset. + - When the "Player" object collides with the "Slime" object, set the "direction" variable to "right". + - For the **Flip the object horizontally** action, set **Activate flipping** to **No**. Then drag an instance of the "Right" object into the scene, to the left of the enemy. diff --git a/docs/gdevelop5/tutorials/platformer/part-7.md b/docs/gdevelop5/tutorials/platformer/part-7.md index 1f326ffa42..0d1fa26a7f 100644 --- a/docs/gdevelop5/tutorials/platformer/part-7.md +++ b/docs/gdevelop5/tutorials/platformer/part-7.md @@ -18,7 +18,6 @@ You are reading **Part 7** of the [Platformer Tutorial](/gdevelop5/tutorials/pla 7. Part 7: Make Enemies Kill the Player (and the Player Kill the Enemies) 8. [Part 8: Add Checkpoints to the Game](/gdevelop5/tutorials/platformer/part-8) - ## Step 1: Kill the player When the player collides with an enemy, the player should die. An easy way to "kill" the player is to delete the "Player" object if it collides with an enemy. diff --git a/docs/gdevelop5/tutorials/platformer/part-8.md b/docs/gdevelop5/tutorials/platformer/part-8.md index 9399869beb..f273c89474 100644 --- a/docs/gdevelop5/tutorials/platformer/part-8.md +++ b/docs/gdevelop5/tutorials/platformer/part-8.md @@ -34,7 +34,7 @@ When the player reaches a checkpoint, you can use variables to save the coordina You can access the X and Y coordinates of an object with the following syntax: -``` +```javascript ObjectName.X() ObjectName.Y() ``` @@ -59,8 +59,8 @@ To send the "Player" object back to the previous checkpoint: 1. Remove the **Delete an object** action. 2. Create a **Position of an object** action for the "Player" object. 3. For each of the **Modification's sign** fields, select **= (set to)**. -3. Set the **X position** coordinate to `Variable(CheckpointX)`. -4. Set the **Y position** coordinate to `Variable(CheckpointY)`. +4. Set the **X position** coordinate to `Variable(CheckpointX)`. +5. Set the **Y position** coordinate to `Variable(CheckpointY)`. ![](/gdevelop5/tutorials/platformer/08-02.jpg) @@ -74,8 +74,8 @@ The `CheckpointX` and `CheckpointY` variables don't exist until the player reach This may cause a problem if: -- Something else exists at the default coordinates (such as an enemy). -- There isn't a platform beneath the default coordinates. + - Something else exists at the default coordinates (such as an enemy). + - There isn't a platform beneath the default coordinates. To fix this, set the value of the `CheckpointX` and `CheckpointY` variables to the initial coordinates of the "Player" object. Then the default coordinates are defined by where you place the "Player" object in the Scene editor. diff --git a/docs/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation.md b/docs/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation.md index fbf00c4812..9b1484b7c2 100644 --- a/docs/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation.md +++ b/docs/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation.md @@ -30,14 +30,14 @@ The following steps will help prepare the grid objects, which will be used as pa We now need to set up the initial events to prepare terrain generation. -1. Access the event sheet. -2. Add a new event. -3. Click **Add condition**. +1. Access the event sheet. +2. Add a new event. +3. Click **Add condition**. - Within the condition list, select **At the beginning of the scene**. - Click **OK**. -4. Within the same event, click **Add action**. +4. Within the same event, click **Add action**. - Search for **Scene Variable**. - Select **Value of a scene variable**. @@ -46,7 +46,7 @@ We now need to set up the initial events to prepare terrain generation. - Within the **Value** field, type **1**. - Click **OK**. -5. Repeat all of #4 above, but with a Variable name of **y**. +5. Repeat all of #4 above, but with a Variable name of **y**. These variables will handle the placement of tiles on the x and y-axis. @@ -54,15 +54,15 @@ These variables will handle the placement of tiles on the x and y-axis. Next a set of actions should be set up to allow testing tile generation. -1. At the bottom of the event sheet, click **Add a new event**. -2. Within the new event, click **Add condition**. +1. At the bottom of the event sheet, click **Add a new event**. +2. Within the new event, click **Add condition**. - Search for **released**. - Within the results, select **Mouse button released**. - In the **Button to test** field, select **Left (primary)**. - Click **OK**. -3. Within the action field, click **Add action**. +3. Within the action field, click **Add action**. - Search for **create**. - Select **Create an object** from the list. \* Note: If using the new condition/action editor, the **tile** object may need to be selected from the list before the normal **Create an object** action is available @@ -71,7 +71,7 @@ Next a set of actions should be set up to allow testing tile generation. - In the **Y position** field, type **32 \* Variable(y)**, this will automatically populate the value of the scene variable **Y**. - Click **OK**. -4. Within the action field, click **Add action**. +4. Within the action field, click **Add action**. - Search for **Scene Variable**. - Select **Value of a scene variable**. @@ -80,14 +80,14 @@ Next a set of actions should be set up to allow testing tile generation. - Within the **Value** field, type **1**. - Click **OK** -5. Preview the program. If the above steps are completed successfully, when the left mouse button is clicked a new tile should be created in a column. +5. Preview the program. If the above steps are completed successfully, when the left mouse button is clicked a new tile should be created in a column. - However, the column keeps going on down off the screen. What would be ideal is if once the column got to a certain size it created a new column. ### Step 4: Create Events to Generate Tiles in a Rows and Columns Creating new columns -1. In the first event click **add action**. +1. In the first event click **add action**. - Search for **Scene Variable**. - Select **Value of a scene variable** @@ -95,23 +95,23 @@ Creating new columns - Change the **modification's sign** to **=** - Change the **Value** field to 4 -2. Repeat all of step #1 above, but change the variable name to **sizeY** +2. Repeat all of step #1 above, but change the variable name to **sizeY** - These variables will control the size of the grid on the x and y-axis. The event should look like this once complete: {{ :gdevelop5:tutorials:procedural-generation:step5.jpg?nolink |}} -3. Right-click on the create tile event. +3. Right-click on the create tile event. - Then select **Add Sub Event**. -4. Within the sub event, click **Add condition**. +4. Within the sub event, click **Add condition**. - Search for **Scene Variable**. - Within the results, select **Value of a scene variable**. - In the **Variable** field, select **y**. - In the **Sign of the test** field, select **> (greater then)**. - finally, in the **Value to compare** field, input **Variable(sizeY)**. - Click **OK**. -5. Within the action field, click **Add action** +5. Within the action field, click **Add action** - Find **Scene Variable**. - For the **Variable** field, select y. - For the **Modification's sign** field, select **= (set to)**. - For the **Value** field, input 1. -6. Add another **Change the scene variable** action +6. Add another **Change the scene variable** action - In the **Variable** field, select **x**. - In the **Modification's sign** field, select **+ (add)**. - In the **Value** field, enter **1** @@ -122,19 +122,19 @@ Now the grid will increment in the x dimension. This next set section will add the last event to prevent the grid from going too far on the x-axis. -1. Right-click on the **scene variable y \> Variable(sizeY)** event and click **Add Sub Event**. +1. Right-click on the **scene variable y \> Variable(sizeY)** event and click **Add Sub Event**. - Click **Copy** and then **Paste** the event. - Move the new event and make it a **Sub Event** of the original event. -2. Select the **condition**. +2. Select the **condition**. - Change the **Variable** field to **x**. - Keep the **Sign of the test** field the same. - Change the **Value to compare** field to **Variable(sizeX)**. -3. Select the **Change the scene variable y** action. +3. Select the **Change the scene variable y** action. - Change the **Value** field to **-1**. -4. Select the **Change the scene variable x** action. +4. Select the **Change the scene variable x** action. - Change the **Modification's sign** field to **= (set to)**. - Change the **Value** field to **-1**. -5. Select the **Left mouse button was released** event. +5. Select the **Left mouse button was released** event. - Select the **Create object** action - Change the **X position** field to 32 \* Variable(x) @@ -142,23 +142,23 @@ This next set section will add the last event to prevent the grid from going too Placing tiles by hand is good for testing, but for a game tiles need to be placed quickly. To do this a [while event](/gdevelop5/events/while) is used. -1. Click the **Add** button at the bottom of the event sheet. +1. Click the **Add** button at the bottom of the event sheet. - Select the **While** event. -2. Under **While these conditions are true**, click **add condition**. +2. Under **While these conditions are true**, click **add condition**. - Find **Value of a scene variable**. - Within the **Variable** field, type **x**. - Within the **Sign of the test** field, select **\> (greater then)**. - Within the **Value to compare** field, type **0**. -3. Repeat all of the above step, but change the variable **y**. -4. Cut the actions from the **Left mouse button was released** event and paste it into the while event. -5. Drag **The scene variable y \> Variable(sizeY)** event and make it a sub event of the while event. -6. Lastly, delete the **Left mouse button was released** event. +3. Repeat all of the above step, but change the variable **y**. +4. Cut the actions from the **Left mouse button was released** event and paste it into the while event. +5. Drag **The scene variable y \> Variable(sizeY)** event and make it a sub event of the while event. +6. Lastly, delete the **Left mouse button was released** event. ### Step 6: Controlling Grid Placement This section covers changing the location of where the grid is created from. -1. Select the **while event**. +1. Select the **while event**. - Select the **Create object tile at position** action. - Change the **X position** field to **origin.X() + 32 \* Variable(x)**. - Change the **Y position** field to **origin.Y() + 32 \* Variable(y)**. @@ -172,12 +172,12 @@ Understanding how noise works is important, but not necessary to doing procedura ### Step 2: Setting the Noise Seed -1. Click **Add a new event**, +1. Click **Add a new event**, - Drag the new event and place it above the while event. -2. Click **Add condition**. +2. Click **Add condition**. - Search for **At the beginning of the scene**. - Once found select it. -3. Then click **Add action**. +3. Then click **Add action**. - Search for the **Set the seed used for noise generation**. - Once found click it. @@ -193,18 +193,18 @@ Understanding how noise works is important, but not necessary to doing procedura This section covers how to display the seed using the currentSeed() expression. -1. Go to the scene view and create a new text object. +1. Go to the scene view and create a new text object. - In this example it will be called **seed** and will hold the current seed. -2. Be sure to place the object into the scene. -3. Move back to the event sheet. -4. At the bottom of the event sheet find **Add event** and click it. +2. Be sure to place the object into the scene. +3. Move back to the event sheet. +4. At the bottom of the event sheet find **Add event** and click it. - Drag it above the while event and let go. -5. Click **Add condition**. +5. Click **Add condition**. - Within the condition list, select **At the beginning of the scene**. - Click **OK**. -6. Then click **Add action**. +6. Then click **Add action**. - Search for **Modify the text**. - For the **Modification's sign**, select **= (set to)**. @@ -217,11 +217,11 @@ This section covers how to display the seed using the currentSeed() expression. In order to visually see the noise values, the opacity of the tile must be changed creating a grayscale version of the procedurally generated world. -1. Change variable **sizeX** and **sizeY** to both be set to 16. +1. Change variable **sizeX** and **sizeY** to both be set to 16. - The grid created will now be 16 tiles by 16 tiles for a total of 256 tiles. -2. Click on **Add action** in the while event. +2. Click on **Add action** in the while event. - Find the **Change sprite opacity** action. - Within the **Modification's sign** field, select **= (set to)**. @@ -233,23 +233,23 @@ In order to visually see the noise values, the opacity of the tile must be chang Run the program. ![](/gdevelop5/tutorials/procedural-generation/step18.jpg) -- Assume the lighter a square is the lower its is and the darker it is the higher it is. -- Notice how each square does not smoothly transition to its neighboring tiles. -- This is because random values are generated without consideration for the values generated before or the value that will be generated after. -- This is why noise must be used instead of random. + - Assume the lighter a square is the lower its is and the darker it is the higher it is. + - Notice how each square does not smoothly transition to its neighboring tiles. + - This is because random values are generated without consideration for the values generated before or the value that will be generated after. + - This is why noise must be used instead of random. ### Step 6: Implementing Noise To get a smooth gradient of opacity **randomInRange()** must be swapped out with a noise function. For this example **noise::perlin2()**will be used. -1. Select the **Change the opacity** action. +1. Select the **Change the opacity** action. - Change the **Value** field to **Noise::perlin2(Variable(x) / 10, Variable(y) / 10)**. - Noise functions take coordinates instead of min and max values like random. - Variables x and y must be divided by 10 for the function to work correctly. -2. Run the program, notice how no tiles are visible. +2. Run the program, notice how no tiles are visible. - Change the value field to the following **ExtendedMath::Map(Noise::Perlin2(Variable(x) / 10, Variable(y) / 10), -1, 1, 0, 255)**. @@ -259,9 +259,9 @@ To get a smooth gradient of opacity **randomInRange()** must be swapped out with ### Step 8: Creating Different Worlds -1. Select the **set noise seed action**. +1. Select the **set noise seed action**. - Change the **value** field, to a **randomInRange(1, 65536)**. -2. Run the program a few times to see some examples of procedural generation. +2. Run the program a few times to see some examples of procedural generation. ## Part 3: Colouring diff --git a/docs/gdevelop5/tutorials/procedural-generation/index.md b/docs/gdevelop5/tutorials/procedural-generation/index.md index e17372270f..6358988e79 100644 --- a/docs/gdevelop5/tutorials/procedural-generation/index.md +++ b/docs/gdevelop5/tutorials/procedural-generation/index.md @@ -3,7 +3,7 @@ title: Procedural Generation --- # Procedural Generation -> Make sure to import the Extended math support and Noise generator extensions into your project. Read [this](/gdevelop5/extensions/search) to learn how to import extensions. +> Make sure to import the Extended math support and Noise generator extensions into your project. Read [this](/gdevelop5/extensions/search) to learn how to import extensions. ## What is Procedural Generation @@ -15,6 +15,6 @@ Procedural generation is way for the computer to create parts of the game for yo Articles about Procedural Generation: -- [Understanding Procedural Generation](/gdevelop5/tutorials/procedural-generation/understanding-procedural-generation) -- [Implementing Procedural Generation](/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation) -- [Constraint a terrain generation](/gdevelop5/extensions/marching-squares/details/#constraint-a-terrain-generation) + - [Understanding Procedural Generation](/gdevelop5/tutorials/procedural-generation/understanding-procedural-generation) + - [Implementing Procedural Generation](/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation) + - [Constraint a terrain generation](/gdevelop5/extensions/marching-squares/details/#constraint-a-terrain-generation) diff --git a/docs/gdevelop5/tutorials/randomness/index.md b/docs/gdevelop5/tutorials/randomness/index.md index 2eaddb4791..ce52bd7383 100644 --- a/docs/gdevelop5/tutorials/randomness/index.md +++ b/docs/gdevelop5/tutorials/randomness/index.md @@ -8,10 +8,9 @@ title: Randomness Random numbers can be generated using the [expressions](/gdevelop5/all-features/expressions/): `Random`, `RandomFloat`, `RandomFloatInRange`, `RandomInRange` and `RandomWithStep`. - ## Create a random object -Random objects can be created according to a random number. +Random objects can be created according to a random number.