From 30154b8f91c62413f38ddff28ba02c65f6925775 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:16:49 +0900 Subject: [PATCH 01/59] Add check markdown lint action --- .markdownlint.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .markdownlint.json diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000000..f71417a913 --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,7 @@ +{ + "default": true, + "MD007": { "indent": 4 }, + "MD013": false, + "MD025": false, + "MD045": false +} \ No newline at end of file From dbcf83b7958bb7492bdd4038a174285c0dfbf20f Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 14:44:23 +0900 Subject: [PATCH 02/59] Ignore MD047 Lint --- .markdownlint.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.markdownlint.json b/.markdownlint.json index f71417a913..df2de0d6b6 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -3,5 +3,6 @@ "MD007": { "indent": 4 }, "MD013": false, "MD025": false, - "MD045": false + "MD045": false, + "MD047": false } \ No newline at end of file From bfe1b4fafaa67e6beb8aaca5206c4bc5b8c5c209 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:02:56 +0900 Subject: [PATCH 03/59] Ignore MD001, MD004, MD036 lint --- .markdownlint.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.markdownlint.json b/.markdownlint.json index df2de0d6b6..07dfb5f2bb 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -1,8 +1,11 @@ { "default": true, + "MD001": false, + "MD004": false, "MD007": { "indent": 4 }, "MD013": false, "MD025": false, + "MD036": false, "MD045": false, "MD047": false } \ No newline at end of file From 3cbd71f905c8f485dc2309b88d5153ef93c54ff4 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:27:09 +0900 Subject: [PATCH 04/59] Apply lint to `gevelop5/behaviors` --- docs/gdevelop5/behaviors/anchor/index.md | 19 +- docs/gdevelop5/behaviors/bounce/index.md | 2 - .../behaviors/destroyoutside/index.md | 4 +- docs/gdevelop5/behaviors/draggable/index.md | 8 - .../behaviors/events-based-behaviors/index.md | 12 +- docs/gdevelop5/behaviors/index.md | 11 +- docs/gdevelop5/behaviors/pathfinding/index.md | 22 +-- docs/gdevelop5/behaviors/physics/index.md | 8 +- docs/gdevelop5/behaviors/physics2/index.md | 187 +++++++++--------- docs/gdevelop5/behaviors/platformer/index.md | 7 +- docs/gdevelop5/behaviors/topdown/index.md | 24 +-- docs/gdevelop5/behaviors/tween/index.md | 3 - 12 files changed, 138 insertions(+), 169 deletions(-) diff --git a/docs/gdevelop5/behaviors/anchor/index.md b/docs/gdevelop5/behaviors/anchor/index.md index df5ff1c8c9..ebb8c40a57 100644 --- a/docs/gdevelop5/behaviors/anchor/index.md +++ b/docs/gdevelop5/behaviors/anchor/index.md @@ -9,24 +9,23 @@ You can anchor an [object](/gdevelop5/objects) to the screen by using anchor [be To add an anchor to an object: - * Right-click on the object in the Objects Panel (or create a new object) and select **Edit object**. - * Click on the **Behaviors** tab. - * Click **+** to add a behavior to the object. - * Select **Anchor**. - * Set your anchor points and click **Apply**. - +* Right-click on the object in the Objects Panel (or create a new object) and select **Edit object**. +* Click on the **Behaviors** tab. +* Click **+** to add a behavior to the 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. - * **Window side**: The distance between the object's edge and the selected window side is set so that it is the same for any window size. - * **Proportional**: The object's edge will always be set so that it is at the same proportion of the screen. +* **None**: No anchor will be applied to the selected edge. +* **Window side**: The distance between the object's edge and the selected window side is set so that it is the same for any window size. +* **Proportional**: The object's edge will always be set so that it is at the same proportion of the screen. Note that setting anchors to opposite edges will stretch the object. 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..1bc3079523 100644 --- a/docs/gdevelop5/behaviors/events-based-behaviors/index.md +++ b/docs/gdevelop5/behaviors/events-based-behaviors/index.md @@ -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 @@ -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. @@ -158,17 +157,16 @@ 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. + * 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. * 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. - + * 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. - * 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..b1b4169f61 100644 --- a/docs/gdevelop5/behaviors/index.md +++ b/docs/gdevelop5/behaviors/index.md @@ -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..fe7686d014 100644 --- a/docs/gdevelop5/behaviors/pathfinding/index.md +++ b/docs/gdevelop5/behaviors/pathfinding/index.md @@ -13,8 +13,8 @@ When the behavior is added to an object, some properties can be modified: ![](pasted/20230304-155732.png) - * **impassable:** if enabled, the obstacle is going to be impassable. The moving object will be avoiding them and never go through them. - * **cost:** if the obstacle is not impassable, a cost can be set the obstacle. The moving object, when looking for the best possible path to a destination, will prefer to avoid the obstacle with high-cost values. For example, a river might have some cost. The moving object, if possible, will avoid it. However, if there is no other way around the river, or if the river has a lower cost compared to another area, the moving object will go through it (instead of climbing a mountain with a higher cost for example). And if we put crocodiles into the river and increase its cost, the moving object might decide to climb the mountains instead. +* **impassable:** if enabled, the obstacle is going to be impassable. The moving object will be avoiding them and never go through them. +* **cost:** if the obstacle is not impassable, a cost can be set the obstacle. The moving object, when looking for the best possible path to a destination, will prefer to avoid the obstacle with high-cost values. For example, a river might have some cost. The moving object, if possible, will avoid it. However, if there is no other way around the river, or if the river has a lower cost compared to another area, the moving object will go through it (instead of climbing a mountain with a higher cost for example). And if we put crocodiles into the river and increase its cost, the moving object might decide to climb the mountains instead. !!! tip @@ -28,14 +28,14 @@ After we add the behavior to the object, we can customize a number of options: ![](pasted/20230304-160035.png) - * **acceleration:** this is how fast the object is going to accelerate while moving on a path. - * **allow diagonals:** set if the object can move in diagonals. - * **angle offset:** in case the sprite is facing the wrong direction we can set the angle offset - * **extra border size:** sets the border size around the object. This setting determines how close the object can move to the obstacles. - * **max speed:** maximum speed the object can move on the path. - * **rotate object:** if you don't want the object to rotate while moving on the path, disable the object's rotation. - * **rotate speed:** sets the speed of the object's rotation. - * **virtual cell height and width:** the path is generated using a virtual grid. The size of the cells if this virtual grid can be changed. When the grid is smaller, the movement is more precise and can find path between objects - but is also more intensive for the device to compute. +* **acceleration:** this is how fast the object is going to accelerate while moving on a path. +* **allow diagonals:** set if the object can move in diagonals. +* **angle offset:** in case the sprite is facing the wrong direction we can set the angle offset +* **extra border size:** sets the border size around the object. This setting determines how close the object can move to the obstacles. +* **max speed:** maximum speed the object can move on the path. +* **rotate object:** if you don't want the object to rotate while moving on the path, disable the object's rotation. +* **rotate speed:** sets the speed of the object's rotation. +* **virtual cell height and width:** the path is generated using a virtual grid. The size of the cells if this virtual grid can be changed. When the grid is smaller, the movement is more precise and can find path between objects - but is also more intensive for the device to compute. !!! note @@ -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..43d705f4e1 100644 --- a/docs/gdevelop5/behaviors/physics/index.md +++ b/docs/gdevelop5/behaviors/physics/index.md @@ -12,13 +12,14 @@ title: Physics behavior 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 +60,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 +73,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..f8eda5a0a5 100644 --- a/docs/gdevelop5/behaviors/physics2/index.md +++ b/docs/gdevelop5/behaviors/physics2/index.md @@ -17,16 +17,16 @@ 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. The world has three properties: - * **Gravity**. It consists of two components (X and Y) and works like our gravity adding a force to every object, pushing them in the given direction. Objects support a gravity scale factor too, more on this in the bodies section. - * **Timescale**. It defines the scale of time the simulation will use. With a timescale of `0.5`, the simulation will run at half the speed; with a timescale of `2`, the simulation will be twice as fast. If timescale is `0`, the simulation will pause. Super useful for bullet time effects! - * **Scale**. GDevelop distances and sizes are defined in pixels, but the physics engine uses meters internally. A scale factor must is set (with two components, scale on X axis and on Y axis) to make the conversion. The scale numbers mean how many pixels a meter is; for example, a scale of 50 means that a distance of 50 pixels in GDevelop is converted to 1 meter in the physics world. +* **Gravity**. It consists of two components (X and Y) and works like our gravity adding a force to every object, pushing them in the given direction. Objects support a gravity scale factor too, more on this in the bodies section. +* **Timescale**. It defines the scale of time the simulation will use. With a timescale of `0.5`, the simulation will run at half the speed; with a timescale of `2`, the simulation will be twice as fast. If timescale is `0`, the simulation will pause. Super useful for bullet time effects! +* **Scale**. GDevelop distances and sizes are defined in pixels, but the physics engine uses meters internally. A scale factor must is set (with two components, scale on X axis and on Y axis) to make the conversion. The scale numbers mean how many pixels a meter is; for example, a scale of 50 means that a distance of 50 pixels in GDevelop is converted to 1 meter in the physics world. !!! note @@ -38,20 +38,20 @@ 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: - * **Dynamic**: The most common type, dynamic bodies, are affected by gravity, can collide with other active, static, and kinematic bodies. You can apply forces and impulses on them and modify their velocity as well. Almost anything that must move should be a dynamic body. - * **Static**: Static objects are not affected by gravity, and you can't move them using forces, impulses or modifying their velocity. They can collide with dynamic objects only, ignoring kinematics and other static bodies. They are meant to be used for static world geometry, as the ground, non-movable walls, and platforms. - * **Kinematic**: Kinematics are very specialized; they are a type of static body, so they won't be affected by gravity or forces or impulses, but you can move them by modifying their velocity. Kinematics collide with dynamic bodies only, but will not move as a result of this collision. Kinematic bodies are useful for simulating movable walls and platforms. +* **Dynamic**: The most common type, dynamic bodies, are affected by gravity, can collide with other active, static, and kinematic bodies. You can apply forces and impulses on them and modify their velocity as well. Almost anything that must move should be a dynamic body. +* **Static**: Static objects are not affected by gravity, and you can't move them using forces, impulses or modifying their velocity. They can collide with dynamic objects only, ignoring kinematics and other static bodies. They are meant to be used for static world geometry, as the ground, non-movable walls, and platforms. +* **Kinematic**: Kinematics are very specialized; they are a type of static body, so they won't be affected by gravity or forces or impulses, but you can move them by modifying their velocity. Kinematics collide with dynamic bodies only, but will not move as a result of this collision. Kinematic bodies are useful for simulating movable walls and platforms. And some dynamic-related settings: - * **Bullet**: If set to true, the object will use a continuous-collision-detection algorithm, slightly reducing the performance but improving the response when moving very fast. Useful to correctly simulate bullets or any high-speed object and reduce the chances for the bullets to go through thin objects. - * **Fixed Rotation**: If set to true, the object won't be able to rotate. Useful to avoid an object like your player spinning each time it collides with a wall or while walking down a slope. - * **Can Sleep**: If set to true, the engine can improve the performance on objects that haven't moved in a while, putting them to sleep. This is a performance setting and should not impact the simulation itself. +* **Bullet**: If set to true, the object will use a continuous-collision-detection algorithm, slightly reducing the performance but improving the response when moving very fast. Useful to correctly simulate bullets or any high-speed object and reduce the chances for the bullets to go through thin objects. +* **Fixed Rotation**: If set to true, the object won't be able to rotate. Useful to avoid an object like your player spinning each time it collides with a wall or while walking down a slope. +* **Can Sleep**: If set to true, the engine can improve the performance on objects that haven't moved in a while, putting them to sleep. This is a performance setting and should not impact the simulation itself. !!! note @@ -61,53 +61,52 @@ And some dynamic-related settings: Body shape options determine the body form and size. Depending on the shape type, you have different options to set the dimensions: - * **Box**: *An axis-aligned rectangle centered on the object*. If a custom width and height are not set, the object size is used. - * **Circle**: *A circle centered on the object*. If a custom radius is not set, it will be calculated as an average from the object width and height. If the object is in the form of a square, the result will be an inscribed circle inside the object bounding box. - * **Edge**: *A thin line centered in the object*; since this shape has no volume, it doesn't work well as a dynamic body. It's meant to be used for static geometry, as ground and platforms. If a custom length and angle are not set, the edge will be a horizontal line with length equal to the object width. - * **Polygon**: *A custom shape configured using vertices*. This polygon must be convex (if this condition is not fulfilled, the shape falls back to a box). The number of vertices must be greater than or equal to 3 (otherwise, it can't be convex) and less than or equal to 8 (the maximum number of vertices supported per polygon). +* **Box**: *An axis-aligned rectangle centered on the object*. If a custom width and height are not set, the object size is used. +* **Circle**: *A circle centered on the object*. If a custom radius is not set, it will be calculated as an average from the object width and height. If the object is in the form of a square, the result will be an inscribed circle inside the object bounding box. +* **Edge**: *A thin line centered in the object*; since this shape has no volume, it doesn't work well as a dynamic body. It's meant to be used for static geometry, as ground and platforms. If a custom length and angle are not set, the edge will be a horizontal line with length equal to the object width. +* **Polygon**: *A custom shape configured using vertices*. This polygon must be convex (if this condition is not fulfilled, the shape falls back to a box). The number of vertices must be greater than or equal to 3 (otherwise, it can't be convex) and less than or equal to 8 (the maximum number of vertices supported per polygon). In addition to custom shape type and dimension, the body shape supports two extra options: - * **Offset**: The offset has two components (X and Y) and can be used to move the shape from the object center. - * **Scale**: This will scale the shape custom dimensions and offset. If you don't use custom dimensions, you can use the box shape and let the width and height be equal to the object's original size; there's no need to change the shape scale as the scaling will be done automatically. If the shape type is a polygon, the scale will modify the vertices position too, and the scaling origin will be the **Polygon Origin**. If you set the polygon origin to `Center` and scale the shape down, the vertices will be scaled down to/in-direction-of the object center. +* **Offset**: The offset has two components (X and Y) and can be used to move the shape from the object center. +* **Scale**: This will scale the shape custom dimensions and offset. If you don't use custom dimensions, you can use the box shape and let the width and height be equal to the object's original size; there's no need to change the shape scale as the scaling will be done automatically. If the shape type is a polygon, the scale will modify the vertices position too, and the scaling origin will be the **Polygon Origin**. If you set the polygon origin to `Center` and scale the shape down, the vertices will be scaled down to/in-direction-of the object center. ### Body Settings Besides the type and shape, physics bodies have some extra settings that determine how the body will behave on collision, how the gravity will affect them and the energy they lose by air friction. Each setting is explained below: - * **Density**: Density determines the body mass. The general formula is `density = mass/volume`. In 2D games, this is equivalent to `density = mass/area`. Two bodies with the same density but different areas/sizes will have different mass, so you have to take the density into account when resizing objects. +* **Density**: Density determines the body mass. The general formula is `density = mass/volume`. In 2D games, this is equivalent to `density = mass/area`. Two bodies with the same density but different areas/sizes will have different mass, so you have to take the density into account when resizing objects. - * **Friction**: Friction adds a force to the bodies in contact, in the opposite direction to their direction of movement. The higher the friction, the faster the objects will slow down on contact. To understand it better, a platform made of sand will have friction close to 1 (very high), while a platform made of ice, will have a friction factor close to zero. When two objects are in contact, the total friction is calculated using the frictions of the colliding objects through the formula: `friction = sqrt(frictionA * frictionB)` +* **Friction**: Friction adds a force to the bodies in contact, in the opposite direction to their direction of movement. The higher the friction, the faster the objects will slow down on contact. To understand it better, a platform made of sand will have friction close to 1 (very high), while a platform made of ice, will have a friction factor close to zero. When two objects are in contact, the total friction is calculated using the frictions of the colliding objects through the formula: `friction = sqrt(frictionA * frictionB)` - * **Restitution**: Restitution determines how much energy the object will keep or lose in each collision. A value of zero means the collisions will be perfectly inelastic, and the object won't bounce at all. While a restitution = 1 means the collisions will be perfectly elastic, and the object will jump with the same energy each time. Imagine a ball bouncing off the ground, and always reaching the same height. Values of restitution greater than 1 are valid but will make the object gain energy on each collision, and the simulation will probably run out of control. When two objects make contact, the total restitution is calculated using the restitutions of the colliding objects through the formula: `restitution = max(restitutionA, restitutionB)` +* **Restitution**: Restitution determines how much energy the object will keep or lose in each collision. A value of zero means the collisions will be perfectly inelastic, and the object won't bounce at all. While a restitution = 1 means the collisions will be perfectly elastic, and the object will jump with the same energy each time. Imagine a ball bouncing off the ground, and always reaching the same height. Values of restitution greater than 1 are valid but will make the object gain energy on each collision, and the simulation will probably run out of control. When two objects make contact, the total restitution is calculated using the restitutions of the colliding objects through the formula: `restitution = max(restitutionA, restitutionB)` - * **Linear Damping**: Linear damping reduces the object velocity all the time. The higher the value, the faster it slows down the objects. You can imagine it as the air viscosity, very high values would even simulate the object to move in liquid. Although you can use any value, a negative damping will make the object to gain velocity on each step, generating a non-physical behavior. +* **Linear Damping**: Linear damping reduces the object velocity all the time. The higher the value, the faster it slows down the objects. You can imagine it as the air viscosity, very high values would even simulate the object to move in liquid. Although you can use any value, a negative damping will make the object to gain velocity on each step, generating a non-physical behavior. - * **Angular Damping**: Angular damping is analogous to the linear damping, but instead of slowing down the object's linear velocity, it slows down the angular velocity, making the object to rotate slower each step. Although you can use any value, a negative damping will make the object to gain angular velocity on each step, generating a non-physical behavior. +* **Angular Damping**: Angular damping is analogous to the linear damping, but instead of slowing down the object's linear velocity, it slows down the angular velocity, making the object to rotate slower each step. Although you can use any value, a negative damping will make the object to gain angular velocity on each step, generating a non-physical behavior. - * **Gravity Scale**: This is multiplied by the world gravity to determine the gravity applied to the object. Note that this is a number and not a vector; you can't change the orientation of the gravity, just the magnitude and sense. Any number is valid. For example, if the gravity scale is 1, the gravity applied will be the world gravity; if it's 2, the gravity will be twice as strong for this object; if it's 0.5, the gravity will be twice as weak; if it's 0 the object won't be affected by gravity, and if it's -1, the gravity will be inverted. +* **Gravity Scale**: This is multiplied by the world gravity to determine the gravity applied to the object. Note that this is a number and not a vector; you can't change the orientation of the gravity, just the magnitude and sense. Any number is valid. For example, if the gravity scale is 1, the gravity applied will be the world gravity; if it's 2, the gravity will be twice as strong for this object; if it's 0.5, the gravity will be twice as weak; if it's 0 the object won't be affected by gravity, and if it's -1, the gravity will be inverted. ### Collision Layers & Masks Layers and masks are the way to filter collisions between objects. - * **Layer**: Logical group that an object can belong to. Objects can be a member of multiple layers. - * **Mask**: List of the layers that an object will collide with. +* **Layer**: Logical group that an object can belong to. Objects can be a member of multiple layers. +* **Mask**: List of the layers that an object will collide with. !!! note 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*. Here is a possible solution to the above zombie problem: - * Ground: Enable the first layer and the first and second masks. - * Player: Enable the first layer and the first and second masks. - * Zombie: Enable the second layer and the first mask only. +* Ground: Enable the first layer and the first and second masks. +* Player: Enable the first layer and the first and second masks. +* Zombie: Enable the second layer and the first mask only. | Object | Layer | Mask | |---|---|---| @@ -117,10 +116,10 @@ Here is a possible solution to the above zombie problem: We can verify this works: - * Ground & Player: A ground layer matches a player mask (first), **and** a player layer matches a ground mask (first) - * Ground & Zombie: A ground layer matches a zombie mask (first), **and** a zombie layer matches a ground mask (second) - * Player & Zombie: A player layer matches a zombie mask (first), **and** a zombie layer matches a player mask (second) - * Zombie & Zombie: The zombie has only the second layer enabled, and only the first mask enabled, so zombies can't collide with each other. +* Ground & Player: A ground layer matches a player mask (first), **and** a player layer matches a ground mask (first) +* Ground & Zombie: A ground layer matches a zombie mask (first), **and** a zombie layer matches a ground mask (second) +* Player & Zombie: A player layer matches a zombie mask (first), **and** a zombie layer matches a player mask (second) +* Zombie & Zombie: The zombie has only the second layer enabled, and only the first mask enabled, so zombies can't collide with each other. Note that you have 16 layers and 16 masks available. Here, in this example, only two layers and masks were needed. By default, all physics objects will use layer 1 and mask 1. @@ -183,9 +182,9 @@ The objects won't be at the given distance all the time but will tend to reach i Settings: - * **Length**: The target distance, if a negative value is given, the distance between the objects when creating the joint is used. - * **Damping ratio**: The "friction" the objects will suffer, low values make the objects oscillate more, higher values reduce oscillations but objects will move slower. - * **Frequency**: How fast the objects will oscillate, lower values generate soft joints moving more gradually to reach the target distance, higher values simulate harder joints with objects moving very fast to reach the target. +* **Length**: The target distance, if a negative value is given, the distance between the objects when creating the joint is used. +* **Damping ratio**: The "friction" the objects will suffer, low values make the objects oscillate more, higher values reduce oscillations but objects will move slower. +* **Frequency**: How fast the objects will oscillate, lower values generate soft joints moving more gradually to reach the target distance, higher values simulate harder joints with objects moving very fast to reach the target. !!! note Low damping ratio and frequency values will generate soft joints, with lots of oscillations before getting close to the target distance. In contrast, high values for both settings generate very rigid joints. @@ -195,31 +194,31 @@ Settings: Revolute joints work like "pins" and are also known as "hinges," they make the objects to rotate around a point. There are two types of revolute joints; in the end, they are almost the same, with a small difference: - * **A revolute joint between two objects**: It "pins" two objects, the objects will move together in a way so their anchor points overlap, and each object will rotate around their anchor point. Imagine that you pin two cards together and throw them, so they move and rotate freely around the pin. - * **A revolute joint in a single object**: Joints usually work between two objects; this is one of the exceptions. This joint needs a single object and its anchor point and pinpoints the object at the given fixed position. Think of it like pinning a note in a wall; the note can rotate around the pin but can't move. +* **A revolute joint between two objects**: It "pins" two objects, the objects will move together in a way so their anchor points overlap, and each object will rotate around their anchor point. Imagine that you pin two cards together and throw them, so they move and rotate freely around the pin. +* **A revolute joint in a single object**: Joints usually work between two objects; this is one of the exceptions. This joint needs a single object and its anchor point and pinpoints the object at the given fixed position. Think of it like pinning a note in a wall; the note can rotate around the pin but can't move. !!! note In the single object version of the joint, the object is added as the second object in the joint. The first object is a hidden static body; this allows to use this type of joint in gears, which is explained in the gear joint section. Here is the list of the settings specific for revolute joints: - * **Angle limits**: If enabled, the rotation will be restricted between the minimum and maximum angles. Note that both angles are relative to the first object. - * **Reference angle**: The angle between the objects that will be considered as zero. It offsets all the angle properties. If the reference angle is 15 degrees, asking for the current joint angle when the angle between the objects is 15 degrees in world coordinates will return 0, and set the maximum angle to 30 will set it to 45 (relative to the first object). - * **Minimum angle**: The minimum angle between the objects, relative to the first object. Must be lower than or equal to the maximum angle. - * **Maximum angle**: The maximum angle between the objects, relative to the first object. Must be greater than or equal to the minimum angle. +* **Angle limits**: If enabled, the rotation will be restricted between the minimum and maximum angles. Note that both angles are relative to the first object. +* **Reference angle**: The angle between the objects that will be considered as zero. It offsets all the angle properties. If the reference angle is 15 degrees, asking for the current joint angle when the angle between the objects is 15 degrees in world coordinates will return 0, and set the maximum angle to 30 will set it to 45 (relative to the first object). +* **Minimum angle**: The minimum angle between the objects, relative to the first object. Must be lower than or equal to the maximum angle. +* **Maximum angle**: The maximum angle between the objects, relative to the first object. Must be greater than or equal to the minimum angle. !!! tip You can use revolute joints with angle limits to simulate articulations, in other words, ragdolls! - * **Motor**: If enabled, the joint will add torque to the second object to make it rotate without the need of an external force, like a motor. If you enable it, remember to set a motor speed and a maximum motor torque! - * **Motor speed**: The target motor speed, in degrees per second. This is the speed the second object will try to reach while rotating around the first object. Motor speed can be positive to rotate the object in a clockwise direction or negative to rotate it in the anticlockwise direction. - * **Maximum motor torque**: The maximum torque the motor can spend to reach the target motor speed must be positive. +* **Motor**: If enabled, the joint will add torque to the second object to make it rotate without the need of an external force, like a motor. If you enable it, remember to set a motor speed and a maximum motor torque! +* **Motor speed**: The target motor speed, in degrees per second. This is the speed the second object will try to reach while rotating around the first object. Motor speed can be positive to rotate the object in a clockwise direction or negative to rotate it in the anticlockwise direction. +* **Maximum motor torque**: The maximum torque the motor can spend to reach the target motor speed must be positive. Also, you can access the following values during simulation: - * **Joint angle**: The current angle between the objects, relative to the first object and affected by the reference angle. - * **Joint speed**: The current joint angular speed, i.e., the speed the second object is rotating around, relative to the first object rotation. - * **Joint motor torque**: The current motor torque, it can be lower than the maximum motor torque, as it's the required torque to reach the target motor speed. +* **Joint angle**: The current angle between the objects, relative to the first object and affected by the reference angle. +* **Joint speed**: The current joint angular speed, i.e., the speed the second object is rotating around, relative to the first object rotation. +* **Joint motor torque**: The current motor torque, it can be lower than the maximum motor torque, as it's the required torque to reach the target motor speed. !!! note @@ -231,24 +230,24 @@ Prismatic joints work like "pistons" and are also known as "sliders." They make Settings specific for prismatic joints: - * **Axis angle**: The angle that determines the movement direction, an axis angle of 0 means a horizontal movement. The value is given in world coordinates, but the axis will rotate following the first object direction (if you rotate your elevator rails, the elevator movement angle rotates too). - * **Reference angle**: As in revolute joints, this angle adds an offset to the axis, establishing a new "angle zero." If the reference angle is 15, an axis angle of 15 in world coordinates (relative to the first object direction) will be treated as 0. - * **Translation limits**: If enabled, the second object movement will be limited between the given minimum and maximum translations. - * **Minimum translation**: The minimum position the second object can move from the first one. In our elevator example, the minimum translation would be the floor. - * **Maximum translation**: The maximum position the second object can move from the first one. In our elevator example, the roof. +* **Axis angle**: The angle that determines the movement direction, an axis angle of 0 means a horizontal movement. The value is given in world coordinates, but the axis will rotate following the first object direction (if you rotate your elevator rails, the elevator movement angle rotates too). +* **Reference angle**: As in revolute joints, this angle adds an offset to the axis, establishing a new "angle zero." If the reference angle is 15, an axis angle of 15 in world coordinates (relative to the first object direction) will be treated as 0. +* **Translation limits**: If enabled, the second object movement will be limited between the given minimum and maximum translations. +* **Minimum translation**: The minimum position the second object can move from the first one. In our elevator example, the minimum translation would be the floor. +* **Maximum translation**: The maximum position the second object can move from the first one. In our elevator example, the roof. !!! warning The translation limits range must include the zero, a minimum translation of 5, and maximum translation of 10 (range [5, 10]) will be converted to the range [0, 10] to include the zero. - * **Motor**: If enabled, the joint will apply a force to the second object to reach a given motor speed. If you enable it, remember to set a motor speed and a maximum motor force! - * **Motor speed**: The target speed the motor will try to reach; if positive, the second object will move in the axis direction, and in the opposite direction if negative. - * **Maximum motor force**: The maximum amount of force the motor can spend to reach the target speed. It must be positive. +* **Motor**: If enabled, the joint will apply a force to the second object to reach a given motor speed. If you enable it, remember to set a motor speed and a maximum motor force! +* **Motor speed**: The target speed the motor will try to reach; if positive, the second object will move in the axis direction, and in the opposite direction if negative. +* **Maximum motor force**: The maximum amount of force the motor can spend to reach the target speed. It must be positive. Also, you can access the below values during simulation: - * **Joint translation**: In the current translation, the second object has moved relative to the first. - * **Joint speed**: The current speed the second object is moving at, along the axis and relative to the first object speed. - * **Joint motor force**: The current force the motor is applying to the second object; this value can be lower than the maximum motor force as it's the force needed to reach the target motor speed. +* **Joint translation**: In the current translation, the second object has moved relative to the first. +* **Joint speed**: The current speed the second object is moving at, along the axis and relative to the first object speed. +* **Joint motor force**: The current force the motor is applying to the second object; this value can be lower than the maximum motor force as it's the force needed to reach the target motor speed. ### Pulley joint @@ -268,11 +267,11 @@ Also, please note that there is not a "rope" at all. The joint works with the di Here are the joint settings: - * **First ground point**: The fixed point the first object is attached (in the examples, point A). - * **Second ground point**: The fixed point the second object is attached (in the examples, point B). - * **First length**: The initial rope length between the first object and its ground point; if the value is negative or zero, the distance at the moment of creating the joint is used. - * **Second length**: The initial rope length between the second object and its ground point; if the value is negative or zero, the distance at the moment of creating the joint is used. - * **Ratio**: Explained above, the equivalence between the distance in each side. If the ratio is = 0.33, 1 meter on the first side is equivalent to 3 meters on the second side. +* **First ground point**: The fixed point the first object is attached (in the examples, point A). +* **Second ground point**: The fixed point the second object is attached (in the examples, point B). +* **First length**: The initial rope length between the first object and its ground point; if the value is negative or zero, the distance at the moment of creating the joint is used. +* **Second length**: The initial rope length between the second object and its ground point; if the value is negative or zero, the distance at the moment of creating the joint is used. +* **Ratio**: Explained above, the equivalence between the distance in each side. If the ratio is = 0.33, 1 meter on the first side is equivalent to 3 meters on the second side. ### Gear Joint @@ -287,9 +286,9 @@ You can gear together two revolute joints, two prismatic joints, or a revolute a The gear joint settings: - * **First joint**: A revolute or prismatic joint will be linked to the second joint. - * **Second joint**: A revolute or prismatic joint will be linked to the first joint. - * **Ratio**: Like the pulley joint, gears support a "ratio", and works in a similarly: If you link two revolute joints with a ratio = 0.33, each turn in the first revolute will be equivalent to three turns in the second one. But there is a difference against the pulley joint ratio: gears ratios can be negative, allowing a positive movement in one of the joints to generate a negative movement in the other. For example, when linking two revolute joints with a ratio = -1, clockwise rotation in a revolute joint will generate an anti-clockwise rotation in the other, much like a gear. +* **First joint**: A revolute or prismatic joint will be linked to the second joint. +* **Second joint**: A revolute or prismatic joint will be linked to the first joint. +* **Ratio**: Like the pulley joint, gears support a "ratio", and works in a similarly: If you link two revolute joints with a ratio = 0.33, each turn in the first revolute will be equivalent to three turns in the second one. But there is a difference against the pulley joint ratio: gears ratios can be negative, allowing a positive movement in one of the joints to generate a negative movement in the other. For example, when linking two revolute joints with a ratio = -1, clockwise rotation in a revolute joint will generate an anti-clockwise rotation in the other, much like a gear. !!! warning @@ -303,15 +302,15 @@ Note that it's another exception from the other joints because it's a joint that Settings for the mouse joint: - * **Object**: The object to move around, towards the target position. - * **Target**: The target point the object will try to reach. You can update it as many times as you want after creating the joint. +* **Object**: The object to move around, towards the target position. +* **Target**: The target point the object will try to reach. You can update it as many times as you want after creating the joint. !!! warning The initial target position (at the moment of creating the joint) is also used as the object anchor point, so make sure to set it! - * **Maximum force**: The maximum force the joint can apply on the object to reach the target position; the greater the force, the faster the object will move. It must be positive. - * **Frequency**: Works like the distance joint frequency, determining how fast the object will oscillate around the target. - * **Damping ratio**: Works like the distance joint damping ratio, slowing down the object along the time. +* **Maximum force**: The maximum force the joint can apply on the object to reach the target position; the greater the force, the faster the object will move. It must be positive. +* **Frequency**: Works like the distance joint frequency, determining how fast the object will oscillate around the target. +* **Damping ratio**: Works like the distance joint damping ratio, slowing down the object along the time. !!! note @@ -332,18 +331,18 @@ You can think of the wheel joint as a revolute plus a prismatic joint: Here are the wheel joint settings: - * **Axis angle**: Equivalent to the prismatic joint axis angle, it determines the direction of movement (or sliding) between the wheel and the first object. - * **Frequency**: The suspension frequency, equivalent to the distance joint frequency. Higher values will make the wheel oscillate faster. - * **Damping ratio**: Damping ration is the suspension damping, equivalent to the distance joint damping ratio. Higher value slows down the wheel movement at a higher rate. - * **Motor**: If enabled, the joint will add torque to the wheel (second object) to reach a given motor target speed. If you enable it, remember to set the motor speed and the maximum motor torque! - * **Motor speed**: The target angular speed the wheel will try to reach. It can be positive for clockwise rotation or negative for anti-clockwise rotation. - * **Maximum motor torque**: The maximum amount of torque the joint can apply to the wheel to reach the motor target speed. It must be positive. +* **Axis angle**: Equivalent to the prismatic joint axis angle, it determines the direction of movement (or sliding) between the wheel and the first object. +* **Frequency**: The suspension frequency, equivalent to the distance joint frequency. Higher values will make the wheel oscillate faster. +* **Damping ratio**: Damping ration is the suspension damping, equivalent to the distance joint damping ratio. Higher value slows down the wheel movement at a higher rate. +* **Motor**: If enabled, the joint will add torque to the wheel (second object) to reach a given motor target speed. If you enable it, remember to set the motor speed and the maximum motor torque! +* **Motor speed**: The target angular speed the wheel will try to reach. It can be positive for clockwise rotation or negative for anti-clockwise rotation. +* **Maximum motor torque**: The maximum amount of torque the joint can apply to the wheel to reach the motor target speed. It must be positive. And some extra values you can access during simulation: - * **Joint translation**: The current wheel translation along the suspension axis. - * **Joint speed**: The current wheel rotation speed. - * **Joint motor torque**: The current torque the joint is applying to the wheel, it can be lower than the maximum motor torque as it's the torque needed to reach the target speed. +* **Joint translation**: The current wheel translation along the suspension axis. +* **Joint speed**: The current wheel rotation speed. +* **Joint motor torque**: The current torque the joint is applying to the wheel, it can be lower than the maximum motor torque as it's the torque needed to reach the target speed. ### Weld Joint @@ -355,13 +354,13 @@ This joint is super basic: it just tries to stick/glue two objects together and The weld joint-specific settings: - * **Reference angle**: The angle the second object will have, relative to the first object angle. +* **Reference angle**: The angle the second object will have, relative to the first object angle. !!! note To stick the objects in the angle they are at the moment of creating the joint, use the relative angle between the objects as the reference angle: `SecondObject.Angle() - FirstObject.Angle()` - * **Frequency**: Works like the distance joint frequency, determining how fast the objects will oscillate to reach the rest position. - * **Damping ratio**: Works like the distance joint damping ratio, slowing down the objects along the time. +* **Frequency**: Works like the distance joint frequency, determining how fast the objects will oscillate to reach the rest position. +* **Damping ratio**: Works like the distance joint damping ratio, slowing down the objects along the time. ### Rope Joint @@ -371,7 +370,7 @@ As in the pulley joint, there is not a real rope; the joint just checks the dist The only setting specific for the rope joint: - * **Maximum length**: It is the maximum distance between the objects. If the initial value is negative, the distance between the objects at the moment of creating the joint is used. +* **Maximum length**: It is the maximum distance between the objects. If the initial value is negative, the distance between the objects at the moment of creating the joint is used. ### Friction Joint @@ -383,8 +382,8 @@ Friction joint simulates friction in a Z-axis; it slows down the relative speed Friction joint settings: - * **Maximum force**: The maximum force the joint can apply to the objects; higher values generate higher linear friction. - * **Maximum torque**: The maximum torque the joint can apply to the objects; higher values generate higher angular friction. +* **Maximum force**: The maximum force the joint can apply to the objects; higher values generate higher linear friction. +* **Maximum torque**: The maximum torque the joint can apply to the objects; higher values generate higher angular friction. ### Motor Joint @@ -392,8 +391,8 @@ The motor joint has not much to do with real motors, at least not directly. When Two things to take into account: - * The joint is not rigid; the objects can be far away from their target position or angle, a correction factor will tell how fast they will move and rotate to reach the rest pose. For example, imagine one of these punching bag toys that always gets up again. You could simulate it using a motor joint, linking the ground and the bag; this way no matter how much you push the bag object, the joint will try to put it back in the original angle, but not automatically. - * Motor joints will stop if there are obstacles. Going back to the punching bag example, if you push it with a big object to keep it on the ground, the motor joint won't be able to push it back, like in real life. +* The joint is not rigid; the objects can be far away from their target position or angle, a correction factor will tell how fast they will move and rotate to reach the rest pose. For example, imagine one of these punching bag toys that always gets up again. You could simulate it using a motor joint, linking the ground and the bag; this way no matter how much you push the bag object, the joint will try to put it back in the original angle, but not automatically. +* Motor joints will stop if there are obstacles. Going back to the punching bag example, if you push it with a big object to keep it on the ground, the motor joint won't be able to push it back, like in real life. !!! note @@ -401,11 +400,11 @@ Two things to take into account: The motor joint specific settings: - * **Offset X/Y**: The offset position for the second object, relative to the first one. To use the current object's position at the moment of creating the joints use `SecondObject.X() - FirstObject.X()` and `SecondObject.Y() - FirstObject.Y()` - * **Offset angle**: The angular offset for the second object relative to the first one. To use the current objects relative angle at the moment of creating the joints, use `SecondObject.Angle() - FirstObject.Angle()` - * **Maximum force**: The maximum force the joint can apply to the objects to move them to the target position. Higher values will move the objects faster, in case of being necessary. If this value is zero, there won't be a linear correction, and objects won't move to reach the target position. - * **Maximum torque**: The maximum torque the joint can apply to the objects to rotate them to the target angle. Higher values will rotate the objects faster, in case of being necessary. If this value is zero, there won't be an angular correction, and objects won't rotate to reach the target angle. - * **Correction factor**: How fast the objects have to move and rotate to reach the target position and angle. The higher the correction, the faster the objects will move and/or rotate. The correction is limited by the maximum amount of force and torque the joint can use. +* **Offset X/Y**: The offset position for the second object, relative to the first one. To use the current object's position at the moment of creating the joints use `SecondObject.X() - FirstObject.X()` and `SecondObject.Y() - FirstObject.Y()` +* **Offset angle**: The angular offset for the second object relative to the first one. To use the current objects relative angle at the moment of creating the joints, use `SecondObject.Angle() - FirstObject.Angle()` +* **Maximum force**: The maximum force the joint can apply to the objects to move them to the target position. Higher values will move the objects faster, in case of being necessary. If this value is zero, there won't be a linear correction, and objects won't move to reach the target position. +* **Maximum torque**: The maximum torque the joint can apply to the objects to rotate them to the target angle. Higher values will rotate the objects faster, in case of being necessary. If this value is zero, there won't be an angular correction, and objects won't rotate to reach the target angle. +* **Correction factor**: How fast the objects have to move and rotate to reach the target position and angle. The higher the correction, the faster the objects will move and/or rotate. The correction is limited by the maximum amount of force and torque the joint can use. ## Reference diff --git a/docs/gdevelop5/behaviors/platformer/index.md b/docs/gdevelop5/behaviors/platformer/index.md index 1526946e63..f8b8fed56a 100644 --- a/docs/gdevelop5/behaviors/platformer/index.md +++ b/docs/gdevelop5/behaviors/platformer/index.md @@ -24,6 +24,7 @@ By clicking on the platform behavior, you can choose from 3 different platform t * **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". @@ -120,7 +120,7 @@ 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: @@ -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..02d870730b 100644 --- a/docs/gdevelop5/behaviors/tween/index.md +++ b/docs/gdevelop5/behaviors/tween/index.md @@ -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 } From 73a16547d649acf897f360e16383201a198cae7a Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:27:25 +0900 Subject: [PATCH 05/59] Ignore MD024, MD026, MD046 lint --- .markdownlint.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.markdownlint.json b/.markdownlint.json index 07dfb5f2bb..5c5e9be95b 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -4,8 +4,11 @@ "MD004": false, "MD007": { "indent": 4 }, "MD013": false, + "MD024": false, "MD025": false, + "MD026": false, "MD036": false, "MD045": false, + "MD046": false, "MD047": false } \ No newline at end of file From 27266f20ffc78c8d5b6861c9b87fafb4b68c72f8 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:27:45 +0900 Subject: [PATCH 06/59] Apply lint to `gevelop5/community` --- .../contribute-to-the-assets-store.md | 48 +++---- docs/gdevelop5/community/events.md | 18 +-- docs/gdevelop5/community/faq.md | 23 ++-- .../guide-for-submitting-an-example.md | 49 ++++--- .../community/guide-to-reporting-a-bug.md | 20 +-- docs/gdevelop5/community/index.md | 1 - .../community/sell-asset-pack-store.md | 34 +++-- docs/gdevelop5/community/teams.md | 130 +++++++++--------- 8 files changed, 149 insertions(+), 174 deletions(-) diff --git a/docs/gdevelop5/community/contribute-to-the-assets-store.md b/docs/gdevelop5/community/contribute-to-the-assets-store.md index 3b1484508f..86ab61b730 100644 --- a/docs/gdevelop5/community/contribute-to-the-assets-store.md +++ b/docs/gdevelop5/community/contribute-to-the-assets-store.md @@ -8,34 +8,33 @@ 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: - * Each image frame, has to be a png transparency file - * Every animation frame has to be the same pixel size as the other animation states - * Tiles and GUI images have to be properly aligned +* Each image frame, has to be a png transparency file +* Every animation frame has to be the same pixel size as the other animation states +* Tiles and GUI images have to be properly aligned !!! note 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 - * Desktop: 1280x720 - * Desktop full HD: 1920x1080 +* Mobile: 720x1280 +* Desktop: 1280x720 +* Desktop full HD: 1920x1080 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,32 +42,29 @@ 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` @@ -78,7 +74,8 @@ RedHero_RunJewel_4.png 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: @@ -112,7 +109,7 @@ If you are not sure about the number that "time between frames" will represent,[ 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. @@ -172,7 +167,6 @@ A great tool to convert audio files to AAC format is [fre:ac](https://www.freac. 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": "", diff --git a/docs/gdevelop5/community/events.md b/docs/gdevelop5/community/events.md index b34e972224..427940c1cc 100644 --- a/docs/gdevelop5/community/events.md +++ b/docs/gdevelop5/community/events.md @@ -6,17 +6,17 @@ 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. + * [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)** + * [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! diff --git a/docs/gdevelop5/community/faq.md b/docs/gdevelop5/community/faq.md index 62136652da..86e819565d 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,24 +88,24 @@ 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 diff --git a/docs/gdevelop5/community/guide-for-submitting-an-example.md b/docs/gdevelop5/community/guide-for-submitting-an-example.md index 086381ab18..b1cb753498 100644 --- a/docs/gdevelop5/community/guide-for-submitting-an-example.md +++ b/docs/gdevelop5/community/guide-for-submitting-an-example.md @@ -35,9 +35,7 @@ You will have to make sure the example can be MIT licensed and make sure the res - 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 @@ -98,7 +96,6 @@ You will have to make sure the example can be MIT licensed and make sure the res #### Project Properties - - The project properties should be properly filled out. - *Project Name* The project name should be the example name. @@ -111,8 +108,8 @@ You will have to make sure the example can be MIT licensed and make sure the res ##### 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 @@ -127,35 +124,35 @@ You will have to make sure the example can be MIT licensed and make sure the res You can submit the example to the [Example repository](https://github.com/GDevelopApp/GDevelop-examples/issues) as an issue. - - Go to the site, - - Click The Green **New Issue** button: +- Go to the site, +- Click The Green **New Issue** button: ![](/gdevelop5/community/newissuegithub.png) - - A option to select issue template will be shown, click **New Example**: +- A option to select issue template will be shown, click **New Example**: ![](/gdevelop5/community/example-templategithub.png) - - You will get a text box where you can write the "issue" which is where you can upload the project file (as a `zip` file) and add a proper description about it. - - Change the title to the example's name. +- You will get a text box where you can write the "issue" which is where you can upload the project file (as a `zip` file) and add a proper description about it. +- Change the title to the example's name. ![](/gdevelop5/community/github-example-submission-title.png) - - 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. - ``` - - - Under `## Game folder`, add a zip of your project and drag and drop it into the text box. - - Now click `Submit Issue`. +- 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. + +```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`. ![](/gdevelop5/community/github-submit-issue.png) diff --git a/docs/gdevelop5/community/guide-to-reporting-a-bug.md b/docs/gdevelop5/community/guide-to-reporting-a-bug.md index 7ccd80d09b..8be88c42c8 100644 --- a/docs/gdevelop5/community/guide-to-reporting-a-bug.md +++ b/docs/gdevelop5/community/guide-to-reporting-a-bug.md @@ -34,13 +34,12 @@ 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 + * 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 @@ -51,10 +50,8 @@ screenshot of the active window). * 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 - #### Instructions to reproduce the bug If possible, add proper instructions to reproduce the bug. So that the developers can easily know what the problem that @@ -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 @@ -83,7 +78,6 @@ Some errors logs can hint the problem. So, do check (If possible) if there was a - Open the **Console** tab and check if there was any error shown - * Also, check the **sources** for call stacks !!! note @@ -94,7 +88,7 @@ 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. @@ -116,7 +110,6 @@ Steps to reproduce the behavior: * 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 +119,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,7 +131,7 @@ 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. @@ -155,7 +145,6 @@ You can also report it on [GDevelop's Github repo as an issue](https://github.co ![](/gdevelop5/community/rb1.png) - - Click on **New Issue**. - You will be asked if the issue is a bug report or a feature request. Click on Bug Report. @@ -167,4 +156,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..4c90153d59 100644 --- a/docs/gdevelop5/community/index.md +++ b/docs/gdevelop5/community/index.md @@ -20,7 +20,6 @@ We have written various *guides* that allow everyone to improve and submit quali * 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. diff --git a/docs/gdevelop5/community/sell-asset-pack-store.md b/docs/gdevelop5/community/sell-asset-pack-store.md index 02f6b332e9..33179b532a 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,7 +31,6 @@ 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. @@ -48,9 +46,10 @@ Note that: Momentary discounts and single-purchase coupons will be available for creators. 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. +- 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) @@ -71,10 +70,10 @@ We will soon provide a guide for that purpose. GDevelop uses Stripe's Marketplace in order to handle payments. In order to be eligible to sell Asset Packs on the app, you'll need: - * To be older than 13 years old - * A valid email - * An address in your country of residence - * A bank account in your country of residence +* To be older than 13 years old +* A valid email +* An address in your country of residence +* A bank account in your country of residence Once your assets have been accepted, GDevelop's team will create a Stripe account for you. You will have to complete your registration with your email address, home address, full name, and bank details. Once you've filled in this information, your Stripe account will be up and running with a purchases dashboard, where you'll be able to follow all your transactions. @@ -102,22 +101,21 @@ 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. Thus, every asset creator must go through a selection process. If you're an artist and wish to submit your assets to the store, contact us and make sure to send the following information: - * Name - * Country of residence - * Link to your premium pack for revision - * An introduction about who you are, and what inspired you to create that pack +* Name +* Country of residence +* Link to your premium pack for revision +* An introduction about who you are, and what inspired you to create that pack 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/teams.md b/docs/gdevelop5/community/teams.md index eb25fba72b..e0c8e25e74 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,25 +166,25 @@ 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 - - None +- None #### 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,14 +194,14 @@ 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 From 6e6455e5dcf5e64db516117aba43d7a0d71eeaee Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:33:12 +0900 Subject: [PATCH 07/59] Apply lint to `gevelop5/events` --- docs/gdevelop5/events/async.md | 6 +++--- docs/gdevelop5/events/callback-variables.md | 3 +++ docs/gdevelop5/events/functions/index.md | 16 ++++------------ docs/gdevelop5/events/index.md | 3 ++- docs/gdevelop5/events/js-code/index.md | 6 +++--- docs/gdevelop5/events/link/index.md | 2 +- docs/gdevelop5/events/standard/index.md | 3 ++- 7 files changed, 18 insertions(+), 21 deletions(-) diff --git a/docs/gdevelop5/events/async.md b/docs/gdevelop5/events/async.md index dc3a6585b1..2f7b2a1966 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/functions/index.md b/docs/gdevelop5/events/functions/index.md index 7dc6c1ae47..bf1e90e2dc 100644 --- a/docs/gdevelop5/events/functions/index.md +++ b/docs/gdevelop5/events/functions/index.md @@ -48,7 +48,7 @@ When a function is selected, on the top, you can see the configuration of the fu * 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_ ``` @@ -62,9 +62,9 @@ Add a parameter with the button "Add a parameter": For each parameter, you can enter: - * The name, that will be used to access the parameter in the *events of the function*. - * The type. Parameters can be objects, numbers, texts, etc. [See the complete list of parameters](/gdevelop5/events/functions/#references-of-parameters). - * A description, that will be shown in the window when configuring the action/condition or expression. +* The name, that will be used to access the parameter in the *events of the function*. +* The type. Parameters can be objects, numbers, texts, etc. [See the complete list of parameters](/gdevelop5/events/functions/#references-of-parameters). +* A description, that will be shown in the window when configuring the action/condition or expression. For example, we can add a parameter, that would return the objects to be rotated: @@ -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,7 +163,6 @@ 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. diff --git a/docs/gdevelop5/events/index.md b/docs/gdevelop5/events/index.md index fbf76976e3..64cc55739b 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. @@ -133,7 +135,6 @@ This section lists the different types of events, each of which is useful for ad - [Link events](/gdevelop5/events/link) - [JavaScript events](/gdevelop5/events/js-code) - Refer to the linked pages to learn more about each type of event. !!! note diff --git a/docs/gdevelop5/events/js-code/index.md b/docs/gdevelop5/events/js-code/index.md index 5cd8c81745..99700fd6c4 100644 --- a/docs/gdevelop5/events/js-code/index.md +++ b/docs/gdevelop5/events/js-code/index.md @@ -40,9 +40,8 @@ This array is exactly like what an action or a condition would use. For example, ## Documentation 📚 - * 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)**. - +* 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 @@ -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/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: From 691a1dfb044777f7d7e66062e455161e04f2daa8 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:33:28 +0900 Subject: [PATCH 08/59] Apply lint to `gevelop5/getting_started` --- ...tch-install-gdevelop-company-university.md | 2 +- docs/gdevelop5/getting_started/index.md | 22 +++++++++---------- .../open-gdevelop-4-project/index.md | 8 +++---- 3 files changed, 16 insertions(+), 16 deletions(-) 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..01e914408a 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..7ce89b3f92 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) From e283fb63a6676dac137a862f3bc00a9bcecc9a31 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:45:13 +0900 Subject: [PATCH 09/59] Apply lint to `gevelop5/interface` --- .../command-palette-and-shortcuts.md | 20 +++++-------- docs/gdevelop5/interface/debugger/index.md | 3 -- .../events-editor/external-events.md | 4 +-- .../interface/events-editor/index.md | 14 +++++---- .../interface/games-dashboard/index.md | 6 ++-- .../leaderboard-administration.md | 17 ++++++----- docs/gdevelop5/interface/preview.md | 1 - docs/gdevelop5/interface/profile.md | 21 +++++-------- .../interface/project-manager/index.md | 12 ++++---- .../interface/project-manager/resources.md | 11 ------- .../scene-editor/external-layouts.md | 1 - .../gdevelop5/interface/scene-editor/index.md | 1 + .../interface/scene-editor/layer-effects.md | 30 +++++++++---------- .../scene-editor/layers-and-cameras.md | 12 ++++---- 14 files changed, 63 insertions(+), 90 deletions(-) diff --git a/docs/gdevelop5/interface/command-palette-and-shortcuts.md b/docs/gdevelop5/interface/command-palette-and-shortcuts.md index 97ee51b5e1..50c768a9b5 100644 --- a/docs/gdevelop5/interface/command-palette-and-shortcuts.md +++ b/docs/gdevelop5/interface/command-palette-and-shortcuts.md @@ -9,19 +9,19 @@ 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**: - * Click **Open projects manager** (On the start page) - * Go to **Preferences** - * Go to the **Keyboard shortcuts** tab +* Click **Open projects manager** (On the start page) +* Go to **Preferences** +* Go to the **Keyboard shortcuts** tab **On desktop version**: - * Open **Files** on the toolbar - * Go to **Preferences** - * Go to the **Keyboard shortcuts** tab +* Open **Files** on the toolbar +* Go to **Preferences** +* Go to the **Keyboard shortcuts** tab ![](/gdevelop5/interface/shortcuts.png) @@ -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/events-editor/external-events.md b/docs/gdevelop5/interface/events-editor/external-events.md index 44c642d835..8117f5664f 100644 --- a/docs/gdevelop5/interface/events-editor/external-events.md +++ b/docs/gdevelop5/interface/events-editor/external-events.md @@ -35,5 +35,5 @@ You can use an external events sheet by linking to it with the [Link event type] External Events are good to use when you'd like to isolate one large block of events in your events sheet, either to keep things clean or to use in multiple places throughout your event sheet and game. Some examples include: - * Isolating the events associated with a particular object to reduce clutter - * Moving your entire game logic to an events sheet to be used over multiple scenes of global objects \ No newline at end of file +* Isolating the events associated with a particular object to reduce clutter +* Moving your entire game logic to an events sheet to be used over multiple scenes of global objects \ No newline at end of file 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/index.md b/docs/gdevelop5/interface/games-dashboard/index.md index b6108189d7..8d31c065a4 100644 --- a/docs/gdevelop5/interface/games-dashboard/index.md +++ b/docs/gdevelop5/interface/games-dashboard/index.md @@ -30,9 +30,9 @@ When you've opened a game dashboard, navigate to the Analytics tab. This shows v You'll find: - * the number of **sessions** (number of time the game was launched), - * the number of **players** for the selected day, and the number of new players (that never launched the game before - unless they have uninstalled the game), - * how many players are playing again for for up to 7 days after the first time they played (this is what is called the "**retention**"). +* the number of **sessions** (number of time the game was launched), +* the number of **players** for the selected day, and the number of new players (that never launched the game before - unless they have uninstalled the game), +* how many players are playing again for for up to 7 days after the first time they played (this is what is called the "**retention**"). If you don't have a GDevelop subscription, you'll only get access to the number of sessions - which should still give you an overview of your game success. As GDevelop is providing the analytics, the infrastructure cost and the bandwidth to collect the session metrics, we ask you to support GDevelop by getting a subscription. This will help the development of the game engine for the future and help to strengthen the community! diff --git a/docs/gdevelop5/interface/games-dashboard/leaderboard-administration.md b/docs/gdevelop5/interface/games-dashboard/leaderboard-administration.md index d96a0b9ff2..3a869a66da 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) @@ -115,9 +116,9 @@ Here is more details on the 2 options you have to format the score: * 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` + * `$150` + * `96 coins` + * `250.60` #### 2.Display as time @@ -129,10 +130,10 @@ Choose the format you want to use: ![](/gdevelop5/interface/games-dashboard/leaderboard-administration/pasted/20220429-165539.png) - * `HH` corresponds to hours - * `MM` corresponds to minutes - * `SS` corresponds to seconds - * `ms` corresponds to milliseconds +* `HH` corresponds to hours +* `MM` corresponds to minutes +* `SS` corresponds to seconds +* `ms` corresponds to milliseconds !!! note 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..4f88b08399 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. @@ -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..e13a43ebe4 100644 --- a/docs/gdevelop5/interface/project-manager/index.md +++ b/docs/gdevelop5/interface/project-manager/index.md @@ -13,14 +13,12 @@ The project manager shows the structure of your entire game. You can fold and unfold each category by clicking on the small arrow next to each category. - * **Game settings:** This is where you can customize the global settings of the game. For example, the default size of the game window or the package name for Android and iOS. You can see [all settings in "Properties"](/gdevelop5/interface/project-manager/properties). You can also [set the icons for your game](/gdevelop5/interface/project-manager/icons) and [manage the resources](/gdevelop5/interface/project-manager/resources) from the game. +* **Game settings:** This is where you can customize the global settings of the game. For example, the default size of the game window or the package name for Android and iOS. You can see [all settings in "Properties"](/gdevelop5/interface/project-manager/properties). You can also [set the icons for your game](/gdevelop5/interface/project-manager/icons) and [manage the resources](/gdevelop5/interface/project-manager/resources) from the game. - * **Scenes:** Scenes are the different screens and levels in your game. Everything in GDevelop is created in [scenes](/gdevelop5/interface/scene-editor). +* **Scenes:** Scenes are the different screens and levels in your game. Everything in GDevelop is created in [scenes](/gdevelop5/interface/scene-editor). - * **Extensions:** Extend GDevelop and make your objects and logic more modular by creating **custom behaviors**, new actions, conditions, expressions, or even custom objects using events. [Read more about extensions](/gdevelop5/extensions/create) to learn how to create them, use them in your game and share them. - - * **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. +* **Extensions:** Extend GDevelop and make your objects and logic more modular by creating **custom behaviors**, new actions, conditions, expressions, or even custom objects using events. [Read more about extensions](/gdevelop5/extensions/create) to learn how to create them, use them in your game and share them. +* **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/resources.md b/docs/gdevelop5/interface/project-manager/resources.md index 9d3636f9d3..02f4186404 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) @@ -56,29 +55,24 @@ Images can appear blurry if they're scaled to a ratio they were not meant to be, ### 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..de946edab7 100644 --- a/docs/gdevelop5/interface/scene-editor/external-layouts.md +++ b/docs/gdevelop5/interface/scene-editor/external-layouts.md @@ -5,7 +5,6 @@ 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. diff --git a/docs/gdevelop5/interface/scene-editor/index.md b/docs/gdevelop5/interface/scene-editor/index.md index 547df0aed9..7c146b107e 100644 --- a/docs/gdevelop5/interface/scene-editor/index.md +++ b/docs/gdevelop5/interface/scene-editor/index.md @@ -99,6 +99,7 @@ By clicking the grid button in the toolbar, you get multiple options: 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..cb5622ec12 100644 --- a/docs/gdevelop5/interface/scene-editor/layer-effects.md +++ b/docs/gdevelop5/interface/scene-editor/layer-effects.md @@ -57,7 +57,6 @@ 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 (`""`). @@ -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. @@ -85,10 +84,10 @@ Applies a color-map effect on an object or layer. This works by modifying a reference "color image map" containing all possible colors. - - Download the reference color map image below, or create your own. - - In an image editor (like Photoshop or GIMP), tweak the color balances of the reference color image map. - * e.g. In an image editor, using the invert colors function on the reference map will also invert all of the colors of the objects on the layer that the Color Map effect is used. - - Save it as a new file, then use this resulting file as the color image map for the effect in GDevelop. +- Download the reference color map image below, or create your own. +- In an image editor (like Photoshop or GIMP), tweak the color balances of the reference color image map. + * e.g. In an image editor, using the invert colors function on the reference map will also invert all of the colors of the objects on the layer that the Color Map effect is used. +- Save it as a new file, then use this resulting file as the color image map for the effect in GDevelop. **Download the image file below and use it as the color map** in GDevelop: color-map-original-template.png (reference color map image): ![](/gdevelop5/interface/scene-editor/color-map-original-template.png) @@ -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..7eabeed472 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". From 0ba36703afe92d8847b4760120239a82f0309299 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:55:23 +0900 Subject: [PATCH 10/59] Ignore MD033 lint --- .markdownlint.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.markdownlint.json b/.markdownlint.json index 5c5e9be95b..b8b94292aa 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -7,6 +7,7 @@ "MD024": false, "MD025": false, "MD026": false, + "MD033": false, "MD036": false, "MD045": false, "MD046": false, From 206f5e9707f205f61b56a7cc923dd67d3b50111d Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:59:02 +0900 Subject: [PATCH 11/59] Apply lint to `gevelop5/objects` --- docs/es/gdevelop5/objects/sprite.md | 6 +- docs/gdevelop5/objects/bbtext/index.md | 34 +++---- docs/gdevelop5/objects/bitmap_text/index.md | 1 - docs/gdevelop5/objects/index.md | 4 +- docs/gdevelop5/objects/light/index.md | 5 - docs/gdevelop5/objects/panel_sprite/index.md | 2 +- .../objects/particles_emitter/index.md | 8 +- docs/gdevelop5/objects/shape_painter/index.md | 4 - .../objects/sprite/edit-points/index.md | 2 - docs/gdevelop5/objects/sprite/index.md | 3 +- docs/gdevelop5/objects/text/index.md | 16 ++-- docs/gdevelop5/objects/tiled_sprite/index.md | 10 +- docs/gdevelop5/objects/tilemap/index.md | 91 ++++++++++--------- docs/gdevelop5/objects/toggle-switch/index.md | 8 +- docs/gdevelop5/objects/video/index.md | 11 +-- 15 files changed, 95 insertions(+), 110 deletions(-) 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/objects/bbtext/index.md b/docs/gdevelop5/objects/bbtext/index.md index 901e8cbc7f..2a16e114b5 100644 --- a/docs/gdevelop5/objects/bbtext/index.md +++ b/docs/gdevelop5/objects/bbtext/index.md @@ -15,18 +15,18 @@ title: BBText The BBText object supports the following common tags: - * `[b]bold text[/b]` - * `[i]italic text[/i]` - * `[color=#hexColor]colored text[/color]` - * `[font=times]text with a custom font family[/font]` - * `[size=23]my text with 23px size[/size]` +* `[b]bold text[/b]` +* `[i]italic text[/i]` +* `[color=#hexColor]colored text[/color]` +* `[font=times]text with a custom font family[/font]` +* `[size=23]my text with 23px size[/size]` There are a few additional styles that are supported in GDevelop too: - * `[outline=#hexColor]text with an outline in a specified color[/outline]` - * `[shadow=#hexColor]text with a dropshadow with a specified color[/shadow]` - * `[spacing=12] text with extra spacing between the letters[/spacing]` - * `[align=center]text that is centered (you can also use left and right)[/align]` +* `[outline=#hexColor]text with an outline in a specified color[/outline]` +* `[shadow=#hexColor]text with a dropshadow with a specified color[/shadow]` +* `[spacing=12] text with extra spacing between the letters[/spacing]` +* `[align=center]text that is centered (you can also use left and right)[/align]` `#hexColor` means a color in the hexadecimal notation, like: #000000 for black, #FFFFFF for white. You can easily [find a color picker online](https://htmlcolorcodes.com/). @@ -40,14 +40,14 @@ You can set the default style of the text displayed on the screen. Tags are then ![](pasted/20230304-163249.png) - * Base color (default is black). - * Base opacity: from 0 to 255, 0 being is completely transparent. - * Base font size: the overall font size. The default is 24px. - * Base font family: default is Arial. - * Text alignment: default is left. This can be "left", "right" or "center" - * BBCode formatted text: the text to be displayed. The default is a demo of how to use the tags. - * Word wrap: if enabled, break the text into multilines according to the object width. - * Visible on start: by unchecking this option, the object will be hidden at the beginning of the scene. Use events to show it on. +* Base color (default is black). +* Base opacity: from 0 to 255, 0 being is completely transparent. +* Base font size: the overall font size. The default is 24px. +* Base font family: default is Arial. +* Text alignment: default is left. This can be "left", "right" or "center" +* BBCode formatted text: the text to be displayed. The default is a demo of how to use the tags. +* Word wrap: if enabled, break the text into multilines according to the object width. +* Visible on start: by unchecking this option, the object will be hidden at the beginning of the scene. Use events to show it on. All these properties can be modified using the actions and conditions of the object in the events sheet. diff --git a/docs/gdevelop5/objects/bitmap_text/index.md b/docs/gdevelop5/objects/bitmap_text/index.md index 77eb0b90e6..21f2331c9f 100644 --- a/docs/gdevelop5/objects/bitmap_text/index.md +++ b/docs/gdevelop5/objects/bitmap_text/index.md @@ -11,7 +11,6 @@ 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 diff --git a/docs/gdevelop5/objects/index.md b/docs/gdevelop5/objects/index.md index b2cd6395ab..1c4af2d815 100644 --- a/docs/gdevelop5/objects/index.md +++ b/docs/gdevelop5/objects/index.md @@ -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. diff --git a/docs/gdevelop5/objects/light/index.md b/docs/gdevelop5/objects/light/index.md index 30bb2025a7..a40810eb11 100644 --- a/docs/gdevelop5/objects/light/index.md +++ b/docs/gdevelop5/objects/light/index.md @@ -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/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..00b6251dcf 100644 --- a/docs/gdevelop5/objects/particles_emitter/index.md +++ b/docs/gdevelop5/objects/particles_emitter/index.md @@ -8,9 +8,9 @@ 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 @@ -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/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/sprite/edit-points/index.md b/docs/gdevelop5/objects/sprite/edit-points/index.md index c24bcfe195..10bf656fc5 100644 --- a/docs/gdevelop5/objects/sprite/edit-points/index.md +++ b/docs/gdevelop5/objects/sprite/edit-points/index.md @@ -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..eb04475f5b 100644 --- a/docs/gdevelop5/objects/text/index.md +++ b/docs/gdevelop5/objects/text/index.md @@ -52,14 +52,14 @@ You can choose from bold and italic, as well as choosing a custom font for the t Using events, you can modify all properties of the text object, such as: - * Text Displayed - * Bold - * Italic - * Padding - * Alignment - * Wrapping - * Wrapping Width - * Font Size +* Text Displayed +* Bold +* Italic +* Padding +* Alignment +* Wrapping +* Wrapping Width +* Font Size ## Examples 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..4feaf9df46 100644 --- a/docs/gdevelop5/objects/tilemap/index.md +++ b/docs/gdevelop5/objects/tilemap/index.md @@ -7,9 +7,9 @@ The Tilemap object can be used to display tile-based objects. It's a good way to If you want to directly dive into it, 3 examples are using tile maps: - * a platformer with ladders and jumpthrus ([open the project online](https://editor.gdevelop.io/?project=example://platformer-with-tilemap)) - * a more advanced platformer ([open the project online](https://editor.gdevelop.io/?project=example://not-a-vania)) - * various tile maps ([open the project online](https://editor.gdevelop.io/?project=example://tilemaps-made-with-tiled-editor)) +* a platformer with ladders and jumpthrus ([open the project online](https://editor.gdevelop.io/?project=example://platformer-with-tilemap)) +* a more advanced platformer ([open the project online](https://editor.gdevelop.io/?project=example://not-a-vania)) +* various tile maps ([open the project online](https://editor.gdevelop.io/?project=example://tilemaps-made-with-tiled-editor)) For now, this object is meant for advanced users as it requires Tilemaps to be authored in an **external editor**: [LDtk (Level Designer Toolkit)](https://ldtk.io/) or [Tiled](https://www.mapeditor.org/). @@ -23,74 +23,77 @@ For now, this object is meant for advanced users as it requires Tilemaps to be a This object is still experimental and will be improved in the future - * An external tool is needed to edit tile maps. - * Maps must be saved as **JSON files** (.json) with Tiled or LDtk. - * Only **orthogonal** tilemaps are supported - **isometric tilemaps** are not for now. - * 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. +* An external tool is needed to edit tile maps. +* Maps must be saved as **JSON files** (.json) with Tiled or LDtk. +* Only **orthogonal** tilemaps are supported - **isometric tilemaps** are not for now. +* 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. !!! 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. - - Click **New**. - - Browse to the location to save the map, and give it a title. A new empty map is created. +- Launch LDtk. +- Click **New**. +- Browse to the location to save the map, and give it a title. A new empty map is created. ![](pasted/20221229-110649.png) ### Create the tileset - - Click the **Tilesets** button or press **T** on the keyboard. The **Project Tilesets** window will display. - - Click the plus **+** button to add a new tileset. A file browser will popup. - - Navigate to the tileset image file. - - 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. +- Click the **Tilesets** button or press **T** on the keyboard. The **Project Tilesets** window will display. +- Click the plus **+** button to add a new tileset. A file browser will popup. +- Navigate to the tileset image file. +- 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) - - Click the **Tiles** option. - - Within the **Layer identifier** field, type a name. - - Select the desired tileset from the dropdown list. - - For the **Grid size** field, this should normally be the same size as your tiles, or at least a multiple of it. - - 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. +- 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, 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. +- For the **Grid size** field, this should normally be the same size as your tiles, or at least a multiple of it. +- 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. - - Ensure **Use .ldtk extension** is checked. - - Leave all other settings as default. - - Click **Save as**. A file browser will display. - - Browse to somewhere to save the map. - - Name the map file and click **Save**. +- Once the map is complete, click the **Project Settings** button, or press **P** on the keyboard. +- Ensure **Use .ldtk extension** is checked. +- Leave all other settings as default. +- 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. ### Importing into GDevelop - - Within the GDevelop Project, add a new object. - - Ensure the **New object from scratch** tab is currently selected. - - Select the **Tilemap** object from the list. - - Within the **Object Name** field, name the map object. - - Within the **LDtk and Tiled: Tilemap** field, click **Choose a file**. - - Select **Choose a file** if using the desktop client, or **File(s) on your device** If using the web app and then **Choose file**, A file browser will display. - - Browse to the .ldtk tilemap file created above. - - Click open. If using the web app, click **Add selected file**. - - All other settings can be left at default. - - Click **Apply**. The tilemap object is now created, and can be dragged to the scene. +- Within the GDevelop Project, add a new object. +- Ensure the **New object from scratch** tab is currently selected. +- Select the **Tilemap** object from the list. +- Within the **Object Name** field, name the map object. +- Within the **LDtk and Tiled: Tilemap** field, click **Choose a file**. +- Select **Choose a file** if using the desktop client, or **File(s) on your device** If using the web app and then **Choose file**, A file browser will display. +- Browse to the .ldtk tilemap file created above. +- Click open. If using the web app, click **Add selected file**. +- All other settings can be left at default. +- 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. 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..4b504e7e69 100644 --- a/docs/gdevelop5/objects/video/index.md +++ b/docs/gdevelop5/objects/video/index.md @@ -19,7 +19,6 @@ Support for videos can vary according to the device or browser running the game. * **H264** for the video, * **AAC** for the audio. - ## Set up a video The video object has several objects: @@ -31,18 +30,17 @@ 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: - * **Loop the video**: If video is looped when it reaches the end. - * **Opacity** : From 0 (fully transparent) to 255 (opaque - default). - * **Volume** : From 0 (silent) to 100 (maximum volume - default) +* **Loop the video**: If video is looped when it reaches the end. +* **Opacity** : From 0 (fully transparent) to 255 (opaque - default). +* **Volume** : From 0 (silent) to 100 (maximum volume - default) !!! note @@ -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) From cc29f486ecdc6e1d3c2ec9bcfa2125e27a3e9fe2 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 16:09:44 +0900 Subject: [PATCH 12/59] Ignore MD010-text lint --- .markdownlint.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.markdownlint.json b/.markdownlint.json index b8b94292aa..fb52aa5a88 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -3,6 +3,7 @@ "MD001": false, "MD004": false, "MD007": { "indent": 4 }, + "MD010": { "ignore_code_languages": ["text"] }, "MD013": false, "MD024": false, "MD025": false, From b8bbff1ce1eab9331ac9481165b5c675c02ab24b Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 16:10:38 +0900 Subject: [PATCH 13/59] Apply lint to `gevelop5/publishing` --- .../publishing/android_and_ios/index.md | 19 +++++------- .../android_and_ios/play-store/index.md | 4 +-- .../play-store/upgrading-from-apk-to-aab.md | 5 ++-- .../android_and_ios_with_cordova.md | 30 +++++++++---------- .../gdevelop5/publishing/crazy-games/index.md | 1 - .../html5_game_in_a_local_folder.md | 8 ++--- docs/gdevelop5/publishing/index.md | 14 ++++----- docs/gdevelop5/publishing/poki/index.md | 1 - .../publishing/publish-to-steam/index.md | 4 +-- .../publishing-to-amazon-app-store.md | 4 +-- .../publishing/publishing-to-crimsongames.md | 11 +++++-- .../monetize.md | 5 ++-- .../publishing-to-gamejolt-store.md | 2 +- .../publishing-to-kongregate-store.md | 2 +- .../publishing/publishing-to-windows-store.md | 4 +-- docs/gdevelop5/publishing/web.md | 4 +-- .../windows-macos-linux-with-electron.md | 20 ++++++------- .../publishing/windows-macos-linux.md | 11 ++++--- 18 files changed, 69 insertions(+), 80 deletions(-) diff --git a/docs/gdevelop5/publishing/android_and_ios/index.md b/docs/gdevelop5/publishing/android_and_ios/index.md index d90c10e45a..243f4e7da7 100644 --- a/docs/gdevelop5/publishing/android_and_ios/index.md +++ b/docs/gdevelop5/publishing/android_and_ios/index.md @@ -9,10 +9,10 @@ GDevelop allows you to publish your games to a variety of formats including Andr It is important to verify that your game is ready to be exported for Android and iOS: - * In the game properties that are accessible from the [Project Manager](/gdevelop5/interface)), make sure to enter a valid _package name_. A package name is an identifier like this: `com.yourname.gamename`. It's like the address of a website but reversed. You can choose any package name provided that: - * It is not used by another game or application on iOS or Android. - * It is written with only letters, numbers, and dots. Only put one dot between words (for example, `com..mygame` or `..mygame` are not valid). _Limit this identifier to 2-5 words maximum._ - * Check that you've included the required icons. +* In the game properties that are accessible from the [Project Manager](/gdevelop5/interface)), make sure to enter a valid _package name_. A package name is an identifier like this: `com.yourname.gamename`. It's like the address of a website but reversed. You can choose any package name provided that: + * It is not used by another game or application on iOS or Android. + * It is written with only letters, numbers, and dots. Only put one dot between words (for example, `com..mygame` or `..mygame` are not valid). _Limit this identifier to 2-5 words maximum._ +* Check that you've included the required icons. ## Launch export @@ -20,7 +20,6 @@ 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. @@ -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..604ed630cb 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) @@ -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..1a90f05094 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 @@ -57,13 +57,13 @@ 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!). @@ -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..43b394f344 100644 --- a/docs/gdevelop5/publishing/android_and_ios_with_cordova.md +++ b/docs/gdevelop5/publishing/android_and_ios_with_cordova.md @@ -41,47 +41,45 @@ you need **macOS with XCode** installed. You need to install: - * Android Studio with the Android SDK - * Java (version 11, can be downloaded from the Oracle website) - as we are using cordova-android 11 - * Gradle. +* Android Studio with the Android SDK +* Java (version 11, can be downloaded from the Oracle website) - as we are using cordova-android 11 +* Gradle. ## Build Cordova project 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 ``` After that, navigate to your Cordova project's directory and type this on the command prompt or terminal: - * `cordova platform add ios` if you want to export your game to iOS. - * `cordova platform add android@11` if you want to export your game to Android. +* `cordova platform add ios` if you want to export your game to iOS. +* `cordova platform add android@11` if you want to export your game to Android. This will create new folders on your project's directory: - * _platforms/ios_: iOS project of your game, which can be open with XCode. - * _platforms/android_: Android project of your game, which can be open with Android Studio. +* _platforms/ios_: iOS project of your game, which can be open with XCode. +* _platforms/android_: Android project of your game, which can be open with Android Studio. Once you have specified what platform you want your game to be exported to, you can now build the Cordova project. Type on the command prompt or terminal either: - * `cordova build`: this will build your project to all the platforms you have. - * `cordova build ios`: this will only build your project into an iOS executable, that can be used to install your game on iOS devices. - * `cordova build android`: this will only build your project into an Android executable (apk), that can be used to install your game on Android devices. +* `cordova build`: this will build your project to all the platforms you have. +* `cordova build ios`: this will only build your project into an iOS executable, that can be used to install your game on iOS devices. +* `cordova build android`: this will only build your project into an Android executable (apk), that can be used to install your game on Android devices. !!! 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. @@ -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..f9f68e3f9e 100644 --- a/docs/gdevelop5/publishing/crazy-games/index.md +++ b/docs/gdevelop5/publishing/crazy-games/index.md @@ -13,5 +13,4 @@ Some games made with GDevelop that have been published on CrazyGames: !!! tip - You're welcome to contribute by adding a step-by-step explanation of the process. diff --git a/docs/gdevelop5/publishing/html5_game_in_a_local_folder.md b/docs/gdevelop5/publishing/html5_game_in_a_local_folder.md index 3029f851cf..e798cbaa1c 100644 --- a/docs/gdevelop5/publishing/html5_game_in_a_local_folder.md +++ b/docs/gdevelop5/publishing/html5_game_in_a_local_folder.md @@ -37,10 +37,10 @@ There are many game hosting sites on the internet and each of them requires you The following guides walk through how to host your game pain-free, using a 3rd party hosting site: - * [publishing to itch io](/gdevelop5/publishing/publishing-to-itch-io) - * [publishing to gamejolt store](/gdevelop5/publishing/publishing-to-gamejolt-store) - * [publishing to kongregate store](/gdevelop5/publishing/publishing-to-kongregate-store) - * [publishing to crimsongames](/gdevelop5/publishing/publishing-to-crimsongames) +* [publishing to itch io](/gdevelop5/publishing/publishing-to-itch-io) +* [publishing to gamejolt store](/gdevelop5/publishing/publishing-to-gamejolt-store) +* [publishing to kongregate store](/gdevelop5/publishing/publishing-to-kongregate-store) +* [publishing to crimsongames](/gdevelop5/publishing/publishing-to-crimsongames) ### Private Web Hosting diff --git a/docs/gdevelop5/publishing/index.md b/docs/gdevelop5/publishing/index.md index cca051b990..7a15aefab8 100644 --- a/docs/gdevelop5/publishing/index.md +++ b/docs/gdevelop5/publishing/index.md @@ -22,15 +22,15 @@ You can customise the link to your game, activate feedbacks and benefit from the ### Publish on Stores and other platforms - * **[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. +* **[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. ### 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..7617e2c283 100644 --- a/docs/gdevelop5/publishing/poki/index.md +++ b/docs/gdevelop5/publishing/poki/index.md @@ -14,5 +14,4 @@ Some games made with GDevelop that have been published on Poki: !!! 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..fbdf7a799f 100644 --- a/docs/gdevelop5/publishing/publish-to-steam/index.md +++ b/docs/gdevelop5/publishing/publish-to-steam/index.md @@ -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: -``` +```text "AppBuild" { "AppID" "1234560" // your AppID 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..5e42bea8f0 100644 --- a/docs/gdevelop5/publishing/publishing-to-crimsongames.md +++ b/docs/gdevelop5/publishing/publishing-to-crimsongames.md @@ -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..a96938ad5b 100644 --- a/docs/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize.md +++ b/docs/gdevelop5/publishing/publishing-to-facebook-instant-games/monetize.md @@ -16,8 +16,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. +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*). @@ -57,7 +57,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-kongregate-store.md b/docs/gdevelop5/publishing/publishing-to-kongregate-store.md index 0502f58f39..ad2e7e8113 100644 --- a/docs/gdevelop5/publishing/publishing-to-kongregate-store.md +++ b/docs/gdevelop5/publishing/publishing-to-kongregate-store.md @@ -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. 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..fe419f8e7a 100644 --- a/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md +++ b/docs/gdevelop5/publishing/windows-macos-linux-with-electron.md @@ -24,27 +24,27 @@ 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. ### Building the Package - - Start up Command Prompt (**CMD**). - - 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: +- Start up Command Prompt (**CMD**). +- 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..ba6c4bc411 100644 --- a/docs/gdevelop5/publishing/windows-macos-linux.md +++ b/docs/gdevelop5/publishing/windows-macos-linux.md @@ -5,16 +5,15 @@ 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: - * In the game properties (accessible from the [Project Manager](/gdevelop5/interface)), make sure to enter a valid _package name_. A package name is an identifier like this : `com.yourname.gamename`. It's like the address of a website but reversed. You can choose any package name provided that: - * It is not used by another game or application on iOS or Android. - * It is written with only letters, numbers and dots. Only put one dot between words (for example, `com..mygame` or `..mygame` are not valid), and limit this identifier to 2-5 words maximum. - * In the game properties, enter a valid version number (like 1.0.0, 1.0.1...) - * Check that you've set up icons. +* In the game properties (accessible from the [Project Manager](/gdevelop5/interface)), make sure to enter a valid _package name_. A package name is an identifier like this : `com.yourname.gamename`. It's like the address of a website but reversed. You can choose any package name provided that: + * It is not used by another game or application on iOS or Android. + * It is written with only letters, numbers and dots. Only put one dot between words (for example, `com..mygame` or `..mygame` are not valid), and limit this identifier to 2-5 words maximum. +* In the game properties, enter a valid version number (like 1.0.0, 1.0.1...) +* Check that you've set up icons. ## Launch export From 3a97b2f32e1eee7591607955dc401836ada9eacc Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:37:20 +0900 Subject: [PATCH 14/59] Ignore MD038 lint --- .markdownlint.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.markdownlint.json b/.markdownlint.json index fb52aa5a88..f43d2b3581 100644 --- a/.markdownlint.json +++ b/.markdownlint.json @@ -10,6 +10,7 @@ "MD026": false, "MD033": false, "MD036": false, + "MD038": false, "MD045": false, "MD046": false, "MD047": false From bc99857bfda8978e5f25f825125c4628c8a188e0 Mon Sep 17 00:00:00 2001 From: supertree-wook <88178296+st-Wook@users.noreply.github.com> Date: Mon, 12 Jun 2023 17:37:49 +0900 Subject: [PATCH 15/59] Apply lint to `gevelop5/tutorials` --- docs/gdevelop5/tutorials/asteroids/index.md | 2 +- .../tutorials/asteroids/screen_wrap.md | 2 + .../tutorials/asteroids/setting_scene.md | 2 + .../tutorials/basic-game-making-concepts.md | 19 +- docs/gdevelop5/tutorials/breakout.md | 388 ++++++++---------- .../tutorials/change-event-editor-mode.md | 16 +- docs/gdevelop5/tutorials/endless-runner.md | 18 +- .../follow-player-with-camera/index.md | 4 - .../tutorials/geometry-monster/index.md | 3 - .../how-to-debug-poor-performance.md | 9 +- .../tutorials/how-to-make-behavior.md | 1 - .../tutorials/how-to-move-objects.md | 3 +- .../tutorials/how-to-rotate-objects.md | 3 - .../how-to-use-gdevelop-as-a-team.md | 3 +- docs/gdevelop5/tutorials/index.md | 79 ++-- docs/gdevelop5/tutorials/leaderboards.md | 27 +- .../tutorials/nilarjun-space-shooter-draft.md | 6 +- .../tutorials/piskel-sprite-sheets.md | 8 +- .../platform-game/2-player-animations.md | 2 + .../4-add-backgrounds-objects.md | 2 +- ...add-coins-and-number-of-collected-coins.md | 7 +- .../tutorials/platform-game/6-add-enemies.md | 2 - .../tutorials/platform-game/7-checkpoints.md | 2 - .../tutorials/platform-game/index.md | 3 +- docs/gdevelop5/tutorials/platformer/index.md | 4 +- docs/gdevelop5/tutorials/platformer/part-3.md | 5 +- docs/gdevelop5/tutorials/platformer/part-4.md | 12 +- docs/gdevelop5/tutorials/platformer/part-5.md | 6 +- docs/gdevelop5/tutorials/platformer/part-6.md | 3 +- docs/gdevelop5/tutorials/platformer/part-7.md | 1 - docs/gdevelop5/tutorials/platformer/part-8.md | 6 +- .../implementing-procedural-generation.md | 86 ++-- .../tutorials/procedural-generation/index.md | 2 +- docs/gdevelop5/tutorials/randomness/index.md | 9 +- docs/gdevelop5/tutorials/resources.md | 173 ++++---- docs/gdevelop5/tutorials/roadrider.md | 38 +- .../space-shooter/10-sound-effects-music.md | 5 +- .../space-shooter/11-visual-effects.md | 3 +- .../tutorials/space-shooter/12-levels.md | 5 +- .../tutorials/space-shooter/13-main-menu.md | 4 +- .../tutorials/space-shooter/2-move-player.md | 12 +- .../space-shooter/3-shoot-and-health.md | 3 +- .../space-shooter/4-background-and-camera.md | 5 +- .../tutorials/space-shooter/5-enemies.md | 11 +- .../space-shooter/6-enemy-mechanics.md | 4 +- .../tutorials/space-shooter/7-meteors.md | 4 +- .../tutorials/space-shooter/8-powerups.md | 3 +- .../gdevelop5/tutorials/space-shooter/9-ui.md | 3 +- .../tutorials/space-shooter/index.md | 10 +- .../tutorials/storage-action-explained.md | 2 +- docs/gdevelop5/tutorials/tank-shooter.md | 68 +-- .../tutorials/topdown-shooter/index.md | 46 +-- .../topdown-shooter/topdown-shooterpart2.md | 116 +++--- .../topdown-shooter/topdown-shooterpart3.md | 64 +-- .../topdown-shooter/topdown-shooterpart4.md | 68 +-- .../topdown-shooter/topdown-shooterpart5.md | 100 ++--- .../topdown-shooter/topdown-shooterpart6.md | 110 ++--- .../tutorials/using-github-desktop.md | 7 +- docs/gdevelop5/tutorials/videos.md | 2 +- 59 files changed, 790 insertions(+), 821 deletions(-) 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..b76fb7c9f7 100644 --- a/docs/gdevelop5/tutorials/asteroids/screen_wrap.md +++ b/docs/gdevelop5/tutorials/asteroids/screen_wrap.md @@ -29,11 +29,13 @@ 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. Action: + - "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..2d240b2a4a 100644 --- a/docs/gdevelop5/tutorials/asteroids/setting_scene.md +++ b/docs/gdevelop5/tutorials/asteroids/setting_scene.md @@ -19,9 +19,11 @@ 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". 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) diff --git a/docs/gdevelop5/tutorials/basic-game-making-concepts.md b/docs/gdevelop5/tutorials/basic-game-making-concepts.md index f578a95c63..69fc71a7c9 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). @@ -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 @@ -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. @@ -173,12 +169,10 @@ 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: @@ -187,7 +181,6 @@ The _scope_ of a variable determines the place a variable can be accessed. In GD * **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) The wiki page associated with variables can be found [here](https://wiki.gdevelop.io/gdevelop5/all-features/variables). diff --git a/docs/gdevelop5/tutorials/breakout.md b/docs/gdevelop5/tutorials/breakout.md index 0b19385235..aa5e58c6ed 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 @@ -38,18 +38,17 @@ Click **Create a new project** on the start page. Scroll down and choose a folde For a breakout game, you will need the following assets: - * Image file of a ball - * Image file of a paddle - * Image file of a barrier - * Image files of different bricks - * images of Power-ups (optional) +* Image file of a ball +* Image file of a paddle +* Image file of a barrier +* Image files of different bricks +* images of Power-ups (optional) Or you can download the assets used in the tutorial, [breakout assets.zip](/gdevelop5/tutorials/breakout-assets.zip) ---- - ## 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. @@ -58,21 +57,21 @@ Scenes contain _objects_ displayed on screen as game content. Each object you pl To add a new scene: - - On the **Project** panel on the left, click **+** to add a scene. +- On the **Project** panel on the left, click **+** to add a scene. ![](/gdevelop5/tutorials/breakout-game/newscene.jpg) - - A new scene is added to the list. Click **NewScene** to open it. +- A new scene is added to the list. Click **NewScene** to open it. ![](/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. +- On the **Objects** panel on the right, click **+** to add an object. ![](/gdevelop5/tutorials/breakout-game/add-object.jpg) @@ -80,7 +79,7 @@ A window will appear displaying different types of objects you can add. Each typ ![](/gdevelop5/tutorials/object_types.jpg) - - For the paddle, you need the Sprite object type. Click **Sprite**. +- For the paddle, you need the Sprite object type. Click **Sprite**. !!! tip _Sprites_ are animated objects that are used for many common game elements (players, platforms, enemies, bricks, etc.). @@ -91,29 +90,27 @@ The new object is added to your scene and the Object Editor dialog box is opened Right now, your sprite object has no animations, or associated images. - - Click **+** to add an animation. - - Click **+** in the blank thumbnail to add an image to the animation. - - Select the image called "paddle.png" in your project folder and click **Open**. The image is added to the object. +- Click **+** to add an animation. +- Click **+** in the blank thumbnail to add an image to the animation. +- Select the image called "paddle.png" in your project folder and click **Open**. The image is added to the object. ![](/gdevelop5/tutorials/paddle_animation.jpg) +- In the **Object Name** field, type **Paddle** to rename your object. - - In the **Object Name** field, type **Paddle** to rename your object. - - - Click **Apply** to save and close the editor. +- Click **Apply** to save and close the editor. !!! warning 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 To display the paddle in your game, you need to add it to your scene. Because only one paddle is needed, it is called a _unique_ instance. Other objects like bricks will have multiple instances in your scene. - - To add the paddle to the scene, click and drag it from the **Objects** panel to the scene. Place it near the bottom. +- To add the paddle to the scene, click and drag it from the **Objects** panel to the scene. Place it near the bottom. ![](/gdevelop5/tutorials/paddle_drag.gif) @@ -125,13 +122,13 @@ Next, you will add a visual barrier that appears to stop the ball from bouncing To create the barrier object: - - On the **Objects** panel on the right, click **+** to add an object. - - Click **Tiled Sprite**. - - In the **Object Editor** dialog box, click **+** to add an animation. - - Click **+** in the blank thumbnail to add an image. - - Select "barrier.jpg" in your project folder and click **Open**. - - In the **Object Name** field, rename your object "Barrier". - - Click **Apply** to save and close the Object Editor. +- On the **Objects** panel on the right, click **+** to add an object. +- Click **Tiled Sprite**. +- In the **Object Editor** dialog box, click **+** to add an animation. +- Click **+** in the blank thumbnail to add an image. +- Select "barrier.jpg" in your project folder and click **Open**. +- In the **Object Name** field, rename your object "Barrier". +- Click **Apply** to save and close the Object Editor. ---- @@ -143,32 +140,30 @@ 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). - - Add a final barrier at the top to connect the two. Resize it to 770 x 15, and position it at (15, 15). +- 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). +- Add a final barrier at the top to connect the two. Resize it to 770 x 15, and position it at (15, 15). ![](/gdevelop5/tutorials/breakout-game/barriers_added.jpg) ---- - ## 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). Create an event where if the player presses the left arrow on the keyboard, the paddle moves left: - - Click the **NewScene (Events)** tab to open the **Events Editor**. - - Click **Add a new empty event** ![](/gdevelop5/tutorials/breakout-game/empty_event_button.jpg). - - Click **Add condition**. +- Click the **NewScene (Events)** tab to open the **Events Editor**. +- Click **Add a new empty event** ![](/gdevelop5/tutorials/breakout-game/empty_event_button.jpg). +- Click **Add condition**. ![](/gdevelop5/tutorials/breakout-game/add-condition.jpg) - - Click **Keyboard > Key pressed**. +- Click **Keyboard > Key pressed**. ![](/gdevelop5/tutorials/breakout-game/keyboard-key-pressed.jpg) - - In the **Key** field, type **Left** and click **OK**. This condition is true if the player presses the left arrow on the keyboard. +- In the **Key** field, type **Left** and click **OK**. This condition is true if the player presses the left arrow on the keyboard. Now you need to add a corresponding action to the condition. The paddle should move left on a horizontal axis if the condition is met. @@ -178,19 +173,19 @@ Now you need to add a corresponding action to the condition. The paddle should m On a horizontal axis, left is 180°, right is 0°. ![](/gdevelop5/tutorials/breakout-game/angles.png) - - Click **Add action**. +- Click **Add action**. - - Click **Common actions for all objects > Movement > Add a force (angle).** +- Click **Common actions for all objects > Movement > Add a force (angle).** - - Select **Paddle** in the **Object** field. +- Select **Paddle** in the **Object** field. - - In the **Angle** field, type **180**. +- In the **Angle** field, type **180**. - - In the **Speed (in pixels per second)** field, type **300**. +- In the **Speed (in pixels per second)** field, type **300**. - - Click **Instant**. +- Click **Instant**. - - Click **OK**. +- Click **OK**. ![](/gdevelop5/tutorials/breakout-game/add_force_to_paddle.jpg) @@ -200,54 +195,53 @@ 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. To add another condition to stop the paddle: - - In the same event, below your first condition, click **Add condition**. +- In the same event, below your first condition, click **Add condition**. - - Click **Common conditions for all objects > Position > Compare X position of an object**. +- Click **Common conditions for all objects > Position > Compare X position of an object**. - - In the **Object** field, select **Paddle**. +- In the **Object** field, select **Paddle**. - - In the **Sign of the test** field, select **> (greater than)**. +- In the **Sign of the test** field, select **> (greater than)**. - - In the **X position** field, type the X coordinate of the right side of the left barrier. In this example, it is 30. +- In the **X position** field, type the X coordinate of the right side of the left barrier. In this example, it is 30. - - Click **OK**. +- Click **OK**. ![](/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. - * Click **Add a new empty event**. - * Click **Add condition**. - * Click **Keyboard > Key pressed**. - * In the **Key** field, type **Right**. - * Click **OK**. ----- +* Click **Add a new empty event**. +* Click **Add condition**. +* Click **Keyboard > Key pressed**. +* In the **Key** field, type **Right**. +* Click **OK**. - * Click **Add action**. - * Click **Common actions for all objects > Movement > Add a force (angle).** - * In the **Object** field, select **Paddle**. - * In the **Angle** field, type **0**. - * In the **Speed (in pixels per second)** field, type **300**. - * Click **OK**. ---- - * Click **Add condition**. - * Click **Common conditions for all objects > Position > Compare X position of an object**. - * In the **Object** field, select **Paddle**. - * In the **Sign of the test** field, select **< (less than)**. - * 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**. +* Click **Add action**. +* Click **Common actions for all objects > Movement > Add a force (angle).** +* In the **Object** field, select **Paddle**. +* In the **Angle** field, type **0**. +* In the **Speed (in pixels per second)** field, type **300**. +* Click **OK**. + +---- +* Click **Add condition**. +* Click **Common conditions for all objects > Position > Compare X position of an object**. +* In the **Object** field, select **Paddle**. +* In the **Sign of the test** field, select **< (less than)**. +* 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. @@ -255,75 +249,63 @@ Preview your game to make sure it works. 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) +- To add a comment line, click **Add a comment**. ![](/gdevelop5/tutorials/breakout-game/add_a_comment.jpg) - - Enter your comment text and use the blue bar on the left of the comment to drag and drop your comment where you want it. +- Enter your comment text and use the blue bar on the left of the comment to drag and drop your comment where you want it. ![](/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. When you think about the game, the ball will need to do four things: - * Move when the player starts the game - * Bounce when it collides with the paddle or with the barrier - * Break bricks and bounce when it collides with bricks - * End the game when it falls off-screen below the paddle - +* Move when the player starts the game +* Bounce when it collides with the paddle or with the barrier +* 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) ---- - * Click **Add action**. - * Click **Common actions for all objects > Movement > Add a force (angle)**. - * In the **Object** field, select **Ball**. - * In the **Angle** field, type **-45+RandomInRange(-5, 5)**. This will launch the ball at a -45 degree angle, with an additional random variation of 5 degrees either way to add challenge for the player. +* Click **Add action**. +* Click **Common actions for all objects > Movement > Add a force (angle)**. +* In the **Object** field, select **Ball**. +* In the **Angle** field, type **-45+RandomInRange(-5, 5)**. This will launch the ball at a -45 degree angle, with an additional random variation of 5 degrees either way to add challenge for the player. !!! tip You don't need to memorize all the expressions. You can open the **Expression Editor** to help you populate fields. ![](/gdevelop5/tutorials/breakout-game/expression_editor_button.jpg) In this case, you could type **-45** in the **Angle** field then click **Expression Editor** and search by **Random**. The expression **Random integer in range** with a minimum value of -5 and a maximum value of 5 will generate RandomInRange(-5, 5) in your field. You can use it in your speed calculation as you'd like. - * In the **Speed (in pixels per second)** field, type **300**. Adjust this as you wish; the higher the number, the faster the object. - * Click **Permanent**, since you want the ball to continue to move throughout the game. - * Click **OK**. +* In the **Speed (in pixels per second)** field, type **300**. Adjust this as you wish; the higher the number, the faster the object. +* Click **Permanent**, since you want the ball to continue to move throughout the game. +* Click **OK**. ![](/gdevelop5/tutorials/breakout-game/ball-start-movement.jpg) 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. @@ -332,14 +314,15 @@ For good gameplay, your ball needs to bounce realistically whenever it collides 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. - * From the list at the bottom, select **Bounce** and click **Install in project**. -![](/gdevelop5/tutorials/breakout-game/add_bounce_behaviour.png) +* 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. +* From the list at the bottom, select **Bounce** and click **Install in project**. + + ![](/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**. +* You can now add the new behavior to the object. Scroll down, select **Bounce**, and click **Apply**. ![](/gdevelop5/tutorials/apply_bounce.png) @@ -353,21 +336,21 @@ Next, add events to make the ball bounce off the barrier and the paddle. It is t To create a collision condition between the ball and the barrier: - * From the **NewScene (Events)** tab, click **Add a new empty event**. - * Click **Add condition**. - * Click **Common conditions for all objects > Collision > Collision**. - * In the first **Object** field, select **Ball**. In the second **Object** field, select **Barrier**. - * Click **OK**. +* From the **NewScene (Events)** tab, click **Add a new empty event**. +* Click **Add condition**. +* Click **Common conditions for all objects > Collision > Collision**. +* In the first **Object** field, select **Ball**. In the second **Object** field, select **Barrier**. +* Click **OK**. ---- To add the action causing the ball to bounce off the barrier upon collision: - * Click **Add action**. - * Click **Bounce > Bounce > Bounce off another object**. - * In the **Object** field, select **Ball**. - * In the **Objects to bounce on** field, select **Barrier**. - * Click **OK**. +* Click **Add action**. +* Click **Bounce > Bounce > Bounce off another object**. +* In the **Object** field, select **Ball**. +* In the **Objects to bounce on** field, select **Barrier**. +* Click **OK**. ![](/gdevelop5/tutorials/breakout-game/add_bounce_action_in_event.png) @@ -379,23 +362,20 @@ 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: - * Click on the **NewScene** tab to get to the Scene Editor. - * On the **Object** panel, click **+** to add a new object. - * Name this object **Brick**. Give it three separate animations using the brick-green.png, brick-red.png and brick-yellow.png files from your project folder. Name the animations accordingly. - * Click **Apply**. +* Click on the **NewScene** tab to get to the Scene Editor. +* On the **Object** panel, click **+** to add a new object. +* Name this object **Brick**. Give it three separate animations using the brick-green.png, brick-red.png and brick-yellow.png files from your project folder. Name the animations accordingly. +* Click **Apply**. ![](/gdevelop5/tutorials/brick_colours.png) @@ -408,14 +388,14 @@ You can use external layouts to create some different levels with different bric To create an external layout: - * Click on the **Project manager** button on the top left. ![](/gdevelop5/tutorials/breakout-game/project_manager.jpg) - * Click **External layouts** and **+** to add an external layout. - * Click **⋮** next to your new layout and rename it **Layout1**. +* Click on the **Project manager** button on the top left. ![](/gdevelop5/tutorials/breakout-game/project_manager.jpg) +* Click **External layouts** and **+** to add an external layout. +* Click **⋮** next to your new layout and rename it **Layout1**. ![](/gdevelop5/tutorials/breakout-game/external_layout_add.png) - * Click **Layout1**. You will be asked to choose the scene in which it will be included. Choose **NewScene** - that is the scene where all the game play happens. A new tab will open that looks like your existing NewScene. - * Add bricks in whatever configuration you choose. Have fun with this part - be creative! +* Click **Layout1**. You will be asked to choose the scene in which it will be included. Choose **NewScene** - that is the scene where all the game play happens. A new tab will open that looks like your existing NewScene. +* Add bricks in whatever configuration you choose. Have fun with this part - be creative! !!! tip @@ -424,24 +404,22 @@ To create an external layout: ![](/gdevelop5/tutorials/breakout-game/duplicating_objects.gif) - - * Create two or more new layouts and name them Layout1, Layout2, etc. +* 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 To make a random layout appear at the beginning of each scene, first add your condition: - * Click the **NewScene (Events)** tab to go back into your Events Editor. - * Click the **Add a new empty event** button. - * Click **Add condition**. - * Click **Scene > At the beginning of the scene**. +* Click the **NewScene (Events)** tab to go back into your Events Editor. +* Click the **Add a new empty event** button. +* Click **Add condition**. +* Click **Scene > At the beginning of the scene**. ---- @@ -449,13 +427,13 @@ Rather than attach actions to this condition, you will now create sub-events tha To start, create a new scene variable called Random_layout: - * Click on a blank space within the event you just created and click the **Add a sub-event to the selected event** button.![](/gdevelop5/tutorials/breakout-game/subevent_button.jpg) - * In the new sub-event, click **Add action**. - * Click **Variables > Value of a scene variable**. - * In the **Variable** field, type **Random_layout** to create a new scene variable. - * In the **Modification's sign** field, select **= (set to)**. - * In the **Value** field, type **Random(2)+1**. - * Click **OK**. +* Click on a blank space within the event you just created and click the **Add a sub-event to the selected event** button.![](/gdevelop5/tutorials/breakout-game/subevent_button.jpg) +* In the new sub-event, click **Add action**. +* Click **Variables > Value of a scene variable**. +* In the **Variable** field, type **Random_layout** to create a new scene variable. +* In the **Modification's sign** field, select **= (set to)**. +* In the **Value** field, type **Random(2)+1**. +* Click **OK**. ![](/gdevelop5/tutorials/breakout-game/modify_scene_variable_value.jpg) @@ -471,57 +449,52 @@ Now you will string your variable number to the external layout name Layout. Thi To add a random layout of bricks to the beginning of the scene: - * Add another new sub-event for the beginning of the scene, then click **Add action**. - * Click **External layouts > Create objects from an external layout**. - * In the **Name of the external layout** field, type **"Layout" + ToString(Variable(Random_layout))**. This will randomly add one of the external layouts to the scene. - * Click **OK**. +* Add another new sub-event for the beginning of the scene, then click **Add action**. +* Click **External layouts > Create objects from an external layout**. +* In the **Name of the external layout** field, type **"Layout" + ToString(Variable(Random_layout))**. This will randomly add one of the external layouts to the scene. +* Click **OK**. ![](/gdevelop5/tutorials/breakout-game/random_layout_selection.jpg) - ---- You can add interest by making the brick colour random at the start of each scene. To choose a random brick colour: - * Add another new sub-event for the beginning of the scene, then click **Add action**. - * Click **Variables > Value of a scene variable**. - * In the **Variable** field, type **Brick_colour**. - * In the **Modification's sign** field, select **= (set to)**. - * In the **Value** field, type **Random(2)**. - * Click **OK**. +* Add another new sub-event for the beginning of the scene, then click **Add action**. +* Click **Variables > Value of a scene variable**. +* In the **Variable** field, type **Brick_colour**. +* In the **Modification's sign** field, select **= (set to)**. +* In the **Value** field, type **Random(2)**. +* Click **OK**. ![](/gdevelop5/tutorials/modify_scene_variable_value2.png) - ---- - * Add one last new sub-event for the beginning of the scene, then click **Add action**. - * Click **Sprite > Animations and images > Change the animation**. - * In the **Object** field, select **Brick**. - * In the **Modification's sign** field, select **= (set to)**. - * In the **Value** field, type **Variable(Brick_colour)**. - * Click **OK**. +* Add one last new sub-event for the beginning of the scene, then click **Add action**. +* Click **Sprite > Animations and images > Change the animation**. +* In the **Object** field, select **Brick**. +* In the **Modification's sign** field, select **= (set to)**. +* In the **Value** field, type **Variable(Brick_colour)**. +* Click **OK**. ![](/gdevelop5/tutorials/breakout-game/brick_colour_change.jpg) 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: - - Create a new event. - - Add a collision condition between the ball and the brick. - - Bounce your ball away from the bricks. +- Create a new event. +- Add a collision condition between the ball and the brick. +- Bounce your ball away from the bricks. !!! tip @@ -533,10 +506,10 @@ Now that you have bricks on the scene, you want the ball to bounce away from the As the ball bounces off bricks, it should destroy them. Destroying an object in GDevelop is easy. - * In the same collision event, click **Add action**. - * Click **Common actions for all objects > Objects > Delete an object**. - * In the Object field, select **Brick**. - * Click **OK**. +* In the same collision event, click **Add action**. +* Click **Common actions for all objects > Objects > Delete an object**. +* In the Object field, select **Brick**. +* Click **OK**. ![](/gdevelop5/tutorials/breakout-game/delete_a_brick.jpg) @@ -554,41 +527,39 @@ You want the congratulations message to be hidden, only to appear when all the b To add a text object to the scene: - * Click the **NewScene** tab. - * In the **Objects** panel, click **+** to add a new object and select **Text**. - * In the **Object Name** field, type **Congratulations**. - * In the **Text** field, type a congratulatory message (e.g. Congratulations! You cleared all the blocks!). Also include a line telling the player "Press Enter to play again." - * Click **Apply**. +* Click the **NewScene** tab. +* In the **Objects** panel, click **+** to add a new object and select **Text**. +* In the **Object Name** field, type **Congratulations**. +* In the **Text** field, type a congratulatory message (e.g. Congratulations! You cleared all the blocks!). Also include a line telling the player "Press Enter to play again." +* Click **Apply**. ![](/gdevelop5/tutorials/breakout-game/congratulations_message.jpg) - * Drag and drop your Congratulations object into the middle of 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: - * Click on **NewScene (Events)**. - * Go to the existing event containing the condition "At the beginning of the scene" and click **Add action**. - * Click **Common actions for all objects > Visibility > Hide**. - * In the **Object** field, select **Congratulations**. - * Click **OK**. +* Click on **NewScene (Events)**. +* Go to the existing event containing the condition "At the beginning of the scene" and click **Add action**. +* Click **Common actions for all objects > Visibility > Hide**. +* In the **Object** field, select **Congratulations**. +* Click **OK**. ![](/gdevelop5/tutorials/breakout-game/hide_congratulations.jpg) - ---- To make your text object appear when all the bricks are destroyed: - * Click the **Add a new empty event** button. - * Click **Add condition**. - * Click **Common conditions for all objects > Objects > Number of objects**. - * In the **Object** field, select **Brick**. - * In the **Sign of the test** field, select **= (equal to)**. - * In the **Value** field, type **0**. - * Click **OK**. +* Click the **Add a new empty event** button. +* Click **Add condition**. +* Click **Common conditions for all objects > Objects > Number of objects**. +* In the **Object** field, select **Brick**. +* In the **Sign of the test** field, select **= (equal to)**. +* In the **Value** field, type **0**. +* Click **OK**. ---- @@ -601,20 +572,20 @@ Both of the actions are common actions for all objects. Add them now. You also want to give the player the option of starting a new game: - * Create a new sub-event ![](/gdevelop5/tutorials/breakout-game/subevent_button.jpg) to the event you just created where the number of brick objects is =0. - * Click **Add Condition**. - * Click **Keyboard > Key pressed**. - * In the **Key** field, type **Return**. (Remember the congratulations message tells the player to hit Enter to start again.) - * Click **OK**. +* Create a new sub-event ![](/gdevelop5/tutorials/breakout-game/subevent_button.jpg) to the event you just created where the number of brick objects is =0. +* Click **Add Condition**. +* Click **Keyboard > Key pressed**. +* In the **Key** field, type **Return**. (Remember the congratulations message tells the player to hit Enter to start again.) +* Click **OK**. ---- Add an action to go back to the first scene: - * Click **Add action**. - * Click **Scene > Change the scene**. - * In the **Name of the new scene** field, type **"NewScene"**. Don't forget the quotation marks! - * Click **OK**. +* Click **Add action**. +* Click **Scene > Change the scene**. +* In the **Name of the new scene** field, type **"NewScene"**. Don't forget the quotation marks! +* Click **OK**. Now when the player clears all the bricks, they will get a congratulatory message and the option of starting again! @@ -643,19 +614,18 @@ The next step will be to make the message reappear if the player misses the ball To add a condition to check if the player has missed the ball: - * Click the **Add a new empty event** button. - * Click **Add condition**. - * Click **Common conditions for all objects > Position > Compare Y position of an object**. - * In the **Object** field, select **Ball**. - * In the **Sign of the test** field, select **> (greater than)**. - * In the **Value** field, type **600**. (600 is the default game window height, so that means the ball is off-screen.) - * Click **OK**. +* Click the **Add a new empty event** button. +* Click **Add condition**. +* Click **Common conditions for all objects > Position > Compare Y position of an object**. +* In the **Object** field, select **Ball**. +* In the **Sign of the test** field, select **> (greater than)**. +* In the **Value** field, type **600**. (600 is the default game window height, so that means the ball is off-screen.) +* Click **OK**. Add a corresponding action to make the GameOver object visible. You should also add a sub-event that causes the ball to be deleted and the game to restart if the player presses Enter. Add them now. ![](/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..a8be941fdd 100644 --- a/docs/gdevelop5/tutorials/change-event-editor-mode.md +++ b/docs/gdevelop5/tutorials/change-event-editor-mode.md @@ -2,22 +2,30 @@ 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. - - Click the **Preferences** menu. - - Within the **Event Sheet** section, click **Use the new action/condition editor**. If it is currently enabled, it will be disabled and vice versa. - - Click **Close**. The event editor mode will now be updated. +- Within GDevelop, click the **File** tab. +- Click the **Preferences** menu. +- Within the **Event Sheet** section, click **Use the new action/condition editor**. If it is currently enabled, it will be disabled and vice versa. +- 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..62cbd98e11 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,7 +223,7 @@ 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 @@ -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/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..1b913426a2 100644 --- a/docs/gdevelop5/tutorials/how-to-debug-poor-performance.md +++ b/docs/gdevelop5/tutorials/how-to-debug-poor-performance.md @@ -9,7 +9,7 @@ If your game is running slowly, it's a good idea to look at these common consume * 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.) + * 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. @@ -55,8 +55,8 @@ For example, if you want to create an object every time a click is done, this is ![](/gdevelop5/events/bad_event_optimisation.png) - * What is expected to happen: When the left mouse button is pressed, an object is created called **MyObject**. - * What actually happens: As long as the mouse left button is pressed, **MyObject** instances are created. +* What is expected to happen: When the left mouse button is pressed, an object is created called **MyObject**. +* What actually happens: As long as the mouse left button is pressed, **MyObject** instances are created. This is problematic because when the mouse button is pressed, it is likely held down for longer than a single frame like 0.3 seconds. During this period of time the event is called multiple times, and the object is created more than once. @@ -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-make-behavior.md b/docs/gdevelop5/tutorials/how-to-make-behavior.md index 02daad5e18..6f96f65e4c 100644 --- a/docs/gdevelop5/tutorials/how-to-make-behavior.md +++ b/docs/gdevelop5/tutorials/how-to-make-behavior.md @@ -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..a899b38b07 100644 --- a/docs/gdevelop5/tutorials/how-to-move-objects.md +++ b/docs/gdevelop5/tutorials/how-to-move-objects.md @@ -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. @@ -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..71b9c1610f 100644 --- a/docs/gdevelop5/tutorials/how-to-rotate-objects.md +++ b/docs/gdevelop5/tutorials/how-to-rotate-objects.md @@ -12,7 +12,6 @@ An object can be instantly rotated with the **Angle** action. The action needs a - **Object.AngleToObject(object)** to face an object - **Object.AngleToPosition(x, y)** to face a position. - ### Rotate an object over time Objects can be rotated at a given speed using the action **Rotate toward position**. Its position parameters can be set to `Object.X()` and `Object.Y()` to turn in the direction of an object. @@ -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..cc7861a9a9 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 @@ -27,8 +27,7 @@ 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. - + * 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..bd4d7ebdaa 100644 --- a/docs/gdevelop5/tutorials/index.md +++ b/docs/gdevelop5/tutorials/index.md @@ -9,72 +9,73 @@ These tutorials are step-by-step guides that explain how to create a game from s If you're using GDevelop for the first time, it's recommended to start with these tutorials - * **[Basic game making concepts: What you need to know to start with GDevelop](/gdevelop5/tutorials/basic-game-making-concepts)** - * **[Create a physics based Asteroids game](/gdevelop5/tutorials/asteroids)** - * **[Geometry Monster: a complete, simple mobile game](/gdevelop5/tutorials/geometry-monster)** - * **[Create a platform game](/gdevelop5/tutorials/platformer)** - * **[Create a space shooter game](/gdevelop5/tutorials/space-shooter)** - +* **[Basic game making concepts: What you need to know to start with GDevelop](/gdevelop5/tutorials/basic-game-making-concepts)** +* **[Create a physics based Asteroids game](/gdevelop5/tutorials/asteroids)** +* **[Geometry Monster: a complete, simple mobile game](/gdevelop5/tutorials/geometry-monster)** +* **[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) - * [Create a simple Tank Shooter game](/gdevelop5/tutorials/tank-shooter) - * [Create a simple Endless Runner game](/gdevelop5/tutorials/endless-runner) - * [Endless car game](/gdevelop5/tutorials/roadrider) - * [Create a simple Breakout game](/gdevelop5/tutorials/breakout) - * [Create a top down shooter game](/gdevelop5/tutorials/topdown-shooter) - +* [Understand and use the Noise generator extension for procedural Generation](/gdevelop5/tutorials/procedural-generation) +* [Create a simple Tank Shooter game](/gdevelop5/tutorials/tank-shooter) +* [Create a simple Endless Runner game](/gdevelop5/tutorials/endless-runner) +* [Endless car game](/gdevelop5/tutorials/roadrider) +* [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)** +* **[How to create a behavior for an object](/gdevelop5/tutorials/how-to-make-behavior)** ---- # 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)** - * [How to move objects in your game (all the different solutions)](/gdevelop5/tutorials/how-to-move-objects) - * [How to animate the jump and the fall of a character in a platformer game](/gdevelop5/tutorials/how-to-animate-jump-fall-platformer) - * [How to display a big background in your game](/gdevelop5/tutorials/how-to-display-big-background) - * [How to debug poor game performance](/gdevelop5/tutorials/how-to-debug-poor-performance) - * [How to reduce the size of your game](/gdevelop5/tutorials/reduce-size-game) - * [How to handle complex logic – The finite state machine (FSM)](/gdevelop5/tutorials/finite_state_machine) - * [How to make togglable states](/gdevelop5/tutorials/how-to-make-togglable-states-with-variables) - * [How to use GDevelop as a team (multiple developers and teammates)](/gdevelop5/tutorials/how-to-use-GDevelop-as-a-team) - * [How to use Piskel to Import a Sprite Sheet Image](/gdevelop5/tutorials/piskel-sprite-sheets) - * [How to backup and maintain your project using GitHub and GitHub Desktop](/gdevelop5/tutorials/using-github-desktop) - * [How to Change the Event Sheet's Action and Condition Editor Mode](/gdevelop5/tutorials/change-event-editor-mode) - * [How to add realtime leaderboards to your game](/gdevelop5/tutorials/leaderboards) - * [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) +* **[How to create a behavior for an object](/gdevelop5/tutorials/how-to-make-behavior)** +* [How to move objects in your game (all the different solutions)](/gdevelop5/tutorials/how-to-move-objects) +* [How to animate the jump and the fall of a character in a platformer game](/gdevelop5/tutorials/how-to-animate-jump-fall-platformer) +* [How to display a big background in your game](/gdevelop5/tutorials/how-to-display-big-background) +* [How to debug poor game performance](/gdevelop5/tutorials/how-to-debug-poor-performance) +* [How to reduce the size of your game](/gdevelop5/tutorials/reduce-size-game) +* [How to handle complex logic – The finite state machine (FSM)](/gdevelop5/tutorials/finite_state_machine) +* [How to make togglable states](/gdevelop5/tutorials/how-to-make-togglable-states-with-variables) +* [How to use GDevelop as a team (multiple developers and teammates)](/gdevelop5/tutorials/how-to-use-GDevelop-as-a-team) +* [How to use Piskel to Import a Sprite Sheet Image](/gdevelop5/tutorials/piskel-sprite-sheets) +* [How to backup and maintain your project using GitHub and GitHub Desktop](/gdevelop5/tutorials/using-github-desktop) +* [How to Change the Event Sheet's Action and Condition Editor Mode](/gdevelop5/tutorials/change-event-editor-mode) +* [How to add realtime leaderboards to your game](/gdevelop5/tutorials/leaderboards) +* [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 Check out the [official GDevelop Channel here](https://www.youtube.com/channel/UCmoHIfIerKCZkOOt6zr9inw)! - * See the [full list of video tutorials](/gdevelop5/tutorials/videos) - +* 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 +* [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..f164ac5b99 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,23 +50,23 @@ 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. +* **allow read;**: We always want the database to be readable. Therefore, we do not add any condition. - * **allow create: if**: We only allow creation, not writing, as this would allow users to change their score later. +* **allow create: if**: We only allow creation, not writing, as this would allow users to change their score later. - * **request.resource.data.keys().hasOnly(["name", "score"]) && request.resource.data.keys().hasAll(["name", "score"])**: This is making sure that the data has the shape we defined in 1: it has all the properties a score needs and not any extra properties. +* **request.resource.data.keys().hasOnly(["name", "score"]) && request.resource.data.keys().hasAll(["name", "score"])**: This is making sure that the data has the shape we defined in 1: it has all the properties a score needs and not any extra properties. - * **request.resource.data.score is number && request.resource.data.score > 1**: We make sure the score is a number and in the range of scores possible. Here, a score can be any number higher than 1. +* **request.resource.data.score is number && request.resource.data.score > 1**: We make sure the score is a number and in the range of scores possible. Here, a score can be any number higher than 1. - * **request.resource.data.name is string && request.resource.data.name.size() > 1 && request.resource.data.name.size() < 15;**: And finally, we make sure the name is a text with at least 1 character, and up to 14 characters. +* **request.resource.data.name is string && request.resource.data.name.size() > 1 && request.resource.data.name.size() < 15;**: And finally, we make sure the name is a text with at least 1 character, and up to 14 characters. !!! tip @@ -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..2759ae3db7 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,11 +11,12 @@ 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. - * The sprite sheet must be for a _single_ animation. - * The sprite sheet must have the sprites evenly spread apart. +* The sprite sheet file must be in jpg, gif, or png format. +* The sprite sheet must be for a _single_ animation. +* The sprite sheet must have the sprites evenly spread apart. ## Step 1 - Create the Sprite Object and Animation 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..25dbc9c8ae 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..67fb1a9586 100644 --- a/docs/gdevelop5/tutorials/platformer/index.md +++ b/docs/gdevelop5/tutorials/platformer/index.md @@ -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 diff --git a/docs/gdevelop5/tutorials/platformer/part-3.md b/docs/gdevelop5/tutorials/platformer/part-3.md index e4be42db43..a790823c6b 100644 --- a/docs/gdevelop5/tutorials/platformer/part-3.md +++ b/docs/gdevelop5/tutorials/platformer/part-3.md @@ -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..26ca19c5f9 100644 --- a/docs/gdevelop5/tutorials/platformer/part-4.md +++ b/docs/gdevelop5/tutorials/platformer/part-4.md @@ -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..d3e1ddbc6f 100644 --- a/docs/gdevelop5/tutorials/platformer/part-5.md +++ b/docs/gdevelop5/tutorials/platformer/part-5.md @@ -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. @@ -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..5c32107fec 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". @@ -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 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..db5760d049 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) diff --git a/docs/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation.md b/docs/gdevelop5/tutorials/procedural-generation/implementing-procedural-generation.md index fbf00c4812..3e3aea2cb6 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)**. @@ -242,14 +242,14 @@ Run the program. ![](/gdevelop5/tutorials/procedural-generation/step18.jpg) 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..8918653d6e 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 diff --git a/docs/gdevelop5/tutorials/randomness/index.md b/docs/gdevelop5/tutorials/randomness/index.md index 2eaddb4791..afa5fee1e5 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.