Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 53 additions & 37 deletions examples/top-down-grid-movement/top-down-grid-movement.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
},
"properties": {
"adaptGameResolutionAtRuntime": true,
"antialiasingMode": "MSAA",
"antialisingEnabledOnMobile": false,
"folderProject": false,
"orientation": "landscape",
"packageName": "com.example.gamename",
Expand Down Expand Up @@ -650,6 +652,7 @@
],
"objects": [
{
"adaptCollisionMaskAutomatically": false,
"assetStoreId": "",
"name": "Bard4",
"tags": "",
Expand Down Expand Up @@ -965,6 +968,7 @@
"behaviors": []
},
{
"adaptCollisionMaskAutomatically": false,
"assetStoreId": "",
"name": "Bard6",
"tags": "",
Expand Down Expand Up @@ -1271,6 +1275,7 @@
]
},
{
"adaptCollisionMaskAutomatically": false,
"assetStoreId": "",
"name": "Stone",
"tags": "",
Expand Down Expand Up @@ -1347,8 +1352,7 @@
"textG": 0,
"textR": 0
},
"comment": "The characters have a pixel-perfect behavior that makes them move after the keys are released and stop exactly in a cell.\nThere is nothing else to do. The following events are mainly about sprite animation.",
"comment2": ""
"comment": "The characters have a pixel-perfect behavior that makes them move after the keys are released and stop exactly in a cell.\nThere is nothing else to do. The following events are mainly about sprite animation."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1489,8 +1493,7 @@
"textG": 0,
"textR": 0
},
"comment": "Wait a bit.",
"comment2": ""
"comment": "Wait a bit."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1541,8 +1544,7 @@
"textG": 0,
"textR": 0
},
"comment": "Choose a random direction.",
"comment2": ""
"comment": "Choose a random direction."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1591,8 +1593,7 @@
"textG": 0,
"textR": 0
},
"comment": "The pixel-perfect behavior forces the characters to move to the next cell.\nThere is only to give them an impulse in the right direction.",
"comment2": ""
"comment": "The pixel-perfect behavior forces the characters to move to the next cell.\nThere is only to give them an impulse in the right direction."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -1711,9 +1712,14 @@
"ambientLightColorB": 32,
"ambientLightColorG": 0,
"ambientLightColorR": 0,
"camera3DFarPlaneDistance": 10000,
"camera3DFieldOfView": 45,
"camera3DNearPlaneDistance": 0.1,
"followBaseLayerCamera": false,
"isLightingLayer": false,
"isLocked": false,
"name": "",
"renderingType": "",
"visibility": true,
"cameras": [
{
Expand Down Expand Up @@ -1764,9 +1770,14 @@
"name": "TopDownMovementAnimator",
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Arrows/a6026156355ae5f03613b03971e4ddb50d0c95b8901e7a21edc57f33f0032e42_Arrows_thin_arrows_all_directions_cross.svg",
"shortDescription": "Change the animation according to the movement direction.",
"version": "0.1.0",
"version": "0.1.1",
"description": "Change the animation according to the movement direction.",
"origin": {
"identifier": "TopDownMovementAnimator",
"name": "gdevelop-extension-store"
},
"tags": [
"top-down",
"animation",
"direction"
],
Expand Down Expand Up @@ -2032,19 +2043,17 @@
"textG": 0,
"textR": 0
},
"comment": "Use a small margin is used to avoid to flicker between 2 directions.",
"comment2": ""
"comment": "Use a small margin is used to avoid to flicker between 2 directions."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": true,
"value": "BuiltinCommonInstructions::CompareNumbers"
},
"parameters": [
"abs(Object.Behavior:: DirectionDifference(Object.Behavior::SharedPropertyNewAnimationDirection(), Object.Behavior::PropertyAnimationDirection()))",
"abs(Object.Behavior::DirectionDifference(Object.Behavior::SharedPropertyNewAnimationDirection(), Object.Behavior::PropertyAnimationDirection()))",
">",
"0.5 + 0.03125"
]
Expand Down Expand Up @@ -2162,7 +2171,7 @@
},
"parameters": [
"Object",
"Object. Behavior::PropertyAnimationName() + ToString(Object.Behavior::PropertyAnimationDirection())"
"Object.Behavior::PropertyAnimationName() + ToString(Object.Behavior::PropertyAnimationDirection())"
]
}
]
Expand Down Expand Up @@ -2487,8 +2496,7 @@
"textG": 0,
"textR": 0
},
"comment": "Change the animation but keep the current frame number.",
"comment2": ""
"comment": "Change the animation but keep the current frame number."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -2609,7 +2617,7 @@
"type": "Number",
"unit": "DegreeAngle",
"label": "Angle offset",
"description": "Setted to 90°, \"Walk0\" becomes the animation for down.",
"description": "Set to 90°, \"Walk0\" becomes the animation for down.",
"group": "Direction",
"extraInformation": [],
"hidden": false,
Expand Down Expand Up @@ -2654,19 +2662,21 @@
},
{
"author": "Gustavo Marciano",
"category": "",
"category": "Visual effect",
"extensionNamespace": "",
"fullName": "YSort",
"helpPath": "",
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLXNvcnQtYXNjZW5kaW5nIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTE5IDE3SDIyTDE4IDIxTDE0IDE3SDE3VjNIMTlNMiAxN0gxMlYxOUgyTTYgNVY3SDJWNU0yIDExSDlWMTNIMlYxMVoiIC8+PC9zdmc+",
"name": "YSort",
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/sort-ascending.svg",
"shortDescription": "Create an illusion of depth by setting the Z-order based on the Y position of the object. Useful for isometric games, 2D games with a \"Top-Down\" view, RPG...",
"version": "0.0.1",
"version": "0.1.0",
"description": [
"Set the depth (Z-order) of the instance to the value of its Y position in the scene, creating an illusion of depth. The origin point of the object is used to determine the Z-order.",
"",
"Useful for isometric games, 2D games with a \"Top-Down\" view, RPG..."
"This is useful for:",
"- isometric games ([open the project online](https://editor.gdevelop.io/?project=example://isometric-game))",
"- top-down games ([open the project online](https://editor.gdevelop.io/?project=example://top-down-grid-movement))"
],
"origin": {
"identifier": "YSort",
Expand All @@ -2677,7 +2687,7 @@
"y-sort",
"depth",
"fake-depth",
"isometric-depth",
"isometric",
"rpg"
],
"authorIds": [],
Expand All @@ -2693,9 +2703,21 @@
{
"fullName": "",
"functionType": "Action",
"name": "doStepPreEvents",
"name": "doStepPostEvents",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
"color": {
"b": 109,
"g": 230,
"r": 255,
"textB": 0,
"textG": 0,
"textR": 0
},
"comment": "This is done in doStepPostEvents because the sort must happens right before the rendering to avoid a 1 frame delay."
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
Expand Down Expand Up @@ -2761,8 +2783,9 @@
},
"tags": [
"pixel perfect",
"platformer",
"platform",
"top down",
"top-down",
"movement",
"grid"
],
Expand Down Expand Up @@ -3557,8 +3580,7 @@
"textG": 0,
"textR": 0
},
"comment": "We don't know if the deceleration was already applied or not this step, but if the speed drifted from more than 1%, another extension is probably modifying the speed and it must not be overridden.",
"comment2": ""
"comment": "We don't know if the deceleration was already applied or not this step, but if the speed drifted from more than 1%, another extension is probably modifying the speed and it must not be overridden."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -3595,8 +3617,7 @@
"textG": 0,
"textR": 0
},
"comment": "Find how far to go to reach a pixel.",
"comment2": ""
"comment": "Find how far to go to reach a pixel."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -3740,8 +3761,7 @@
"textG": 0,
"textR": 0
},
"comment": "Move to the target as the movement behavior would do.",
"comment2": ""
"comment": "Move to the target as the movement behavior would do."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -3984,8 +4004,7 @@
"textG": 0,
"textR": 0
},
"comment": "Find how far to go to reach a pixel.",
"comment2": ""
"comment": "Find how far to go to reach a pixel."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -4165,8 +4184,7 @@
"textG": 0,
"textR": 0
},
"comment": "Move to the target as the movement behavior would do.",
"comment2": ""
"comment": "Move to the target as the movement behavior would do."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -4460,8 +4478,7 @@
"textG": 0,
"textR": 0
},
"comment": "Check if the character is decelerating.\nIt's done in doStepPostEvent because there is no way to know if the doStepPreEvents of this behavior is executed before or after the one of PlatformerCharcter.\nAs TimeDelta is used, we have to be sure the last PlatformerCharcter.doStepPreEvents call used the same TimeDelta. Which means this must be done after PlatformerCharcter.doStepPreEvents.",
"comment2": ""
"comment": "Check if the character is decelerating.\nIt's done in doStepPostEvent because there is no way to know if the doStepPreEvents of this behavior is executed before or after the one of PlatformerCharcter.\nAs TimeDelta is used, we have to be sure the last PlatformerCharcter.doStepPreEvents call used the same TimeDelta. Which means this must be done after PlatformerCharcter.doStepPreEvents."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -4535,8 +4552,7 @@
"textG": 0,
"textR": 0
},
"comment": "Save the speed to detect speed changes from outside.",
"comment2": ""
"comment": "Save the speed to detect speed changes from outside."
},
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down