diff --git a/extensions/community/CreatPhysicsEngine.json b/extensions/community/CreatPhysicsEngine.json new file mode 100644 index 000000000..2ca1f95c0 --- /dev/null +++ b/extensions/community/CreatPhysicsEngine.json @@ -0,0 +1,641 @@ +{ + "author": "", + "category": "Game mechanic", + "dimension": "2D", + "extensionNamespace": "", + "fullName": "Creat Physics Engine", + "gdevelopVersion": "", + "helpPath": "", + "iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyMy4wLjMsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iSWNvbnMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4Ig0KCSB2aWV3Qm94PSIwIDAgMzIgMzIiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDMyIDMyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7ZmlsbDpub25lO3N0cm9rZTojMDAwMDAwO3N0cm9rZS13aWR0aDoyO3N0cm9rZS1saW5lY2FwOnJvdW5kO3N0cm9rZS1saW5lam9pbjpyb3VuZDtzdHJva2UtbWl0ZXJsaW1pdDoxMDt9DQo8L3N0eWxlPg0KPHBhdGggY2xhc3M9InN0MCIgZD0iTTMsMjVsMi42LTQuMmMxLjUtMi4zLDQtMy44LDYuOC0zLjhIMTl2MGMwLDIuMi0xLjgsNC00LDRoLTIiLz4NCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik0xNSwyMWg4bDEuMi0xLjZjMS4xLTEuNSwyLjktMi40LDQuOC0yLjRoMGwtMi43LDQuOGMtMS40LDIuNi00LjIsNC4yLTcuMSw0LjJoMGMtNC43LDAtOS4zLDEuNC0xMy4yLDRsMCwwIi8+DQo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNMjAsOWMwLDIuMi0xLjgsNC00LDRzLTQtMS44LTQtNGMwLTMsNC03LDQtN1MyMCw2LDIwLDl6Ii8+DQo8L3N2Zz4NCg==", + "name": "CreatPhysicsEngine", + "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Line Hero Pack/Master/SVG/Cleaning/5e5e1f97ed67cf22711d66e975b5a3db5d467681d04629c63e07f95aba352777_Cleaning_clean_hands_wash_soap_water_drop.svg", + "shortDescription": "Great For Hundreds Of Objects Without Lagging.", + "version": "0.0.1", + "description": "Simple Physics, 2D and 3D - Coming Soon.", + "tags": [ + "Physics" + ], + "authorIds": [ + "LmDPcZ5ey4WWF4VdoEQcmPVTmFu2" + ], + "dependencies": [], + "globalVariables": [], + "sceneVariables": [], + "eventsFunctions": [], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT" + }, + "eventsBasedBehaviors": [ + { + "description": "Adds Physics To This 2D Object.", + "fullName": "Physics Object 2D", + "helpPath": "", + "iconUrl": "", + "name": "MyBehavior", + "objectType": "", + "previewIconUrl": "", + "eventsFunctions": [ + { + "description": "Simulates Object Falling.", + "fullName": "Simulate Object", + "functionType": "Action", + "name": "Function", + "sentence": "Simulate Object _PARAM0_,_PARAM1_,_PARAM2_,_PARAM3_,_PARAM4_,_PARAM5_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CollisionNP" + }, + "parameters": [ + "Object", + "Platform", + "Platform.Width()/2", + "", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State", + "=", + "\"Falling\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Acceleration", + "+", + "Acceleration+Gravity/70" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "=", + "Acceleration/(AirDensity/3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Object", + "+", + "CurrentSpeed" + ] + } + ] + } + ], + "variables": [ + { + "name": "CurrentSpeed", + "type": "number", + "value": 0 + }, + { + "name": "Acceleration", + "type": "number", + "value": 1.1 + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Else", + "conditions": [ + { + "type": { + "value": "CenterY" + }, + "parameters": [ + "Object", + "<=", + "CameraCenterY(Object.Layer())+SceneWindowHeight()/2" + ] + } + ], + "actions": [ + { + "type": { + "value": "PickNearest" + }, + "parameters": [ + "Platform", + "Object.CenterX()", + "Object.CenterY()" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Shape2", + "=", + "\"Circle\"" + ] + }, + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "Object", + "<=", + "Platform.CenterX()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "-", + "10" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "10" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Shape2", + "=", + "\"Circle\"" + ] + }, + { + "type": { + "value": "CenterX" + }, + "parameters": [ + "Object", + ">=", + "Platform.CenterX()" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetX" + }, + "parameters": [ + "Object", + "+", + "10" + ] + }, + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "10" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Shape2", + "=", + "\"Square\"" + ] + } + ], + "actions": [ + { + "type": { + "value": "SeparateFromObjects" + }, + "parameters": [ + "Object", + "Platform", + "" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "RotateTowardAngle" + }, + "parameters": [ + "Object", + "Platform.Angle()", + "Weight*Gravity", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "Shape", + "=", + "\"Circle\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Angle" + }, + "parameters": [ + "Platform", + "<=", + "90" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "+", + "20" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "Angle" + }, + "parameters": [ + "Platform", + ">=", + "270" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetAngle" + }, + "parameters": [ + "Object", + "-", + "20" + ] + } + ] + } + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "CollisionNP" + }, + "parameters": [ + "Platform", + "Object", + "", + "", + "no" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "StringVariable" + }, + "parameters": [ + "State2", + "=", + "\"Falling\"" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "Acceleration", + "+", + "Acceleration+Gravity/70" + ] + }, + { + "type": { + "value": "SetNumberVariable" + }, + "parameters": [ + "CurrentSpeed", + "=", + "Acceleration/(AirDensity/3)" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetY" + }, + "parameters": [ + "Platform", + "+", + "CurrentSpeed" + ] + } + ] + } + ], + "variables": [ + { + "name": "CurrentSpeed", + "type": "number", + "value": 0 + }, + { + "name": "Acceleration", + "type": "number", + "value": 1.1 + } + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CreatPhysicsEngine::MyBehavior", + "type": "behavior" + }, + { + "description": "Platform", + "name": "Platform", + "type": "objectList" + }, + { + "description": "Phsyic Object 2D", + "name": "MyBehavior", + "supplementaryInformation": "CreatPhysicsEngine::MyBehavior", + "type": "behavior" + }, + { + "description": "State", + "name": "State2", + "supplementaryInformation": "[\"Falling\",\"Anchored\"]", + "type": "stringWithSelector" + }, + { + "description": "Shape", + "name": "Shape2", + "supplementaryInformation": "[\"Circle\",\"Square\"]", + "type": "stringWithSelector" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "CreatPhysicsEngine::MyBehavior", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "eventsFunctionsFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "functionName": "Function" + }, + { + "functionName": "doStepPreEvents" + } + ] + }, + "propertyDescriptors": [ + { + "value": "1", + "type": "Number", + "label": "Mass", + "description": "Weight In KG.", + "name": "Weight" + }, + { + "value": "", + "type": "Boolean", + "label": "Fixed Rotation", + "description": "Rotations Won't Be Applied.", + "name": "Fixed_Rotation" + }, + { + "value": "Falling", + "type": "Choice", + "label": "State", + "description": "State Of Object.", + "choices": [ + { + "label": "Anchored", + "value": "Anchored" + }, + { + "label": "Falling", + "value": "Falling" + } + ], + "name": "State" + }, + { + "value": "", + "type": "Choice", + "label": "Shape", + "description": "Shape Of Object.", + "choices": [ + { + "label": "Square", + "value": "Square" + }, + { + "label": "Circle", + "value": "Circle" + } + ], + "name": "Shape" + } + ], + "propertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "Weight" + }, + { + "propertyName": "Fixed_Rotation" + }, + { + "propertyName": "State" + }, + { + "propertyName": "Shape" + } + ] + }, + "sharedPropertyDescriptors": [ + { + "value": "100", + "type": "Number", + "label": "Gravity", + "description": "Gravity Applied To Objects.", + "name": "Gravity" + }, + { + "value": "1", + "type": "Number", + "label": "Air Density", + "description": "Air Density Slows Down The Acceleration.", + "name": "AirDensity" + } + ], + "sharedPropertiesFolderStructure": { + "folderName": "__ROOT", + "children": [ + { + "propertyName": "AirDensity" + }, + { + "propertyName": "Gravity" + } + ] + } + } + ], + "eventsBasedObjects": [] +}