├── .gitattributes ├── LICENSE ├── README.md ├── bee ├── bee.atlas └── images │ ├── Bee01.png │ ├── Bee02.png │ ├── Bee03.png │ ├── Bee04.png │ ├── Bee05.png │ ├── Bee06.png │ ├── Bee07.png │ ├── Bee08.png │ ├── Bee09.png │ ├── Bee10.png │ ├── Bee11.png │ ├── Bee12.png │ ├── Bee13.png │ ├── Bee14.png │ ├── Bee15.png │ ├── Bee16.png │ ├── Bee17.png │ ├── Bee18.png │ ├── Bee19.png │ ├── Bee20.png │ ├── Bee21.png │ ├── Bee22.png │ ├── Bee23.png │ ├── Bee24.png │ ├── Bee_shot01.png │ ├── Bee_shot02.png │ ├── Bee_shot03.png │ ├── Bee_shot04.png │ ├── Bee_shot05.png │ ├── Bee_shot06.png │ ├── Bee_shot07.png │ ├── Bee_shot08.png │ ├── Bee_shot09.png │ ├── Bee_shot10.png │ ├── Sting01.png │ ├── Sting02.png │ ├── Sting03.png │ ├── Sting04.png │ ├── Sting05.png │ ├── Sting06.png │ ├── Sting07.png │ ├── Sting08.png │ └── Sting09.png ├── colibri ├── colibri.atlas └── images │ ├── colibri01.png │ ├── colibri02.png │ ├── colibri03.png │ ├── colibri04.png │ ├── colibri05.png │ ├── colibri06.png │ ├── colibri07.png │ ├── colibri08.png │ ├── colibri09.png │ ├── colibri10.png │ ├── colibri11.png │ ├── colibri12.png │ ├── colibri13.png │ ├── colibri14.png │ ├── colibri15.png │ ├── colibri16.png │ ├── colibri17.png │ ├── colibri18.png │ ├── colibri19.png │ ├── colibri20.png │ ├── colibri21.png │ ├── colibri22.png │ ├── colibri23.png │ └── colibri24.png ├── fonts ├── BoogalooOne-Regular.ttf └── score.font ├── game.project ├── hero ├── hero.atlas ├── hero.go ├── hero.script └── images │ ├── hero-fall_right_0.png │ ├── hero-fall_right_1.png │ ├── hero-fall_right_10.png │ ├── hero-fall_right_11.png │ ├── hero-fall_right_12.png │ ├── hero-fall_right_13.png │ ├── hero-fall_right_14.png │ ├── hero-fall_right_15.png │ ├── hero-fall_right_16.png │ ├── hero-fall_right_17.png │ ├── hero-fall_right_18.png │ ├── hero-fall_right_19.png │ ├── hero-fall_right_2.png │ ├── hero-fall_right_20.png │ ├── hero-fall_right_21.png │ ├── hero-fall_right_22.png │ ├── hero-fall_right_23.png │ ├── hero-fall_right_24.png │ ├── hero-fall_right_25.png │ ├── hero-fall_right_26.png │ ├── hero-fall_right_27.png │ ├── hero-fall_right_28.png │ ├── hero-fall_right_29.png │ ├── hero-fall_right_3.png │ ├── hero-fall_right_4.png │ ├── hero-fall_right_5.png │ ├── hero-fall_right_6.png │ ├── hero-fall_right_7.png │ ├── hero-fall_right_8.png │ ├── hero-fall_right_9.png │ ├── hero-idle_right_0.png │ ├── hero-idle_right_1.png │ ├── hero-idle_right_10.png │ ├── hero-idle_right_11.png │ ├── hero-idle_right_12.png │ ├── hero-idle_right_13.png │ ├── hero-idle_right_14.png │ ├── hero-idle_right_15.png │ ├── hero-idle_right_16.png │ ├── hero-idle_right_17.png │ ├── hero-idle_right_18.png │ ├── hero-idle_right_19.png │ ├── hero-idle_right_2.png │ ├── hero-idle_right_20.png │ ├── hero-idle_right_21.png │ ├── hero-idle_right_22.png │ ├── hero-idle_right_23.png │ ├── hero-idle_right_24.png │ ├── hero-idle_right_25.png │ ├── hero-idle_right_26.png │ ├── hero-idle_right_27.png │ ├── hero-idle_right_28.png │ ├── hero-idle_right_29.png │ ├── hero-idle_right_3.png │ ├── hero-idle_right_30.png │ ├── hero-idle_right_31.png │ ├── hero-idle_right_32.png │ ├── hero-idle_right_33.png │ ├── hero-idle_right_34.png │ ├── hero-idle_right_35.png │ ├── hero-idle_right_36.png │ ├── hero-idle_right_4.png │ ├── hero-idle_right_5.png │ ├── hero-idle_right_6.png │ ├── hero-idle_right_7.png │ ├── hero-idle_right_8.png │ ├── hero-idle_right_9.png │ ├── hero-jump_right_0.png │ ├── hero-jump_right_1.png │ ├── hero-jump_right_10.png │ ├── hero-jump_right_11.png │ ├── hero-jump_right_12.png │ ├── hero-jump_right_13.png │ ├── hero-jump_right_14.png │ ├── hero-jump_right_15.png │ ├── hero-jump_right_16.png │ ├── hero-jump_right_17.png │ ├── hero-jump_right_18.png │ ├── hero-jump_right_19.png │ ├── hero-jump_right_2.png │ ├── hero-jump_right_3.png │ ├── hero-jump_right_4.png │ ├── hero-jump_right_5.png │ ├── hero-jump_right_6.png │ ├── hero-jump_right_7.png │ ├── hero-jump_right_8.png │ ├── hero-jump_right_9.png │ ├── hero-run_right_0.png │ ├── hero-run_right_1.png │ ├── hero-run_right_10.png │ ├── hero-run_right_11.png │ ├── hero-run_right_12.png │ ├── hero-run_right_13.png │ ├── hero-run_right_14.png │ ├── hero-run_right_15.png │ ├── hero-run_right_16.png │ ├── hero-run_right_17.png │ ├── hero-run_right_18.png │ ├── hero-run_right_19.png │ ├── hero-run_right_2.png │ ├── hero-run_right_3.png │ ├── hero-run_right_4.png │ ├── hero-run_right_5.png │ ├── hero-run_right_6.png │ ├── hero-run_right_7.png │ ├── hero-run_right_8.png │ └── hero-run_right_9.png ├── input └── game.input_binding ├── items ├── images │ ├── bubble.png │ ├── bubble_magnet.png │ ├── bubble_rocket.png │ ├── coin.png │ └── heart.png └── items.atlas ├── key ├── images │ ├── key_00.png │ ├── key_01.png │ ├── key_02.png │ ├── key_03.png │ ├── key_04.png │ ├── key_05.png │ ├── key_06.png │ ├── key_07.png │ ├── key_08.png │ ├── key_09.png │ ├── key_10.png │ ├── key_11.png │ └── key_12.png ├── key.atlas └── key.go ├── level ├── background.atlas ├── images │ ├── background.png │ ├── ground01.png │ ├── ground02.png │ ├── ground03.png │ ├── rock.png │ ├── rock_planks.png │ ├── sign_attention.png │ ├── sign_direction.png │ ├── sign_plus.png │ ├── trees_bg.png │ ├── vines01.png │ ├── vines02.png │ ├── vines03.png │ ├── wall01.png │ ├── wall02.png │ ├── wall03.png │ ├── wall04.png │ ├── wall05.png │ ├── wall06.png │ └── wall_long.png ├── level.atlas ├── level.collection ├── platform.go └── platform_long.go └── main ├── main.collection ├── main.go └── main.script /.gitattributes: -------------------------------------------------------------------------------- 1 | *.dae binary 2 | 3 | # Defold Protocol Buffer Text Files (https://github.com/github/linguist/issues/5091) 4 | *.animationset linguist-language=JSON5 5 | *.atlas linguist-language=JSON5 6 | *.camera linguist-language=JSON5 7 | *.collection linguist-language=JSON5 8 | *.collectionfactory linguist-language=JSON5 9 | *.collectionproxy linguist-language=JSON5 10 | *.collisionobject linguist-language=JSON5 11 | *.cubemap linguist-language=JSON5 12 | *.display_profiles linguist-language=JSON5 13 | *.factory linguist-language=JSON5 14 | *.font linguist-language=JSON5 15 | *.gamepads linguist-language=JSON5 16 | *.go linguist-language=JSON5 17 | *.gui linguist-language=JSON5 18 | *.input_binding linguist-language=JSON5 19 | *.label linguist-language=JSON5 20 | *.material linguist-language=JSON5 21 | *.mesh linguist-language=JSON5 22 | *.model linguist-language=JSON5 23 | *.particlefx linguist-language=JSON5 24 | *.render linguist-language=JSON5 25 | *.sound linguist-language=JSON5 26 | *.sprite linguist-language=JSON5 27 | *.spinemodel linguist-language=JSON5 28 | *.spinescene linguist-language=JSON5 29 | *.texture_profiles linguist-language=JSON5 30 | *.tilemap linguist-language=JSON5 31 | *.tilesource linguist-language=JSON5 32 | 33 | # Defold JSON Files 34 | *.buffer linguist-language=JSON 35 | 36 | # Defold GLSL Shaders 37 | *.fp linguist-language=GLSL 38 | *.vp linguist-language=GLSL 39 | 40 | # Defold Lua Files 41 | *.editor_script linguist-language=Lua 42 | *.render_script linguist-language=Lua 43 | *.script linguist-language=Lua 44 | *.gui_script linguist-language=Lua 45 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Defold 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tutorial-platformer 2 | Files for the platformer tutorial found here: https://www.defold.com/tutorials/platformer/ 3 | -------------------------------------------------------------------------------- /bee/bee.atlas: -------------------------------------------------------------------------------- 1 | animations { 2 | id: "idle" 3 | images { 4 | image: "/bee/images/Bee01.png" 5 | } 6 | images { 7 | image: "/bee/images/Bee02.png" 8 | } 9 | images { 10 | image: "/bee/images/Bee03.png" 11 | } 12 | images { 13 | image: "/bee/images/Bee04.png" 14 | } 15 | images { 16 | image: "/bee/images/Bee05.png" 17 | } 18 | images { 19 | image: "/bee/images/Bee06.png" 20 | } 21 | images { 22 | image: "/bee/images/Bee07.png" 23 | } 24 | images { 25 | image: "/bee/images/Bee08.png" 26 | } 27 | images { 28 | image: "/bee/images/Bee09.png" 29 | } 30 | images { 31 | image: "/bee/images/Bee10.png" 32 | } 33 | images { 34 | image: "/bee/images/Bee11.png" 35 | } 36 | images { 37 | image: "/bee/images/Bee12.png" 38 | } 39 | images { 40 | image: "/bee/images/Bee13.png" 41 | } 42 | images { 43 | image: "/bee/images/Bee14.png" 44 | } 45 | images { 46 | image: "/bee/images/Bee15.png" 47 | } 48 | images { 49 | image: "/bee/images/Bee16.png" 50 | } 51 | images { 52 | image: "/bee/images/Bee17.png" 53 | } 54 | images { 55 | image: "/bee/images/Bee18.png" 56 | } 57 | images { 58 | image: "/bee/images/Bee19.png" 59 | } 60 | images { 61 | image: "/bee/images/Bee20.png" 62 | } 63 | images { 64 | image: "/bee/images/Bee21.png" 65 | } 66 | images { 67 | image: "/bee/images/Bee22.png" 68 | } 69 | images { 70 | image: "/bee/images/Bee23.png" 71 | } 72 | images { 73 | image: "/bee/images/Bee24.png" 74 | } 75 | playback: PLAYBACK_LOOP_FORWARD 76 | fps: 30 77 | flip_horizontal: 0 78 | flip_vertical: 0 79 | } 80 | animations { 81 | id: "shot" 82 | images { 83 | image: "/bee/images/Bee_shot01.png" 84 | } 85 | images { 86 | image: "/bee/images/Bee_shot02.png" 87 | } 88 | images { 89 | image: "/bee/images/Bee_shot03.png" 90 | } 91 | images { 92 | image: "/bee/images/Bee_shot04.png" 93 | } 94 | images { 95 | image: "/bee/images/Bee_shot05.png" 96 | } 97 | images { 98 | image: "/bee/images/Bee_shot06.png" 99 | } 100 | images { 101 | image: "/bee/images/Bee_shot07.png" 102 | } 103 | images { 104 | image: "/bee/images/Bee_shot08.png" 105 | } 106 | images { 107 | image: "/bee/images/Bee_shot09.png" 108 | } 109 | images { 110 | image: "/bee/images/Bee_shot10.png" 111 | } 112 | playback: PLAYBACK_ONCE_FORWARD 113 | fps: 30 114 | flip_horizontal: 0 115 | flip_vertical: 0 116 | } 117 | animations { 118 | id: "sting" 119 | images { 120 | image: "/bee/images/Sting01.png" 121 | } 122 | images { 123 | image: "/bee/images/Sting02.png" 124 | } 125 | images { 126 | image: "/bee/images/Sting03.png" 127 | } 128 | images { 129 | image: "/bee/images/Sting04.png" 130 | } 131 | images { 132 | image: "/bee/images/Sting05.png" 133 | } 134 | images { 135 | image: "/bee/images/Sting06.png" 136 | } 137 | images { 138 | image: "/bee/images/Sting07.png" 139 | } 140 | images { 141 | image: "/bee/images/Sting08.png" 142 | } 143 | images { 144 | image: "/bee/images/Sting09.png" 145 | } 146 | playback: PLAYBACK_LOOP_FORWARD 147 | fps: 30 148 | flip_horizontal: 0 149 | flip_vertical: 0 150 | } 151 | margin: 0 152 | extrude_borders: 0 153 | inner_padding: 0 154 | -------------------------------------------------------------------------------- /bee/images/Bee01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee01.png -------------------------------------------------------------------------------- /bee/images/Bee02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee02.png -------------------------------------------------------------------------------- /bee/images/Bee03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee03.png -------------------------------------------------------------------------------- /bee/images/Bee04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee04.png -------------------------------------------------------------------------------- /bee/images/Bee05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee05.png -------------------------------------------------------------------------------- /bee/images/Bee06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee06.png -------------------------------------------------------------------------------- /bee/images/Bee07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee07.png -------------------------------------------------------------------------------- /bee/images/Bee08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee08.png -------------------------------------------------------------------------------- /bee/images/Bee09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee09.png -------------------------------------------------------------------------------- /bee/images/Bee10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee10.png -------------------------------------------------------------------------------- /bee/images/Bee11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee11.png -------------------------------------------------------------------------------- /bee/images/Bee12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee12.png -------------------------------------------------------------------------------- /bee/images/Bee13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee13.png -------------------------------------------------------------------------------- /bee/images/Bee14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee14.png -------------------------------------------------------------------------------- /bee/images/Bee15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee15.png -------------------------------------------------------------------------------- /bee/images/Bee16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee16.png -------------------------------------------------------------------------------- /bee/images/Bee17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee17.png -------------------------------------------------------------------------------- /bee/images/Bee18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee18.png -------------------------------------------------------------------------------- /bee/images/Bee19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee19.png -------------------------------------------------------------------------------- /bee/images/Bee20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee20.png -------------------------------------------------------------------------------- /bee/images/Bee21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee21.png -------------------------------------------------------------------------------- /bee/images/Bee22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee22.png -------------------------------------------------------------------------------- /bee/images/Bee23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee23.png -------------------------------------------------------------------------------- /bee/images/Bee24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee24.png -------------------------------------------------------------------------------- /bee/images/Bee_shot01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot01.png -------------------------------------------------------------------------------- /bee/images/Bee_shot02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot02.png -------------------------------------------------------------------------------- /bee/images/Bee_shot03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot03.png -------------------------------------------------------------------------------- /bee/images/Bee_shot04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot04.png -------------------------------------------------------------------------------- /bee/images/Bee_shot05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot05.png -------------------------------------------------------------------------------- /bee/images/Bee_shot06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot06.png -------------------------------------------------------------------------------- /bee/images/Bee_shot07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot07.png -------------------------------------------------------------------------------- /bee/images/Bee_shot08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot08.png -------------------------------------------------------------------------------- /bee/images/Bee_shot09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot09.png -------------------------------------------------------------------------------- /bee/images/Bee_shot10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Bee_shot10.png -------------------------------------------------------------------------------- /bee/images/Sting01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting01.png -------------------------------------------------------------------------------- /bee/images/Sting02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting02.png -------------------------------------------------------------------------------- /bee/images/Sting03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting03.png -------------------------------------------------------------------------------- /bee/images/Sting04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting04.png -------------------------------------------------------------------------------- /bee/images/Sting05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting05.png -------------------------------------------------------------------------------- /bee/images/Sting06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting06.png -------------------------------------------------------------------------------- /bee/images/Sting07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting07.png -------------------------------------------------------------------------------- /bee/images/Sting08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting08.png -------------------------------------------------------------------------------- /bee/images/Sting09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/bee/images/Sting09.png -------------------------------------------------------------------------------- /colibri/colibri.atlas: -------------------------------------------------------------------------------- 1 | animations { 2 | id: "anim" 3 | images { 4 | image: "/colibri/images/colibri01.png" 5 | } 6 | images { 7 | image: "/colibri/images/colibri02.png" 8 | } 9 | images { 10 | image: "/colibri/images/colibri03.png" 11 | } 12 | images { 13 | image: "/colibri/images/colibri04.png" 14 | } 15 | images { 16 | image: "/colibri/images/colibri05.png" 17 | } 18 | images { 19 | image: "/colibri/images/colibri06.png" 20 | } 21 | images { 22 | image: "/colibri/images/colibri07.png" 23 | } 24 | images { 25 | image: "/colibri/images/colibri08.png" 26 | } 27 | images { 28 | image: "/colibri/images/colibri09.png" 29 | } 30 | images { 31 | image: "/colibri/images/colibri10.png" 32 | } 33 | images { 34 | image: "/colibri/images/colibri11.png" 35 | } 36 | images { 37 | image: "/colibri/images/colibri12.png" 38 | } 39 | images { 40 | image: "/colibri/images/colibri13.png" 41 | } 42 | images { 43 | image: "/colibri/images/colibri14.png" 44 | } 45 | images { 46 | image: "/colibri/images/colibri15.png" 47 | } 48 | images { 49 | image: "/colibri/images/colibri16.png" 50 | } 51 | images { 52 | image: "/colibri/images/colibri17.png" 53 | } 54 | images { 55 | image: "/colibri/images/colibri18.png" 56 | } 57 | images { 58 | image: "/colibri/images/colibri19.png" 59 | } 60 | images { 61 | image: "/colibri/images/colibri20.png" 62 | } 63 | images { 64 | image: "/colibri/images/colibri21.png" 65 | } 66 | images { 67 | image: "/colibri/images/colibri22.png" 68 | } 69 | images { 70 | image: "/colibri/images/colibri23.png" 71 | } 72 | images { 73 | image: "/colibri/images/colibri24.png" 74 | } 75 | playback: PLAYBACK_LOOP_FORWARD 76 | fps: 30 77 | flip_horizontal: 0 78 | flip_vertical: 0 79 | } 80 | margin: 0 81 | extrude_borders: 0 82 | inner_padding: 0 83 | -------------------------------------------------------------------------------- /colibri/images/colibri01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri01.png -------------------------------------------------------------------------------- /colibri/images/colibri02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri02.png -------------------------------------------------------------------------------- /colibri/images/colibri03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri03.png -------------------------------------------------------------------------------- /colibri/images/colibri04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri04.png -------------------------------------------------------------------------------- /colibri/images/colibri05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri05.png -------------------------------------------------------------------------------- /colibri/images/colibri06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri06.png -------------------------------------------------------------------------------- /colibri/images/colibri07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri07.png -------------------------------------------------------------------------------- /colibri/images/colibri08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri08.png -------------------------------------------------------------------------------- /colibri/images/colibri09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri09.png -------------------------------------------------------------------------------- /colibri/images/colibri10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri10.png -------------------------------------------------------------------------------- /colibri/images/colibri11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri11.png -------------------------------------------------------------------------------- /colibri/images/colibri12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri12.png -------------------------------------------------------------------------------- /colibri/images/colibri13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri13.png -------------------------------------------------------------------------------- /colibri/images/colibri14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri14.png -------------------------------------------------------------------------------- /colibri/images/colibri15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri15.png -------------------------------------------------------------------------------- /colibri/images/colibri16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri16.png -------------------------------------------------------------------------------- /colibri/images/colibri17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri17.png -------------------------------------------------------------------------------- /colibri/images/colibri18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri18.png -------------------------------------------------------------------------------- /colibri/images/colibri19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri19.png -------------------------------------------------------------------------------- /colibri/images/colibri20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri20.png -------------------------------------------------------------------------------- /colibri/images/colibri21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri21.png -------------------------------------------------------------------------------- /colibri/images/colibri22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri22.png -------------------------------------------------------------------------------- /colibri/images/colibri23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri23.png -------------------------------------------------------------------------------- /colibri/images/colibri24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/colibri/images/colibri24.png -------------------------------------------------------------------------------- /fonts/BoogalooOne-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/fonts/BoogalooOne-Regular.ttf -------------------------------------------------------------------------------- /fonts/score.font: -------------------------------------------------------------------------------- 1 | font: "/fonts/BoogalooOne-Regular.ttf" 2 | material: "/builtins/fonts/font.material" 3 | size: 40 4 | outline_alpha: 1.0 5 | outline_width: 2.0 6 | -------------------------------------------------------------------------------- /game.project: -------------------------------------------------------------------------------- 1 | [project] 2 | title = platformer 3 | 4 | [bootstrap] 5 | main_collection = /main/main.collectionc 6 | 7 | [input] 8 | game_binding = /input/game.input_bindingc 9 | use_accelerometer = 0 10 | 11 | [display] 12 | width = 1024 13 | height = 768 14 | 15 | [physics] 16 | scale = 0.02 17 | debug = 0 18 | 19 | [graphics] 20 | default_texture_min_filter = linear 21 | default_texture_mag_filter = linear 22 | 23 | [script] 24 | shared_state = 1 25 | 26 | -------------------------------------------------------------------------------- /hero/hero.atlas: -------------------------------------------------------------------------------- 1 | animations { 2 | id: "idle" 3 | images { 4 | image: "/hero/images/hero-idle_right_0.png" 5 | } 6 | images { 7 | image: "/hero/images/hero-idle_right_1.png" 8 | } 9 | images { 10 | image: "/hero/images/hero-idle_right_2.png" 11 | } 12 | images { 13 | image: "/hero/images/hero-idle_right_3.png" 14 | } 15 | images { 16 | image: "/hero/images/hero-idle_right_4.png" 17 | } 18 | images { 19 | image: "/hero/images/hero-idle_right_5.png" 20 | } 21 | images { 22 | image: "/hero/images/hero-idle_right_6.png" 23 | } 24 | images { 25 | image: "/hero/images/hero-idle_right_7.png" 26 | } 27 | images { 28 | image: "/hero/images/hero-idle_right_8.png" 29 | } 30 | images { 31 | image: "/hero/images/hero-idle_right_9.png" 32 | } 33 | images { 34 | image: "/hero/images/hero-idle_right_10.png" 35 | } 36 | images { 37 | image: "/hero/images/hero-idle_right_11.png" 38 | } 39 | images { 40 | image: "/hero/images/hero-idle_right_12.png" 41 | } 42 | images { 43 | image: "/hero/images/hero-idle_right_13.png" 44 | } 45 | images { 46 | image: "/hero/images/hero-idle_right_14.png" 47 | } 48 | images { 49 | image: "/hero/images/hero-idle_right_15.png" 50 | } 51 | images { 52 | image: "/hero/images/hero-idle_right_16.png" 53 | } 54 | images { 55 | image: "/hero/images/hero-idle_right_17.png" 56 | } 57 | images { 58 | image: "/hero/images/hero-idle_right_18.png" 59 | } 60 | images { 61 | image: "/hero/images/hero-idle_right_19.png" 62 | } 63 | images { 64 | image: "/hero/images/hero-idle_right_20.png" 65 | } 66 | images { 67 | image: "/hero/images/hero-idle_right_21.png" 68 | } 69 | images { 70 | image: "/hero/images/hero-idle_right_22.png" 71 | } 72 | images { 73 | image: "/hero/images/hero-idle_right_23.png" 74 | } 75 | images { 76 | image: "/hero/images/hero-idle_right_24.png" 77 | } 78 | images { 79 | image: "/hero/images/hero-idle_right_25.png" 80 | } 81 | images { 82 | image: "/hero/images/hero-idle_right_26.png" 83 | } 84 | images { 85 | image: "/hero/images/hero-idle_right_27.png" 86 | } 87 | images { 88 | image: "/hero/images/hero-idle_right_28.png" 89 | } 90 | images { 91 | image: "/hero/images/hero-idle_right_29.png" 92 | } 93 | images { 94 | image: "/hero/images/hero-idle_right_30.png" 95 | } 96 | images { 97 | image: "/hero/images/hero-idle_right_31.png" 98 | } 99 | images { 100 | image: "/hero/images/hero-idle_right_32.png" 101 | } 102 | images { 103 | image: "/hero/images/hero-idle_right_33.png" 104 | } 105 | images { 106 | image: "/hero/images/hero-idle_right_34.png" 107 | } 108 | images { 109 | image: "/hero/images/hero-idle_right_35.png" 110 | } 111 | images { 112 | image: "/hero/images/hero-idle_right_36.png" 113 | } 114 | playback: PLAYBACK_LOOP_FORWARD 115 | fps: 30 116 | flip_horizontal: 0 117 | flip_vertical: 0 118 | } 119 | animations { 120 | id: "run" 121 | images { 122 | image: "/hero/images/hero-run_right_0.png" 123 | } 124 | images { 125 | image: "/hero/images/hero-run_right_1.png" 126 | } 127 | images { 128 | image: "/hero/images/hero-run_right_2.png" 129 | } 130 | images { 131 | image: "/hero/images/hero-run_right_3.png" 132 | } 133 | images { 134 | image: "/hero/images/hero-run_right_4.png" 135 | } 136 | images { 137 | image: "/hero/images/hero-run_right_5.png" 138 | } 139 | images { 140 | image: "/hero/images/hero-run_right_6.png" 141 | } 142 | images { 143 | image: "/hero/images/hero-run_right_7.png" 144 | } 145 | images { 146 | image: "/hero/images/hero-run_right_8.png" 147 | } 148 | images { 149 | image: "/hero/images/hero-run_right_9.png" 150 | } 151 | images { 152 | image: "/hero/images/hero-run_right_10.png" 153 | } 154 | images { 155 | image: "/hero/images/hero-run_right_11.png" 156 | } 157 | images { 158 | image: "/hero/images/hero-run_right_12.png" 159 | } 160 | images { 161 | image: "/hero/images/hero-run_right_13.png" 162 | } 163 | images { 164 | image: "/hero/images/hero-run_right_14.png" 165 | } 166 | images { 167 | image: "/hero/images/hero-run_right_15.png" 168 | } 169 | images { 170 | image: "/hero/images/hero-run_right_16.png" 171 | } 172 | images { 173 | image: "/hero/images/hero-run_right_17.png" 174 | } 175 | images { 176 | image: "/hero/images/hero-run_right_18.png" 177 | } 178 | images { 179 | image: "/hero/images/hero-run_right_19.png" 180 | } 181 | playback: PLAYBACK_LOOP_FORWARD 182 | fps: 30 183 | flip_horizontal: 0 184 | flip_vertical: 0 185 | } 186 | animations { 187 | id: "jump" 188 | images { 189 | image: "/hero/images/hero-jump_right_0.png" 190 | } 191 | images { 192 | image: "/hero/images/hero-jump_right_1.png" 193 | } 194 | images { 195 | image: "/hero/images/hero-jump_right_2.png" 196 | } 197 | images { 198 | image: "/hero/images/hero-jump_right_3.png" 199 | } 200 | images { 201 | image: "/hero/images/hero-jump_right_4.png" 202 | } 203 | images { 204 | image: "/hero/images/hero-jump_right_5.png" 205 | } 206 | images { 207 | image: "/hero/images/hero-jump_right_6.png" 208 | } 209 | images { 210 | image: "/hero/images/hero-jump_right_7.png" 211 | } 212 | images { 213 | image: "/hero/images/hero-jump_right_8.png" 214 | } 215 | images { 216 | image: "/hero/images/hero-jump_right_9.png" 217 | } 218 | images { 219 | image: "/hero/images/hero-jump_right_10.png" 220 | } 221 | images { 222 | image: "/hero/images/hero-jump_right_11.png" 223 | } 224 | images { 225 | image: "/hero/images/hero-jump_right_12.png" 226 | } 227 | images { 228 | image: "/hero/images/hero-jump_right_13.png" 229 | } 230 | images { 231 | image: "/hero/images/hero-jump_right_14.png" 232 | } 233 | images { 234 | image: "/hero/images/hero-jump_right_15.png" 235 | } 236 | images { 237 | image: "/hero/images/hero-jump_right_16.png" 238 | } 239 | images { 240 | image: "/hero/images/hero-jump_right_17.png" 241 | } 242 | images { 243 | image: "/hero/images/hero-jump_right_18.png" 244 | } 245 | images { 246 | image: "/hero/images/hero-jump_right_19.png" 247 | } 248 | playback: PLAYBACK_ONCE_FORWARD 249 | fps: 30 250 | flip_horizontal: 0 251 | flip_vertical: 0 252 | } 253 | animations { 254 | id: "fall" 255 | images { 256 | image: "/hero/images/hero-fall_right_0.png" 257 | } 258 | images { 259 | image: "/hero/images/hero-fall_right_1.png" 260 | } 261 | images { 262 | image: "/hero/images/hero-fall_right_2.png" 263 | } 264 | images { 265 | image: "/hero/images/hero-fall_right_3.png" 266 | } 267 | images { 268 | image: "/hero/images/hero-fall_right_4.png" 269 | } 270 | images { 271 | image: "/hero/images/hero-fall_right_5.png" 272 | } 273 | images { 274 | image: "/hero/images/hero-fall_right_6.png" 275 | } 276 | images { 277 | image: "/hero/images/hero-fall_right_7.png" 278 | } 279 | images { 280 | image: "/hero/images/hero-fall_right_8.png" 281 | } 282 | images { 283 | image: "/hero/images/hero-fall_right_9.png" 284 | } 285 | images { 286 | image: "/hero/images/hero-fall_right_10.png" 287 | } 288 | images { 289 | image: "/hero/images/hero-fall_right_11.png" 290 | } 291 | images { 292 | image: "/hero/images/hero-fall_right_12.png" 293 | } 294 | images { 295 | image: "/hero/images/hero-fall_right_13.png" 296 | } 297 | images { 298 | image: "/hero/images/hero-fall_right_14.png" 299 | } 300 | images { 301 | image: "/hero/images/hero-fall_right_15.png" 302 | } 303 | images { 304 | image: "/hero/images/hero-fall_right_16.png" 305 | } 306 | images { 307 | image: "/hero/images/hero-fall_right_17.png" 308 | } 309 | images { 310 | image: "/hero/images/hero-fall_right_18.png" 311 | } 312 | images { 313 | image: "/hero/images/hero-fall_right_19.png" 314 | } 315 | images { 316 | image: "/hero/images/hero-fall_right_20.png" 317 | } 318 | images { 319 | image: "/hero/images/hero-fall_right_21.png" 320 | } 321 | images { 322 | image: "/hero/images/hero-fall_right_22.png" 323 | } 324 | images { 325 | image: "/hero/images/hero-fall_right_23.png" 326 | } 327 | images { 328 | image: "/hero/images/hero-fall_right_24.png" 329 | } 330 | images { 331 | image: "/hero/images/hero-fall_right_25.png" 332 | } 333 | images { 334 | image: "/hero/images/hero-fall_right_26.png" 335 | } 336 | images { 337 | image: "/hero/images/hero-fall_right_27.png" 338 | } 339 | images { 340 | image: "/hero/images/hero-fall_right_28.png" 341 | } 342 | images { 343 | image: "/hero/images/hero-fall_right_29.png" 344 | } 345 | playback: PLAYBACK_ONCE_FORWARD 346 | fps: 30 347 | flip_horizontal: 0 348 | flip_vertical: 0 349 | } 350 | margin: 0 351 | extrude_borders: 4 352 | inner_padding: 0 353 | -------------------------------------------------------------------------------- /hero/hero.go: -------------------------------------------------------------------------------- 1 | components { 2 | id: "script" 3 | component: "/hero/hero.script" 4 | position { 5 | x: 0.0 6 | y: 0.0 7 | z: 0.0 8 | } 9 | rotation { 10 | x: 0.0 11 | y: 0.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | } 16 | embedded_components { 17 | id: "collisionobject" 18 | type: "collisionobject" 19 | data: "collision_shape: \"\"\n" 20 | "type: COLLISION_OBJECT_TYPE_KINEMATIC\n" 21 | "mass: 0.0\n" 22 | "friction: 0.1\n" 23 | "restitution: 0.5\n" 24 | "group: \"hero\"\n" 25 | "mask: \"geometry\"\n" 26 | "embedded_collision_shape {\n" 27 | " shapes {\n" 28 | " shape_type: TYPE_BOX\n" 29 | " position {\n" 30 | " x: 9.640521\n" 31 | " y: 28.211432\n" 32 | " z: 0.0\n" 33 | " }\n" 34 | " rotation {\n" 35 | " x: 0.0\n" 36 | " y: 0.0\n" 37 | " z: 0.0\n" 38 | " w: 1.0\n" 39 | " }\n" 40 | " index: 0\n" 41 | " count: 3\n" 42 | " }\n" 43 | " data: 19.835552\n" 44 | " data: 26.133411\n" 45 | " data: 10.0\n" 46 | "}\n" 47 | "linear_damping: 0.0\n" 48 | "angular_damping: 0.0\n" 49 | "locked_rotation: false\n" 50 | "" 51 | position { 52 | x: 0.0 53 | y: 0.0 54 | z: 0.0 55 | } 56 | rotation { 57 | x: 0.0 58 | y: 0.0 59 | z: 0.0 60 | w: 1.0 61 | } 62 | } 63 | embedded_components { 64 | id: "sprite" 65 | type: "sprite" 66 | data: "tile_set: \"/hero/hero.atlas\"\n" 67 | "default_animation: \"idle\"\n" 68 | "material: \"/builtins/materials/sprite.material\"\n" 69 | "blend_mode: BLEND_MODE_ALPHA\n" 70 | "" 71 | position { 72 | x: 0.0 73 | y: 30.809103 74 | z: 0.1 75 | } 76 | rotation { 77 | x: 0.0 78 | y: 0.0 79 | z: 0.0 80 | w: 1.0 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /hero/hero.script: -------------------------------------------------------------------------------- 1 | -- these are the tweaks for the mechanics, feel free to change them for a different feeling 2 | -- the acceleration to move right/left 3 | local move_acceleration = 3500 4 | -- acceleration factor to use when air-borne 5 | local air_acceleration_factor = 0.8 6 | -- max speed right/left 7 | local max_speed = 400 8 | -- gravity pulling the player down in pixel units 9 | local gravity = -1100 10 | -- take-off speed when jumping in pixel units 11 | local jump_takeoff_speed = 700 12 | -- time within a double tap must occur to be considered a jump (only used for mouse/touch controls) 13 | local touch_jump_timeout = 0.2 14 | 15 | -- pre-hashing ids improves performance 16 | local msg_contact_point_response = hash("contact_point_response") 17 | local msg_animation_done = hash("animation_done") 18 | local group_geometry = hash("geometry") 19 | local input_left = hash("left") 20 | local input_right = hash("right") 21 | local input_jump = hash("jump") 22 | local input_touch = hash("touch") 23 | local anim_run = hash("run") 24 | local anim_idle = hash("idle") 25 | local anim_jump = hash("jump") 26 | local anim_fall = hash("fall") 27 | 28 | function init(self) 29 | -- this lets us handle input in this script 30 | msg.post(".", "acquire_input_focus") 31 | 32 | -- initial player velocity 33 | self.velocity = vmath.vector3(0, 0, 0) 34 | -- support variable to keep track of collisions and separation 35 | self.correction = vmath.vector3() 36 | -- if the player stands on ground or not 37 | self.ground_contact = false 38 | -- movement input in the range [-1,1] 39 | self.move_input = 0 40 | -- character direction, for anim selection (-1 or 1) 41 | self.direction = 1 42 | -- the currently playing animation 43 | self.anim = nil 44 | -- timer that controls the jump-window when using mouse/touch 45 | self.touch_jump_timer = 0 46 | end 47 | 48 | local function play_animation(self, anim) 49 | -- only play animations which are not already playing 50 | if self.anim ~= anim then 51 | -- tell the sprite to play the animation 52 | msg.post("#sprite", "play_animation", {id = anim}) 53 | -- remember which animation is playing 54 | self.anim = anim 55 | end 56 | end 57 | 58 | local function update_animations(self) 59 | -- make sure the player character faces the right way 60 | sprite.set_hflip("#sprite", self.direction < 0) 61 | -- make sure the right animation is playing 62 | if self.ground_contact then 63 | if self.velocity.x == 0 then 64 | play_animation(self, anim_idle) 65 | else 66 | play_animation(self, anim_run) 67 | end 68 | else 69 | if self.velocity.y > 0 then 70 | play_animation(self, anim_jump) 71 | else 72 | play_animation(self, anim_fall) 73 | end 74 | end 75 | end 76 | 77 | function update(self, dt) 78 | -- determine the target speed based on input 79 | local target_speed = self.move_input * max_speed 80 | -- calculate the difference between our current speed and the target speed 81 | local speed_diff = target_speed - self.velocity.x 82 | -- the complete acceleration to integrate over this frame 83 | local acceleration = vmath.vector3(0, gravity, 0) 84 | if speed_diff ~= 0 then 85 | -- set the acceleration to work in the direction of the difference 86 | if speed_diff < 0 then 87 | acceleration.x = -move_acceleration 88 | else 89 | acceleration.x = move_acceleration 90 | end 91 | -- decrease the acceleration when air-borne to give a slower feel 92 | if not self.ground_contact then 93 | acceleration.x = air_acceleration_factor * acceleration.x 94 | end 95 | end 96 | -- calculate the velocity change this frame (dv is short for delta-velocity) 97 | local dv = acceleration * dt 98 | -- check if dv exceeds the intended speed difference, clamp it in that case 99 | if math.abs(dv.x) > math.abs(speed_diff) then 100 | dv.x = speed_diff 101 | end 102 | -- save the current velocity for later use 103 | -- (self.velocity, which right now is the velocity used the previous frame) 104 | local v0 = self.velocity 105 | -- calculate the new velocity by adding the velocity change 106 | self.velocity = self.velocity + dv 107 | -- calculate the translation this frame by integrating the velocity 108 | local dp = (v0 + self.velocity) * dt * 0.5 109 | -- apply it to the player character 110 | go.set_position(go.get_position() + dp) 111 | 112 | -- update the jump timer 113 | if self.touch_jump_timer > 0 then 114 | self.touch_jump_timer = self.touch_jump_timer - dt 115 | end 116 | 117 | update_animations(self) 118 | 119 | -- reset volatile state 120 | self.correction = vmath.vector3() 121 | self.move_input = 0 122 | self.ground_contact = false 123 | 124 | end 125 | 126 | local function handle_geometry_contact(self, normal, distance) 127 | -- project the correction vector onto the contact normal 128 | -- (the correction vector is the 0-vector for the first contact point) 129 | local proj = vmath.dot(self.correction, normal) 130 | -- calculate the compensation we need to make for this contact point 131 | local comp = (distance - proj) * normal 132 | -- add it to the correction vector 133 | self.correction = self.correction + comp 134 | -- apply the compensation to the player character 135 | go.set_position(go.get_position() + comp) 136 | -- check if the normal points enough up to consider the player standing on the ground 137 | -- (0.7 is roughly equal to 45 degrees deviation from pure vertical direction) 138 | if normal.y > 0.7 then 139 | self.ground_contact = true 140 | end 141 | -- project the velocity onto the normal 142 | proj = vmath.dot(self.velocity, normal) 143 | -- if the projection is negative, it means that some of the velocity points towards the contact point 144 | if proj < 0 then 145 | -- remove that component in that case 146 | self.velocity = self.velocity - proj * normal 147 | end 148 | end 149 | 150 | function on_message(self, message_id, message, sender) 151 | -- check if we received a contact point message 152 | if message_id == msg_contact_point_response then 153 | -- check that the object is something we consider geometry 154 | if message.group == group_geometry then 155 | handle_geometry_contact(self, message.normal, message.distance) 156 | end 157 | end 158 | end 159 | 160 | local function jump(self) 161 | -- only allow jump from ground 162 | -- (extend this with a counter to do things like double-jumps) 163 | if self.ground_contact then 164 | -- set take-off speed 165 | self.velocity.y = jump_takeoff_speed 166 | -- play animation 167 | play_animation(self, anim_jump) 168 | end 169 | end 170 | 171 | local function abort_jump(self) 172 | -- cut the jump short if we are still going up 173 | if self.velocity.y > 0 then 174 | -- scale down the upwards speed 175 | self.velocity.y = self.velocity.y * 0.5 176 | end 177 | end 178 | 179 | function on_input(self, action_id, action) 180 | if action_id == input_left then 181 | self.move_input = -action.value 182 | self.direction = -1 183 | elseif action_id == input_right then 184 | self.move_input = action.value 185 | self.direction = 1 186 | elseif action_id == input_jump then 187 | if action.pressed then 188 | jump(self) 189 | elseif action.released then 190 | abort_jump(self) 191 | end 192 | elseif action_id == input_touch then 193 | -- move towards the touch-point 194 | local diff = action.x - go.get_position().x 195 | -- update direction 196 | if diff > 0 then 197 | self.direction = 1 198 | else 199 | self.direction = -1 200 | end 201 | -- only give input when far away (more than 10 pixels) 202 | if math.abs(diff) > 10 then 203 | -- slow down when less than 100 pixels away 204 | self.move_input = diff / 100 205 | -- clamp input to [-1,1] 206 | self.move_input = math.min(1, math.max(-1, self.move_input)) 207 | end 208 | if action.released then 209 | -- start timing the last release to see if we are about to jump 210 | self.touch_jump_timer = touch_jump_timeout 211 | elseif action.pressed then 212 | -- jump on double tap 213 | if self.touch_jump_timer > 0 then 214 | jump(self) 215 | end 216 | end 217 | end 218 | end 219 | -------------------------------------------------------------------------------- /hero/images/hero-fall_right_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_0.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_1.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_10.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_11.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_12.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_13.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_14.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_15.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_16.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_17.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_18.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_19.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_2.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_20.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_21.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_22.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_23.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_24.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_25.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_26.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_27.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_28.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_29.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_3.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_4.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_5.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_6.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_7.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_8.png -------------------------------------------------------------------------------- /hero/images/hero-fall_right_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-fall_right_9.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_0.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_1.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_10.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_11.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_12.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_13.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_14.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_15.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_16.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_17.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_18.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_19.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_2.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_20.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_21.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_22.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_23.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_24.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_25.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_26.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_27.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_28.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_29.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_3.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_30.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_31.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_32.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_33.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_34.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_35.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_36.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_4.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_5.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_6.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_7.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_8.png -------------------------------------------------------------------------------- /hero/images/hero-idle_right_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-idle_right_9.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_0.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_1.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_10.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_11.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_12.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_13.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_14.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_15.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_16.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_17.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_18.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_19.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_2.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_3.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_4.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_5.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_6.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_7.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_8.png -------------------------------------------------------------------------------- /hero/images/hero-jump_right_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-jump_right_9.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_0.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_1.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_10.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_11.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_12.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_13.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_14.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_15.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_16.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_17.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_18.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_19.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_2.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_3.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_4.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_5.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_6.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_7.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_8.png -------------------------------------------------------------------------------- /hero/images/hero-run_right_9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/hero/images/hero-run_right_9.png -------------------------------------------------------------------------------- /input/game.input_binding: -------------------------------------------------------------------------------- 1 | key_trigger { 2 | input: KEY_LEFT 3 | action: "left" 4 | } 5 | key_trigger { 6 | input: KEY_RIGHT 7 | action: "right" 8 | } 9 | key_trigger { 10 | input: KEY_SPACE 11 | action: "jump" 12 | } 13 | mouse_trigger { 14 | input: MOUSE_BUTTON_1 15 | action: "touch" 16 | } 17 | -------------------------------------------------------------------------------- /items/images/bubble.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/items/images/bubble.png -------------------------------------------------------------------------------- /items/images/bubble_magnet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/items/images/bubble_magnet.png -------------------------------------------------------------------------------- /items/images/bubble_rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/items/images/bubble_rocket.png -------------------------------------------------------------------------------- /items/images/coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/items/images/coin.png -------------------------------------------------------------------------------- /items/images/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/items/images/heart.png -------------------------------------------------------------------------------- /items/items.atlas: -------------------------------------------------------------------------------- 1 | images { 2 | image: "/items/images/bubble.png" 3 | } 4 | images { 5 | image: "/items/images/bubble_magnet.png" 6 | } 7 | images { 8 | image: "/items/images/bubble_rocket.png" 9 | } 10 | images { 11 | image: "/items/images/coin.png" 12 | } 13 | images { 14 | image: "/items/images/heart.png" 15 | } 16 | margin: 0 17 | extrude_borders: 0 18 | inner_padding: 0 19 | -------------------------------------------------------------------------------- /key/images/key_00.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_00.png -------------------------------------------------------------------------------- /key/images/key_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_01.png -------------------------------------------------------------------------------- /key/images/key_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_02.png -------------------------------------------------------------------------------- /key/images/key_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_03.png -------------------------------------------------------------------------------- /key/images/key_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_04.png -------------------------------------------------------------------------------- /key/images/key_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_05.png -------------------------------------------------------------------------------- /key/images/key_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_06.png -------------------------------------------------------------------------------- /key/images/key_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_07.png -------------------------------------------------------------------------------- /key/images/key_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_08.png -------------------------------------------------------------------------------- /key/images/key_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_09.png -------------------------------------------------------------------------------- /key/images/key_10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_10.png -------------------------------------------------------------------------------- /key/images/key_11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_11.png -------------------------------------------------------------------------------- /key/images/key_12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/key/images/key_12.png -------------------------------------------------------------------------------- /key/key.atlas: -------------------------------------------------------------------------------- 1 | images { 2 | image: "/key/images/key_00.png" 3 | } 4 | animations { 5 | id: "anim" 6 | images { 7 | image: "/key/images/key_01.png" 8 | } 9 | images { 10 | image: "/key/images/key_02.png" 11 | } 12 | images { 13 | image: "/key/images/key_03.png" 14 | } 15 | images { 16 | image: "/key/images/key_04.png" 17 | } 18 | images { 19 | image: "/key/images/key_05.png" 20 | } 21 | images { 22 | image: "/key/images/key_06.png" 23 | } 24 | images { 25 | image: "/key/images/key_07.png" 26 | } 27 | images { 28 | image: "/key/images/key_08.png" 29 | } 30 | images { 31 | image: "/key/images/key_09.png" 32 | } 33 | images { 34 | image: "/key/images/key_10.png" 35 | } 36 | images { 37 | image: "/key/images/key_11.png" 38 | } 39 | images { 40 | image: "/key/images/key_12.png" 41 | } 42 | playback: PLAYBACK_LOOP_FORWARD 43 | fps: 30 44 | flip_horizontal: 0 45 | flip_vertical: 0 46 | } 47 | margin: 0 48 | extrude_borders: 0 49 | inner_padding: 0 50 | -------------------------------------------------------------------------------- /key/key.go: -------------------------------------------------------------------------------- 1 | embedded_components { 2 | id: "sprite" 3 | type: "sprite" 4 | data: "tile_set: \"/key/key.atlas\"\n" 5 | "default_animation: \"key_00\"\n" 6 | "material: \"/builtins/materials/sprite.material\"\n" 7 | "blend_mode: BLEND_MODE_ALPHA\n" 8 | "" 9 | position { 10 | x: 0.0 11 | y: 0.0 12 | z: 0.0 13 | } 14 | rotation { 15 | x: 0.0 16 | y: 0.0 17 | z: 0.0 18 | w: 1.0 19 | } 20 | } 21 | embedded_components { 22 | id: "sprite1" 23 | type: "sprite" 24 | data: "tile_set: \"/key/key.atlas\"\n" 25 | "default_animation: \"anim\"\n" 26 | "material: \"/builtins/materials/sprite.material\"\n" 27 | "blend_mode: BLEND_MODE_ALPHA\n" 28 | "" 29 | position { 30 | x: 0.0 31 | y: 0.0 32 | z: 0.0 33 | } 34 | rotation { 35 | x: 0.0 36 | y: 0.0 37 | z: 0.0 38 | w: 1.0 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /level/background.atlas: -------------------------------------------------------------------------------- 1 | images { 2 | image: "/level/images/background.png" 3 | } 4 | images { 5 | image: "/level/images/trees_bg.png" 6 | } 7 | margin: 0 8 | extrude_borders: 0 9 | inner_padding: 0 10 | -------------------------------------------------------------------------------- /level/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/background.png -------------------------------------------------------------------------------- /level/images/ground01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/ground01.png -------------------------------------------------------------------------------- /level/images/ground02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/ground02.png -------------------------------------------------------------------------------- /level/images/ground03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/ground03.png -------------------------------------------------------------------------------- /level/images/rock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/rock.png -------------------------------------------------------------------------------- /level/images/rock_planks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/rock_planks.png -------------------------------------------------------------------------------- /level/images/sign_attention.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/sign_attention.png -------------------------------------------------------------------------------- /level/images/sign_direction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/sign_direction.png -------------------------------------------------------------------------------- /level/images/sign_plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/sign_plus.png -------------------------------------------------------------------------------- /level/images/trees_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/trees_bg.png -------------------------------------------------------------------------------- /level/images/vines01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/vines01.png -------------------------------------------------------------------------------- /level/images/vines02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/vines02.png -------------------------------------------------------------------------------- /level/images/vines03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/vines03.png -------------------------------------------------------------------------------- /level/images/wall01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/wall01.png -------------------------------------------------------------------------------- /level/images/wall02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/wall02.png -------------------------------------------------------------------------------- /level/images/wall03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/wall03.png -------------------------------------------------------------------------------- /level/images/wall04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/wall04.png -------------------------------------------------------------------------------- /level/images/wall05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/wall05.png -------------------------------------------------------------------------------- /level/images/wall06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/wall06.png -------------------------------------------------------------------------------- /level/images/wall_long.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/defold/tutorial-platformer/73b3a14e5194999275a4e3e53e951637c30f82d2/level/images/wall_long.png -------------------------------------------------------------------------------- /level/level.atlas: -------------------------------------------------------------------------------- 1 | images { 2 | image: "/level/images/ground01.png" 3 | } 4 | images { 5 | image: "/level/images/ground02.png" 6 | } 7 | images { 8 | image: "/level/images/ground03.png" 9 | } 10 | images { 11 | image: "/level/images/rock.png" 12 | } 13 | images { 14 | image: "/level/images/rock_planks.png" 15 | } 16 | images { 17 | image: "/level/images/sign_attention.png" 18 | } 19 | images { 20 | image: "/level/images/sign_direction.png" 21 | } 22 | images { 23 | image: "/level/images/sign_plus.png" 24 | } 25 | images { 26 | image: "/level/images/vines01.png" 27 | } 28 | images { 29 | image: "/level/images/vines02.png" 30 | } 31 | images { 32 | image: "/level/images/vines03.png" 33 | } 34 | images { 35 | image: "/level/images/wall01.png" 36 | } 37 | images { 38 | image: "/level/images/wall02.png" 39 | } 40 | images { 41 | image: "/level/images/wall03.png" 42 | } 43 | images { 44 | image: "/level/images/wall04.png" 45 | } 46 | images { 47 | image: "/level/images/wall05.png" 48 | } 49 | images { 50 | image: "/level/images/wall06.png" 51 | } 52 | animations { 53 | id: "wall_right" 54 | images { 55 | image: "/level/images/wall_long.png" 56 | } 57 | playback: PLAYBACK_ONCE_FORWARD 58 | fps: 30 59 | flip_horizontal: 0 60 | flip_vertical: 0 61 | } 62 | animations { 63 | id: "wall_left" 64 | images { 65 | image: "/level/images/wall_long.png" 66 | } 67 | playback: PLAYBACK_ONCE_FORWARD 68 | fps: 30 69 | flip_horizontal: 1 70 | flip_vertical: 0 71 | } 72 | margin: 0 73 | extrude_borders: 4 74 | inner_padding: 0 75 | -------------------------------------------------------------------------------- /level/level.collection: -------------------------------------------------------------------------------- 1 | name: "default" 2 | instances { 3 | id: "key" 4 | prototype: "/key/key.go" 5 | position { 6 | x: 853.62823 7 | y: 640.14197 8 | z: 0.05 9 | } 10 | rotation { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 1.0 15 | } 16 | scale3 { 17 | x: 0.6 18 | y: 0.6 19 | z: 1.0 20 | } 21 | } 22 | instances { 23 | id: "platform1" 24 | prototype: "/level/platform.go" 25 | position { 26 | x: 343.36282 27 | y: 206.24477 28 | z: 0.0 29 | } 30 | rotation { 31 | x: 0.0 32 | y: 0.0 33 | z: 0.0 34 | w: 1.0 35 | } 36 | scale3 { 37 | x: 0.6 38 | y: 0.6 39 | z: 1.0 40 | } 41 | } 42 | instances { 43 | id: "platform2" 44 | prototype: "/level/platform.go" 45 | position { 46 | x: 814.8116 47 | y: 337.551 48 | z: 0.0 49 | } 50 | rotation { 51 | x: 0.0 52 | y: 0.0 53 | z: 0.0 54 | w: 1.0 55 | } 56 | scale3 { 57 | x: 0.6 58 | y: 0.6 59 | z: 1.0 60 | } 61 | } 62 | instances { 63 | id: "platform_long" 64 | prototype: "/level/platform_long.go" 65 | position { 66 | x: 323.0316 67 | y: 543.63873 68 | z: 0.05 69 | } 70 | rotation { 71 | x: 0.0 72 | y: 0.0 73 | z: 0.0 74 | w: 1.0 75 | } 76 | scale3 { 77 | x: 0.6 78 | y: 0.6 79 | z: 1.0 80 | } 81 | } 82 | scale_along_z: 0 83 | embedded_instances { 84 | id: "background" 85 | data: "embedded_components {\n" 86 | " id: \"sprite\"\n" 87 | " type: \"sprite\"\n" 88 | " data: \"tile_set: \\\"/level/background.atlas\\\"\\n" 89 | "default_animation: \\\"background\\\"\\n" 90 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 91 | "blend_mode: BLEND_MODE_ALPHA\\n" 92 | "\"\n" 93 | " position {\n" 94 | " x: 0.0\n" 95 | " y: 0.0\n" 96 | " z: 0.0\n" 97 | " }\n" 98 | " rotation {\n" 99 | " x: 0.0\n" 100 | " y: 0.0\n" 101 | " z: 0.0\n" 102 | " w: 1.0\n" 103 | " }\n" 104 | "}\n" 105 | "" 106 | position { 107 | x: 512.162 108 | y: 408.1994 109 | z: -0.5 110 | } 111 | rotation { 112 | x: 0.0 113 | y: 0.0 114 | z: 0.0 115 | w: 1.0 116 | } 117 | scale3 { 118 | x: 1.1 119 | y: 1.1 120 | z: 1.0 121 | } 122 | } 123 | embedded_instances { 124 | id: "background_trees" 125 | data: "embedded_components {\n" 126 | " id: \"sprite1\"\n" 127 | " type: \"sprite\"\n" 128 | " data: \"tile_set: \\\"/level/background.atlas\\\"\\n" 129 | "default_animation: \\\"trees_bg\\\"\\n" 130 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 131 | "blend_mode: BLEND_MODE_ALPHA\\n" 132 | "\"\n" 133 | " position {\n" 134 | " x: 189.21692\n" 135 | " y: 9.010329\n" 136 | " z: 0.0\n" 137 | " }\n" 138 | " rotation {\n" 139 | " x: 0.0\n" 140 | " y: 0.0\n" 141 | " z: 0.0\n" 142 | " w: 1.0\n" 143 | " }\n" 144 | "}\n" 145 | "" 146 | position { 147 | x: 394.64157 148 | y: 563.9494 149 | z: -0.4 150 | } 151 | rotation { 152 | x: 0.0 153 | y: 0.0 154 | z: 0.0 155 | w: 1.0 156 | } 157 | scale3 { 158 | x: 0.8 159 | y: 0.8 160 | z: 1.0 161 | } 162 | } 163 | embedded_instances { 164 | id: "coin" 165 | data: "embedded_components {\n" 166 | " id: \"sprite\"\n" 167 | " type: \"sprite\"\n" 168 | " data: \"tile_set: \\\"/items/items.atlas\\\"\\n" 169 | "default_animation: \\\"coin\\\"\\n" 170 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 171 | "blend_mode: BLEND_MODE_ALPHA\\n" 172 | "\"\n" 173 | " position {\n" 174 | " x: 0.0\n" 175 | " y: 0.0\n" 176 | " z: 0.0\n" 177 | " }\n" 178 | " rotation {\n" 179 | " x: 0.0\n" 180 | " y: 0.0\n" 181 | " z: 0.0\n" 182 | " w: 1.0\n" 183 | " }\n" 184 | "}\n" 185 | "" 186 | position { 187 | x: 845.90625 188 | y: 425.32614 189 | z: 0.0 190 | } 191 | rotation { 192 | x: 0.0 193 | y: 0.0 194 | z: 0.0 195 | w: 1.0 196 | } 197 | scale3 { 198 | x: 0.6 199 | y: 0.6 200 | z: 1.0 201 | } 202 | } 203 | embedded_instances { 204 | id: "coin1" 205 | data: "embedded_components {\n" 206 | " id: \"sprite\"\n" 207 | " type: \"sprite\"\n" 208 | " data: \"tile_set: \\\"/items/items.atlas\\\"\\n" 209 | "default_animation: \\\"coin\\\"\\n" 210 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 211 | "blend_mode: BLEND_MODE_ALPHA\\n" 212 | "\"\n" 213 | " position {\n" 214 | " x: 0.0\n" 215 | " y: 0.0\n" 216 | " z: 0.0\n" 217 | " }\n" 218 | " rotation {\n" 219 | " x: 0.0\n" 220 | " y: 0.0\n" 221 | " z: 0.0\n" 222 | " w: 1.0\n" 223 | " }\n" 224 | "}\n" 225 | "" 226 | position { 227 | x: 720.0336 228 | y: 462.84586 229 | z: 0.0 230 | } 231 | rotation { 232 | x: 0.0 233 | y: 0.0 234 | z: 0.0 235 | w: 1.0 236 | } 237 | scale3 { 238 | x: 0.6 239 | y: 0.6 240 | z: 1.0 241 | } 242 | } 243 | embedded_instances { 244 | id: "coin2" 245 | data: "embedded_components {\n" 246 | " id: \"sprite\"\n" 247 | " type: \"sprite\"\n" 248 | " data: \"tile_set: \\\"/items/items.atlas\\\"\\n" 249 | "default_animation: \\\"coin\\\"\\n" 250 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 251 | "blend_mode: BLEND_MODE_ALPHA\\n" 252 | "\"\n" 253 | " position {\n" 254 | " x: 0.0\n" 255 | " y: 0.0\n" 256 | " z: 0.0\n" 257 | " }\n" 258 | " rotation {\n" 259 | " x: 0.0\n" 260 | " y: 0.0\n" 261 | " z: 0.0\n" 262 | " w: 1.0\n" 263 | " }\n" 264 | "}\n" 265 | "" 266 | position { 267 | x: 464.65744 268 | y: 355.12796 269 | z: 0.0 270 | } 271 | rotation { 272 | x: 0.0 273 | y: 0.0 274 | z: 0.0 275 | w: 1.0 276 | } 277 | scale3 { 278 | x: 0.6 279 | y: 0.6 280 | z: 1.0 281 | } 282 | } 283 | embedded_instances { 284 | id: "coin3" 285 | data: "embedded_components {\n" 286 | " id: \"sprite\"\n" 287 | " type: \"sprite\"\n" 288 | " data: \"tile_set: \\\"/items/items.atlas\\\"\\n" 289 | "default_animation: \\\"coin\\\"\\n" 290 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 291 | "blend_mode: BLEND_MODE_ALPHA\\n" 292 | "\"\n" 293 | " position {\n" 294 | " x: 0.0\n" 295 | " y: 0.0\n" 296 | " z: 0.0\n" 297 | " }\n" 298 | " rotation {\n" 299 | " x: 0.0\n" 300 | " y: 0.0\n" 301 | " z: 0.0\n" 302 | " w: 1.0\n" 303 | " }\n" 304 | "}\n" 305 | "" 306 | position { 307 | x: 569.9547 308 | y: 438.6396 309 | z: 0.0 310 | } 311 | rotation { 312 | x: 0.0 313 | y: 0.0 314 | z: 0.0 315 | w: 1.0 316 | } 317 | scale3 { 318 | x: 0.6 319 | y: 0.6 320 | z: 1.0 321 | } 322 | } 323 | embedded_instances { 324 | id: "colibri" 325 | data: "embedded_components {\n" 326 | " id: \"sprite\"\n" 327 | " type: \"sprite\"\n" 328 | " data: \"tile_set: \\\"/colibri/colibri.atlas\\\"\\n" 329 | "default_animation: \\\"anim\\\"\\n" 330 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 331 | "blend_mode: BLEND_MODE_ALPHA\\n" 332 | "\"\n" 333 | " position {\n" 334 | " x: 0.0\n" 335 | " y: 0.0\n" 336 | " z: 0.0\n" 337 | " }\n" 338 | " rotation {\n" 339 | " x: 0.0\n" 340 | " y: 0.0\n" 341 | " z: 0.0\n" 342 | " w: 1.0\n" 343 | " }\n" 344 | "}\n" 345 | "" 346 | position { 347 | x: 165.70995 348 | y: 378.1239 349 | z: 0.0 350 | } 351 | rotation { 352 | x: 0.0 353 | y: 0.0 354 | z: 0.0 355 | w: 1.0 356 | } 357 | scale3 { 358 | x: 0.6 359 | y: 0.6 360 | z: 1.0 361 | } 362 | } 363 | embedded_instances { 364 | id: "geometry_physics" 365 | data: "embedded_components {\n" 366 | " id: \"collisionobject\"\n" 367 | " type: \"collisionobject\"\n" 368 | " data: \"collision_shape: \\\"\\\"\\n" 369 | "type: COLLISION_OBJECT_TYPE_STATIC\\n" 370 | "mass: 0.0\\n" 371 | "friction: 0.1\\n" 372 | "restitution: 0.5\\n" 373 | "group: \\\"geometry\\\"\\n" 374 | "mask: \\\"hero\\\"\\n" 375 | "embedded_collision_shape {\\n" 376 | " shapes {\\n" 377 | " shape_type: TYPE_BOX\\n" 378 | " position {\\n" 379 | " x: -600.7627\\n" 380 | " y: 139.1458\\n" 381 | " z: 0.0\\n" 382 | " }\\n" 383 | " rotation {\\n" 384 | " x: 0.0\\n" 385 | " y: 0.0\\n" 386 | " z: 0.0\\n" 387 | " w: 1.0\\n" 388 | " }\\n" 389 | " index: 0\\n" 390 | " count: 3\\n" 391 | " }\\n" 392 | " shapes {\\n" 393 | " shape_type: TYPE_BOX\\n" 394 | " position {\\n" 395 | " x: -79.82029\\n" 396 | " y: -303.17407\\n" 397 | " z: 0.0\\n" 398 | " }\\n" 399 | " rotation {\\n" 400 | " x: 0.0\\n" 401 | " y: 0.0\\n" 402 | " z: 0.0\\n" 403 | " w: 1.0\\n" 404 | " }\\n" 405 | " index: 3\\n" 406 | " count: 3\\n" 407 | " }\\n" 408 | " shapes {\\n" 409 | " shape_type: TYPE_BOX\\n" 410 | " position {\\n" 411 | " x: 432.09137\\n" 412 | " y: 134.69673\\n" 413 | " z: 0.0\\n" 414 | " }\\n" 415 | " rotation {\\n" 416 | " x: 0.0\\n" 417 | " y: 0.0\\n" 418 | " z: 0.0\\n" 419 | " w: 1.0\\n" 420 | " }\\n" 421 | " index: 6\\n" 422 | " count: 3\\n" 423 | " }\\n" 424 | " shapes {\\n" 425 | " shape_type: TYPE_BOX\\n" 426 | " position {\\n" 427 | " x: -85.327286\\n" 428 | " y: 666.76404\\n" 429 | " z: 0.0\\n" 430 | " }\\n" 431 | " rotation {\\n" 432 | " x: 0.0\\n" 433 | " y: 0.0\\n" 434 | " z: 0.0\\n" 435 | " w: 1.0\\n" 436 | " }\\n" 437 | " index: 9\\n" 438 | " count: 3\\n" 439 | " }\\n" 440 | " data: 45.13268\\n" 441 | " data: 500.0\\n" 442 | " data: 10.0\\n" 443 | " data: 600.0\\n" 444 | " data: 40.419384\\n" 445 | " data: 10.0\\n" 446 | " data: 45.13268\\n" 447 | " data: 500.0\\n" 448 | " data: 10.0\\n" 449 | " data: 600.0\\n" 450 | " data: 40.419384\\n" 451 | " data: 10.0\\n" 452 | "}\\n" 453 | "linear_damping: 0.0\\n" 454 | "angular_damping: 0.0\\n" 455 | "locked_rotation: false\\n" 456 | "\"\n" 457 | " position {\n" 458 | " x: 0.0\n" 459 | " y: 0.0\n" 460 | " z: 0.0\n" 461 | " }\n" 462 | " rotation {\n" 463 | " x: 0.0\n" 464 | " y: 0.0\n" 465 | " z: 0.0\n" 466 | " w: 1.0\n" 467 | " }\n" 468 | "}\n" 469 | "" 470 | position { 471 | x: 592.5898 472 | y: 323.8885 473 | z: 0.0 474 | } 475 | rotation { 476 | x: 0.0 477 | y: 0.0 478 | z: 0.0 479 | w: 1.0 480 | } 481 | scale3 { 482 | x: 1.0 483 | y: 1.0 484 | z: 1.0 485 | } 486 | } 487 | embedded_instances { 488 | id: "ground" 489 | data: "embedded_components {\n" 490 | " id: \"sprite\"\n" 491 | " type: \"sprite\"\n" 492 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 493 | "default_animation: \\\"ground01\\\"\\n" 494 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 495 | "blend_mode: BLEND_MODE_ALPHA\\n" 496 | "\"\n" 497 | " position {\n" 498 | " x: 190.0\n" 499 | " y: 0.0\n" 500 | " z: 0.0\n" 501 | " }\n" 502 | " rotation {\n" 503 | " x: 0.0\n" 504 | " y: 0.0\n" 505 | " z: 0.0\n" 506 | " w: 1.0\n" 507 | " }\n" 508 | "}\n" 509 | "embedded_components {\n" 510 | " id: \"sprite1\"\n" 511 | " type: \"sprite\"\n" 512 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 513 | "default_animation: \\\"ground01\\\"\\n" 514 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 515 | "blend_mode: BLEND_MODE_ALPHA\\n" 516 | "\"\n" 517 | " position {\n" 518 | " x: -190.0\n" 519 | " y: 0.0\n" 520 | " z: 0.0\n" 521 | " }\n" 522 | " rotation {\n" 523 | " x: 0.0\n" 524 | " y: 0.0\n" 525 | " z: 0.0\n" 526 | " w: 1.0\n" 527 | " }\n" 528 | "}\n" 529 | "embedded_components {\n" 530 | " id: \"sprite2\"\n" 531 | " type: \"sprite\"\n" 532 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 533 | "default_animation: \\\"ground01\\\"\\n" 534 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 535 | "blend_mode: BLEND_MODE_ALPHA\\n" 536 | "\"\n" 537 | " position {\n" 538 | " x: 570.0\n" 539 | " y: 0.0\n" 540 | " z: 0.0\n" 541 | " }\n" 542 | " rotation {\n" 543 | " x: 0.0\n" 544 | " y: 0.0\n" 545 | " z: 0.0\n" 546 | " w: 1.0\n" 547 | " }\n" 548 | "}\n" 549 | "embedded_components {\n" 550 | " id: \"sprite3\"\n" 551 | " type: \"sprite\"\n" 552 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 553 | "default_animation: \\\"ground01\\\"\\n" 554 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 555 | "blend_mode: BLEND_MODE_ALPHA\\n" 556 | "\"\n" 557 | " position {\n" 558 | " x: -570.0\n" 559 | " y: 0.0\n" 560 | " z: 0.0\n" 561 | " }\n" 562 | " rotation {\n" 563 | " x: 0.0\n" 564 | " y: 0.0\n" 565 | " z: 0.0\n" 566 | " w: 1.0\n" 567 | " }\n" 568 | "}\n" 569 | "" 570 | position { 571 | x: 513.38544 572 | y: 53.463528 573 | z: 0.0 574 | } 575 | rotation { 576 | x: 0.0 577 | y: 0.0 578 | z: 0.0 579 | w: 1.0 580 | } 581 | scale3 { 582 | x: 0.6 583 | y: 0.6 584 | z: 1.0 585 | } 586 | } 587 | embedded_instances { 588 | id: "left_wall" 589 | data: "embedded_components {\n" 590 | " id: \"sprite\"\n" 591 | " type: \"sprite\"\n" 592 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 593 | "default_animation: \\\"wall_left\\\"\\n" 594 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 595 | "blend_mode: BLEND_MODE_ALPHA\\n" 596 | "\"\n" 597 | " position {\n" 598 | " x: 0.0\n" 599 | " y: -400.0\n" 600 | " z: 0.0\n" 601 | " }\n" 602 | " rotation {\n" 603 | " x: 0.0\n" 604 | " y: 0.0\n" 605 | " z: 0.0\n" 606 | " w: 1.0\n" 607 | " }\n" 608 | "}\n" 609 | "embedded_components {\n" 610 | " id: \"sprite1\"\n" 611 | " type: \"sprite\"\n" 612 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 613 | "default_animation: \\\"wall_left\\\"\\n" 614 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 615 | "blend_mode: BLEND_MODE_ALPHA\\n" 616 | "\"\n" 617 | " position {\n" 618 | " x: 0.0\n" 619 | " y: 399.0\n" 620 | " z: 0.0\n" 621 | " }\n" 622 | " rotation {\n" 623 | " x: 0.0\n" 624 | " y: 0.0\n" 625 | " z: 0.0\n" 626 | " w: 1.0\n" 627 | " }\n" 628 | "}\n" 629 | "" 630 | position { 631 | x: 20.0 632 | y: 460.62122 633 | z: 0.0 634 | } 635 | rotation { 636 | x: 0.0 637 | y: 0.0 638 | z: 0.0 639 | w: 1.0 640 | } 641 | scale3 { 642 | x: 0.6 643 | y: 0.6 644 | z: 1.0 645 | } 646 | } 647 | embedded_instances { 648 | id: "right_wall" 649 | data: "embedded_components {\n" 650 | " id: \"sprite\"\n" 651 | " type: \"sprite\"\n" 652 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 653 | "default_animation: \\\"wall_right\\\"\\n" 654 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 655 | "blend_mode: BLEND_MODE_ALPHA\\n" 656 | "\"\n" 657 | " position {\n" 658 | " x: 0.0\n" 659 | " y: 399.0\n" 660 | " z: 0.0\n" 661 | " }\n" 662 | " rotation {\n" 663 | " x: 0.0\n" 664 | " y: 0.0\n" 665 | " z: 0.0\n" 666 | " w: 1.0\n" 667 | " }\n" 668 | "}\n" 669 | "embedded_components {\n" 670 | " id: \"sprite1\"\n" 671 | " type: \"sprite\"\n" 672 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 673 | "default_animation: \\\"wall_right\\\"\\n" 674 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 675 | "blend_mode: BLEND_MODE_ALPHA\\n" 676 | "\"\n" 677 | " position {\n" 678 | " x: 0.0\n" 679 | " y: -400.0\n" 680 | " z: 0.0\n" 681 | " }\n" 682 | " rotation {\n" 683 | " x: 0.0\n" 684 | " y: 0.0\n" 685 | " z: 0.0\n" 686 | " w: 1.0\n" 687 | " }\n" 688 | "}\n" 689 | "" 690 | position { 691 | x: 1008.0924 692 | y: 464.76138 693 | z: 0.0 694 | } 695 | rotation { 696 | x: 0.0 697 | y: 0.0 698 | z: 0.0 699 | w: 1.0 700 | } 701 | scale3 { 702 | x: 0.6 703 | y: 0.6 704 | z: 1.0 705 | } 706 | } 707 | embedded_instances { 708 | id: "sign" 709 | data: "embedded_components {\n" 710 | " id: \"sprite\"\n" 711 | " type: \"sprite\"\n" 712 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 713 | "default_animation: \\\"sign_direction\\\"\\n" 714 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 715 | "blend_mode: BLEND_MODE_ALPHA\\n" 716 | "\"\n" 717 | " position {\n" 718 | " x: 0.0\n" 719 | " y: 0.0\n" 720 | " z: 0.0\n" 721 | " }\n" 722 | " rotation {\n" 723 | " x: 0.0\n" 724 | " y: 0.0\n" 725 | " z: 0.0\n" 726 | " w: 1.0\n" 727 | " }\n" 728 | "}\n" 729 | "embedded_components {\n" 730 | " id: \"sprite1\"\n" 731 | " type: \"sprite\"\n" 732 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 733 | "default_animation: \\\"sign_plus\\\"\\n" 734 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 735 | "blend_mode: BLEND_MODE_ALPHA\\n" 736 | "\"\n" 737 | " position {\n" 738 | " x: 0.0\n" 739 | " y: 0.0\n" 740 | " z: -0.1\n" 741 | " }\n" 742 | " rotation {\n" 743 | " x: 0.0\n" 744 | " y: 0.0\n" 745 | " z: 0.0\n" 746 | " w: 1.0\n" 747 | " }\n" 748 | "}\n" 749 | "" 750 | position { 751 | x: 582.95746 752 | y: 279.35168 753 | z: 0.0 754 | } 755 | rotation { 756 | x: 0.0 757 | y: 0.0 758 | z: -0.6961352 759 | w: 0.71791065 760 | } 761 | scale3 { 762 | x: 0.6 763 | y: 0.6 764 | z: 1.0 765 | } 766 | } 767 | embedded_instances { 768 | id: "vines" 769 | data: "embedded_components {\n" 770 | " id: \"sprite\"\n" 771 | " type: \"sprite\"\n" 772 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 773 | "default_animation: \\\"vines02\\\"\\n" 774 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 775 | "blend_mode: BLEND_MODE_ALPHA\\n" 776 | "\"\n" 777 | " position {\n" 778 | " x: 187.0\n" 779 | " y: 0.0\n" 780 | " z: 0.0\n" 781 | " }\n" 782 | " rotation {\n" 783 | " x: 0.0\n" 784 | " y: 0.0\n" 785 | " z: 0.0\n" 786 | " w: 1.0\n" 787 | " }\n" 788 | "}\n" 789 | "embedded_components {\n" 790 | " id: \"sprite1\"\n" 791 | " type: \"sprite\"\n" 792 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 793 | "default_animation: \\\"vines03\\\"\\n" 794 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 795 | "blend_mode: BLEND_MODE_ALPHA\\n" 796 | "\"\n" 797 | " position {\n" 798 | " x: -187.0\n" 799 | " y: 0.0\n" 800 | " z: 0.0\n" 801 | " }\n" 802 | " rotation {\n" 803 | " x: 0.0\n" 804 | " y: 0.0\n" 805 | " z: 0.0\n" 806 | " w: 1.0\n" 807 | " }\n" 808 | "}\n" 809 | "embedded_components {\n" 810 | " id: \"sprite2\"\n" 811 | " type: \"sprite\"\n" 812 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 813 | "default_animation: \\\"vines03\\\"\\n" 814 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 815 | "blend_mode: BLEND_MODE_ALPHA\\n" 816 | "\"\n" 817 | " position {\n" 818 | " x: 561.0\n" 819 | " y: 0.0\n" 820 | " z: 0.0\n" 821 | " }\n" 822 | " rotation {\n" 823 | " x: 0.0\n" 824 | " y: 0.0\n" 825 | " z: 0.0\n" 826 | " w: 1.0\n" 827 | " }\n" 828 | "}\n" 829 | "embedded_components {\n" 830 | " id: \"sprite3\"\n" 831 | " type: \"sprite\"\n" 832 | " data: \"tile_set: \\\"/level/level.atlas\\\"\\n" 833 | "default_animation: \\\"vines02\\\"\\n" 834 | "material: \\\"/builtins/materials/sprite.material\\\"\\n" 835 | "blend_mode: BLEND_MODE_ALPHA\\n" 836 | "\"\n" 837 | " position {\n" 838 | " x: -561.0\n" 839 | " y: 0.0\n" 840 | " z: 0.0\n" 841 | " }\n" 842 | " rotation {\n" 843 | " x: 0.0\n" 844 | " y: 0.0\n" 845 | " z: 0.0\n" 846 | " w: 1.0\n" 847 | " }\n" 848 | "}\n" 849 | "" 850 | position { 851 | x: 510.5536 852 | y: 784.0726 853 | z: 0.0 854 | } 855 | rotation { 856 | x: 0.0 857 | y: 0.0 858 | z: 0.0 859 | w: 1.0 860 | } 861 | scale3 { 862 | x: 0.6 863 | y: 0.6 864 | z: 1.0 865 | } 866 | } 867 | -------------------------------------------------------------------------------- /level/platform.go: -------------------------------------------------------------------------------- 1 | embedded_components { 2 | id: "collisionobject" 3 | type: "collisionobject" 4 | data: "collision_shape: \"\"\n" 5 | "type: COLLISION_OBJECT_TYPE_STATIC\n" 6 | "mass: 0.0\n" 7 | "friction: 0.1\n" 8 | "restitution: 0.5\n" 9 | "group: \"geometry\"\n" 10 | "mask: \"hero\"\n" 11 | "embedded_collision_shape {\n" 12 | " shapes {\n" 13 | " shape_type: TYPE_BOX\n" 14 | " position {\n" 15 | " x: -1.2413472\n" 16 | " y: -0.5386601\n" 17 | " z: 0.0\n" 18 | " }\n" 19 | " rotation {\n" 20 | " x: 0.0\n" 21 | " y: 0.0\n" 22 | " z: 0.0\n" 23 | " w: 1.0\n" 24 | " }\n" 25 | " index: 0\n" 26 | " count: 3\n" 27 | " }\n" 28 | " data: 174.40343\n" 29 | " data: 63.286747\n" 30 | " data: 10.0\n" 31 | "}\n" 32 | "linear_damping: 0.0\n" 33 | "angular_damping: 0.0\n" 34 | "locked_rotation: false\n" 35 | "" 36 | position { 37 | x: 0.0 38 | y: 0.0 39 | z: 0.0 40 | } 41 | rotation { 42 | x: 0.0 43 | y: 0.0 44 | z: 0.0 45 | w: 1.0 46 | } 47 | } 48 | embedded_components { 49 | id: "sprite" 50 | type: "sprite" 51 | data: "tile_set: \"/level/level.atlas\"\n" 52 | "default_animation: \"rock_planks\"\n" 53 | "material: \"/builtins/materials/sprite.material\"\n" 54 | "blend_mode: BLEND_MODE_ALPHA\n" 55 | "" 56 | position { 57 | x: 0.0 58 | y: 0.0 59 | z: 0.1 60 | } 61 | rotation { 62 | x: 0.0 63 | y: 0.0 64 | z: 0.0 65 | w: 1.0 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /level/platform_long.go: -------------------------------------------------------------------------------- 1 | embedded_components { 2 | id: "collisionobject" 3 | type: "collisionobject" 4 | data: "collision_shape: \"\"\n" 5 | "type: COLLISION_OBJECT_TYPE_STATIC\n" 6 | "mass: 0.0\n" 7 | "friction: 0.1\n" 8 | "restitution: 0.5\n" 9 | "group: \"geometry\"\n" 10 | "mask: \"hero\"\n" 11 | "embedded_collision_shape {\n" 12 | " shapes {\n" 13 | " shape_type: TYPE_BOX\n" 14 | " position {\n" 15 | " x: 8.646227\n" 16 | " y: -0.5386601\n" 17 | " z: 0.0\n" 18 | " }\n" 19 | " rotation {\n" 20 | " x: 0.0\n" 21 | " y: 0.0\n" 22 | " z: 0.0\n" 23 | " w: 1.0\n" 24 | " }\n" 25 | " index: 0\n" 26 | " count: 3\n" 27 | " }\n" 28 | " data: 363.91525\n" 29 | " data: 63.286747\n" 30 | " data: 10.0\n" 31 | "}\n" 32 | "linear_damping: 0.0\n" 33 | "angular_damping: 0.0\n" 34 | "locked_rotation: false\n" 35 | "" 36 | position { 37 | x: 0.0 38 | y: 0.0 39 | z: 0.0 40 | } 41 | rotation { 42 | x: 0.0 43 | y: 0.0 44 | z: 0.0 45 | w: 1.0 46 | } 47 | } 48 | embedded_components { 49 | id: "sprite" 50 | type: "sprite" 51 | data: "tile_set: \"/level/level.atlas\"\n" 52 | "default_animation: \"rock_planks\"\n" 53 | "material: \"/builtins/materials/sprite.material\"\n" 54 | "blend_mode: BLEND_MODE_ALPHA\n" 55 | "" 56 | position { 57 | x: -176.87991 58 | y: -0.6551108 59 | z: 0.1 60 | } 61 | rotation { 62 | x: 0.0 63 | y: 0.0 64 | z: 0.0 65 | w: 1.0 66 | } 67 | } 68 | embedded_components { 69 | id: "sprite1" 70 | type: "sprite" 71 | data: "tile_set: \"/level/level.atlas\"\n" 72 | "default_animation: \"rock_planks\"\n" 73 | "material: \"/builtins/materials/sprite.material\"\n" 74 | "blend_mode: BLEND_MODE_ALPHA\n" 75 | "" 76 | position { 77 | x: 203.08435 78 | y: -0.6551108 79 | z: 0.1 80 | } 81 | rotation { 82 | x: 0.0 83 | y: 0.0 84 | z: 0.0 85 | w: 1.0 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /main/main.collection: -------------------------------------------------------------------------------- 1 | name: "parallax" 2 | instances { 3 | id: "main" 4 | prototype: "/main/main.go" 5 | position { 6 | x: 0.0 7 | y: 0.0 8 | z: 0.0 9 | } 10 | rotation { 11 | x: 0.0 12 | y: 0.0 13 | z: 0.0 14 | w: 1.0 15 | } 16 | scale3 { 17 | x: 1.0 18 | y: 1.0 19 | z: 1.0 20 | } 21 | } 22 | instances { 23 | id: "player" 24 | prototype: "/hero/hero.go" 25 | position { 26 | x: 324.6498 27 | y: 97.761734 28 | z: 0.0 29 | } 30 | rotation { 31 | x: 0.0 32 | y: 0.0 33 | z: 0.0 34 | w: 1.0 35 | } 36 | scale3 { 37 | x: 1.0 38 | y: 1.0 39 | z: 1.0 40 | } 41 | } 42 | collection_instances { 43 | id: "level" 44 | collection: "/level/level.collection" 45 | position { 46 | x: 0.0 47 | y: 0.0 48 | z: 0.0 49 | } 50 | rotation { 51 | x: 0.0 52 | y: 0.0 53 | z: 0.0 54 | w: 1.0 55 | } 56 | scale3 { 57 | x: 1.0 58 | y: 1.0 59 | z: 1.0 60 | } 61 | } 62 | scale_along_z: 0 63 | -------------------------------------------------------------------------------- /main/main.go: -------------------------------------------------------------------------------- 1 | components { 2 | id: "script" 3 | component: "/main/main.script" 4 | position { 5 | x: 0.0 6 | y: 0.0 7 | z: 0.0 8 | } 9 | rotation { 10 | x: 0.0 11 | y: 0.0 12 | z: 0.0 13 | w: 1.0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /main/main.script: -------------------------------------------------------------------------------- 1 | function init(self) 2 | -- set blue background 3 | msg.post("@render:", "clear_color", { color = vmath.vector4(96 / 255, 148 / 255, 185 / 255, 0) } ) 4 | end 5 | --------------------------------------------------------------------------------