From 332ca91a910c42cbfa705c720b18ad3c47ef652f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 20 May 2023 13:33:29 +0200 Subject: [PATCH 1/3] [Reviewed] [3D First person] Add a camera icon and tweak speeds --- examples/3d-first-person/3d-first-person.json | 60 +++++++++--------- examples/3d-first-person/Camera.png | Bin 0 -> 717 bytes 2 files changed, 31 insertions(+), 29 deletions(-) create mode 100644 examples/3d-first-person/Camera.png diff --git a/examples/3d-first-person/3d-first-person.json b/examples/3d-first-person/3d-first-person.json index 4ad446bf4..684fe8727 100644 --- a/examples/3d-first-person/3d-first-person.json +++ b/examples/3d-first-person/3d-first-person.json @@ -404,6 +404,15 @@ "identifier": "https://asset-resources.gdevelop.io/public-resources/Multitouch joysticks/13d8225be69d0f11b6de965cac0d840e7e63e2510a638af89ae42b052caa2460_Shaded dark joystick thumb.png", "name": "Shaded dark joystick thumb.png" } + }, + { + "alwaysLoaded": false, + "file": "Camera.png", + "kind": "image", + "metadata": "", + "name": "Camera.png", + "smoothed": true, + "userAdded": true } ], "resourceFolders": [] @@ -476,15 +485,15 @@ ], "instances": [ { - "angle": 180, - "customSize": true, + "angle": 202, + "customSize": false, "height": 20, "layer": "", "name": "Camera", "persistentUuid": "b47b3320-fbbb-473d-8e2a-9eb5497c56f0", "width": 20, "x": 475, - "y": 301, + "y": 325, "zOrder": 2, "numberProperties": [ { @@ -1022,14 +1031,14 @@ "depth": 100, "enableTextureTransparency": false, "facesOrientation": "Y", - "frontFaceResourceName": "", + "frontFaceResourceName": "Camera.png", "backFaceResourceName": "", "backFaceUpThroughWhichAxisRotation": "X", "leftFaceResourceName": "", "rightFaceResourceName": "", "topFaceResourceName": "", "bottomFaceResourceName": "", - "frontFaceVisible": false, + "frontFaceVisible": true, "backFaceVisible": false, "leftFaceVisible": false, "rightFaceVisible": false, @@ -1295,8 +1304,7 @@ "textG": 0, "textR": 0 }, - "comment": "Camera object rotates along with the player's cursor, and the in game camera rotates based on the position of the Camera object", - "comment2": "" + "comment": "Camera object rotates along with the player's cursor, and the in game camera rotates based on the position of the Camera object" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1402,7 +1410,7 @@ "parameters": [ "Camera", "+", - "LookJoystick.StickForceX()" + "LookJoystick.StickForceX() * 4" ] }, { @@ -1412,7 +1420,7 @@ "parameters": [ "Camera", "+", - "LookJoystick.StickForceY()" + "LookJoystick.StickForceY() * 2" ] } ] @@ -1439,7 +1447,7 @@ "parameters": [ "Camera", "+", - "Gamepads::StickForceX(1, \"Right\")" + "Gamepads::StickForceX(1, \"Right\") * 4" ] }, { @@ -1449,7 +1457,7 @@ "parameters": [ "Camera", "+", - "Gamepads::StickForceY(1, \"Right\")" + "Gamepads::StickForceY(1, \"Right\") * 2" ] } ] @@ -1464,8 +1472,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the camera doesn't get upsidedown.", - "comment2": "" + "comment": "Make sure the camera doesn't get upsidedown." }, { "type": "BuiltinCommonInstructions::Standard", @@ -1522,8 +1529,7 @@ "textG": 0, "textR": 0 }, - "comment": "To allow player to walk under an object, it needs to be neglected from picking when separating from obstacles", - "comment2": "" + "comment": "To allow player to walk under an object, it needs to be neglected from picking when separating from obstacles" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1562,8 +1568,7 @@ "textG": 0, "textR": 0 }, - "comment": "Moving the Camera object along the X/Y plane with forces", - "comment2": "" + "comment": "Moving the Camera object along the X/Y plane with forces" }, { "type": "BuiltinCommonInstructions::Standard", @@ -1599,7 +1604,7 @@ "parameters": [ "Camera", "Camera.Angle()", - "200", + "400", "" ] } @@ -1626,7 +1631,7 @@ "parameters": [ "Camera", "Camera.Angle()+180", - "200", + "400", "" ] } @@ -1653,7 +1658,7 @@ "parameters": [ "Camera", "Camera.Angle() + 90", - "200", + "400", "" ] } @@ -1680,7 +1685,7 @@ "parameters": [ "Camera", "Camera.Angle() - 90", - "200", + "400", "" ] } @@ -1715,7 +1720,7 @@ "parameters": [ "Camera", "WalkJoystick.StickAngle() + Camera.Angle() + 90", - "200", + "400", "" ] } @@ -1756,7 +1761,7 @@ "parameters": [ "Camera", "Gamepads::StickAngle(1, \"Left\") + Camera.Angle() + 90", - "200", + "400", "" ] } @@ -6371,8 +6376,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", @@ -6452,8 +6456,7 @@ "textG": 0, "textR": 0 }, - "comment": "Make sure the joystick has moved from center", - "comment2": "" + "comment": "Make sure the joystick has moved from center" }, { "type": "BuiltinCommonInstructions::Standard", @@ -7085,8 +7088,7 @@ "textG": 0, "textR": 0 }, - "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)", - "comment2": "" + "comment": "Move thumb back to center when not being pressed (acts like a spring on a real controller)" }, { "type": "BuiltinCommonInstructions::Standard", diff --git a/examples/3d-first-person/Camera.png b/examples/3d-first-person/Camera.png new file mode 100644 index 0000000000000000000000000000000000000000..ecbcff9cff555312639db99c1cb30a7b754aa6eb GIT binary patch literal 717 zcmV;;0y6!HP)Oc_3zX<_NAWbv|Vj~z76n}tTW1)Yvjdcob68up_lz>=hu^Jm8NfGr` z7xeDIsWINmW2YLjVRt^6ncbNU)9?2$NU*R-xKIEJKmjNK1)u;F;5UW4_eIxrVcRwc zA@F@4m&;=%6vHq`r_;#ga?mslf*`yPfDi)1FmO7Zo?hs3xxn*0tk-L7HXF3tZOF15 ze+ap*8`=1;5(EJZ!+`6$-^P63$9O!(U@*X9v54*g+qOgF1wlZg(SRgLVA;pg=X^fH zaU4viQ+S?-AP8XFHtO|yIKEn~uv{(?1VOlVxm=Fs0YXTqHyRCOv)PA@2LP63A#!^(YN<_^oTFg;^ zqyyY@+Wyl3x~{` Date: Sat, 20 May 2023 11:36:21 +0000 Subject: [PATCH 2/3] Optimised images with calibre/image-actions --- examples/3d-first-person/Camera.png | Bin 717 -> 408 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/examples/3d-first-person/Camera.png b/examples/3d-first-person/Camera.png index ecbcff9cff555312639db99c1cb30a7b754aa6eb..d816b1304469232bf0bf2c80f365435aa68cee1f 100644 GIT binary patch delta 361 zcmV-v0ha#F1(*YnIDY|3Nkl2{IuaLH&26yB z!1w69L?v(sHBoXar#_m>Yu|Tq*;(s`nwr$M;kn+Q6p64=- zqioxz9Vx6q)KNx<9<UDy4B9q)r6Fb7Z_V)LdchsL1?Z9JQ%Ns6L4&6F{K+OXe5 z{wxz}W0z(5vDAzKbj1E^pZWr2g}1)u;F;5UW4_eIxr zVcRwcA@F@4m&;=%6vHq`r_;#ga?mslf*`yPfDi)1FmO7Zo?hs3xxn*0tk-L7HXF3t zZOF15e+ap*8`=1;5(EJZ!+`6$-^P63$9O!(U@*X9v54*g+qOgF1wlZg(SRgLVA;pg z=X^fHaU4viQ-64#had=G+cxU;dN{sXt*~4!5d=ZFcDY=R<^e)Ts5cr7WV6|ajRydh zWg*Kln$707xgE!WuIsQYD>VKSDzXQB-w$<3k|KxC^&GzM!!%87x7+w~;Ci=t=F9)h z6W4QJ8_#hZDwRq++i2XPsw%40D$?mREXzs`fGCQn)qiTpWHRv{WN}Hi+l>^Ozg|j2 z%_~~WQGlca+;iIg(*U}z!*QJC0vwM=42MIQrg>AgB<>{MZnq$Wpj0Zo)&mT~yewY7 z&cQGYR8_s{6CNoe?gB`qQlTCtRzKx%ID|US^JukN=yW;|MKPWnP!uK9XR{gh`~6d% zIG@kh?SFQdOeW#8TrLLy$Ye6;cDtxlD&RQop;P+D9MCiko6QD65Wsa^j7Fo^G~*lx zP1A0SEf$N&=ku7)=OBcjP$>L-S#ZxEn%!;(!!T~TrKrY#e0(6A&A#VWLY8IpdcBui zt0;;BP1C^h{Cn?(1VIQJa9T=G017|>C;$bZ02&nFKLPjy%=iBB4#XV&00000NkvXX Hu0mjfMVU7N From 1d3c85505be7512cad938038247eec06e5069805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davy=20H=C3=A9lard?= Date: Sat, 20 May 2023 13:37:36 +0200 Subject: [PATCH 3/3] fix camera size --- examples/3d-first-person/3d-first-person.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/3d-first-person/3d-first-person.json b/examples/3d-first-person/3d-first-person.json index 684fe8727..0bddbb952 100644 --- a/examples/3d-first-person/3d-first-person.json +++ b/examples/3d-first-person/3d-first-person.json @@ -486,19 +486,19 @@ "instances": [ { "angle": 202, - "customSize": false, - "height": 20, + "customSize": true, + "height": 40, "layer": "", "name": "Camera", "persistentUuid": "b47b3320-fbbb-473d-8e2a-9eb5497c56f0", - "width": 20, + "width": 40, "x": 475, "y": 325, "zOrder": 2, "numberProperties": [ { "name": "depth", - "value": 0 + "value": 1 }, { "name": "z",