From 2fb80980b9730118bed489a93ef6ff6c1d7f5daf Mon Sep 17 00:00:00 2001 From: TestDotCom <25323975+TestDotCom@users.noreply.github.com> Date: Mon, 4 Mar 2019 12:12:33 +0100 Subject: [PATCH] 2d/physics_platformer works flawlessly on Godot 3.1 beta 8 (#312) * 2d/physics_platformer works flawlessly on Godot 3.1 beta 8 * fix warnings for inferred node type * every script has a class_name * formatted code for better clarity * each files has its own subfolder * bullet collisions and shooting have to be executed from call_deferred * PascalCase naming for nodes --- 2d/physics_platformer/Stage.tscn | 279 ++++++++++++++++ 2d/physics_platformer/Stage2.tscn | 35 ++ .../{tileset.tres => Tileset.tres} | 0 2d/physics_platformer/TilesetEdit.tscn | 159 +++++++++ 2d/physics_platformer/{ => audio}/music.ogg | Bin 2d/physics_platformer/audio/music.ogg.import | 15 + .../{ => audio}/sound_coin.wav | Bin .../audio/sound_coin.wav.import | 21 ++ .../{ => audio}/sound_explode.wav | Bin .../audio/sound_explode.wav.import | 21 ++ .../{ => audio}/sound_hit.wav | Bin .../audio/sound_hit.wav.import | 21 ++ .../{ => audio}/sound_jump.wav | Bin .../audio/sound_jump.wav.import | 21 ++ .../{ => audio}/sound_shoot.wav | Bin .../audio/sound_shoot.wav.import | 21 ++ .../background/ParallaxBg.tscn | 74 +++++ 2d/physics_platformer/background/Seesaw.tscn | 26 ++ .../{ => background}/plank.png | Bin .../{ => background}/plank.png.import | 14 +- .../{ => background}/plankpin.png | Bin .../{ => background}/plankpin.png.import | 14 +- .../{ => background}/scroll_bg_cloud_1.png | Bin .../scroll_bg_cloud_1.png.import | 14 +- .../{ => background}/scroll_bg_cloud_2.png | Bin .../scroll_bg_cloud_2.png.import | 14 +- .../{ => background}/scroll_bg_cloud_3.png | Bin .../scroll_bg_cloud_3.png.import | 14 +- .../{ => background}/scroll_bg_fg_1.png | Bin .../scroll_bg_fg_1.png.import | 14 +- .../{ => background}/scroll_bg_fg_2.png | Bin .../scroll_bg_fg_2.png.import | 14 +- .../{ => background}/scroll_bg_sky.png | Bin .../{ => background}/scroll_bg_sky.png.import | 14 +- 2d/physics_platformer/bullet.tscn | 173 ---------- 2d/physics_platformer/coin.gd | 18 - .../{coin.tscn => coin/Coin.tscn} | 132 ++------ 2d/physics_platformer/coin/coin.gd | 11 + 2d/physics_platformer/{ => coin}/coin.png | Bin .../{ => coin}/coin.png.import | 14 +- 2d/physics_platformer/enemy.tscn | 282 ---------------- 2d/physics_platformer/enemy/Enemy.tscn | 183 +++++++++++ 2d/physics_platformer/{ => enemy}/enemy.gd | 50 +-- 2d/physics_platformer/{ => enemy}/enemy.png | Bin .../{ => enemy}/enemy.png.import | 14 +- 2d/physics_platformer/icon.png.import | 8 +- 2d/physics_platformer/moving_platform.tscn | 42 --- 2d/physics_platformer/music.ogg.import | 18 - 2d/physics_platformer/one_way_platform.tscn | 30 -- 2d/physics_platformer/osb_right.png.import | 32 -- 2d/physics_platformer/parallax_bg.tscn | 103 ------ .../platform/MovingPlatform.tscn | 17 + .../platform/OneWayPlatform.tscn | 17 + .../{ => platform}/moving_platform.gd | 7 +- .../{ => platform}/moving_platform.png | Bin .../{ => platform}/moving_platform.png.import | 14 +- .../{ => platform}/one_way_platform.png | Bin .../one_way_platform.png.import | 14 +- 2d/physics_platformer/player/Bullet.tscn | 86 +++++ .../{player.tscn => player/Player.tscn} | 280 +++++----------- 2d/physics_platformer/{ => player}/bullet.gd | 14 +- 2d/physics_platformer/{ => player}/bullet.png | Bin .../{ => player}/bullet.png.import | 14 +- .../{ => player}/osb_fire.png | Bin .../osb_fire.png.import} | 14 +- .../{ => player}/osb_jump.png | Bin .../{ => player}/osb_jump.png.import | 14 +- .../{ => player}/osb_left.png | Bin .../player/osb_left.png.import | 34 ++ .../{ => player}/osb_right.png | Bin .../osb_right.png.import} | 14 +- 2d/physics_platformer/{ => player}/player.gd | 127 ++++---- .../{ => player}/robot_demo.png | Bin .../{ => player}/robot_demo.png.import | 14 +- 2d/physics_platformer/project.godot | 81 ++++- 2d/physics_platformer/seesaw.tscn | 55 ---- 2d/physics_platformer/sound_coin.wav.import | 24 -- .../sound_explode.wav.import | 24 -- 2d/physics_platformer/sound_hit.wav.import | 24 -- 2d/physics_platformer/sound_jump.wav.import | 24 -- 2d/physics_platformer/sound_shoot.wav.import | 24 -- 2d/physics_platformer/stage.tscn | 306 ----------------- 2d/physics_platformer/stage2.tscn | 57 ---- 2d/physics_platformer/tiles_demo.png.import | 8 +- 2d/physics_platformer/tileset_edit.tscn | 308 ------------------ 85 files changed, 1466 insertions(+), 2064 deletions(-) create mode 100644 2d/physics_platformer/Stage.tscn create mode 100644 2d/physics_platformer/Stage2.tscn rename 2d/physics_platformer/{tileset.tres => Tileset.tres} (100%) create mode 100644 2d/physics_platformer/TilesetEdit.tscn rename 2d/physics_platformer/{ => audio}/music.ogg (100%) create mode 100644 2d/physics_platformer/audio/music.ogg.import rename 2d/physics_platformer/{ => audio}/sound_coin.wav (100%) create mode 100644 2d/physics_platformer/audio/sound_coin.wav.import rename 2d/physics_platformer/{ => audio}/sound_explode.wav (100%) create mode 100644 2d/physics_platformer/audio/sound_explode.wav.import rename 2d/physics_platformer/{ => audio}/sound_hit.wav (100%) create mode 100644 2d/physics_platformer/audio/sound_hit.wav.import rename 2d/physics_platformer/{ => audio}/sound_jump.wav (100%) create mode 100644 2d/physics_platformer/audio/sound_jump.wav.import rename 2d/physics_platformer/{ => audio}/sound_shoot.wav (100%) create mode 100644 2d/physics_platformer/audio/sound_shoot.wav.import create mode 100644 2d/physics_platformer/background/ParallaxBg.tscn create mode 100644 2d/physics_platformer/background/Seesaw.tscn rename 2d/physics_platformer/{ => background}/plank.png (100%) rename 2d/physics_platformer/{ => background}/plank.png.import (59%) rename 2d/physics_platformer/{ => background}/plankpin.png (100%) rename 2d/physics_platformer/{ => background}/plankpin.png.import (58%) rename 2d/physics_platformer/{ => background}/scroll_bg_cloud_1.png (100%) rename 2d/physics_platformer/{ => background}/scroll_bg_cloud_1.png.import (55%) rename 2d/physics_platformer/{ => background}/scroll_bg_cloud_2.png (100%) rename 2d/physics_platformer/{ => background}/scroll_bg_cloud_2.png.import (55%) rename 2d/physics_platformer/{ => background}/scroll_bg_cloud_3.png (100%) rename 2d/physics_platformer/{ => background}/scroll_bg_cloud_3.png.import (55%) rename 2d/physics_platformer/{ => background}/scroll_bg_fg_1.png (100%) rename 2d/physics_platformer/{ => background}/scroll_bg_fg_1.png.import (56%) rename 2d/physics_platformer/{ => background}/scroll_bg_fg_2.png (100%) rename 2d/physics_platformer/{ => background}/scroll_bg_fg_2.png.import (56%) rename 2d/physics_platformer/{ => background}/scroll_bg_sky.png (100%) rename 2d/physics_platformer/{ => background}/scroll_bg_sky.png.import (56%) delete mode 100644 2d/physics_platformer/bullet.tscn delete mode 100644 2d/physics_platformer/coin.gd rename 2d/physics_platformer/{coin.tscn => coin/Coin.tscn} (51%) create mode 100644 2d/physics_platformer/coin/coin.gd rename 2d/physics_platformer/{ => coin}/coin.png (100%) rename 2d/physics_platformer/{ => coin}/coin.png.import (59%) delete mode 100644 2d/physics_platformer/enemy.tscn create mode 100644 2d/physics_platformer/enemy/Enemy.tscn rename 2d/physics_platformer/{ => enemy}/enemy.gd (59%) rename 2d/physics_platformer/{ => enemy}/enemy.png (100%) rename 2d/physics_platformer/{ => enemy}/enemy.png.import (59%) delete mode 100644 2d/physics_platformer/moving_platform.tscn delete mode 100644 2d/physics_platformer/music.ogg.import delete mode 100644 2d/physics_platformer/one_way_platform.tscn delete mode 100644 2d/physics_platformer/osb_right.png.import delete mode 100644 2d/physics_platformer/parallax_bg.tscn create mode 100644 2d/physics_platformer/platform/MovingPlatform.tscn create mode 100644 2d/physics_platformer/platform/OneWayPlatform.tscn rename 2d/physics_platformer/{ => platform}/moving_platform.gd (78%) rename 2d/physics_platformer/{ => platform}/moving_platform.png (100%) rename 2d/physics_platformer/{ => platform}/moving_platform.png.import (56%) rename 2d/physics_platformer/{ => platform}/one_way_platform.png (100%) rename 2d/physics_platformer/{ => platform}/one_way_platform.png.import (55%) create mode 100644 2d/physics_platformer/player/Bullet.tscn rename 2d/physics_platformer/{player.tscn => player/Player.tscn} (50%) rename 2d/physics_platformer/{ => player}/bullet.gd (52%) rename 2d/physics_platformer/{ => player}/bullet.png (100%) rename 2d/physics_platformer/{ => player}/bullet.png.import (59%) rename 2d/physics_platformer/{ => player}/osb_fire.png (100%) rename 2d/physics_platformer/{osb_left.png.import => player/osb_fire.png.import} (59%) rename 2d/physics_platformer/{ => player}/osb_jump.png (100%) rename 2d/physics_platformer/{ => player}/osb_jump.png.import (57%) rename 2d/physics_platformer/{ => player}/osb_left.png (100%) create mode 100644 2d/physics_platformer/player/osb_left.png.import rename 2d/physics_platformer/{ => player}/osb_right.png (100%) rename 2d/physics_platformer/{osb_fire.png.import => player/osb_right.png.import} (57%) rename 2d/physics_platformer/{ => player}/player.gd (63%) rename 2d/physics_platformer/{ => player}/robot_demo.png (100%) rename 2d/physics_platformer/{ => player}/robot_demo.png.import (57%) delete mode 100644 2d/physics_platformer/seesaw.tscn delete mode 100644 2d/physics_platformer/sound_coin.wav.import delete mode 100644 2d/physics_platformer/sound_explode.wav.import delete mode 100644 2d/physics_platformer/sound_hit.wav.import delete mode 100644 2d/physics_platformer/sound_jump.wav.import delete mode 100644 2d/physics_platformer/sound_shoot.wav.import delete mode 100644 2d/physics_platformer/stage.tscn delete mode 100644 2d/physics_platformer/stage2.tscn delete mode 100644 2d/physics_platformer/tileset_edit.tscn diff --git a/2d/physics_platformer/Stage.tscn b/2d/physics_platformer/Stage.tscn new file mode 100644 index 00000000..7502717e --- /dev/null +++ b/2d/physics_platformer/Stage.tscn @@ -0,0 +1,279 @@ +[gd_scene load_steps=21 format=2] + +[ext_resource path="res://Tileset.tres" type="TileSet" id=1] +[ext_resource path="res://coin/Coin.tscn" type="PackedScene" id=2] +[ext_resource path="res://platform/MovingPlatform.tscn" type="PackedScene" id=3] +[ext_resource path="res://background/Seesaw.tscn" type="PackedScene" id=4] +[ext_resource path="res://platform/OneWayPlatform.tscn" type="PackedScene" id=5] +[ext_resource path="res://player/Player.tscn" type="PackedScene" id=6] +[ext_resource path="res://enemy/Enemy.tscn" type="PackedScene" id=7] +[ext_resource path="res://background/ParallaxBg.tscn" type="PackedScene" id=8] + + + + + + + + + +[sub_resource type="PhysicsMaterial" id=1] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=2] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=3] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=4] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=5] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=6] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=7] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=8] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=9] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=10] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=11] +friction = 0.0 + +[sub_resource type="PhysicsMaterial" id=12] +friction = 0.0 + +[node name="Stage" type="Node"] + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +cell_quadrant_size = 8 +format = 1 +tile_data = PoolIntArray( 0, 2, 0, 70, 536870914, 0, 71, 10, 0, 72, 10, 0, 73, 10, 0, 74, 10, 0, 75, 10, 0, 76, 10, 0, 77, 10, 0, 78, 10, 0, 65536, 2, 0, 65606, 536870914, 0, 65607, 10, 0, 65608, 10, 0, 65609, 10, 0, 65610, 10, 0, 65611, 10, 0, 65612, 10, 0, 65613, 10, 0, 65614, 10, 0, 131072, 2, 0, 131142, 536870914, 0, 131143, 10, 0, 131144, 10, 0, 131145, 10, 0, 131146, 10, 0, 131147, 10, 0, 131148, 10, 0, 131149, 10, 0, 131150, 10, 0, 196608, 2, 0, 196626, 9, 0, 196678, 536870914, 0, 196679, 10, 0, 196680, 10, 0, 196681, 10, 0, 196682, 10, 0, 196683, 10, 0, 196684, 10, 0, 196685, 10, 0, 196686, 10, 0, 262144, 2, 0, 262162, 8, 0, 262214, 536870914, 0, 262215, 10, 0, 262216, 10, 0, 262217, 10, 0, 262218, 10, 0, 262219, 10, 0, 262220, 10, 0, 262221, 10, 0, 262222, 10, 0, 327680, 2, 0, 327697, 536870921, 0, 327698, 7, 0, 327733, 9, 0, 327750, 536870914, 0, 327751, 10, 0, 327752, 10, 0, 327753, 10, 0, 327754, 10, 0, 327755, 10, 0, 327756, 10, 0, 327757, 10, 0, 327758, 10, 0, 393216, 2, 0, 393233, 536870920, 0, 393234, 7, 0, 393257, 9, 0, 393269, 7, 0, 393286, 536870914, 0, 393287, 10, 0, 393288, 10, 0, 393289, 10, 0, 393290, 10, 0, 393291, 10, 0, 393292, 10, 0, 393293, 10, 0, 393294, 10, 0, 458752, 2, 0, 458769, 7, 0, 458770, 8, 0, 458790, 9, 0, 458793, 8, 0, 458805, 8, 0, 458822, 536870914, 0, 458823, 10, 0, 458824, 10, 0, 458825, 10, 0, 458826, 10, 0, 458827, 10, 0, 458828, 10, 0, 458829, 10, 0, 458830, 10, 0, 524288, 4, 0, 524289, 1, 0, 524304, 536870913, 0, 524305, 536870918, 0, 524306, 6, 0, 524307, 5, 0, 524308, 1, 0, 524326, 8, 0, 524329, 7, 0, 524341, 7, 0, 524358, 536870914, 0, 524359, 10, 0, 524360, 10, 0, 524361, 10, 0, 524362, 10, 0, 524363, 10, 0, 524364, 10, 0, 524365, 10, 0, 524366, 10, 0, 589824, 10, 0, 589825, 13, 0, 589840, 536870914, 0, 589841, 10, 0, 589842, 10, 0, 589843, 10, 0, 589844, 2, 0, 589862, 7, 0, 589865, 7, 0, 589876, 536870913, 0, 589877, 6, 0, 589878, 1, 0, 589894, 536870914, 0, 589895, 10, 0, 589896, 10, 0, 589897, 10, 0, 589898, 10, 0, 589899, 10, 0, 589900, 10, 0, 589901, 10, 0, 589902, 10, 0, 655360, 2, 0, 655376, 536870914, 0, 655377, 10, 0, 655378, 10, 0, 655379, 10, 0, 655380, 2, 0, 655398, 7, 0, 655401, 8, 0, 655412, 536870925, 0, 655413, 11, 0, 655414, 13, 0, 655430, 536870914, 0, 655431, 10, 0, 655432, 10, 0, 655433, 10, 0, 655434, 10, 0, 655435, 10, 0, 655436, 10, 0, 655437, 10, 0, 655438, 10, 0, 720896, 2, 0, 720912, 536870914, 0, 720913, 10, 0, 720914, 10, 0, 720915, 10, 0, 720916, 2, 0, 720934, 8, 0, 720937, 7, 0, 720958, 536870913, 0, 720959, 5, 0, 720960, 536870917, 0, 720961, 5, 0, 720962, 5, 0, 720963, 536870917, 0, 720964, 5, 0, 720965, 0, 0, 720966, 536870916, 0, 720967, 10, 0, 720968, 10, 0, 720969, 10, 0, 720970, 10, 0, 720971, 10, 0, 720972, 10, 0, 720973, 10, 0, 720974, 10, 0, 786432, 2, 0, 786437, 9, 0, 786448, 536870914, 0, 786449, 10, 0, 786450, 10, 0, 786451, 10, 0, 786452, 2, 0, 786464, 536870913, 0, 786465, 1, 0, 786470, 7, 0, 786473, 7, 0, 786474, 536870924, 0, 786475, 1, 0, 786494, 536870914, 0, 786495, 10, 0, 786496, 10, 0, 786497, 10, 0, 786498, 10, 0, 786499, 10, 0, 786500, 10, 0, 786501, 10, 0, 786502, 10, 0, 786503, 10, 0, 786504, 10, 0, 786505, 10, 0, 786506, 10, 0, 786507, 10, 0, 786508, 10, 0, 786509, 10, 0, 851968, 2, 0, 851973, 7, 0, 851984, 536870914, 0, 851985, 10, 0, 851986, 10, 0, 851987, 10, 0, 851988, 2, 0, 851996, 536870913, 0, 851997, 1, 0, 852000, 536870914, 0, 852001, 3, 0, 852006, 7, 0, 852009, 536870913, 0, 852011, 2, 0, 852030, 536870914, 0, 852031, 10, 0, 852032, 10, 0, 852033, 10, 0, 852034, 10, 0, 852035, 10, 0, 852036, 10, 0, 852037, 10, 0, 852038, 10, 0, 852039, 10, 0, 852040, 10, 0, 852041, 10, 0, 852042, 10, 0, 852043, 10, 0, 852044, 10, 0, 852045, 10, 0, 917504, 2, 0, 917506, 9, 0, 917509, 7, 0, 917512, 536870921, 0, 917520, 536870925, 0, 917521, 11, 0, 917522, 11, 0, 917523, 11, 0, 917524, 13, 0, 917532, 536870925, 0, 917533, 13, 0, 917536, 536870914, 0, 917537, 4, 0, 917538, 1, 0, 917540, 536870913, 0, 917541, 0, 0, 917542, 1, 0, 917545, 536870914, 0, 917546, 10, 0, 917547, 4, 0, 917548, 1, 0, 917566, 536870914, 0, 917567, 10, 0, 917568, 10, 0, 917569, 10, 0, 917570, 10, 0, 917571, 10, 0, 917572, 10, 0, 917573, 10, 0, 917574, 10, 0, 917575, 10, 0, 917576, 10, 0, 917577, 10, 0, 917578, 10, 0, 917579, 10, 0, 917580, 10, 0, 917581, 10, 0, 983040, 2, 0, 983042, 7, 0, 983045, 7, 0, 983048, 536870920, 0, 983050, 536870913, 0, 983051, 0, 0, 983052, 1, 0, 983064, 536870913, 0, 983065, 1, 0, 983072, 536870914, 0, 983073, 10, 0, 983074, 4, 0, 983075, 0, 0, 983076, 536870916, 0, 983077, 10, 0, 983078, 4, 0, 983079, 536870912, 0, 983080, 536870912, 0, 983081, 536870916, 0, 983082, 10, 0, 983083, 10, 0, 983084, 2, 0, 983095, 9, 0, 983102, 536870914, 0, 983103, 10, 0, 983104, 10, 0, 983105, 10, 0, 983106, 10, 0, 983107, 10, 0, 983108, 10, 0, 983109, 10, 0, 983110, 10, 0, 983111, 10, 0, 983112, 10, 0, 983113, 10, 0, 983114, 10, 0, 983115, 10, 0, 983116, 10, 0, 983117, 10, 0, 1048576, 2, 0, 1048578, 8, 0, 1048581, 8, 0, 1048584, 536870919, 0, 1048586, 536870914, 0, 1048587, 536870922, 0, 1048588, 2, 0, 1048600, 536870925, 0, 1048601, 13, 0, 1048604, 9, 0, 1048608, 536870925, 0, 1048609, 536870923, 0, 1048610, 536870923, 0, 1048611, 536870923, 0, 1048612, 10, 0, 1048613, 10, 0, 1048614, 10, 0, 1048615, 10, 0, 1048616, 10, 0, 1048617, 10, 0, 1048618, 10, 0, 1048619, 10, 0, 1048620, 4, 0, 1048621, 1, 0, 1048630, 536870921, 0, 1048631, 8, 0, 1048638, 536870914, 0, 1048639, 10, 0, 1048640, 10, 0, 1048641, 10, 0, 1048642, 10, 0, 1048643, 10, 0, 1048644, 10, 0, 1048645, 10, 0, 1048646, 10, 0, 1048647, 10, 0, 1048648, 10, 0, 1048649, 10, 0, 1048650, 10, 0, 1048651, 10, 0, 1048652, 10, 0, 1048653, 10, 0, 1114112, 4, 0, 1114113, 0, 0, 1114114, 6, 0, 1114115, 0, 0, 1114116, 0, 0, 1114117, 6, 0, 1114118, 1, 0, 1114120, 536870920, 0, 1114122, 536870925, 0, 1114123, 11, 0, 1114124, 13, 0, 1114128, 536870913, 0, 1114129, 5, 0, 1114130, 536870917, 0, 1114131, 5, 0, 1114132, 0, 0, 1114133, 1, 0, 1114140, 7, 0, 1114141, 536870921, 0, 1114148, 536870914, 0, 1114149, 10, 0, 1114150, 10, 0, 1114151, 10, 0, 1114152, 10, 0, 1114153, 10, 0, 1114154, 10, 0, 1114155, 10, 0, 1114156, 10, 0, 1114157, 2, 0, 1114166, 536870920, 0, 1114167, 8, 0, 1114174, 536870914, 0, 1114175, 10, 0, 1114176, 10, 0, 1114177, 10, 0, 1114178, 10, 0, 1114179, 10, 0, 1114180, 10, 0, 1114181, 10, 0, 1114182, 10, 0, 1114183, 10, 0, 1114184, 10, 0, 1114185, 10, 0, 1114186, 10, 0, 1114187, 10, 0, 1114188, 10, 0, 1179648, 10, 0, 1179649, 10, 0, 1179650, 10, 0, 1179651, 10, 0, 1179652, 10, 0, 1179653, 10, 0, 1179654, 2, 0, 1179656, 536870919, 0, 1179664, 536870915, 0, 1179665, 10, 0, 1179666, 10, 0, 1179667, 10, 0, 1179668, 10, 0, 1179669, 4, 0, 1179670, 12, 0, 1179675, 9, 0, 1179676, 8, 0, 1179677, 8, 0, 1179684, 536870914, 0, 1179685, 10, 0, 1179686, 10, 0, 1179687, 10, 0, 1179688, 10, 0, 1179689, 10, 0, 1179690, 10, 0, 1179691, 10, 0, 1179692, 10, 0, 1179693, 4, 0, 1179694, 1, 0, 1179701, 9, 0, 1179702, 536870919, 0, 1179703, 7, 0, 1179710, 536870914, 0, 1179711, 10, 0, 1179712, 10, 0, 1179713, 10, 0, 1179714, 10, 0, 1179715, 10, 0, 1179716, 10, 0, 1179717, 10, 0, 1179718, 10, 0, 1179719, 10, 0, 1179720, 10, 0, 1179721, 10, 0, 1179722, 10, 0, 1245184, 10, 0, 1245185, 10, 0, 1245186, 10, 0, 1245187, 10, 0, 1245188, 10, 0, 1245189, 10, 0, 1245190, 2, 0, 1245192, 536870919, 0, 1245199, 536870913, 0, 1245200, 536870916, 0, 1245201, 10, 0, 1245202, 10, 0, 1245203, 10, 0, 1245204, 10, 0, 1245205, 10, 0, 1245207, 1, 0, 1245211, 7, 0, 1245212, 7, 0, 1245213, 536870920, 0, 1245220, 536870914, 0, 1245221, 10, 0, 1245222, 10, 0, 1245223, 10, 0, 1245224, 10, 0, 1245225, 10, 0, 1245226, 10, 0, 1245227, 10, 0, 1245228, 10, 0, 1245229, 10, 0, 1245230, 2, 0, 1245237, 8, 0, 1245238, 536870919, 0, 1245239, 8, 0, 1245240, 536870921, 0, 1245246, 536870914, 0, 1245247, 10, 0, 1245248, 10, 0, 1245249, 10, 0, 1245250, 10, 0, 1245251, 10, 0, 1245252, 10, 0, 1245253, 10, 0, 1245254, 10, 0, 1245255, 10, 0, 1245256, 10, 0, 1245257, 10, 0, 1245258, 10, 0, 1310720, 10, 0, 1310721, 10, 0, 1310722, 10, 0, 1310723, 10, 0, 1310724, 10, 0, 1310725, 10, 0, 1310726, 2, 0, 1310728, 536870920, 0, 1310730, 536870913, 0, 1310731, 1, 0, 1310734, 536870913, 0, 1310735, 536870916, 0, 1310736, 10, 0, 1310737, 10, 0, 1310738, 10, 0, 1310739, 10, 0, 1310740, 10, 0, 1310741, 10, 0, 1310742, 10, 0, 1310743, 4, 0, 1310744, 1, 0, 1310747, 8, 0, 1310748, 7, 0, 1310749, 536870919, 0, 1310756, 536870914, 0, 1310757, 10, 0, 1310758, 10, 0, 1310759, 10, 0, 1310760, 10, 0, 1310761, 10, 0, 1310762, 10, 0, 1310763, 10, 0, 1310764, 10, 0, 1310765, 10, 0, 1310766, 4, 0, 1310767, 5, 0, 1310768, 12, 0, 1310773, 7, 0, 1310774, 536870919, 0, 1310775, 7, 0, 1310776, 536870919, 0, 1310782, 536870914, 0, 1310783, 10, 0, 1310784, 10, 0, 1310785, 10, 0, 1310786, 10, 0, 1310787, 10, 0, 1310788, 10, 0, 1310789, 10, 0, 1310790, 10, 0, 1310791, 10, 0, 1310792, 10, 0, 1310793, 10, 0, 1376256, 10, 0, 1376257, 10, 0, 1376258, 10, 0, 1376259, 10, 0, 1376260, 10, 0, 1376261, 10, 0, 1376262, 4, 0, 1376263, 0, 0, 1376264, 0, 0, 1376265, 0, 0, 1376266, 536870916, 0, 1376267, 4, 0, 1376268, 0, 0, 1376269, 0, 0, 1376270, 536870916, 0, 1376271, 10, 0, 1376272, 10, 0, 1376273, 10, 0, 1376274, 10, 0, 1376275, 10, 0, 1376276, 10, 0, 1376277, 10, 0, 1376278, 10, 0, 1376279, 10, 0, 1376280, 4, 0, 1376281, 12, 0, 1376283, 8, 0, 1376284, 8, 0, 1376285, 536870920, 0, 1376287, 536870924, 0, 1376288, 0, 0, 1376289, 5, 0, 1376290, 536870917, 0, 1376291, 0, 0, 1376292, 536870916, 0, 1376293, 10, 0, 1376294, 10, 0, 1376295, 10, 0, 1376296, 10, 0, 1376297, 10, 0, 1376298, 10, 0, 1376299, 10, 0, 1376300, 10, 0, 1376301, 10, 0, 1376302, 10, 0, 1376303, 10, 0, 1376305, 12, 0, 1376309, 7, 0, 1376310, 536870920, 0, 1376311, 7, 0, 1376312, 536870920, 0, 1376318, 536870914, 0, 1376319, 10, 0, 1376320, 10, 0, 1376321, 10, 0, 1376322, 10, 0, 1376323, 10, 0, 1376324, 10, 0, 1376325, 10, 0, 1376326, 10, 0, 1376327, 10, 0, 1376328, 10, 0, 1441792, 10, 0, 1441793, 10, 0, 1441794, 10, 0, 1441795, 10, 0, 1441796, 10, 0, 1441797, 10, 0, 1441798, 10, 0, 1441799, 10, 0, 1441800, 10, 0, 1441801, 10, 0, 1441802, 10, 0, 1441803, 10, 0, 1441804, 10, 0, 1441805, 10, 0, 1441806, 10, 0, 1441807, 10, 0, 1441808, 10, 0, 1441809, 10, 0, 1441810, 10, 0, 1441811, 10, 0, 1441812, 10, 0, 1441813, 10, 0, 1441814, 10, 0, 1441815, 10, 0, 1441816, 10, 0, 1441818, 0, 0, 1441819, 6, 0, 1441820, 6, 0, 1441821, 536870918, 0, 1441822, 5, 0, 1441824, 10, 0, 1441825, 10, 0, 1441826, 10, 0, 1441827, 10, 0, 1441828, 10, 0, 1441829, 10, 0, 1441830, 10, 0, 1441831, 10, 0, 1441832, 10, 0, 1441833, 10, 0, 1441834, 10, 0, 1441835, 10, 0, 1441836, 10, 0, 1441837, 10, 0, 1441838, 10, 0, 1441839, 10, 0, 1441840, 10, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 1441845, 6, 0, 1441846, 536870918, 0, 1441847, 6, 0, 1441848, 536870918, 0, 1441849, 0, 0, 1441850, 5, 0, 1441851, 536870917, 0, 1441852, 5, 0, 1441853, 0, 0, 1441854, 536870916, 0, 1441855, 10, 0, 1441856, 10, 0, 1441857, 10, 0, 1441858, 10, 0, 1441859, 10, 0, 1441860, 10, 0, 1441861, 10, 0, 1441862, 10, 0, 1441863, 10, 0, 1507328, 10, 0, 1507329, 10, 0, 1507330, 10, 0, 1507331, 10, 0, 1507332, 10, 0, 1507333, 10, 0, 1507334, 10, 0, 1507335, 10, 0, 1507336, 10, 0, 1507337, 10, 0, 1507338, 10, 0, 1507339, 10, 0, 1507340, 10, 0, 1507341, 10, 0, 1507342, 10, 0, 1507343, 10, 0, 1507344, 10, 0, 1507345, 10, 0, 1507346, 10, 0, 1507347, 10, 0, 1507348, 10, 0, 1507349, 10, 0, 1507350, 10, 0, 1507351, 10, 0, 1507352, 10, 0, 1507353, 10, 0, 1507354, 10, 0, 1507355, 10, 0, 1507356, 10, 0, 1507357, 10, 0, 1507358, 10, 0, 1507359, 10, 0, 1507360, 10, 0, 1507361, 10, 0, 1507362, 10, 0, 1507363, 10, 0, 1507364, 10, 0, 1507365, 10, 0, 1507366, 10, 0, 1507367, 10, 0, 1507368, 10, 0, 1507369, 10, 0, 1507370, 10, 0, 1507371, 10, 0, 1507372, 10, 0, 1507373, 10, 0, 1507374, 10, 0, 1507375, 10, 0, 1507376, 10, 0, 1507377, 10, 0, 1507378, 10, 0, 1507379, 10, 0, 1507380, 10, 0, 1507381, 10, 0, 1507382, 10, 0, 1507383, 10, 0, 1507384, 10, 0, 1507385, 10, 0, 1507386, 10, 0, 1507387, 10, 0, 1507388, 10, 0, 1507389, 10, 0, 1507390, 10, 0, 1507391, 10, 0, 1507392, 10, 0, 1507393, 10, 0, 1507394, 10, 0, 1507395, 10, 0, 1507396, 10, 0, 1507397, 10, 0, 1507398, 10, 0, 1507399, 10, 0, 1572864, 10, 0, 1572865, 10, 0, 1572866, 10, 0, 1572867, 10, 0, 1572868, 10, 0, 1572869, 10, 0, 1572870, 10, 0, 1572871, 10, 0, 1572872, 10, 0, 1572873, 10, 0, 1572874, 10, 0, 1572875, 10, 0, 1572876, 10, 0, 1572877, 10, 0, 1572878, 10, 0, 1572879, 10, 0, 1572880, 10, 0, 1572881, 10, 0, 1572882, 10, 0, 1572883, 10, 0, 1572884, 10, 0, 1572885, 10, 0, 1572886, 10, 0, 1572887, 10, 0, 1572888, 10, 0, 1572889, 10, 0, 1572890, 10, 0, 1572891, 10, 0, 1572892, 10, 0, 1572893, 10, 0, 1572894, 10, 0, 1572895, 10, 0, 1572896, 10, 0, 1572897, 10, 0, 1572898, 10, 0, 1572899, 10, 0, 1572900, 10, 0, 1572901, 10, 0, 1572902, 10, 0, 1572903, 10, 0, 1572904, 10, 0, 1572905, 10, 0, 1572906, 10, 0, 1572907, 10, 0, 1572908, 10, 0, 1572909, 10, 0, 1572910, 10, 0, 1572911, 10, 0, 1572912, 10, 0, 1572913, 10, 0, 1572914, 10, 0, 1572915, 10, 0, 1572916, 10, 0, 1572917, 10, 0, 1572918, 10, 0, 1572919, 10, 0, 1572920, 10, 0, 1572921, 10, 0, 1572922, 10, 0, 1572923, 10, 0, 1572924, 10, 0, 1572925, 10, 0, 1572926, 10, 0, 1572927, 10, 0, 1572928, 10, 0, 1572929, 10, 0, 1572930, 10, 0, 1572931, 10, 0, 1572932, 10, 0, 1572933, 10, 0, 1572934, 10, 0, 1572935, 10, 0, 1638400, 10, 0, 1638401, 10, 0, 1638402, 10, 0, 1638403, 10, 0, 1638404, 10, 0, 1638405, 10, 0, 1638406, 10, 0, 1638407, 10, 0, 1638408, 10, 0, 1638409, 10, 0, 1638410, 10, 0, 1638411, 10, 0, 1638412, 10, 0, 1638413, 10, 0, 1638414, 10, 0, 1638415, 10, 0, 1638416, 10, 0, 1638417, 10, 0, 1638418, 10, 0, 1638419, 10, 0, 1638420, 10, 0, 1638421, 10, 0, 1638422, 10, 0, 1638423, 10, 0, 1638424, 10, 0, 1638425, 10, 0, 1638426, 10, 0, 1638427, 10, 0, 1638428, 10, 0, 1638429, 10, 0, 1638430, 10, 0, 1638431, 10, 0, 1638432, 10, 0, 1638433, 10, 0, 1638434, 10, 0, 1638435, 10, 0, 1638436, 10, 0, 1638437, 10, 0, 1638438, 10, 0, 1638439, 10, 0, 1638440, 10, 0, 1638441, 10, 0, 1638442, 10, 0, 1638443, 10, 0, 1638444, 10, 0, 1638445, 10, 0, 1638446, 10, 0, 1638447, 10, 0, 1638448, 10, 0, 1638449, 10, 0, 1638450, 10, 0, 1638451, 10, 0, 1638452, 10, 0, 1638453, 10, 0, 1638454, 10, 0, 1638455, 10, 0, 1638456, 10, 0, 1638457, 10, 0, 1638458, 10, 0, 1638459, 10, 0, 1638460, 10, 0, 1638461, 10, 0, 1638462, 10, 0, 1638463, 10, 0, 1638464, 10, 0, 1638465, 10, 0, 1638466, 10, 0, 1638467, 10, 0, 1638468, 10, 0, 1638469, 10, 0, 1638470, 10, 0, 1638471, 10, 0, 1703952, 10, 0, 1703953, 10, 0, 1703954, 10, 0, 1703955, 10, 0, 1703956, 10, 0, 1703957, 10, 0, 1703958, 10, 0, 1703959, 10, 0, 1703960, 10, 0, 1703961, 10, 0, 1703962, 10, 0, 1703963, 10, 0, 1703964, 10, 0, 1703965, 10, 0, 1703966, 10, 0, 1703967, 10, 0, 1703968, 10, 0, 1703969, 10, 0, 1703970, 10, 0, 1703971, 10, 0, 1703972, 10, 0, 1703973, 10, 0, 1703974, 10, 0, 1703975, 10, 0, 1703976, 10, 0, 1703977, 10, 0, 1703978, 10, 0, 1703979, 10, 0, 1703980, 10, 0, 1703981, 10, 0, 1703982, 10, 0, 1703983, 10, 0, 1703984, 10, 0, 1703985, 10, 0, 1703986, 10, 0, 1703987, 10, 0, 1703988, 10, 0, 1703989, 10, 0, 1703990, 10, 0, 1703991, 10, 0, 1703992, 10, 0, 1703993, 10, 0, 1703994, 10, 0, 1703995, 10, 0, 1703996, 10, 0, 1703997, 10, 0, 1703998, 10, 0, 1703999, 10, 0, 1704000, 10, 0, 1704001, 10, 0, 1704002, 10, 0, 1704003, 10, 0, 1704004, 10, 0, 1704005, 10, 0, 1704006, 10, 0, 1704007, 10, 0, 1769488, 10, 0, 1769489, 10, 0, 1769490, 10, 0, 1769491, 10, 0, 1769492, 10, 0, 1769493, 10, 0, 1769494, 10, 0, 1769495, 10, 0, 1769496, 10, 0, 1769497, 10, 0, 1769498, 10, 0, 1769499, 10, 0, 1769500, 10, 0, 1769501, 10, 0, 1769502, 10, 0, 1769503, 10, 0, 1769504, 10, 0, 1769505, 10, 0, 1769506, 10, 0, 1769507, 10, 0, 1769508, 10, 0, 1769509, 10, 0, 1769510, 10, 0, 1769511, 10, 0, 1769512, 10, 0, 1769513, 10, 0, 1769514, 10, 0, 1769515, 10, 0, 1769516, 10, 0, 1769517, 10, 0, 1769518, 10, 0, 1769519, 10, 0, 1769520, 10, 0, 1769521, 10, 0, 1769522, 10, 0, 1769523, 10, 0, 1769524, 10, 0, 1769525, 10, 0, 1769526, 10, 0, 1769527, 10, 0, 1769528, 10, 0, 1769529, 10, 0, 1769530, 10, 0, 1769531, 10, 0, 1769532, 10, 0, 1769533, 10, 0, 1769534, 10, 0, 1769535, 10, 0, 1769536, 10, 0, 1769537, 10, 0, 1769538, 10, 0, 1769539, 10, 0, 1769540, 10, 0, 1769541, 10, 0 ) +__meta__ = { +"_edit_lock_": true +} + +[node name="Coins" type="Node" parent="."] + +[node name="Coin" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 672, 1179 ) + +[node name="Coin2" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 704, 1179 ) + +[node name="Coin3" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 736, 1179 ) + +[node name="Coin4" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1120, 992 ) + +[node name="Coin5" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1152, 992 ) + +[node name="Coin6" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1184, 992 ) + +[node name="Coin7" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1216, 992 ) + +[node name="Coin8" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1248, 992 ) + +[node name="Coin9" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1568, 864 ) + +[node name="Coin10" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1632, 864 ) + +[node name="Coin11" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1824, 768 ) + +[node name="Coin12" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1888, 768 ) + +[node name="Coin13" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 2080, 672 ) + +[node name="Coin14" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 2144, 672 ) + +[node name="Coin15" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1792, 1248 ) + +[node name="Coin16" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1856, 1248 ) + +[node name="Coin17" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1920, 1248 ) + +[node name="Coin18" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1920, 1184 ) + +[node name="Coin19" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1856, 1184 ) + +[node name="Coin20" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 1792, 1184 ) + +[node name="Coin21" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 98.8868, 488.515 ) + +[node name="Coin22" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 89.5989, 481.217 ) + +[node name="Coin23" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 108.175, 481.217 ) + +[node name="Coin24" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 116.136, 469.939 ) + +[node name="Coin25" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 117.463, 457.997 ) + +[node name="Coin26" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 106.184, 449.373 ) + +[node name="Coin27" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 98.2234, 458.661 ) + +[node name="Coin28" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 88.272, 448.71 ) + +[node name="Coin29" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 79.6476, 457.334 ) + +[node name="Coin30" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 82.9647, 468.612 ) + +[node name="Coin31" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 3357.42, 465.288 ) + +[node name="Coin32" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 3421.42, 465.288 ) + +[node name="Coin33" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 3485.42, 465.288 ) + +[node name="Coin34" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 3485.42, 401.288 ) + +[node name="Coin35" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 3421.42, 401.288 ) + +[node name="Coin36" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 3357.42, 401.288 ) + +[node name="Coin37" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 4172.75, 605.058 ) + +[node name="Coin38" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 4236.75, 605.058 ) + +[node name="Coin39" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 4300.75, 605.058 ) + +[node name="Coin40" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 4300.75, 541.058 ) + +[node name="Coin41" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 4236.75, 541.058 ) + +[node name="Coin42" parent="Coins" instance=ExtResource( 2 )] +position = Vector2( 4172.75, 541.058 ) + +[node name="Props" type="Node" parent="."] + +[node name="MovingPlatform" parent="Props" instance=ExtResource( 3 )] +position = Vector2( 1451.86, 742.969 ) +motion = Vector2( 0, 140 ) +cycle = 5.0 + +[node name="MovingPlatform 2" parent="Props" instance=ExtResource( 3 )] +position = Vector2( 624.824, 545.544 ) +motion = Vector2( 300, 0 ) +cycle = 10.0 + +[node name="MovingPlatform 3" parent="Props" instance=ExtResource( 3 )] +position = Vector2( 3419.86, 739.662 ) +motion = Vector2( 450, 0 ) +cycle = 10.0 + +[node name="Seesaw" parent="Props" instance=ExtResource( 4 )] +position = Vector2( 2402.79, 849.52 ) + +[node name="OneWayPlatform" parent="Props" instance=ExtResource( 5 )] +position = Vector2( 927.698, 1120.81 ) + +[node name="Player" parent="." instance=ExtResource( 6 )] +position = Vector2( 251.684, 1045.6 ) +physics_material_override = SubResource( 1 ) + +[node name="Enemies" type="Node" parent="."] + +[node name="Enemy1" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 834.664, 1309.6 ) +physics_material_override = SubResource( 2 ) + +[node name="Enemy2" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 707.665, 1225.05 ) +physics_material_override = SubResource( 3 ) + +[node name="Enemy3" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 1125.21, 1053.06 ) +physics_material_override = SubResource( 4 ) + +[node name="Enemy4" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 1292.11, 1059.24 ) +physics_material_override = SubResource( 5 ) + +[node name="Enemy5" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 1607.38, 923.239 ) +physics_material_override = SubResource( 6 ) + +[node name="Enemy6" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 2586.9, 939.059 ) +physics_material_override = SubResource( 7 ) + +[node name="Enemy7" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 1457.6, 688.741 ) +physics_material_override = SubResource( 8 ) + +[node name="Enemy8" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 1193.63, 460.381 ) +physics_material_override = SubResource( 9 ) + +[node name="Enemy9" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 3429.73, 540.865 ) +physics_material_override = SubResource( 10 ) + +[node name="Enemy10" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 3546.2, 1356.19 ) +physics_material_override = SubResource( 11 ) + +[node name="Enemy11" parent="Enemies" instance=ExtResource( 7 )] +position = Vector2( 2406.63, 815.115 ) +physics_material_override = SubResource( 12 ) + +[node name="ParallaxBg" parent="." instance=ExtResource( 8 )] + +[node name="Label" type="Label" parent="."] +margin_left = 12.0 +margin_top = -202.0 +margin_right = 358.0 +margin_bottom = -10.0 +size_flags_horizontal = 2 +size_flags_vertical = 0 +text = "This is a simple demo on how to make a platformer game with Godot.\"This version uses physics and the 2D physics engine for motion and collision.\"\"The demo also shows the benefits of using the scene system, where coins,\"enemies and the player are edited separatedly and instanced in the stage.\"\"To edit the base tiles for the tileset, open the tileset_edit.tscn file and follow \"instructions.\"" +autowrap = true + diff --git a/2d/physics_platformer/Stage2.tscn b/2d/physics_platformer/Stage2.tscn new file mode 100644 index 00000000..be956369 --- /dev/null +++ b/2d/physics_platformer/Stage2.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Tileset.tres" type="TileSet" id=1] +[ext_resource path="res://player/Player.tscn" type="PackedScene" id=2] +[ext_resource path="res://background/ParallaxBg.tscn" type="PackedScene" id=3] + + + + +[node name="Stage" type="Node"] + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource( 1 ) +cell_quadrant_size = 8 +format = 1 +tile_data = PoolIntArray( 0, 2, 0, 70, 536870914, 0, 71, 10, 0, 72, 10, 0, 73, 10, 0, 74, 10, 0, 75, 10, 0, 76, 10, 0, 77, 10, 0, 78, 10, 0, 65536, 2, 0, 65606, 536870914, 0, 65607, 10, 0, 65608, 10, 0, 65609, 10, 0, 65610, 10, 0, 65611, 10, 0, 65612, 10, 0, 65613, 10, 0, 65614, 10, 0, 131072, 2, 0, 131142, 536870914, 0, 131143, 10, 0, 131144, 10, 0, 131145, 10, 0, 131146, 10, 0, 131147, 10, 0, 131148, 10, 0, 131149, 10, 0, 131150, 10, 0, 196608, 2, 0, 196626, 9, 0, 196678, 536870914, 0, 196679, 10, 0, 196680, 10, 0, 196681, 10, 0, 196682, 10, 0, 196683, 10, 0, 196684, 10, 0, 196685, 10, 0, 196686, 10, 0, 262144, 2, 0, 262162, 8, 0, 262214, 536870914, 0, 262215, 10, 0, 262216, 10, 0, 262217, 10, 0, 262218, 10, 0, 262219, 10, 0, 262220, 10, 0, 262221, 10, 0, 262222, 10, 0, 327680, 2, 0, 327697, 536870921, 0, 327698, 7, 0, 327733, 9, 0, 327750, 536870914, 0, 327751, 10, 0, 327752, 10, 0, 327753, 10, 0, 327754, 10, 0, 327755, 10, 0, 327756, 10, 0, 327757, 10, 0, 327758, 10, 0, 393216, 2, 0, 393233, 536870920, 0, 393234, 7, 0, 393257, 9, 0, 393269, 7, 0, 393286, 536870914, 0, 393287, 10, 0, 393288, 10, 0, 393289, 10, 0, 393290, 10, 0, 393291, 10, 0, 393292, 10, 0, 393293, 10, 0, 393294, 10, 0, 458752, 2, 0, 458769, 7, 0, 458770, 8, 0, 458790, 9, 0, 458793, 8, 0, 458805, 8, 0, 458822, 536870914, 0, 458823, 10, 0, 458824, 10, 0, 458825, 10, 0, 458826, 10, 0, 458827, 10, 0, 458828, 10, 0, 458829, 10, 0, 458830, 10, 0, 524288, 4, 0, 524289, 1, 0, 524304, 536870913, 0, 524305, 536870918, 0, 524306, 6, 0, 524307, 5, 0, 524308, 1, 0, 524326, 8, 0, 524329, 7, 0, 524341, 7, 0, 524358, 536870914, 0, 524359, 10, 0, 524360, 10, 0, 524361, 10, 0, 524362, 10, 0, 524363, 10, 0, 524364, 10, 0, 524365, 10, 0, 524366, 10, 0, 589824, 10, 0, 589825, 13, 0, 589840, 536870914, 0, 589841, 10, 0, 589842, 10, 0, 589843, 10, 0, 589844, 2, 0, 589862, 7, 0, 589865, 7, 0, 589876, 536870913, 0, 589877, 6, 0, 589878, 1, 0, 589894, 536870914, 0, 589895, 10, 0, 589896, 10, 0, 589897, 10, 0, 589898, 10, 0, 589899, 10, 0, 589900, 10, 0, 589901, 10, 0, 589902, 10, 0, 655360, 2, 0, 655376, 536870914, 0, 655377, 10, 0, 655378, 10, 0, 655379, 10, 0, 655380, 2, 0, 655398, 7, 0, 655401, 8, 0, 655412, 536870925, 0, 655413, 11, 0, 655414, 13, 0, 655430, 536870914, 0, 655431, 10, 0, 655432, 10, 0, 655433, 10, 0, 655434, 10, 0, 655435, 10, 0, 655436, 10, 0, 655437, 10, 0, 655438, 10, 0, 720896, 2, 0, 720912, 536870914, 0, 720913, 10, 0, 720914, 10, 0, 720915, 10, 0, 720916, 2, 0, 720934, 8, 0, 720937, 7, 0, 720958, 536870913, 0, 720959, 5, 0, 720960, 536870917, 0, 720961, 5, 0, 720962, 5, 0, 720963, 536870917, 0, 720964, 5, 0, 720965, 0, 0, 720966, 536870916, 0, 720967, 10, 0, 720968, 10, 0, 720969, 10, 0, 720970, 10, 0, 720971, 10, 0, 720972, 10, 0, 720973, 10, 0, 720974, 10, 0, 786432, 2, 0, 786437, 9, 0, 786448, 536870914, 0, 786449, 10, 0, 786450, 10, 0, 786451, 10, 0, 786452, 2, 0, 786464, 536870913, 0, 786465, 1, 0, 786470, 7, 0, 786473, 7, 0, 786474, 536870924, 0, 786475, 1, 0, 786494, 536870914, 0, 786495, 10, 0, 786496, 10, 0, 786497, 10, 0, 786498, 10, 0, 786499, 10, 0, 786500, 10, 0, 786501, 10, 0, 786502, 10, 0, 786503, 10, 0, 786504, 10, 0, 786505, 10, 0, 786506, 10, 0, 786507, 10, 0, 786508, 10, 0, 786509, 10, 0, 851968, 2, 0, 851973, 7, 0, 851984, 536870914, 0, 851985, 10, 0, 851986, 10, 0, 851987, 10, 0, 851988, 2, 0, 851996, 536870913, 0, 851997, 1, 0, 852000, 536870914, 0, 852001, 3, 0, 852006, 7, 0, 852009, 536870913, 0, 852011, 2, 0, 852030, 536870914, 0, 852031, 10, 0, 852032, 10, 0, 852033, 10, 0, 852034, 10, 0, 852035, 10, 0, 852036, 10, 0, 852037, 10, 0, 852038, 10, 0, 852039, 10, 0, 852040, 10, 0, 852041, 10, 0, 852042, 10, 0, 852043, 10, 0, 852044, 10, 0, 852045, 10, 0, 917504, 2, 0, 917506, 9, 0, 917509, 7, 0, 917512, 536870921, 0, 917520, 536870925, 0, 917521, 11, 0, 917522, 11, 0, 917523, 11, 0, 917524, 13, 0, 917532, 536870925, 0, 917533, 13, 0, 917536, 536870914, 0, 917537, 4, 0, 917538, 1, 0, 917540, 536870913, 0, 917541, 0, 0, 917542, 1, 0, 917545, 536870914, 0, 917546, 10, 0, 917547, 4, 0, 917548, 1, 0, 917566, 536870914, 0, 917567, 10, 0, 917568, 10, 0, 917569, 10, 0, 917570, 10, 0, 917571, 10, 0, 917572, 10, 0, 917573, 10, 0, 917574, 10, 0, 917575, 10, 0, 917576, 10, 0, 917577, 10, 0, 917578, 10, 0, 917579, 10, 0, 917580, 10, 0, 917581, 10, 0, 983040, 2, 0, 983042, 7, 0, 983045, 7, 0, 983048, 536870920, 0, 983050, 536870913, 0, 983051, 0, 0, 983052, 1, 0, 983064, 536870913, 0, 983065, 1, 0, 983072, 536870914, 0, 983073, 10, 0, 983074, 4, 0, 983075, 0, 0, 983076, 536870916, 0, 983077, 10, 0, 983078, 4, 0, 983079, 536870912, 0, 983080, 536870912, 0, 983081, 536870916, 0, 983082, 10, 0, 983083, 10, 0, 983084, 2, 0, 983095, 9, 0, 983102, 536870914, 0, 983103, 10, 0, 983104, 10, 0, 983105, 10, 0, 983106, 10, 0, 983107, 10, 0, 983108, 10, 0, 983109, 10, 0, 983110, 10, 0, 983111, 10, 0, 983112, 10, 0, 983113, 10, 0, 983114, 10, 0, 983115, 10, 0, 983116, 10, 0, 983117, 10, 0, 1048576, 2, 0, 1048578, 8, 0, 1048581, 8, 0, 1048584, 536870919, 0, 1048586, 536870914, 0, 1048587, 536870922, 0, 1048588, 2, 0, 1048600, 536870925, 0, 1048601, 13, 0, 1048604, 9, 0, 1048608, 536870925, 0, 1048609, 536870923, 0, 1048610, 536870923, 0, 1048611, 536870923, 0, 1048612, 10, 0, 1048613, 10, 0, 1048614, 10, 0, 1048615, 10, 0, 1048616, 10, 0, 1048617, 10, 0, 1048618, 10, 0, 1048619, 10, 0, 1048620, 4, 0, 1048621, 1, 0, 1048630, 536870921, 0, 1048631, 8, 0, 1048638, 536870914, 0, 1048639, 10, 0, 1048640, 10, 0, 1048641, 10, 0, 1048642, 10, 0, 1048643, 10, 0, 1048644, 10, 0, 1048645, 10, 0, 1048646, 10, 0, 1048647, 10, 0, 1048648, 10, 0, 1048649, 10, 0, 1048650, 10, 0, 1048651, 10, 0, 1048652, 10, 0, 1048653, 10, 0, 1114112, 4, 0, 1114113, 0, 0, 1114114, 6, 0, 1114115, 0, 0, 1114116, 0, 0, 1114117, 6, 0, 1114118, 1, 0, 1114120, 536870920, 0, 1114122, 536870925, 0, 1114123, 11, 0, 1114124, 13, 0, 1114128, 536870913, 0, 1114129, 5, 0, 1114130, 536870917, 0, 1114131, 5, 0, 1114132, 0, 0, 1114133, 1, 0, 1114140, 7, 0, 1114141, 536870921, 0, 1114148, 536870914, 0, 1114149, 10, 0, 1114150, 10, 0, 1114151, 10, 0, 1114152, 10, 0, 1114153, 10, 0, 1114154, 10, 0, 1114155, 10, 0, 1114156, 10, 0, 1114157, 2, 0, 1114166, 536870920, 0, 1114167, 8, 0, 1114174, 536870914, 0, 1114175, 10, 0, 1114176, 10, 0, 1114177, 10, 0, 1114178, 10, 0, 1114179, 10, 0, 1114180, 10, 0, 1114181, 10, 0, 1114182, 10, 0, 1114183, 10, 0, 1114184, 10, 0, 1114185, 10, 0, 1114186, 10, 0, 1114187, 10, 0, 1114188, 10, 0, 1179648, 10, 0, 1179649, 10, 0, 1179650, 10, 0, 1179651, 10, 0, 1179652, 10, 0, 1179653, 10, 0, 1179654, 2, 0, 1179656, 536870919, 0, 1179664, 536870915, 0, 1179665, 10, 0, 1179666, 10, 0, 1179667, 10, 0, 1179668, 10, 0, 1179669, 4, 0, 1179670, 12, 0, 1179675, 9, 0, 1179676, 8, 0, 1179677, 8, 0, 1179684, 536870914, 0, 1179685, 10, 0, 1179686, 10, 0, 1179687, 10, 0, 1179688, 10, 0, 1179689, 10, 0, 1179690, 10, 0, 1179691, 10, 0, 1179692, 10, 0, 1179693, 4, 0, 1179694, 1, 0, 1179701, 9, 0, 1179702, 536870919, 0, 1179703, 7, 0, 1179710, 536870914, 0, 1179711, 10, 0, 1179712, 10, 0, 1179713, 10, 0, 1179714, 10, 0, 1179715, 10, 0, 1179716, 10, 0, 1179717, 10, 0, 1179718, 10, 0, 1179719, 10, 0, 1179720, 10, 0, 1179721, 10, 0, 1179722, 10, 0, 1245184, 10, 0, 1245185, 10, 0, 1245186, 10, 0, 1245187, 10, 0, 1245188, 10, 0, 1245189, 10, 0, 1245190, 2, 0, 1245192, 536870919, 0, 1245199, 536870913, 0, 1245200, 536870916, 0, 1245201, 10, 0, 1245202, 10, 0, 1245203, 10, 0, 1245204, 10, 0, 1245205, 10, 0, 1245207, 1, 0, 1245211, 7, 0, 1245212, 7, 0, 1245213, 536870920, 0, 1245220, 536870914, 0, 1245221, 10, 0, 1245222, 10, 0, 1245223, 10, 0, 1245224, 10, 0, 1245225, 10, 0, 1245226, 10, 0, 1245227, 10, 0, 1245228, 10, 0, 1245229, 10, 0, 1245230, 2, 0, 1245237, 8, 0, 1245238, 536870919, 0, 1245239, 8, 0, 1245240, 536870921, 0, 1245246, 536870914, 0, 1245247, 10, 0, 1245248, 10, 0, 1245249, 10, 0, 1245250, 10, 0, 1245251, 10, 0, 1245252, 10, 0, 1245253, 10, 0, 1245254, 10, 0, 1245255, 10, 0, 1245256, 10, 0, 1245257, 10, 0, 1245258, 10, 0, 1310720, 10, 0, 1310721, 10, 0, 1310722, 10, 0, 1310723, 10, 0, 1310724, 10, 0, 1310725, 10, 0, 1310726, 2, 0, 1310728, 536870920, 0, 1310730, 536870913, 0, 1310731, 1, 0, 1310734, 536870913, 0, 1310735, 536870916, 0, 1310736, 10, 0, 1310737, 10, 0, 1310738, 10, 0, 1310739, 10, 0, 1310740, 10, 0, 1310741, 10, 0, 1310742, 10, 0, 1310743, 4, 0, 1310744, 1, 0, 1310747, 8, 0, 1310748, 7, 0, 1310749, 536870919, 0, 1310756, 536870914, 0, 1310757, 10, 0, 1310758, 10, 0, 1310759, 10, 0, 1310760, 10, 0, 1310761, 10, 0, 1310762, 10, 0, 1310763, 10, 0, 1310764, 10, 0, 1310765, 10, 0, 1310766, 4, 0, 1310767, 5, 0, 1310768, 12, 0, 1310773, 7, 0, 1310774, 536870919, 0, 1310775, 7, 0, 1310776, 536870919, 0, 1310782, 536870914, 0, 1310783, 10, 0, 1310784, 10, 0, 1310785, 10, 0, 1310786, 10, 0, 1310787, 10, 0, 1310788, 10, 0, 1310789, 10, 0, 1310790, 10, 0, 1310791, 10, 0, 1310792, 10, 0, 1310793, 10, 0, 1376256, 10, 0, 1376257, 10, 0, 1376258, 10, 0, 1376259, 10, 0, 1376260, 10, 0, 1376261, 10, 0, 1376262, 4, 0, 1376263, 0, 0, 1376264, 0, 0, 1376265, 0, 0, 1376266, 536870916, 0, 1376267, 4, 0, 1376268, 0, 0, 1376269, 0, 0, 1376270, 536870916, 0, 1376271, 10, 0, 1376272, 10, 0, 1376273, 10, 0, 1376274, 10, 0, 1376275, 10, 0, 1376276, 10, 0, 1376277, 10, 0, 1376278, 10, 0, 1376279, 10, 0, 1376280, 4, 0, 1376281, 12, 0, 1376283, 8, 0, 1376284, 8, 0, 1376285, 536870920, 0, 1376287, 536870924, 0, 1376288, 0, 0, 1376289, 5, 0, 1376290, 536870917, 0, 1376291, 0, 0, 1376292, 536870916, 0, 1376293, 10, 0, 1376294, 10, 0, 1376295, 10, 0, 1376296, 10, 0, 1376297, 10, 0, 1376298, 10, 0, 1376299, 10, 0, 1376300, 10, 0, 1376301, 10, 0, 1376302, 10, 0, 1376303, 10, 0, 1376305, 12, 0, 1376309, 7, 0, 1376310, 536870920, 0, 1376311, 7, 0, 1376312, 536870920, 0, 1376318, 536870914, 0, 1376319, 10, 0, 1376320, 10, 0, 1376321, 10, 0, 1376322, 10, 0, 1376323, 10, 0, 1376324, 10, 0, 1376325, 10, 0, 1376326, 10, 0, 1376327, 10, 0, 1376328, 10, 0, 1441792, 10, 0, 1441793, 10, 0, 1441794, 10, 0, 1441795, 10, 0, 1441796, 10, 0, 1441797, 10, 0, 1441798, 10, 0, 1441799, 10, 0, 1441800, 10, 0, 1441801, 10, 0, 1441802, 10, 0, 1441803, 10, 0, 1441804, 10, 0, 1441805, 10, 0, 1441806, 10, 0, 1441807, 10, 0, 1441808, 10, 0, 1441809, 10, 0, 1441810, 10, 0, 1441811, 10, 0, 1441812, 10, 0, 1441813, 10, 0, 1441814, 10, 0, 1441815, 10, 0, 1441816, 10, 0, 1441818, 0, 0, 1441819, 6, 0, 1441820, 6, 0, 1441821, 536870918, 0, 1441822, 5, 0, 1441824, 10, 0, 1441825, 10, 0, 1441826, 10, 0, 1441827, 10, 0, 1441828, 10, 0, 1441829, 10, 0, 1441830, 10, 0, 1441831, 10, 0, 1441832, 10, 0, 1441833, 10, 0, 1441834, 10, 0, 1441835, 10, 0, 1441836, 10, 0, 1441837, 10, 0, 1441838, 10, 0, 1441839, 10, 0, 1441840, 10, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 1441845, 6, 0, 1441846, 536870918, 0, 1441847, 6, 0, 1441848, 536870918, 0, 1441849, 0, 0, 1441850, 5, 0, 1441851, 536870917, 0, 1441852, 5, 0, 1441853, 0, 0, 1441854, 536870916, 0, 1441855, 10, 0, 1441856, 10, 0, 1441857, 10, 0, 1441858, 10, 0, 1441859, 10, 0, 1441860, 10, 0, 1441861, 10, 0, 1441862, 10, 0, 1441863, 10, 0, 1507328, 10, 0, 1507329, 10, 0, 1507330, 10, 0, 1507331, 10, 0, 1507332, 10, 0, 1507333, 10, 0, 1507334, 10, 0, 1507335, 10, 0, 1507336, 10, 0, 1507337, 10, 0, 1507338, 10, 0, 1507339, 10, 0, 1507340, 10, 0, 1507341, 10, 0, 1507342, 10, 0, 1507343, 10, 0, 1507344, 10, 0, 1507345, 10, 0, 1507346, 10, 0, 1507347, 10, 0, 1507348, 10, 0, 1507349, 10, 0, 1507350, 10, 0, 1507351, 10, 0, 1507352, 10, 0, 1507353, 10, 0, 1507354, 10, 0, 1507355, 10, 0, 1507356, 10, 0, 1507357, 10, 0, 1507358, 10, 0, 1507359, 10, 0, 1507360, 10, 0, 1507361, 10, 0, 1507362, 10, 0, 1507363, 10, 0, 1507364, 10, 0, 1507365, 10, 0, 1507366, 10, 0, 1507367, 10, 0, 1507368, 10, 0, 1507369, 10, 0, 1507370, 10, 0, 1507371, 10, 0, 1507372, 10, 0, 1507373, 10, 0, 1507374, 10, 0, 1507375, 10, 0, 1507376, 10, 0, 1507377, 10, 0, 1507378, 10, 0, 1507379, 10, 0, 1507380, 10, 0, 1507381, 10, 0, 1507382, 10, 0, 1507383, 10, 0, 1507384, 10, 0, 1507385, 10, 0, 1507386, 10, 0, 1507387, 10, 0, 1507388, 10, 0, 1507389, 10, 0, 1507390, 10, 0, 1507391, 10, 0, 1507392, 10, 0, 1507393, 10, 0, 1507394, 10, 0, 1507395, 10, 0, 1507396, 10, 0, 1507397, 10, 0, 1507398, 10, 0, 1507399, 10, 0, 1572864, 10, 0, 1572865, 10, 0, 1572866, 10, 0, 1572867, 10, 0, 1572868, 10, 0, 1572869, 10, 0, 1572870, 10, 0, 1572871, 10, 0, 1572872, 10, 0, 1572873, 10, 0, 1572874, 10, 0, 1572875, 10, 0, 1572876, 10, 0, 1572877, 10, 0, 1572878, 10, 0, 1572879, 10, 0, 1572880, 10, 0, 1572881, 10, 0, 1572882, 10, 0, 1572883, 10, 0, 1572884, 10, 0, 1572885, 10, 0, 1572886, 10, 0, 1572887, 10, 0, 1572888, 10, 0, 1572889, 10, 0, 1572890, 10, 0, 1572891, 10, 0, 1572892, 10, 0, 1572893, 10, 0, 1572894, 10, 0, 1572895, 10, 0, 1572896, 10, 0, 1572897, 10, 0, 1572898, 10, 0, 1572899, 10, 0, 1572900, 10, 0, 1572901, 10, 0, 1572902, 10, 0, 1572903, 10, 0, 1572904, 10, 0, 1572905, 10, 0, 1572906, 10, 0, 1572907, 10, 0, 1572908, 10, 0, 1572909, 10, 0, 1572910, 10, 0, 1572911, 10, 0, 1572912, 10, 0, 1572913, 10, 0, 1572914, 10, 0, 1572915, 10, 0, 1572916, 10, 0, 1572917, 10, 0, 1572918, 10, 0, 1572919, 10, 0, 1572920, 10, 0, 1572921, 10, 0, 1572922, 10, 0, 1572923, 10, 0, 1572924, 10, 0, 1572925, 10, 0, 1572926, 10, 0, 1572927, 10, 0, 1572928, 10, 0, 1572929, 10, 0, 1572930, 10, 0, 1572931, 10, 0, 1572932, 10, 0, 1572933, 10, 0, 1572934, 10, 0, 1572935, 10, 0, 1638400, 10, 0, 1638401, 10, 0, 1638402, 10, 0, 1638403, 10, 0, 1638404, 10, 0, 1638405, 10, 0, 1638406, 10, 0, 1638407, 10, 0, 1638408, 10, 0, 1638409, 10, 0, 1638410, 10, 0, 1638411, 10, 0, 1638412, 10, 0, 1638413, 10, 0, 1638414, 10, 0, 1638415, 10, 0, 1638416, 10, 0, 1638417, 10, 0, 1638418, 10, 0, 1638419, 10, 0, 1638420, 10, 0, 1638421, 10, 0, 1638422, 10, 0, 1638423, 10, 0, 1638424, 10, 0, 1638425, 10, 0, 1638426, 10, 0, 1638427, 10, 0, 1638428, 10, 0, 1638429, 10, 0, 1638430, 10, 0, 1638431, 10, 0, 1638432, 10, 0, 1638433, 10, 0, 1638434, 10, 0, 1638435, 10, 0, 1638436, 10, 0, 1638437, 10, 0, 1638438, 10, 0, 1638439, 10, 0, 1638440, 10, 0, 1638441, 10, 0, 1638442, 10, 0, 1638443, 10, 0, 1638444, 10, 0, 1638445, 10, 0, 1638446, 10, 0, 1638447, 10, 0, 1638448, 10, 0, 1638449, 10, 0, 1638450, 10, 0, 1638451, 10, 0, 1638452, 10, 0, 1638453, 10, 0, 1638454, 10, 0, 1638455, 10, 0, 1638456, 10, 0, 1638457, 10, 0, 1638458, 10, 0, 1638459, 10, 0, 1638460, 10, 0, 1638461, 10, 0, 1638462, 10, 0, 1638463, 10, 0, 1638464, 10, 0, 1638465, 10, 0, 1638466, 10, 0, 1638467, 10, 0, 1638468, 10, 0, 1638469, 10, 0, 1638470, 10, 0, 1638471, 10, 0, 1703952, 10, 0, 1703953, 10, 0, 1703954, 10, 0, 1703955, 10, 0, 1703956, 10, 0, 1703957, 10, 0, 1703958, 10, 0, 1703959, 10, 0, 1703960, 10, 0, 1703961, 10, 0, 1703962, 10, 0, 1703963, 10, 0, 1703964, 10, 0, 1703965, 10, 0, 1703966, 10, 0, 1703967, 10, 0, 1703968, 10, 0, 1703969, 10, 0, 1703970, 10, 0, 1703971, 10, 0, 1703972, 10, 0, 1703973, 10, 0, 1703974, 10, 0, 1703975, 10, 0, 1703976, 10, 0, 1703977, 10, 0, 1703978, 10, 0, 1703979, 10, 0, 1703980, 10, 0, 1703981, 10, 0, 1703982, 10, 0, 1703983, 10, 0, 1703984, 10, 0, 1703985, 10, 0, 1703986, 10, 0, 1703987, 10, 0, 1703988, 10, 0, 1703989, 10, 0, 1703990, 10, 0, 1703991, 10, 0, 1703992, 10, 0, 1703993, 10, 0, 1703994, 10, 0, 1703995, 10, 0, 1703996, 10, 0, 1703997, 10, 0, 1703998, 10, 0, 1703999, 10, 0, 1704000, 10, 0, 1704001, 10, 0, 1704002, 10, 0, 1704003, 10, 0, 1704004, 10, 0, 1704005, 10, 0, 1704006, 10, 0, 1704007, 10, 0, 1769488, 10, 0, 1769489, 10, 0, 1769490, 10, 0, 1769491, 10, 0, 1769492, 10, 0, 1769493, 10, 0, 1769494, 10, 0, 1769495, 10, 0, 1769496, 10, 0, 1769497, 10, 0, 1769498, 10, 0, 1769499, 10, 0, 1769500, 10, 0, 1769501, 10, 0, 1769502, 10, 0, 1769503, 10, 0, 1769504, 10, 0, 1769505, 10, 0, 1769506, 10, 0, 1769507, 10, 0, 1769508, 10, 0, 1769509, 10, 0, 1769510, 10, 0, 1769511, 10, 0, 1769512, 10, 0, 1769513, 10, 0, 1769514, 10, 0, 1769515, 10, 0, 1769516, 10, 0, 1769517, 10, 0, 1769518, 10, 0, 1769519, 10, 0, 1769520, 10, 0, 1769521, 10, 0, 1769522, 10, 0, 1769523, 10, 0, 1769524, 10, 0, 1769525, 10, 0, 1769526, 10, 0, 1769527, 10, 0, 1769528, 10, 0, 1769529, 10, 0, 1769530, 10, 0, 1769531, 10, 0, 1769532, 10, 0, 1769533, 10, 0, 1769534, 10, 0, 1769535, 10, 0, 1769536, 10, 0, 1769537, 10, 0, 1769538, 10, 0, 1769539, 10, 0, 1769540, 10, 0, 1769541, 10, 0 ) +__meta__ = { +"_edit_lock_": true +} + +[node name="Player" parent="." instance=ExtResource( 2 )] +position = Vector2( 251.684, 1045.6 ) + +[node name="ParallaxBg" parent="." instance=ExtResource( 3 )] + +[node name="Label" type="Label" parent="."] +margin_left = 12.0 +margin_top = -202.0 +margin_right = 358.0 +margin_bottom = -10.0 +size_flags_horizontal = 2 +size_flags_vertical = 0 +text = "This is a simple demo on how to make a platformer game with Godot.\"This version uses physics and the 2D physics engine for motion and collision.\"\"The demo also shows the benefits of using the scene system, where coins,\"enemies and the player are edited separatedly and instanced in the stage.\"\"To edit the base tiles for the tileset, open the tileset_edit.tscn file and follow \"instructions.\"" +autowrap = true + diff --git a/2d/physics_platformer/tileset.tres b/2d/physics_platformer/Tileset.tres similarity index 100% rename from 2d/physics_platformer/tileset.tres rename to 2d/physics_platformer/Tileset.tres diff --git a/2d/physics_platformer/TilesetEdit.tscn b/2d/physics_platformer/TilesetEdit.tscn new file mode 100644 index 00000000..5f3cfe7f --- /dev/null +++ b/2d/physics_platformer/TilesetEdit.tscn @@ -0,0 +1,159 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://tiles_demo.png" type="Texture" id=1] + +[node name="Node" type="Node"] + +[node name="Floor" type="Sprite" parent="."] +texture = ExtResource( 1 ) +region_rect = Rect2( 0, 0, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="Floor"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Floor/Collision"] +polygon = PoolVector2Array( 32, -24, 32, 32, -32, 32, -32, -24 ) + +[node name="Edge" type="Sprite" parent="."] +position = Vector2( 64, 0 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 64, 0, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="Edge"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Edge/Collision"] +polygon = PoolVector2Array( -32, -24, 24, -24, 24, 32, -32, 32 ) + +[node name="Wall" type="Sprite" parent="."] +position = Vector2( 64, 64 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 64, 64, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="Wall"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Wall/Collision"] +polygon = PoolVector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) + +[node name="WallDeco" type="Sprite" parent="."] +position = Vector2( 96, 128 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 320, 128, 128, 64 ) + +[node name="Collision" type="StaticBody2D" parent="WallDeco"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="WallDeco/Collision"] +polygon = PoolVector2Array( -64, -32, -8, -32, -8, 32, -64, 32 ) + +[node name="Corner" type="Sprite" parent="."] +position = Vector2( 64, 192 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 64, 128, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="Corner"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Corner/Collision"] +polygon = PoolVector2Array( -32, -32, 24, -32, 32, -24, 32, 32, -32, 32 ) + +[node name="Flowers" type="Sprite" parent="."] +position = Vector2( 128, 192 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 192, 192, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="Flowers"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Flowers/Collision"] +polygon = PoolVector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) + +[node name="TreeBase" type="Sprite" parent="."] +position = Vector2( 192, 192 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 256, 192, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="TreeBase"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="TreeBase/Collision"] +polygon = PoolVector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) + +[node name="TreeMid" type="Sprite" parent="."] +position = Vector2( 192, 128 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 256, 128, 64, 64 ) + +[node name="TreeMid2" type="Sprite" parent="."] +position = Vector2( 192, 64 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 256, 64, 64, 64 ) + +[node name="TreeTop" type="Sprite" parent="."] +position = Vector2( 192, 0 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 256, 0, 64, 64 ) + +[node name="Solid" type="Sprite" parent="."] +position = Vector2( 0, 64 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 0, 64, 64, 64 ) + +[node name="Ceiling" type="Sprite" parent="."] +position = Vector2( 0, 128 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 384, 64, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="Ceiling"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ceiling/Collision"] +polygon = PoolVector2Array( 32, -32, 32, 32, -32, 32, -32, -32 ) + +[node name="Ramp" type="Sprite" parent="."] +position = Vector2( 256, 224 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 128, 128, 64, 128 ) + +[node name="Collision" type="StaticBody2D" parent="Ramp"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Ramp/Collision"] +polygon = PoolVector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) + +[node name="CeilingWall" type="Sprite" parent="."] +position = Vector2( 0, 192 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 448, 64, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="CeilingWall"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="CeilingWall/Collision"] +polygon = PoolVector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) + +[node name="PlatformFloor" type="Sprite" parent="."] +position = Vector2( 0, 256 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 128, 0, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="PlatformFloor"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="PlatformFloor/Collision"] +polygon = PoolVector2Array( 32, -24, 32, 24, -32, 24, -32, -24 ) + +[node name="PlatformEdge" type="Sprite" parent="."] +position = Vector2( 64, 256 ) +texture = ExtResource( 1 ) +region_rect = Rect2( 192, 0, 64, 64 ) + +[node name="Collision" type="StaticBody2D" parent="PlatformEdge"] + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="PlatformEdge/Collision"] +polygon = PoolVector2Array( 24, -24, 24, 24, -32, 24, -32, -24 ) + +[node name="Help" type="Label" parent="."] +margin_left = 1.0 +margin_top = 331.0 +margin_right = 727.0 +margin_bottom = 422.0 +size_flags_horizontal = 2 +text = "This scene serves as a tool for editing the tileset. +Nodes (sprites) and their respective collisionsare edited here. + +To create a tileset from this, a \"TileSet\" resoucre must be created. Use the helper in: Scene -> Convert To -> TileSet. +This will save a tileset. Saving over it will merge your changes. + +Finally, the saved tileset resource (tileset.tres in this case), can be opened to be used into a TileMap node for editing a tile map." + diff --git a/2d/physics_platformer/music.ogg b/2d/physics_platformer/audio/music.ogg similarity index 100% rename from 2d/physics_platformer/music.ogg rename to 2d/physics_platformer/audio/music.ogg diff --git a/2d/physics_platformer/audio/music.ogg.import b/2d/physics_platformer/audio/music.ogg.import new file mode 100644 index 00000000..0a99e952 --- /dev/null +++ b/2d/physics_platformer/audio/music.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/music.ogg-552a37c4bfe46d894cb8004cf1c345ad.oggstr" + +[deps] + +source_file="res://audio/music.ogg" +dest_files=[ "res://.import/music.ogg-552a37c4bfe46d894cb8004cf1c345ad.oggstr" ] + +[params] + +loop=true +loop_offset=0 diff --git a/2d/physics_platformer/sound_coin.wav b/2d/physics_platformer/audio/sound_coin.wav similarity index 100% rename from 2d/physics_platformer/sound_coin.wav rename to 2d/physics_platformer/audio/sound_coin.wav diff --git a/2d/physics_platformer/audio/sound_coin.wav.import b/2d/physics_platformer/audio/sound_coin.wav.import new file mode 100644 index 00000000..02be70ac --- /dev/null +++ b/2d/physics_platformer/audio/sound_coin.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/sound_coin.wav-e18cceeba8b7dc02bbb940b85bcad99a.sample" + +[deps] + +source_file="res://audio/sound_coin.wav" +dest_files=[ "res://.import/sound_coin.wav-e18cceeba8b7dc02bbb940b85bcad99a.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/2d/physics_platformer/sound_explode.wav b/2d/physics_platformer/audio/sound_explode.wav similarity index 100% rename from 2d/physics_platformer/sound_explode.wav rename to 2d/physics_platformer/audio/sound_explode.wav diff --git a/2d/physics_platformer/audio/sound_explode.wav.import b/2d/physics_platformer/audio/sound_explode.wav.import new file mode 100644 index 00000000..52a56ab9 --- /dev/null +++ b/2d/physics_platformer/audio/sound_explode.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/sound_explode.wav-536668d880bfb277b9e5253774598e9e.sample" + +[deps] + +source_file="res://audio/sound_explode.wav" +dest_files=[ "res://.import/sound_explode.wav-536668d880bfb277b9e5253774598e9e.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/2d/physics_platformer/sound_hit.wav b/2d/physics_platformer/audio/sound_hit.wav similarity index 100% rename from 2d/physics_platformer/sound_hit.wav rename to 2d/physics_platformer/audio/sound_hit.wav diff --git a/2d/physics_platformer/audio/sound_hit.wav.import b/2d/physics_platformer/audio/sound_hit.wav.import new file mode 100644 index 00000000..cd0f653d --- /dev/null +++ b/2d/physics_platformer/audio/sound_hit.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/sound_hit.wav-6c98c4eeb2c6ac3fc45dc4a7ebd8602f.sample" + +[deps] + +source_file="res://audio/sound_hit.wav" +dest_files=[ "res://.import/sound_hit.wav-6c98c4eeb2c6ac3fc45dc4a7ebd8602f.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/2d/physics_platformer/sound_jump.wav b/2d/physics_platformer/audio/sound_jump.wav similarity index 100% rename from 2d/physics_platformer/sound_jump.wav rename to 2d/physics_platformer/audio/sound_jump.wav diff --git a/2d/physics_platformer/audio/sound_jump.wav.import b/2d/physics_platformer/audio/sound_jump.wav.import new file mode 100644 index 00000000..b0bb11e8 --- /dev/null +++ b/2d/physics_platformer/audio/sound_jump.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/sound_jump.wav-7e05b84e4426c7461dd15838765e210b.sample" + +[deps] + +source_file="res://audio/sound_jump.wav" +dest_files=[ "res://.import/sound_jump.wav-7e05b84e4426c7461dd15838765e210b.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/2d/physics_platformer/sound_shoot.wav b/2d/physics_platformer/audio/sound_shoot.wav similarity index 100% rename from 2d/physics_platformer/sound_shoot.wav rename to 2d/physics_platformer/audio/sound_shoot.wav diff --git a/2d/physics_platformer/audio/sound_shoot.wav.import b/2d/physics_platformer/audio/sound_shoot.wav.import new file mode 100644 index 00000000..34d93e79 --- /dev/null +++ b/2d/physics_platformer/audio/sound_shoot.wav.import @@ -0,0 +1,21 @@ +[remap] + +importer="wav" +type="AudioStreamSample" +path="res://.import/sound_shoot.wav-a37772efd1dbcd76c4fe35742f502bb7.sample" + +[deps] + +source_file="res://audio/sound_shoot.wav" +dest_files=[ "res://.import/sound_shoot.wav-a37772efd1dbcd76c4fe35742f502bb7.sample" ] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=true +edit/normalize=true +edit/loop=false +compress/mode=0 diff --git a/2d/physics_platformer/background/ParallaxBg.tscn b/2d/physics_platformer/background/ParallaxBg.tscn new file mode 100644 index 00000000..986a672d --- /dev/null +++ b/2d/physics_platformer/background/ParallaxBg.tscn @@ -0,0 +1,74 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://background/scroll_bg_sky.png" type="Texture" id=1] +[ext_resource path="res://background/scroll_bg_cloud_1.png" type="Texture" id=2] +[ext_resource path="res://background/scroll_bg_cloud_2.png" type="Texture" id=3] +[ext_resource path="res://background/scroll_bg_cloud_3.png" type="Texture" id=4] +[ext_resource path="res://background/scroll_bg_fg_2.png" type="Texture" id=5] +[ext_resource path="res://background/scroll_bg_fg_1.png" type="Texture" id=6] + +[node name="ParallaxBg" type="ParallaxBackground"] +scroll_base_scale = Vector2( 0.7, 0 ) + +[node name="Sky" type="ParallaxLayer" parent="."] +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="Sky"] +scale = Vector2( 32, 0.94 ) +texture = ExtResource( 1 ) +centered = false + +[node name="Clouds" type="ParallaxLayer" parent="."] +motion_scale = Vector2( 0.1, 1 ) +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite1" type="Sprite" parent="Clouds"] +position = Vector2( 28, 127 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite2" type="Sprite" parent="Clouds"] +position = Vector2( 404, 24 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite3" type="Sprite" parent="Clouds"] +position = Vector2( 154, 46 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite4" type="Sprite" parent="Clouds"] +position = Vector2( 525, 130 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite5" type="Sprite" parent="Clouds"] +position = Vector2( 255, 158 ) +texture = ExtResource( 4 ) +centered = false + +[node name="Sprite6" type="Sprite" parent="Clouds"] +position = Vector2( 674, 70 ) +texture = ExtResource( 4 ) +centered = false + +[node name="Mount2" type="ParallaxLayer" parent="."] +motion_scale = Vector2( 0.2, 1 ) +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="Mount2"] +position = Vector2( 0, 225 ) +texture = ExtResource( 5 ) +centered = false +region_rect = Rect2( 0, 0, 800, 256 ) + +[node name="Mount1" type="ParallaxLayer" parent="."] +motion_scale = Vector2( 0.4, 1 ) +motion_mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="Mount1"] +position = Vector2( 0, 225 ) +texture = ExtResource( 6 ) +centered = false +region_rect = Rect2( 0, 0, 800, 256 ) + diff --git a/2d/physics_platformer/background/Seesaw.tscn b/2d/physics_platformer/background/Seesaw.tscn new file mode 100644 index 00000000..98ceca7e --- /dev/null +++ b/2d/physics_platformer/background/Seesaw.tscn @@ -0,0 +1,26 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://background/plank.png" type="Texture" id=1] +[ext_resource path="res://background/plankpin.png" type="Texture" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 128, 8 ) + +[node name="Seesaw" type="Node2D"] + +[node name="Plank" type="RigidBody2D" parent="."] +mass = 5.10204 + +[node name="Sprite" type="Sprite" parent="Plank"] +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Plank"] +shape = SubResource( 1 ) + +[node name="Pin" type="PinJoint2D" parent="."] +node_a = NodePath("../plank") + +[node name="Sprite" type="Sprite" parent="."] +position = Vector2( -0.290825, 20.2425 ) +texture = ExtResource( 2 ) + diff --git a/2d/physics_platformer/plank.png b/2d/physics_platformer/background/plank.png similarity index 100% rename from 2d/physics_platformer/plank.png rename to 2d/physics_platformer/background/plank.png diff --git a/2d/physics_platformer/plank.png.import b/2d/physics_platformer/background/plank.png.import similarity index 59% rename from 2d/physics_platformer/plank.png.import rename to 2d/physics_platformer/background/plank.png.import index 28d0aec4..1cd32f1d 100644 --- a/2d/physics_platformer/plank.png.import +++ b/2d/physics_platformer/background/plank.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/plank.png-1bbc55bc0ea546386ad520f861cb9ff9.stex" +path="res://.import/plank.png-d70731fc82f225d8353819786c2ed28a.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://plank.png" -source_md5="28f8eb328fb1fde3d65c243e1ae25725" - -dest_files=[ "res://.import/plank.png-1bbc55bc0ea546386ad520f861cb9ff9.stex" ] -dest_md5="4fe094c2877ef1b9c6ede602be7118ec" +source_file="res://background/plank.png" +dest_files=[ "res://.import/plank.png-d70731fc82f225d8353819786c2ed28a.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/plankpin.png b/2d/physics_platformer/background/plankpin.png similarity index 100% rename from 2d/physics_platformer/plankpin.png rename to 2d/physics_platformer/background/plankpin.png diff --git a/2d/physics_platformer/plankpin.png.import b/2d/physics_platformer/background/plankpin.png.import similarity index 58% rename from 2d/physics_platformer/plankpin.png.import rename to 2d/physics_platformer/background/plankpin.png.import index c368b03a..9c2663bc 100644 --- a/2d/physics_platformer/plankpin.png.import +++ b/2d/physics_platformer/background/plankpin.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/plankpin.png-5a03e8bdc3cbf81fc9d7a4c7873b7dc0.stex" +path="res://.import/plankpin.png-68d06cc4b9ab95f9d0142d1a4c768140.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://plankpin.png" -source_md5="ac4e469b71f5d466f8212f0d6c8ca7aa" - -dest_files=[ "res://.import/plankpin.png-5a03e8bdc3cbf81fc9d7a4c7873b7dc0.stex" ] -dest_md5="99fa804f6514a65d1f533d80da8e54bf" +source_file="res://background/plankpin.png" +dest_files=[ "res://.import/plankpin.png-68d06cc4b9ab95f9d0142d1a4c768140.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/scroll_bg_cloud_1.png b/2d/physics_platformer/background/scroll_bg_cloud_1.png similarity index 100% rename from 2d/physics_platformer/scroll_bg_cloud_1.png rename to 2d/physics_platformer/background/scroll_bg_cloud_1.png diff --git a/2d/physics_platformer/scroll_bg_cloud_1.png.import b/2d/physics_platformer/background/scroll_bg_cloud_1.png.import similarity index 55% rename from 2d/physics_platformer/scroll_bg_cloud_1.png.import rename to 2d/physics_platformer/background/scroll_bg_cloud_1.png.import index 82c7b44c..844cb7d6 100644 --- a/2d/physics_platformer/scroll_bg_cloud_1.png.import +++ b/2d/physics_platformer/background/scroll_bg_cloud_1.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/scroll_bg_cloud_1.png-bad76c04aedb60c1b863fc1c1c6387ee.stex" +path="res://.import/scroll_bg_cloud_1.png-19f55c25a7e1985c92542faa0106888e.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://scroll_bg_cloud_1.png" -source_md5="469ececd0862fb9ee972f4c9afa833e5" - -dest_files=[ "res://.import/scroll_bg_cloud_1.png-bad76c04aedb60c1b863fc1c1c6387ee.stex" ] -dest_md5="2bafbc3854a3abad3d1464c5793f5815" +source_file="res://background/scroll_bg_cloud_1.png" +dest_files=[ "res://.import/scroll_bg_cloud_1.png-19f55c25a7e1985c92542faa0106888e.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/scroll_bg_cloud_2.png b/2d/physics_platformer/background/scroll_bg_cloud_2.png similarity index 100% rename from 2d/physics_platformer/scroll_bg_cloud_2.png rename to 2d/physics_platformer/background/scroll_bg_cloud_2.png diff --git a/2d/physics_platformer/scroll_bg_cloud_2.png.import b/2d/physics_platformer/background/scroll_bg_cloud_2.png.import similarity index 55% rename from 2d/physics_platformer/scroll_bg_cloud_2.png.import rename to 2d/physics_platformer/background/scroll_bg_cloud_2.png.import index d1552394..6b2163fe 100644 --- a/2d/physics_platformer/scroll_bg_cloud_2.png.import +++ b/2d/physics_platformer/background/scroll_bg_cloud_2.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/scroll_bg_cloud_2.png-cb251e8e91cb5450d56a9d0584943db0.stex" +path="res://.import/scroll_bg_cloud_2.png-869806dcc546591f3d754e3b845c61c9.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://scroll_bg_cloud_2.png" -source_md5="5acccab15a17f158a267e2cbf2c8d037" - -dest_files=[ "res://.import/scroll_bg_cloud_2.png-cb251e8e91cb5450d56a9d0584943db0.stex" ] -dest_md5="a8e0aaff2215a5fc5c4e98ac28cc7158" +source_file="res://background/scroll_bg_cloud_2.png" +dest_files=[ "res://.import/scroll_bg_cloud_2.png-869806dcc546591f3d754e3b845c61c9.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/scroll_bg_cloud_3.png b/2d/physics_platformer/background/scroll_bg_cloud_3.png similarity index 100% rename from 2d/physics_platformer/scroll_bg_cloud_3.png rename to 2d/physics_platformer/background/scroll_bg_cloud_3.png diff --git a/2d/physics_platformer/scroll_bg_cloud_3.png.import b/2d/physics_platformer/background/scroll_bg_cloud_3.png.import similarity index 55% rename from 2d/physics_platformer/scroll_bg_cloud_3.png.import rename to 2d/physics_platformer/background/scroll_bg_cloud_3.png.import index c3e8abbd..86fe28b4 100644 --- a/2d/physics_platformer/scroll_bg_cloud_3.png.import +++ b/2d/physics_platformer/background/scroll_bg_cloud_3.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/scroll_bg_cloud_3.png-6bbd67870db2f55a0c1b4685aa91e57c.stex" +path="res://.import/scroll_bg_cloud_3.png-831c6ed9fa8b4070081428a936bcc2f7.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://scroll_bg_cloud_3.png" -source_md5="b5e117acfbd6979087b6ac12f030bfcb" - -dest_files=[ "res://.import/scroll_bg_cloud_3.png-6bbd67870db2f55a0c1b4685aa91e57c.stex" ] -dest_md5="156719b40a3d6eeb72c9992c371e9e06" +source_file="res://background/scroll_bg_cloud_3.png" +dest_files=[ "res://.import/scroll_bg_cloud_3.png-831c6ed9fa8b4070081428a936bcc2f7.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/scroll_bg_fg_1.png b/2d/physics_platformer/background/scroll_bg_fg_1.png similarity index 100% rename from 2d/physics_platformer/scroll_bg_fg_1.png rename to 2d/physics_platformer/background/scroll_bg_fg_1.png diff --git a/2d/physics_platformer/scroll_bg_fg_1.png.import b/2d/physics_platformer/background/scroll_bg_fg_1.png.import similarity index 56% rename from 2d/physics_platformer/scroll_bg_fg_1.png.import rename to 2d/physics_platformer/background/scroll_bg_fg_1.png.import index 9fdaac0b..b95e9504 100644 --- a/2d/physics_platformer/scroll_bg_fg_1.png.import +++ b/2d/physics_platformer/background/scroll_bg_fg_1.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/scroll_bg_fg_1.png-af0d9d2847aea6e03f54efcc2d9b6f06.stex" +path="res://.import/scroll_bg_fg_1.png-20c90ebded5095c6863cdf6b1b82882d.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://scroll_bg_fg_1.png" -source_md5="7b7b3b723bb49a3c3794fb11d24d7600" - -dest_files=[ "res://.import/scroll_bg_fg_1.png-af0d9d2847aea6e03f54efcc2d9b6f06.stex" ] -dest_md5="870592f1c5cb451e3b9b101d1f0f3cf2" +source_file="res://background/scroll_bg_fg_1.png" +dest_files=[ "res://.import/scroll_bg_fg_1.png-20c90ebded5095c6863cdf6b1b82882d.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/scroll_bg_fg_2.png b/2d/physics_platformer/background/scroll_bg_fg_2.png similarity index 100% rename from 2d/physics_platformer/scroll_bg_fg_2.png rename to 2d/physics_platformer/background/scroll_bg_fg_2.png diff --git a/2d/physics_platformer/scroll_bg_fg_2.png.import b/2d/physics_platformer/background/scroll_bg_fg_2.png.import similarity index 56% rename from 2d/physics_platformer/scroll_bg_fg_2.png.import rename to 2d/physics_platformer/background/scroll_bg_fg_2.png.import index 5d515155..eca2580e 100644 --- a/2d/physics_platformer/scroll_bg_fg_2.png.import +++ b/2d/physics_platformer/background/scroll_bg_fg_2.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/scroll_bg_fg_2.png-2419a5b3b81617ba71d0ad50d23bf6f1.stex" +path="res://.import/scroll_bg_fg_2.png-2b54decd69e8aff2caa33640a336d1e9.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://scroll_bg_fg_2.png" -source_md5="4e0e7290a3706ac8b25a9cdcdcd86a22" - -dest_files=[ "res://.import/scroll_bg_fg_2.png-2419a5b3b81617ba71d0ad50d23bf6f1.stex" ] -dest_md5="c8ac2a13834166a1e6089723cff0b7e6" +source_file="res://background/scroll_bg_fg_2.png" +dest_files=[ "res://.import/scroll_bg_fg_2.png-2b54decd69e8aff2caa33640a336d1e9.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/scroll_bg_sky.png b/2d/physics_platformer/background/scroll_bg_sky.png similarity index 100% rename from 2d/physics_platformer/scroll_bg_sky.png rename to 2d/physics_platformer/background/scroll_bg_sky.png diff --git a/2d/physics_platformer/scroll_bg_sky.png.import b/2d/physics_platformer/background/scroll_bg_sky.png.import similarity index 56% rename from 2d/physics_platformer/scroll_bg_sky.png.import rename to 2d/physics_platformer/background/scroll_bg_sky.png.import index b2f3e5c3..70c3d74a 100644 --- a/2d/physics_platformer/scroll_bg_sky.png.import +++ b/2d/physics_platformer/background/scroll_bg_sky.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/scroll_bg_sky.png-df3e8b7d076f566a7bd83c6d4f9b57cf.stex" +path="res://.import/scroll_bg_sky.png-377ea542199b2e23d7a822ed940ea99e.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://scroll_bg_sky.png" -source_md5="8bd7da5f8f7bde4409890946fa92d678" - -dest_files=[ "res://.import/scroll_bg_sky.png-df3e8b7d076f566a7bd83c6d4f9b57cf.stex" ] -dest_md5="78e807a4df94f72516cc399479809e5a" +source_file="res://background/scroll_bg_sky.png" +dest_files=[ "res://.import/scroll_bg_sky.png-377ea542199b2e23d7a822ed940ea99e.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/bullet.tscn b/2d/physics_platformer/bullet.tscn deleted file mode 100644 index 28a359c7..00000000 --- a/2d/physics_platformer/bullet.tscn +++ /dev/null @@ -1,173 +0,0 @@ -[gd_scene load_steps=7 format=2] - -[ext_resource path="res://bullet.gd" type="Script" id=1] -[ext_resource path="res://bullet.png" type="Texture" id=2] - -[sub_resource type="CanvasItemMaterial" id=1] - -render_priority = 0 -blend_mode = 1 -light_mode = 0 - -[sub_resource type="ParticlesMaterial" id=4] - -render_priority = 0 -trail_divisor = 1 -emission_shape = 0 -flag_align_y = false -flag_rotate_y = false -flag_disable_z = true -spread = 0.0 -flatness = 0.0 -gravity = Vector3( 0, 0, 0 ) -initial_velocity = 1.0 -initial_velocity_random = 0.0 -angular_velocity = 38.0 -angular_velocity_random = 0.0 -orbit_velocity = 0.0 -orbit_velocity_random = 0.0 -linear_accel = 0.0 -linear_accel_random = 0.0 -radial_accel = 0.0 -radial_accel_random = 0.0 -tangential_accel = 0.0 -tangential_accel_random = 0.0 -damping = 0.0 -damping_random = 0.0 -angle = 0.0 -angle_random = 0.0 -scale = 0.8 -scale_random = 0.0 -color = Color( 1, 1, 1, 1 ) -hue_variation = 0.0 -hue_variation_random = 0.0 -anim_speed = 0.0 -anim_speed_random = 0.0 -anim_offset = 0.0 -anim_offset_random = 0.0 -anim_loop = false -_sections_unfolded = [ "Scale" ] - -[sub_resource type="CircleShape2D" id=2] - -custom_solver_bias = 0.0 -radius = 10.0 - -[sub_resource type="Animation" id=3] - -length = 1.5 -loop = false -step = 0.1 -tracks/0/type = "method" -tracks/0/path = NodePath(".") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/keys = { -"times": PoolRealArray( 1.31 ), -"transitions": PoolRealArray( 1 ), -"values": [ { -"args": [ ], -"method": "queue_free" -} ] -} -tracks/1/type = "value" -tracks/1/path = NodePath("sprite:modulate") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/keys = { -"times": PoolRealArray( 0, 1.03 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] -} -tracks/2/type = "value" -tracks/2/path = NodePath("Particles2D:self_modulate") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/keys = { -"times": PoolRealArray( 0, 0.5 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] -} - -[node name="bullet" type="RigidBody2D"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -mode = 0 -mass = 1.0 -friction = 1.0 -bounce = 0.0 -gravity_scale = 1.0 -custom_integrator = false -continuous_cd = 2 -contacts_reported = 0 -contact_monitor = false -sleeping = false -can_sleep = true -linear_velocity = Vector2( 0, 0 ) -linear_damp = -1.0 -angular_velocity = 0.0 -angular_damp = -1.0 -script = ExtResource( 1 ) - -[node name="Particles2D" type="Particles2D" parent="." index="0"] - -material = SubResource( 1 ) -emitting = true -amount = 8 -lifetime = 0.3 -one_shot = false -preprocess = 0.0 -speed_scale = 3.0 -explosiveness = 0.0 -randomness = 0.0 -fixed_fps = 0 -fract_delta = true -visibility_rect = Rect2( -100, -100, 200, 200 ) -local_coords = false -draw_order = 0 -process_material = SubResource( 4 ) -texture = ExtResource( 2 ) -normal_map = null -h_frames = 1 -v_frames = 1 -_sections_unfolded = [ "Process Material", "Time", "Visibility" ] - -[node name="sprite" type="Sprite" parent="." index="1"] - -texture = ExtResource( 2 ) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="2"] - -shape = SubResource( 2 ) - -[node name="Timer" type="Timer" parent="." index="3"] - -process_mode = 1 -wait_time = 1.0 -one_shot = true -autostart = false - -[node name="anim" type="AnimationPlayer" parent="." index="4"] - -playback_process_mode = 1 -playback_default_blend_time = 0.0 -root_node = NodePath("..") -anims/shutdown = SubResource( 3 ) -playback/active = true -playback/speed = 1.0 -blend_times = [ ] -autoplay = "" - -[connection signal="timeout" from="Timer" to="." method="disable"] - - diff --git a/2d/physics_platformer/coin.gd b/2d/physics_platformer/coin.gd deleted file mode 100644 index 1daaa1aa..00000000 --- a/2d/physics_platformer/coin.gd +++ /dev/null @@ -1,18 +0,0 @@ -extends Area2D - -# Member variables -var taken = false - - -func _on_body_enter( body ): - if not taken and body is preload("res://player.gd"): - $anim.play("taken") - taken = true - - -func _on_coin_area_enter(area): - pass # replace with function body - - -func _on_coin_area_enter_shape(area_id, area, area_shape, area_shape): - pass # replace with function body diff --git a/2d/physics_platformer/coin.tscn b/2d/physics_platformer/coin/Coin.tscn similarity index 51% rename from 2d/physics_platformer/coin.tscn rename to 2d/physics_platformer/coin/Coin.tscn index e39c4093..ab0a26e5 100644 --- a/2d/physics_platformer/coin.tscn +++ b/2d/physics_platformer/coin/Coin.tscn @@ -1,21 +1,21 @@ [gd_scene load_steps=12 format=2] -[ext_resource path="res://coin.gd" type="Script" id=1] -[ext_resource path="res://coin.png" type="Texture" id=2] -[ext_resource path="res://sound_coin.wav" type="AudioStream" id=3] -[ext_resource path="res://bullet.png" type="Texture" id=4] +[ext_resource path="res://coin/coin.gd" type="Script" id=1] +[ext_resource path="res://coin/coin.png" type="Texture" id=2] +[ext_resource path="res://audio/sound_coin.wav" type="AudioStream" id=3] +[ext_resource path="res://player/bullet.png" type="Texture" id=4] [sub_resource type="Animation" id=1] - resource_name = "spin" length = 1.5 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1 ), @@ -24,15 +24,14 @@ tracks/0/keys = { } [sub_resource type="Animation" id=2] - length = 8.0 -loop = false step = 0.0 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -40,10 +39,11 @@ tracks/0/keys = { "values": [ 0 ] } tracks/1/type = "value" -tracks/1/path = NodePath("particles:emitting") +tracks/1/path = NodePath("Particles:emitting") tracks/1/interp = 1 tracks/1/loop_wrap = true tracks/1/imported = false +tracks/1/enabled = true tracks/1/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -55,6 +55,7 @@ tracks/2/path = NodePath(".") tracks/2/interp = 1 tracks/2/loop_wrap = true tracks/2/imported = false +tracks/2/enabled = true tracks/2/keys = { "times": PoolRealArray( 2.7 ), "transitions": PoolRealArray( 1 ), @@ -64,10 +65,11 @@ tracks/2/keys = { } ] } tracks/3/type = "value" -tracks/3/path = NodePath("sound:playing") +tracks/3/path = NodePath("Sound:playing") tracks/3/interp = 1 tracks/3/loop_wrap = true tracks/3/imported = false +tracks/3/enabled = true tracks/3/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -75,10 +77,11 @@ tracks/3/keys = { "values": [ true ] } tracks/4/type = "value" -tracks/4/path = NodePath("sprite:self_modulate") +tracks/4/path = NodePath("Sprite:self_modulate") tracks/4/interp = 1 tracks/4/loop_wrap = true tracks/4/imported = false +tracks/4/enabled = true tracks/4/keys = { "times": PoolRealArray( 0, 0.41 ), "transitions": PoolRealArray( 1, 1 ), @@ -88,142 +91,53 @@ tracks/4/keys = { [sub_resource type="CircleShape2D" id=3] -custom_solver_bias = 0.0 -radius = 10.0 - [sub_resource type="CanvasItemMaterial" id=4] - -render_priority = 0 blend_mode = 1 -light_mode = 0 [sub_resource type="Curve" id=5] -min_value = 0.0 -max_value = 1.0 -bake_resolution = 100 -_data = [ ] - [sub_resource type="CurveTexture" id=6] - -width = 2048 curve = SubResource( 5 ) [sub_resource type="ParticlesMaterial" id=7] - -render_priority = 0 -trail_divisor = 1 emission_shape = 1 emission_sphere_radius = 20.0 -flag_align_y = false -flag_rotate_y = false flag_disable_z = true -spread = 45.0 -flatness = 0.0 gravity = Vector3( 0, 0, 0 ) initial_velocity = 1.0 -initial_velocity_random = 0.0 -angular_velocity = 0.0 -angular_velocity_random = 0.0 orbit_velocity = 0.0 orbit_velocity_random = 0.0 -linear_accel = 0.0 -linear_accel_random = 0.0 -radial_accel = 0.0 -radial_accel_random = 0.0 -tangential_accel = 0.0 -tangential_accel_random = 0.0 -damping = 0.0 -damping_random = 0.0 -angle = 0.0 -angle_random = 0.0 scale = 0.3 -scale_random = 0.0 scale_curve = SubResource( 6 ) -color = Color( 1, 1, 1, 1 ) -hue_variation = 0.0 -hue_variation_random = 0.0 -anim_speed = 0.0 -anim_speed_random = 0.0 -anim_offset = 0.0 -anim_offset_random = 0.0 -anim_loop = false -[node name="coin" type="Area2D"] - -input_pickable = true -gravity_vec = Vector2( 0, 1 ) -gravity = 98.0 -linear_damp = 0.1 -angular_damp = 1.0 -audio_bus_override = false -audio_bus_name = "Master" +[node name="Coin" type="Area2D"] script = ExtResource( 1 ) -[node name="sprite" type="Sprite" parent="."] - +[node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 2 ) hframes = 4 -[node name="anim" type="AnimationPlayer" parent="."] - -playback_process_mode = 1 -playback_default_blend_time = 0.0 -root_node = NodePath("..") +[node name="Anim" type="AnimationPlayer" parent="."] +autoplay = "spin" anims/spin = SubResource( 1 ) anims/taken = SubResource( 2 ) -playback/active = true -playback/speed = 3.0 -blend_times = [ ] -autoplay = "spin" - -[node name="collision" type="CollisionShape2D" parent="."] +[node name="Collision" type="CollisionShape2D" parent="."] shape = SubResource( 3 ) -[node name="sound" type="AudioStreamPlayer2D" parent="."] - +[node name="Sound" type="AudioStreamPlayer2D" parent="."] stream = ExtResource( 3 ) -volume_db = 0.0 -autoplay = false -max_distance = 2000.0 -attenuation = 1.0 -bus = "Master" -area_mask = 1 - -[node name="particles" type="Particles2D" parent="."] +[node name="Particles" type="Particles2D" parent="."] modulate = Color( 0.596863, 0.638745, 1, 1 ) material = SubResource( 4 ) emitting = false -amount = 8 -lifetime = 1.0 one_shot = true -preprocess = 0.0 -speed_scale = 1.0 explosiveness = 0.7 -randomness = 0.0 -fixed_fps = 0 -fract_delta = true -visibility_rect = Rect2( -100, -100, 200, 200 ) -local_coords = true -draw_order = 0 process_material = SubResource( 7 ) texture = ExtResource( 4 ) -normal_map = null -h_frames = 1 -v_frames = 1 -[node name="enabler" type="VisibilityEnabler2D" parent="."] - -rect = Rect2( -10, -10, 20, 20 ) -pause_animations = true -freeze_bodies = true +[node name="Enabler" type="VisibilityEnabler2D" parent="."] pause_particles = false -pause_animated_sprites = true -process_parent = false -physics_process_parent = false [connection signal="body_entered" from="." to="." method="_on_body_enter"] - - diff --git a/2d/physics_platformer/coin/coin.gd b/2d/physics_platformer/coin/coin.gd new file mode 100644 index 00000000..11809126 --- /dev/null +++ b/2d/physics_platformer/coin/coin.gd @@ -0,0 +1,11 @@ +extends Area2D + +class_name Coin + +# Member variables +var taken = false + + +func _on_body_enter( body ): + if not taken and body is Player: + ($Anim as AnimationPlayer).play("taken") \ No newline at end of file diff --git a/2d/physics_platformer/coin.png b/2d/physics_platformer/coin/coin.png similarity index 100% rename from 2d/physics_platformer/coin.png rename to 2d/physics_platformer/coin/coin.png diff --git a/2d/physics_platformer/coin.png.import b/2d/physics_platformer/coin/coin.png.import similarity index 59% rename from 2d/physics_platformer/coin.png.import rename to 2d/physics_platformer/coin/coin.png.import index e4794a7b..6090e6df 100644 --- a/2d/physics_platformer/coin.png.import +++ b/2d/physics_platformer/coin/coin.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/coin.png-7e710de472b75b3653c3283ef5153eb4.stex" +path="res://.import/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://coin.png" -source_md5="e222f7ea0cf168c4da9b5beff4035f2c" - -dest_files=[ "res://.import/coin.png-7e710de472b75b3653c3283ef5153eb4.stex" ] -dest_md5="6ddc3149e946e3fc81f8d94eccdc03aa" +source_file="res://coin/coin.png" +dest_files=[ "res://.import/coin.png-c9e5c2f51b2a10beb2d794afbbee004f.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/enemy.tscn b/2d/physics_platformer/enemy.tscn deleted file mode 100644 index d67365f1..00000000 --- a/2d/physics_platformer/enemy.tscn +++ /dev/null @@ -1,282 +0,0 @@ -[gd_scene load_steps=13 format=2] - -[ext_resource path="res://enemy.gd" type="Script" id=1] -[ext_resource path="res://enemy.png" type="Texture" id=2] -[ext_resource path="res://bullet.png" type="Texture" id=3] -[ext_resource path="res://sound_hit.wav" type="AudioStream" id=4] -[ext_resource path="res://sound_explode.wav" type="AudioStream" id=5] - -[sub_resource type="Animation" id=1] - -resource_name = "explode" -length = 6.0 -loop = false -step = 0.0 -tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/keys = { -"times": PoolRealArray( 0 ), -"transitions": PoolRealArray( 1 ), -"update": 0, -"values": [ 4 ] -} -tracks/1/type = "value" -tracks/1/path = NodePath("Particles2D:emitting") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/imported = false -tracks/1/keys = { -"times": PoolRealArray( 3.47394 ), -"transitions": PoolRealArray( 1 ), -"update": 1, -"values": [ true ] -} -tracks/2/type = "method" -tracks/2/path = NodePath(".") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/imported = false -tracks/2/keys = { -"times": PoolRealArray( 3.20357, 5.07305 ), -"transitions": PoolRealArray( 1, 1 ), -"values": [ { -"args": [ ], -"method": "_pre_explode" -}, { -"args": [ ], -"method": "_die" -} ] -} -tracks/3/type = "value" -tracks/3/path = NodePath("sprite:self_modulate") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/imported = false -tracks/3/keys = { -"times": PoolRealArray( 3.55, 4.32 ), -"transitions": PoolRealArray( 1, 1 ), -"update": 0, -"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] -} - -[sub_resource type="Animation" id=2] - -length = 6.75 -loop = true -step = 0.25 -tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/keys = { -"times": PoolRealArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ), -"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), -"update": 1, -"values": [ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ] -} - -[sub_resource type="Animation" id=3] - -resource_name = "walk" -length = 1.25 -loop = true -step = 0.25 -tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/imported = false -tracks/0/keys = { -"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), -"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), -"update": 1, -"values": [ 0, 1, 2, 3, 4, 0 ] -} - -[sub_resource type="CircleShape2D" id=4] - -custom_solver_bias = 0.0 -radius = 14.0 - -[sub_resource type="Gradient" id=5] - -offsets = PoolRealArray( 0, 0.564972, 1 ) -colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0.915254, 1, 1, 1, 0 ) - -[sub_resource type="GradientTexture" id=6] - -gradient = SubResource( 5 ) -width = 2048 - -[sub_resource type="ParticlesMaterial" id=7] - -render_priority = 0 -trail_divisor = 1 -emission_shape = 1 -emission_sphere_radius = 20.0 -flag_align_y = false -flag_rotate_y = false -flag_disable_z = true -spread = 180.0 -flatness = 0.0 -gravity = Vector3( 0, 98, 0 ) -initial_velocity = 322.73 -initial_velocity_random = 0.0 -angular_velocity = 0.0 -angular_velocity_random = 0.0 -orbit_velocity = 0.0 -orbit_velocity_random = 0.0 -linear_accel = 0.0 -linear_accel_random = 0.0 -radial_accel = 0.0 -radial_accel_random = 0.0 -tangential_accel = 0.0 -tangential_accel_random = 0.0 -damping = 0.0 -damping_random = 0.0 -angle = 0.0 -angle_random = 0.0 -scale = 2.4 -scale_random = 0.0 -color_ramp = SubResource( 6 ) -hue_variation = 0.0 -hue_variation_random = 0.0 -anim_speed = 0.0 -anim_speed_random = 0.0 -anim_offset = 0.0 -anim_offset_random = 0.0 -anim_loop = false - -[node name="enemy" type="RigidBody2D"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -mode = 2 -mass = 1.0 -friction = 0.0 -bounce = 0.0 -gravity_scale = 1.0 -custom_integrator = false -continuous_cd = 0 -contacts_reported = 4 -contact_monitor = false -sleeping = false -can_sleep = true -linear_velocity = Vector2( 0, 0 ) -linear_damp = -1.0 -angular_velocity = 0.0 -angular_damp = -1.0 -script = ExtResource( 1 ) - -[node name="enabler" type="VisibilityEnabler2D" parent="."] - -position = Vector2( 16.2569, 11.0034 ) -scale = Vector2( 23.5056, 10.8629 ) -rect = Rect2( -10, -10, 20, 20 ) -pause_animations = true -freeze_bodies = true -pause_particles = false -pause_animated_sprites = true -process_parent = false -physics_process_parent = false - -[node name="anim" type="AnimationPlayer" parent="."] - -playback_process_mode = 1 -playback_default_blend_time = 0.0 -root_node = NodePath("..") -anims/explode = SubResource( 1 ) -anims/idle = SubResource( 2 ) -anims/walk = SubResource( 3 ) -playback/active = true -playback/speed = 3.0 -blend_times = [ ] -autoplay = "" - -[node name="sprite" type="Sprite" parent="."] - -texture = ExtResource( 2 ) -hframes = 8 -frame = 4 - -[node name="shape1" type="CollisionShape2D" parent="."] - -position = Vector2( -1.08072, -2.16144 ) -shape = SubResource( 4 ) - -[node name="shape2" type="CollisionShape2D" parent="."] - -position = Vector2( 6.48431, 3.24216 ) -shape = SubResource( 4 ) - -[node name="shape3" type="CollisionShape2D" parent="."] - -position = Vector2( -12.495, 3.53415 ) -shape = SubResource( 4 ) - -[node name="raycast_left" type="RayCast2D" parent="."] - -position = Vector2( -33.2868, -9.34363 ) -enabled = true -exclude_parent = true -cast_to = Vector2( 0, 45 ) -collision_mask = 1 -type_mask = 15 - -[node name="raycast_right" type="RayCast2D" parent="."] - -position = Vector2( 29.1987, -9.34363 ) -enabled = true -exclude_parent = true -cast_to = Vector2( 0, 45 ) -collision_mask = 1 -type_mask = 15 - -[node name="Particles2D" type="Particles2D" parent="."] - -modulate = Color( 1, 1, 1, 0.685843 ) -emitting = false -amount = 8 -lifetime = 0.5 -one_shot = true -preprocess = 0.0 -speed_scale = 1.0 -explosiveness = 0.86 -randomness = 0.0 -fixed_fps = 0 -fract_delta = true -visibility_rect = Rect2( -100, -100, 200, 200 ) -local_coords = true -draw_order = 4 -process_material = SubResource( 7 ) -texture = ExtResource( 3 ) -normal_map = null -h_frames = 1 -v_frames = 1 - -[node name="sound_hit" type="AudioStreamPlayer2D" parent="."] - -stream = ExtResource( 4 ) -volume_db = 0.0 -autoplay = false -max_distance = 2000.0 -attenuation = 1.0 -bus = "Master" -area_mask = 1 - -[node name="sound_explode" type="AudioStreamPlayer2D" parent="."] - -stream = ExtResource( 5 ) -volume_db = 0.0 -autoplay = false -max_distance = 2000.0 -attenuation = 1.0 -bus = "Master" -area_mask = 1 - - diff --git a/2d/physics_platformer/enemy/Enemy.tscn b/2d/physics_platformer/enemy/Enemy.tscn new file mode 100644 index 00000000..88c1f3f6 --- /dev/null +++ b/2d/physics_platformer/enemy/Enemy.tscn @@ -0,0 +1,183 @@ +[gd_scene load_steps=14 format=2] + +[ext_resource path="res://enemy/enemy.gd" type="Script" id=1] +[ext_resource path="res://enemy/enemy.png" type="Texture" id=2] +[ext_resource path="res://player/bullet.png" type="Texture" id=3] +[ext_resource path="res://audio/sound_hit.wav" type="AudioStream" id=4] +[ext_resource path="res://audio/sound_explode.wav" type="AudioStream" id=5] + +[sub_resource type="PhysicsMaterial" id=1] +friction = 0.0 + +[sub_resource type="Animation" id=2] +length = 6.0 +step = 0.0 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ 4 ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Particles2D:emitting") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 3.47394 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/2/type = "method" +tracks/2/path = NodePath(".") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 3.20357, 5.07305 ), +"transitions": PoolRealArray( 1, 1 ), +"values": [ { +"args": [ ], +"method": "_pre_explode" +}, { +"args": [ ], +"method": "_die" +} ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Sprite:self_modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 3.55, 4.32 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} + +[sub_resource type="Animation" id=3] +length = 6.75 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ] +} + +[sub_resource type="Animation" id=4] +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), +"update": 1, +"values": [ 0, 1, 2, 3, 4, 0 ] +} + +[sub_resource type="CircleShape2D" id=5] +radius = 14.0 + +[sub_resource type="Gradient" id=6] +offsets = PoolRealArray( 0, 0.564972, 1 ) +colors = PoolColorArray( 1, 1, 1, 1, 1, 1, 1, 0.915254, 1, 1, 1, 0 ) + +[sub_resource type="GradientTexture" id=7] +gradient = SubResource( 6 ) + +[sub_resource type="ParticlesMaterial" id=8] +emission_shape = 1 +emission_sphere_radius = 20.0 +flag_disable_z = true +spread = 180.0 +gravity = Vector3( 0, 98, 0 ) +initial_velocity = 322.73 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +scale = 2.4 +color_ramp = SubResource( 7 ) + +[node name="Enemy" type="RigidBody2D"] +mode = 2 +physics_material_override = SubResource( 1 ) +contacts_reported = 4 +script = ExtResource( 1 ) + +[node name="Enabler" type="VisibilityEnabler2D" parent="."] +position = Vector2( 16.2569, 11.0034 ) +scale = Vector2( 23.5056, 10.8629 ) +pause_particles = false + +[node name="Anim" type="AnimationPlayer" parent="."] +anims/explode = SubResource( 2 ) +anims/idle = SubResource( 3 ) +anims/walk = SubResource( 4 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 2 ) +hframes = 8 +frame = 4 + +[node name="Shape1" type="CollisionShape2D" parent="."] +position = Vector2( -1.08072, -2.16144 ) +shape = SubResource( 5 ) + +[node name="Shape2" type="CollisionShape2D" parent="."] +position = Vector2( 6.48431, 3.24216 ) +shape = SubResource( 5 ) + +[node name="Shape3" type="CollisionShape2D" parent="."] +position = Vector2( -12.495, 3.53415 ) +shape = SubResource( 5 ) + +[node name="RaycastLeft" type="RayCast2D" parent="."] +position = Vector2( -33.2868, -9.34363 ) +enabled = true +cast_to = Vector2( 0, 45 ) + +[node name="RaycastRight" type="RayCast2D" parent="."] +position = Vector2( 29.1987, -9.34363 ) +enabled = true +cast_to = Vector2( 0, 45 ) + +[node name="Particles2D" type="Particles2D" parent="."] +modulate = Color( 1, 1, 1, 0.685843 ) +emitting = false +lifetime = 0.5 +one_shot = true +explosiveness = 0.86 +draw_order = 4 +process_material = SubResource( 8 ) +texture = ExtResource( 3 ) + +[node name="SoundHit" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource( 4 ) + +[node name="SoundExplode" type="AudioStreamPlayer2D" parent="."] +stream = ExtResource( 5 ) + diff --git a/2d/physics_platformer/enemy.gd b/2d/physics_platformer/enemy/enemy.gd similarity index 59% rename from 2d/physics_platformer/enemy.gd rename to 2d/physics_platformer/enemy/enemy.gd index 6bd9ed0d..f570f94b 100644 --- a/2d/physics_platformer/enemy.gd +++ b/2d/physics_platformer/enemy/enemy.gd @@ -1,36 +1,45 @@ extends RigidBody2D +class_name Enemy + # Member variables +const WALK_SPEED = 50 const STATE_WALKING = 0 const STATE_DYING = 1 +# state machine var state = STATE_WALKING var direction = -1 var anim = "" -onready var rc_left = $raycast_left -onready var rc_right = $raycast_right +onready var rc_left = $RaycastLeft +onready var rc_right = $RaycastRight -var WALK_SPEED = 50 - -var bullet_class = preload("res://bullet.gd") +var Bullet = preload("res://player/bullet.gd") func _die(): queue_free() - func _pre_explode(): #make sure nothing collides against this - $shape1.queue_free() - $shape2.queue_free() - $shape3.queue_free() + $Shape1.queue_free() + $Shape2.queue_free() + $Shape3.queue_free() # Stay there mode = MODE_STATIC - $sound_explode.play() - + ($SoundExplode as AudioStreamPlayer2D).play() + +func _bullet_collider(cc, s, dp): + mode = MODE_RIGID + state = STATE_DYING + + s.set_angular_velocity(sign(dp.x) * 33.0) + set_friction(1) + cc.disable() + ($SoundHit as AudioStreamPlayer2D).play() func _integrate_forces(s): var lv = s.get_linear_velocity() @@ -48,14 +57,9 @@ func _integrate_forces(s): var dp = s.get_contact_local_normal(i) if cc: - if cc is bullet_class and not cc.disabled: - mode = MODE_RIGID - state = STATE_DYING - #lv = s.get_contact_local_normal(i) * 400 - s.set_angular_velocity(sign(dp.x) * 33.0) - set_friction(1) - cc.disable() - $sound_hit.play() + if cc is Bullet and not cc.disabled: + # enqueue call + call_deferred("_bullet_collider", cc, s, dp) break if dp.x > 0.9: @@ -65,18 +69,18 @@ func _integrate_forces(s): if wall_side != 0 and wall_side != direction: direction = -direction - $sprite.scale.x = -direction + ($Sprite as Sprite).scale.x = -direction if direction < 0 and not rc_left.is_colliding() and rc_right.is_colliding(): direction = -direction - $sprite.scale.x = -direction + ($Sprite as Sprite).scale.x = -direction elif direction > 0 and not rc_right.is_colliding() and rc_left.is_colliding(): direction = -direction - $sprite.scale.x = -direction + ($Sprite as Sprite).scale.x = -direction lv.x = direction * WALK_SPEED if anim != new_anim: anim = new_anim - $anim.play(anim) + ($Anim as AnimationPlayer).play(anim) s.set_linear_velocity(lv) diff --git a/2d/physics_platformer/enemy.png b/2d/physics_platformer/enemy/enemy.png similarity index 100% rename from 2d/physics_platformer/enemy.png rename to 2d/physics_platformer/enemy/enemy.png diff --git a/2d/physics_platformer/enemy.png.import b/2d/physics_platformer/enemy/enemy.png.import similarity index 59% rename from 2d/physics_platformer/enemy.png.import rename to 2d/physics_platformer/enemy/enemy.png.import index 83e73259..97a7c88e 100644 --- a/2d/physics_platformer/enemy.png.import +++ b/2d/physics_platformer/enemy/enemy.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/enemy.png-f7d9f81714867a24a08e299bb600e611.stex" +path="res://.import/enemy.png-1891d9038eeed672a2459bc4e7db5910.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://enemy.png" -source_md5="42bb3a8005fffb91c993fbb55e798d1d" - -dest_files=[ "res://.import/enemy.png-f7d9f81714867a24a08e299bb600e611.stex" ] -dest_md5="4c8d1da721e96b61e14085c6dad3a986" +source_file="res://enemy/enemy.png" +dest_files=[ "res://.import/enemy.png-1891d9038eeed672a2459bc4e7db5910.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=false @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/icon.png.import b/2d/physics_platformer/icon.png.import index ab9f8df0..96cbf462 100644 --- a/2d/physics_platformer/icon.png.import +++ b/2d/physics_platformer/icon.png.import @@ -3,20 +3,21 @@ importer="texture" type="StreamTexture" path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" +metadata={ +"vram_texture": false +} [deps] source_file="res://icon.png" -source_md5="059cf00427ccbf40878c582845360337" - dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] -dest_md5="b775640cb5a1f03d40f18d355dddd188" [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/moving_platform.tscn b/2d/physics_platformer/moving_platform.tscn deleted file mode 100644 index 59516ac0..00000000 --- a/2d/physics_platformer/moving_platform.tscn +++ /dev/null @@ -1,42 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://moving_platform.gd" type="Script" id=1] -[ext_resource path="res://moving_platform.png" type="Texture" id=2] - -[node name="moving_platform" type="Node2D"] - -script = ExtResource( 1 ) -motion = Vector2( 0, 0 ) -cycle = 1.0 - -[node name="platform" type="RigidBody2D" parent="."] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -mode = 3 -mass = 1.0 -friction = 1.0 -bounce = 0.0 -gravity_scale = 1.0 -custom_integrator = false -continuous_cd = 0 -contacts_reported = 0 -contact_monitor = false -sleeping = false -can_sleep = true -linear_velocity = Vector2( 0, 0 ) -linear_damp = -1.0 -angular_velocity = 0.0 -angular_damp = -1.0 - -[node name="Sprite" type="Sprite" parent="platform"] - -texture = ExtResource( 2 ) - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform"] - -build_mode = 0 -polygon = PoolVector2Array( -88, -24, 88, -24, 88, 24, -88, 24 ) - - diff --git a/2d/physics_platformer/music.ogg.import b/2d/physics_platformer/music.ogg.import deleted file mode 100644 index ba872894..00000000 --- a/2d/physics_platformer/music.ogg.import +++ /dev/null @@ -1,18 +0,0 @@ -[remap] - -importer="ogg_vorbis" -type="AudioStreamOGGVorbis" -path="res://.import/music.ogg-3bd46d3a4b41702b152014078d12a390.oggstr" - -[deps] - -source_file="res://music.ogg" -source_md5="ac01d521c92ce9d01cf09826bd3addbf" - -dest_files=[ "res://.import/music.ogg-3bd46d3a4b41702b152014078d12a390.oggstr" ] -dest_md5="8f49ec9ebb932a81e74cb040e2a26d5f" - -[params] - -loop=true -loop_offset=0 diff --git a/2d/physics_platformer/one_way_platform.tscn b/2d/physics_platformer/one_way_platform.tscn deleted file mode 100644 index af66db05..00000000 --- a/2d/physics_platformer/one_way_platform.tscn +++ /dev/null @@ -1,30 +0,0 @@ -[gd_scene load_steps=3 format=2] - -[ext_resource path="res://one_way_platform.png" type="Texture" id=1] - -[sub_resource type="RectangleShape2D" id=1] - -custom_solver_bias = 0.0 -extents = Vector2( 100, 10 ) - -[node name="one_way_platform" type="StaticBody2D"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="sprite" type="Sprite" parent="."] - -texture = ExtResource( 1 ) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="."] - -position = Vector2( 1.46304, -13.1672 ) -shape = SubResource( 1 ) -one_way_collision = true - - diff --git a/2d/physics_platformer/osb_right.png.import b/2d/physics_platformer/osb_right.png.import deleted file mode 100644 index 3c760acf..00000000 --- a/2d/physics_platformer/osb_right.png.import +++ /dev/null @@ -1,32 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/osb_right.png-5cf5add2dbc1c8dde17173ac56f3a004.stex" - -[deps] - -source_file="res://osb_right.png" -source_md5="860560d5e66ccd837973fbbde7eb958f" - -dest_files=[ "res://.import/osb_right.png-5cf5add2dbc1c8dde17173ac56f3a004.stex" ] -dest_md5="79b739823ce27077acfa70f6330fedd6" - -[params] - -compress/mode=0 -compress/lossy_quality=0.7 -compress/hdr_mode=0 -compress/normal_map=0 -flags/repeat=0 -flags/filter=true -flags/mipmaps=false -flags/anisotropic=false -flags/srgb=2 -process/fix_alpha_border=true -process/premult_alpha=false -process/HDR_as_SRGB=false -stream=false -size_limit=0 -detect_3d=true -svg/scale=1.0 diff --git a/2d/physics_platformer/parallax_bg.tscn b/2d/physics_platformer/parallax_bg.tscn deleted file mode 100644 index d5983334..00000000 --- a/2d/physics_platformer/parallax_bg.tscn +++ /dev/null @@ -1,103 +0,0 @@ -[gd_scene load_steps=7 format=2] - -[ext_resource path="res://scroll_bg_sky.png" type="Texture" id=1] -[ext_resource path="res://scroll_bg_cloud_1.png" type="Texture" id=2] -[ext_resource path="res://scroll_bg_cloud_2.png" type="Texture" id=3] -[ext_resource path="res://scroll_bg_cloud_3.png" type="Texture" id=4] -[ext_resource path="res://scroll_bg_fg_2.png" type="Texture" id=5] -[ext_resource path="res://scroll_bg_fg_1.png" type="Texture" id=6] - -[node name="parallax_bg" type="ParallaxBackground"] - -layer = -1 -offset = Vector2( 0, 0 ) -rotation = 0.0 -scale = Vector2( 1, 1 ) -scroll_offset = Vector2( 0, 0 ) -scroll_base_offset = Vector2( 0, 0 ) -scroll_base_scale = Vector2( 0.7, 0 ) -scroll_limit_begin = Vector2( 0, 0 ) -scroll_limit_end = Vector2( 0, 0 ) -scroll_ignore_camera_zoom = false - -[node name="sky" type="ParallaxLayer" parent="."] - -motion_scale = Vector2( 1, 1 ) -motion_offset = Vector2( 0, 0 ) -motion_mirroring = Vector2( 800, 0 ) - -[node name="Sprite" type="Sprite" parent="sky"] - -scale = Vector2( 32, 0.94 ) -texture = ExtResource( 1 ) -centered = false - -[node name="clouds" type="ParallaxLayer" parent="."] - -motion_scale = Vector2( 0.1, 1 ) -motion_offset = Vector2( 0, 0 ) -motion_mirroring = Vector2( 800, 0 ) - -[node name="Sprite" type="Sprite" parent="clouds"] - -position = Vector2( 28, 127 ) -texture = ExtResource( 2 ) -centered = false - -[node name="Sprite 2" type="Sprite" parent="clouds"] - -position = Vector2( 404, 24 ) -texture = ExtResource( 2 ) -centered = false - -[node name="Sprite 3" type="Sprite" parent="clouds"] - -position = Vector2( 154, 46 ) -texture = ExtResource( 3 ) -centered = false - -[node name="Sprite 4" type="Sprite" parent="clouds"] - -position = Vector2( 525, 130 ) -texture = ExtResource( 3 ) -centered = false - -[node name="Sprite 5" type="Sprite" parent="clouds"] - -position = Vector2( 255, 158 ) -texture = ExtResource( 4 ) -centered = false - -[node name="Sprite 6" type="Sprite" parent="clouds"] - -position = Vector2( 674, 70 ) -texture = ExtResource( 4 ) -centered = false - -[node name="mount_ 2" type="ParallaxLayer" parent="."] - -motion_scale = Vector2( 0.2, 1 ) -motion_offset = Vector2( 0, 0 ) -motion_mirroring = Vector2( 800, 0 ) - -[node name="Sprite" type="Sprite" parent="mount_ 2"] - -position = Vector2( 0, 225 ) -texture = ExtResource( 5 ) -centered = false -region_rect = Rect2( 0, 0, 800, 256 ) - -[node name="mount_1" type="ParallaxLayer" parent="."] - -motion_scale = Vector2( 0.4, 1 ) -motion_offset = Vector2( 0, 0 ) -motion_mirroring = Vector2( 800, 0 ) - -[node name="Sprite" type="Sprite" parent="mount_1"] - -position = Vector2( 0, 225 ) -texture = ExtResource( 6 ) -centered = false -region_rect = Rect2( 0, 0, 800, 256 ) - - diff --git a/2d/physics_platformer/platform/MovingPlatform.tscn b/2d/physics_platformer/platform/MovingPlatform.tscn new file mode 100644 index 00000000..63655d80 --- /dev/null +++ b/2d/physics_platformer/platform/MovingPlatform.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://platform/moving_platform.gd" type="Script" id=1] +[ext_resource path="res://platform/moving_platform.png" type="Texture" id=2] + +[node name="Moving_platform" type="Node2D"] +script = ExtResource( 1 ) + +[node name="Platform" type="RigidBody2D" parent="."] +mode = 3 + +[node name="Sprite" type="Sprite" parent="Platform"] +texture = ExtResource( 2 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Platform"] +polygon = PoolVector2Array( -88, -24, 88, -24, 88, 24, -88, 24 ) + diff --git a/2d/physics_platformer/platform/OneWayPlatform.tscn b/2d/physics_platformer/platform/OneWayPlatform.tscn new file mode 100644 index 00000000..3b1115f9 --- /dev/null +++ b/2d/physics_platformer/platform/OneWayPlatform.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://platform/one_way_platform.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 100, 10 ) + +[node name="One_way_platform" type="StaticBody2D"] + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 1.46304, -13.1672 ) +shape = SubResource( 1 ) +one_way_collision = true + diff --git a/2d/physics_platformer/moving_platform.gd b/2d/physics_platformer/platform/moving_platform.gd similarity index 78% rename from 2d/physics_platformer/moving_platform.gd rename to 2d/physics_platformer/platform/moving_platform.gd index fcbdff20..125bd98f 100644 --- a/2d/physics_platformer/moving_platform.gd +++ b/2d/physics_platformer/platform/moving_platform.gd @@ -1,15 +1,20 @@ extends Node2D +class_name MovingPlatform + # Member variables export var motion = Vector2() export var cycle = 1.0 + var accum = 0.0 func _physics_process(delta): accum += delta * (1.0 / cycle) * PI * 2.0 accum = fmod(accum, PI * 2.0) + var d = sin(accum) var xf = Transform2D() + xf[2]= motion * d - $platform.transform = xf + ($Platform as RigidBody2D).transform = xf diff --git a/2d/physics_platformer/moving_platform.png b/2d/physics_platformer/platform/moving_platform.png similarity index 100% rename from 2d/physics_platformer/moving_platform.png rename to 2d/physics_platformer/platform/moving_platform.png diff --git a/2d/physics_platformer/moving_platform.png.import b/2d/physics_platformer/platform/moving_platform.png.import similarity index 56% rename from 2d/physics_platformer/moving_platform.png.import rename to 2d/physics_platformer/platform/moving_platform.png.import index eb188fa6..4c69cfcc 100644 --- a/2d/physics_platformer/moving_platform.png.import +++ b/2d/physics_platformer/platform/moving_platform.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/moving_platform.png-1ef2f9fd1684df90d6ad38a267c1201b.stex" +path="res://.import/moving_platform.png-7e92061cd93e8b0235df711d3782cd8c.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://moving_platform.png" -source_md5="3a3eb41985ca94372fe4a9c81b067504" - -dest_files=[ "res://.import/moving_platform.png-1ef2f9fd1684df90d6ad38a267c1201b.stex" ] -dest_md5="2d28d040ea69e01af7f8d176520661b0" +source_file="res://platform/moving_platform.png" +dest_files=[ "res://.import/moving_platform.png-7e92061cd93e8b0235df711d3782cd8c.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/one_way_platform.png b/2d/physics_platformer/platform/one_way_platform.png similarity index 100% rename from 2d/physics_platformer/one_way_platform.png rename to 2d/physics_platformer/platform/one_way_platform.png diff --git a/2d/physics_platformer/one_way_platform.png.import b/2d/physics_platformer/platform/one_way_platform.png.import similarity index 55% rename from 2d/physics_platformer/one_way_platform.png.import rename to 2d/physics_platformer/platform/one_way_platform.png.import index d0358677..bfcd1f4d 100644 --- a/2d/physics_platformer/one_way_platform.png.import +++ b/2d/physics_platformer/platform/one_way_platform.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/one_way_platform.png-af40161497fd0e8bfbc5d400c8bd650a.stex" +path="res://.import/one_way_platform.png-2865772e209813c1636a14aee8d019a3.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://one_way_platform.png" -source_md5="6232db3f22a3599440102f32eb01edca" - -dest_files=[ "res://.import/one_way_platform.png-af40161497fd0e8bfbc5d400c8bd650a.stex" ] -dest_md5="4a0e87dfa4f589f6fead720035abedca" +source_file="res://platform/one_way_platform.png" +dest_files=[ "res://.import/one_way_platform.png-2865772e209813c1636a14aee8d019a3.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/player/Bullet.tscn b/2d/physics_platformer/player/Bullet.tscn new file mode 100644 index 00000000..6661c532 --- /dev/null +++ b/2d/physics_platformer/player/Bullet.tscn @@ -0,0 +1,86 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://player/bullet.gd" type="Script" id=1] +[ext_resource path="res://player/bullet.png" type="Texture" id=2] + +[sub_resource type="CanvasItemMaterial" id=1] +blend_mode = 1 + +[sub_resource type="ParticlesMaterial" id=2] +flag_disable_z = true +spread = 0.0 +gravity = Vector3( 0, 0, 0 ) +initial_velocity = 1.0 +angular_velocity = 38.0 +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +scale = 0.8 + +[sub_resource type="CircleShape2D" id=3] + +[sub_resource type="Animation" id=4] +length = 1.5 +tracks/0/type = "method" +tracks/0/path = NodePath(".") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 1.31 ), +"transitions": PoolRealArray( 1 ), +"values": [ { +"args": [ ], +"method": "queue_free" +} ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Sprite:modulate") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0, 1.03 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Particles2D:self_modulate") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0, 0.5 ), +"transitions": PoolRealArray( 1, 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ] +} + +[node name="Bullet" type="RigidBody2D"] +continuous_cd = 2 +script = ExtResource( 1 ) + +[node name="Particles2D" type="Particles2D" parent="."] +material = SubResource( 1 ) +lifetime = 0.3 +speed_scale = 3.0 +local_coords = false +process_material = SubResource( 2 ) +texture = ExtResource( 2 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 3 ) + +[node name="Timer" type="Timer" parent="."] +one_shot = true + +[node name="Anim" type="AnimationPlayer" parent="."] +anims/shutdown = SubResource( 4 ) + +[connection signal="timeout" from="Timer" to="." method="disable"] diff --git a/2d/physics_platformer/player.tscn b/2d/physics_platformer/player/Player.tscn similarity index 50% rename from 2d/physics_platformer/player.tscn rename to 2d/physics_platformer/player/Player.tscn index 35e5b168..4027520c 100644 --- a/2d/physics_platformer/player.tscn +++ b/2d/physics_platformer/player/Player.tscn @@ -1,73 +1,46 @@ -[gd_scene load_steps=24 format=2] +[gd_scene load_steps=25 format=2] -[ext_resource path="res://player.gd" type="Script" id=1] -[ext_resource path="res://robot_demo.png" type="Texture" id=2] -[ext_resource path="res://bullet.png" type="Texture" id=3] -[ext_resource path="res://osb_left.png" type="Texture" id=4] -[ext_resource path="res://osb_right.png" type="Texture" id=5] -[ext_resource path="res://osb_jump.png" type="Texture" id=6] -[ext_resource path="res://osb_fire.png" type="Texture" id=7] -[ext_resource path="res://sound_shoot.wav" type="AudioStream" id=8] -[ext_resource path="res://sound_jump.wav" type="AudioStream" id=9] +[ext_resource path="res://player/player.gd" type="Script" id=1] +[ext_resource path="res://player/robot_demo.png" type="Texture" id=2] +[ext_resource path="res://player/bullet.png" type="Texture" id=3] +[ext_resource path="res://player/osb_left.png" type="Texture" id=4] +[ext_resource path="res://player/osb_right.png" type="Texture" id=5] +[ext_resource path="res://player/osb_jump.png" type="Texture" id=6] +[ext_resource path="res://player/osb_fire.png" type="Texture" id=7] +[ext_resource path="res://audio/sound_shoot.wav" type="AudioStream" id=8] +[ext_resource path="res://audio/sound_jump.wav" type="AudioStream" id=9] -[sub_resource type="Gradient" id=1] +[sub_resource type="PhysicsMaterial" id=1] +friction = 0.0 -offsets = PoolRealArray( 0, 1 ) +[sub_resource type="Gradient" id=2] colors = PoolColorArray( 0.708353, 0.72498, 1, 1, 1, 1, 1, 0 ) -[sub_resource type="GradientTexture" id=2] +[sub_resource type="GradientTexture" id=3] +gradient = SubResource( 2 ) -gradient = SubResource( 1 ) -width = 2048 - -[sub_resource type="ParticlesMaterial" id=3] - -render_priority = 0 -trail_divisor = 1 -emission_shape = 0 -flag_align_y = false -flag_rotate_y = false +[sub_resource type="ParticlesMaterial" id=4] flag_disable_z = true spread = 65.84 -flatness = 0.0 gravity = Vector3( 0, -15, 0 ) initial_velocity = 10.14 -initial_velocity_random = 0.0 angular_velocity = 200.0 angular_velocity_random = 1.0 orbit_velocity = 0.0 orbit_velocity_random = 0.0 linear_accel = 100.0 -linear_accel_random = 0.0 -radial_accel = 0.0 -radial_accel_random = 0.0 -tangential_accel = 0.0 -tangential_accel_random = 0.0 -damping = 0.0 -damping_random = 0.0 -angle = 0.0 -angle_random = 0.0 -scale = 1.0 -scale_random = 0.0 -color_ramp = SubResource( 2 ) -hue_variation = 0.0 -hue_variation_random = 0.0 -anim_speed = 0.0 -anim_speed_random = 0.0 -anim_offset = 0.0 -anim_offset_random = 0.0 -anim_loop = false - -[sub_resource type="Animation" id=4] +color_ramp = SubResource( 3 ) +[sub_resource type="Animation" id=5] length = 0.01 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -75,16 +48,16 @@ tracks/0/keys = { "values": [ 22 ] } -[sub_resource type="Animation" id=5] - +[sub_resource type="Animation" id=6] length = 0.01 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -92,16 +65,16 @@ tracks/0/keys = { "values": [ 21 ] } -[sub_resource type="Animation" id=6] - +[sub_resource type="Animation" id=7] length = 0.5 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -109,16 +82,16 @@ tracks/0/keys = { "values": [ 26 ] } -[sub_resource type="Animation" id=7] - +[sub_resource type="Animation" id=8] length = 7.0 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1, 1, 1 ), @@ -126,16 +99,16 @@ tracks/0/keys = { "values": [ 16, 17, 18, 16, 19, 20, 19, 16 ] } -[sub_resource type="Animation" id=8] - +[sub_resource type="Animation" id=9] length = 0.5 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -143,16 +116,16 @@ tracks/0/keys = { "values": [ 25 ] } -[sub_resource type="Animation" id=9] - +[sub_resource type="Animation" id=10] length = 0.5 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.25, 0.5 ), "transitions": PoolRealArray( 1, 1, 1 ), @@ -160,16 +133,16 @@ tracks/0/keys = { "values": [ 23, 24, 23 ] } -[sub_resource type="Animation" id=10] - +[sub_resource type="Animation" id=11] length = 0.5 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0 ), "transitions": PoolRealArray( 1 ), @@ -177,16 +150,16 @@ tracks/0/keys = { "values": [ 26 ] } -[sub_resource type="Animation" id=11] - +[sub_resource type="Animation" id=12] length = 1.25 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), @@ -194,16 +167,16 @@ tracks/0/keys = { "values": [ 0, 1, 2, 3, 4, 0 ] } -[sub_resource type="Animation" id=12] - +[sub_resource type="Animation" id=13] length = 1.25 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), @@ -211,16 +184,16 @@ tracks/0/keys = { "values": [ 5, 6, 7, 8, 9, 5 ] } -[sub_resource type="Animation" id=13] - +[sub_resource type="Animation" id=14] length = 1.25 loop = true step = 0.25 tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") +tracks/0/path = NodePath("Sprite:frame") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/imported = false +tracks/0/enabled = true tracks/0/keys = { "times": PoolRealArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), @@ -228,202 +201,99 @@ tracks/0/keys = { "values": [ 10, 11, 12, 13, 14, 5 ] } -[sub_resource type="RayShape2D" id=14] - +[sub_resource type="RayShape2D" id=15] custom_solver_bias = 0.5 -length = 20.0 -[node name="player" type="RigidBody2D"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 +[node name="Player" type="RigidBody2D"] mode = 2 mass = 3.0 -friction = 0.0 -bounce = 0.0 -gravity_scale = 1.0 +physics_material_override = SubResource( 1 ) custom_integrator = true -continuous_cd = 0 contacts_reported = 3 -contact_monitor = false -sleeping = false -can_sleep = true -linear_velocity = Vector2( 0, 0 ) -linear_damp = -1.0 -angular_velocity = 0.0 -angular_damp = -1.0 script = ExtResource( 1 ) -[node name="sprite" type="Sprite" parent="."] - +[node name="Sprite" type="Sprite" parent="."] texture = ExtResource( 2 ) vframes = 2 hframes = 16 -[node name="smoke" type="Particles2D" parent="sprite"] - +[node name="Smoke" type="Particles2D" parent="Sprite"] self_modulate = Color( 1, 1, 1, 0.26702 ) position = Vector2( 20.7312, 3.21187 ) rotation = -1.45648 -emitting = true -amount = 8 +emitting = false lifetime = 0.3 one_shot = true -preprocess = 0.0 -speed_scale = 1.0 explosiveness = 1.0 -randomness = 0.0 -fixed_fps = 0 -fract_delta = true -visibility_rect = Rect2( -100, -100, 200, 200 ) local_coords = false draw_order = 97 -process_material = SubResource( 3 ) +process_material = SubResource( 4 ) texture = ExtResource( 3 ) -normal_map = null -h_frames = 1 -v_frames = 1 -[node name="anim" type="AnimationPlayer" parent="."] +[node name="Anim" type="AnimationPlayer" parent="."] +anims/crouch = SubResource( 5 ) +anims/falling = SubResource( 6 ) +anims/falling_weapon = SubResource( 7 ) +anims/idle = SubResource( 8 ) +anims/idle_weapon = SubResource( 9 ) +anims/jumping = SubResource( 10 ) +anims/jumping_weapon = SubResource( 11 ) +anims/run = SubResource( 12 ) +anims/run_weapon = SubResource( 13 ) +anims/standing_weapon_ready = SubResource( 14 ) -playback_process_mode = 1 -playback_default_blend_time = 0.0 -root_node = NodePath("..") -anims/crouch = SubResource( 4 ) -anims/falling = SubResource( 5 ) -anims/falling_weapon = SubResource( 6 ) -anims/idle = SubResource( 7 ) -anims/idle_weapon = SubResource( 8 ) -anims/jumping = SubResource( 9 ) -anims/jumping_weapon = SubResource( 10 ) -anims/run = SubResource( 11 ) -anims/run_weapon = SubResource( 12 ) -anims/standing_weapon_ready = SubResource( 13 ) -playback/active = true -playback/speed = 2.0 -blend_times = [ ] -autoplay = "" - -[node name="camera" type="Camera2D" parent="."] - -anchor_mode = 1 -rotating = false +[node name="Camera" type="Camera2D" parent="."] current = true -zoom = Vector2( 1, 1 ) limit_left = 0 limit_top = 0 -limit_right = 10000000 -limit_bottom = 10000000 -limit_smoothed = false -drag_margin_h_enabled = true -drag_margin_v_enabled = true -smoothing_enabled = false -smoothing_speed = 5.0 -drag_margin_left = 0.2 -drag_margin_top = 0.2 -drag_margin_right = 0.2 -drag_margin_bottom = 0.2 -editor_draw_screen = true -editor_draw_limits = false -editor_draw_drag_margin = false - -[node name="bullet_shoot" type="Position2D" parent="."] +[node name="BulletShoot" type="Position2D" parent="."] position = Vector2( 31.2428, 4.08784 ) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] - position = Vector2( 0.291992, -12.1587 ) scale = Vector2( 1, 1.76469 ) -shape = SubResource( 14 ) +shape = SubResource( 15 ) [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] - -build_mode = 0 polygon = PoolVector2Array( -0.138023, 16.5036, -19.902, -24.8691, 19.3625, -24.6056 ) -[node name="ui" type="CanvasLayer" parent="."] - +[node name="UI" type="CanvasLayer" parent="."] layer = 0 -offset = Vector2( 0, 0 ) -rotation = 0.0 -scale = Vector2( 1, 1 ) - -[node name="left" type="TouchScreenButton" parent="ui"] +[node name="Left" type="TouchScreenButton" parent="UI"] position = Vector2( 27.7593, 360.87 ) scale = Vector2( 1.49157, 1.46265 ) normal = ExtResource( 4 ) -pressed = null -bitmask = null -shape = null -shape_centered = true -shape_visible = true passby_press = true action = "move_left" visibility_mode = 1 -[node name="right" type="TouchScreenButton" parent="ui"] - +[node name="Right" type="TouchScreenButton" parent="UI"] position = Vector2( 121.542, 361.415 ) scale = Vector2( 1.49157, 1.46265 ) normal = ExtResource( 5 ) -pressed = null -bitmask = null -shape = null -shape_centered = true -shape_visible = true passby_press = true action = "move_right" visibility_mode = 1 -[node name="jump" type="TouchScreenButton" parent="ui"] - +[node name="Jump" type="TouchScreenButton" parent="UI"] position = Vector2( 666.224, 359.02 ) scale = Vector2( 1.49157, 1.46265 ) normal = ExtResource( 6 ) -pressed = null -bitmask = null -shape = null -shape_centered = true -shape_visible = true -passby_press = false action = "jump" visibility_mode = 1 -[node name="fire" type="TouchScreenButton" parent="ui"] - +[node name="Fire" type="TouchScreenButton" parent="UI"] position = Vector2( 668.073, 262.788 ) scale = Vector2( 1.49157, 1.46265 ) normal = ExtResource( 7 ) -pressed = null -bitmask = null -shape = null -shape_centered = true -shape_visible = true -passby_press = false action = "shoot" visibility_mode = 1 -[node name="sound_shoot" type="AudioStreamPlayer2D" parent="."] - +[node name="SoundShoot" type="AudioStreamPlayer2D" parent="."] stream = ExtResource( 8 ) -volume_db = 0.0 -autoplay = false -max_distance = 2000.0 -attenuation = 1.0 -bus = "Master" -area_mask = 1 - -[node name="sound_jump" type="AudioStreamPlayer2D" parent="."] +[node name="SoundJump" type="AudioStreamPlayer2D" parent="."] stream = ExtResource( 9 ) -volume_db = 0.0 -autoplay = false -max_distance = 2000.0 -attenuation = 1.0 -bus = "Master" -area_mask = 1 - diff --git a/2d/physics_platformer/bullet.gd b/2d/physics_platformer/player/bullet.gd similarity index 52% rename from 2d/physics_platformer/bullet.gd rename to 2d/physics_platformer/player/bullet.gd index 28c3d6ad..3ac8f0c7 100644 --- a/2d/physics_platformer/bullet.gd +++ b/2d/physics_platformer/player/bullet.gd @@ -1,15 +1,17 @@ extends RigidBody2D +class_name Bullet + # Member variables var disabled = false +func _ready(): + ($Timer as Timer).start() + func disable(): if disabled: return - $anim.play("shutdown") - disabled = true - - -func _ready(): - $Timer.start() + + ($Anim as AnimationPlayer).play("shutdown") + disabled = true \ No newline at end of file diff --git a/2d/physics_platformer/bullet.png b/2d/physics_platformer/player/bullet.png similarity index 100% rename from 2d/physics_platformer/bullet.png rename to 2d/physics_platformer/player/bullet.png diff --git a/2d/physics_platformer/bullet.png.import b/2d/physics_platformer/player/bullet.png.import similarity index 59% rename from 2d/physics_platformer/bullet.png.import rename to 2d/physics_platformer/player/bullet.png.import index 95f3f5b9..42e175e6 100644 --- a/2d/physics_platformer/bullet.png.import +++ b/2d/physics_platformer/player/bullet.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/bullet.png-ff1424653e10246c11e3724e402c519e.stex" +path="res://.import/bullet.png-5615cb9904aab8db60fe6f48e996475f.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://bullet.png" -source_md5="9fe43d82e09598fc96be75bcf60df249" - -dest_files=[ "res://.import/bullet.png-ff1424653e10246c11e3724e402c519e.stex" ] -dest_md5="04684b9a0276f89c616678cf4489b76d" +source_file="res://player/bullet.png" +dest_files=[ "res://.import/bullet.png-5615cb9904aab8db60fe6f48e996475f.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/osb_fire.png b/2d/physics_platformer/player/osb_fire.png similarity index 100% rename from 2d/physics_platformer/osb_fire.png rename to 2d/physics_platformer/player/osb_fire.png diff --git a/2d/physics_platformer/osb_left.png.import b/2d/physics_platformer/player/osb_fire.png.import similarity index 59% rename from 2d/physics_platformer/osb_left.png.import rename to 2d/physics_platformer/player/osb_fire.png.import index c8ec1518..5492c2c7 100644 --- a/2d/physics_platformer/osb_left.png.import +++ b/2d/physics_platformer/player/osb_fire.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/osb_left.png-fc7230aeb0eec74933ed08f89b893288.stex" +path="res://.import/osb_fire.png-67a49910acd764fd7c67429af0ad5cb8.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://osb_left.png" -source_md5="ce066828ec6ef27c9ce3809341574058" - -dest_files=[ "res://.import/osb_left.png-fc7230aeb0eec74933ed08f89b893288.stex" ] -dest_md5="197f26385b7f1c41c11b5d8356744c09" +source_file="res://player/osb_fire.png" +dest_files=[ "res://.import/osb_fire.png-67a49910acd764fd7c67429af0ad5cb8.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/osb_jump.png b/2d/physics_platformer/player/osb_jump.png similarity index 100% rename from 2d/physics_platformer/osb_jump.png rename to 2d/physics_platformer/player/osb_jump.png diff --git a/2d/physics_platformer/osb_jump.png.import b/2d/physics_platformer/player/osb_jump.png.import similarity index 57% rename from 2d/physics_platformer/osb_jump.png.import rename to 2d/physics_platformer/player/osb_jump.png.import index dba5713e..30492115 100644 --- a/2d/physics_platformer/osb_jump.png.import +++ b/2d/physics_platformer/player/osb_jump.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/osb_jump.png-dbbef3b47abbb562ce6c81a9701121c6.stex" +path="res://.import/osb_jump.png-0d4d2b2d1a7d2c11e3e4fd800b8589ed.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://osb_jump.png" -source_md5="ac3e3adf52903de07cff73354f63896c" - -dest_files=[ "res://.import/osb_jump.png-dbbef3b47abbb562ce6c81a9701121c6.stex" ] -dest_md5="1c8fb76688922e0a92945275b73dcf91" +source_file="res://player/osb_jump.png" +dest_files=[ "res://.import/osb_jump.png-0d4d2b2d1a7d2c11e3e4fd800b8589ed.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/osb_left.png b/2d/physics_platformer/player/osb_left.png similarity index 100% rename from 2d/physics_platformer/osb_left.png rename to 2d/physics_platformer/player/osb_left.png diff --git a/2d/physics_platformer/player/osb_left.png.import b/2d/physics_platformer/player/osb_left.png.import new file mode 100644 index 00000000..583ec772 --- /dev/null +++ b/2d/physics_platformer/player/osb_left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/osb_left.png-95ec3a371455889d592aa8cae0a755bc.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://player/osb_left.png" +dest_files=[ "res://.import/osb_left.png-95ec3a371455889d592aa8cae0a755bc.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/2d/physics_platformer/osb_right.png b/2d/physics_platformer/player/osb_right.png similarity index 100% rename from 2d/physics_platformer/osb_right.png rename to 2d/physics_platformer/player/osb_right.png diff --git a/2d/physics_platformer/osb_fire.png.import b/2d/physics_platformer/player/osb_right.png.import similarity index 57% rename from 2d/physics_platformer/osb_fire.png.import rename to 2d/physics_platformer/player/osb_right.png.import index 8da33e4b..da92a49a 100644 --- a/2d/physics_platformer/osb_fire.png.import +++ b/2d/physics_platformer/player/osb_right.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/osb_fire.png-e657a73546eb75918e9d9a3fea15cf70.stex" +path="res://.import/osb_right.png-db9bb4651315f3d42b87bd17a86cce76.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://osb_fire.png" -source_md5="99a276197ee76a83312af783f33f0ab3" - -dest_files=[ "res://.import/osb_fire.png-e657a73546eb75918e9d9a3fea15cf70.stex" ] -dest_md5="977d51633748d45e85e4c7a214ade70e" +source_file="res://player/osb_right.png" +dest_files=[ "res://.import/osb_right.png-db9bb4651315f3d42b87bd17a86cce76.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=true @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/player.gd b/2d/physics_platformer/player/player.gd similarity index 63% rename from 2d/physics_platformer/player.gd rename to 2d/physics_platformer/player/player.gd index f98737c9..45b33fb8 100644 --- a/2d/physics_platformer/player.gd +++ b/2d/physics_platformer/player/player.gd @@ -1,56 +1,74 @@ extends RigidBody2D -# Character Demo, written by Juan Linietsky. -# -# Implementation of a 2D Character controller. -# This implementation uses the physics engine for -# controlling a character, in a very similar way -# than a 3D character controller would be implemented. -# -# Using the physics engine for this has the main -# advantages: -# -Easy to write. -# -Interaction with other physics-based objects is free -# -Only have to deal with the object linear velocity, not position -# -All collision/area framework available -# -# But also has the following disadvantages: -# -# -Objects may bounce a little bit sometimes -# -Going up ramps sends the chracter flying up, small hack is needed. -# -A ray collider is needed to avoid sliding down on ramps and -# undesiderd bumps, small steps and rare numerical precision errors. -# (another alternative may be to turn on friction when the character is not moving). -# -Friction cant be used, so floor velocity must be considered -# for moving platforms. +class_name Player + +""" Character Demo, written by Juan Linietsky. + + Implementation of a 2D Character controller. + This implementation uses the physics engine for + controlling a character, in a very similar way + than a 3D character controller would be implemented. + + Using the physics engine for this has the main advantages: + - Easy to write. + - Interaction with other physics-based objects is free + - Only have to deal with the object linear velocity, not position + - All collision/area framework available + + But also has the following disadvantages: + - Objects may bounce a little bit sometimes + - Going up ramps sends the chracter flying up, small hack is needed. + - A ray collider is needed to avoid sliding down on ramps and + undesiderd bumps, small steps and rare numerical precision errors. + (another alternative may be to turn on friction when the character is not moving). + - Friction cant be used, so floor velocity must be considered + for moving platforms. """ # Member variables +const WALK_ACCEL = 800.0 +const WALK_DEACCEL = 800.0 +const WALK_MAX_VELOCITY = 200.0 +const AIR_ACCEL = 200.0 +const AIR_DEACCEL = 200.0 +const JUMP_VELOCITY = 460 +const STOP_JUMP_FORCE = 900.0 +const MAX_SHOOT_POSE_TIME = 0.3 +const MAX_FLOOR_AIRBORNE_TIME = 0.15 + var anim = "" var siding_left = false var jumping = false var stopping_jump = false var shooting = false -var WALK_ACCEL = 800.0 -var WALK_DEACCEL = 800.0 -var WALK_MAX_VELOCITY = 200.0 -var AIR_ACCEL = 200.0 -var AIR_DEACCEL = 200.0 -var JUMP_VELOCITY = 460 -var STOP_JUMP_FORCE = 900.0 - -var MAX_FLOOR_AIRBORNE_TIME = 0.15 +var floor_h_velocity = 0.0 var airborne_time = 1e20 var shoot_time = 1e20 -var MAX_SHOOT_POSE_TIME = 0.3 +var Bullet = preload("res://player/Bullet.tscn") +var Enemy = preload("res://enemy/Enemy.tscn") -var bullet = preload("res://bullet.tscn") - -var floor_h_velocity = 0.0 -onready var enemy = load("res://enemy.tscn") +func _shot_bullet(): + shoot_time = 0 + var bi = Bullet.instance() + var ss + if siding_left: + ss = -1.0 + else: + ss = 1.0 + var pos = position + ($BulletShoot as Position2D).position * Vector2(ss, 1.0) + + bi.position = pos + get_parent().add_child(bi) + + bi.linear_velocity = Vector2(800.0 * ss, -80) + + ($Sprite/Smoke as Particles2D).restart() + ($SoundShoot as AudioStreamPlayer2D).play() + + add_collision_exception_with(bi) # Make bullet and this not collide func _integrate_forces(s): var lv = s.get_linear_velocity() @@ -67,10 +85,12 @@ func _integrate_forces(s): var spawn = Input.is_action_pressed("spawn") if spawn: - var e = enemy.instance() + var e = Enemy.instance() var p = position + p.y = p.y - 100 e.position = p + get_parent().add_child(e) # Deapply prev floor velocity @@ -83,6 +103,7 @@ func _integrate_forces(s): for x in range(s.get_contact_count()): var ci = s.get_contact_local_normal(x) + if ci.dot(Vector2(0, -1)) > 0.6: found_floor = true floor_index = x @@ -90,24 +111,7 @@ func _integrate_forces(s): # A good idea when implementing characters of all kinds, # compensates for physics imprecision, as well as human reaction delay. if shoot and not shooting: - shoot_time = 0 - var bi = bullet.instance() - var ss - if siding_left: - ss = -1.0 - else: - ss = 1.0 - var pos = position + $bullet_shoot.position * Vector2(ss, 1.0) - - bi.position = pos - get_parent().add_child(bi) - - bi.linear_velocity = Vector2(800.0 * ss, -80) - - $sprite/smoke.restart() - $sound_shoot.play() - - add_collision_exception_with(bi) # Make bullet and this not collide + call_deferred("_shot_bullet") else: shoot_time += step @@ -149,7 +153,7 @@ func _integrate_forces(s): lv.y = -JUMP_VELOCITY jumping = true stopping_jump = false - $sound_jump.play() + ($SoundJump as AudioStreamPlayer2D).play() # Check siding if lv.x < 0 and move_left: @@ -179,6 +183,7 @@ func _integrate_forces(s): else: var xv = abs(lv.x) xv -= AIR_DEACCEL * step + if xv < 0: xv = 0 lv.x = sign(lv.x) * xv @@ -197,16 +202,16 @@ func _integrate_forces(s): # Update siding if new_siding_left != siding_left: if new_siding_left: - $sprite.scale.x = -1 + ($Sprite as Sprite).scale.x = -1 else: - $sprite.scale.x = 1 + ($Sprite as Sprite).scale.x = 1 siding_left = new_siding_left # Change animation if new_anim != anim: anim = new_anim - $anim.play(anim) + ($Anim as AnimationPlayer).play(anim) shooting = shoot @@ -217,4 +222,4 @@ func _integrate_forces(s): # Finally, apply gravity and set back the linear velocity lv += s.get_total_gravity() * step - s.set_linear_velocity(lv) + s.set_linear_velocity(lv) \ No newline at end of file diff --git a/2d/physics_platformer/robot_demo.png b/2d/physics_platformer/player/robot_demo.png similarity index 100% rename from 2d/physics_platformer/robot_demo.png rename to 2d/physics_platformer/player/robot_demo.png diff --git a/2d/physics_platformer/robot_demo.png.import b/2d/physics_platformer/player/robot_demo.png.import similarity index 57% rename from 2d/physics_platformer/robot_demo.png.import rename to 2d/physics_platformer/player/robot_demo.png.import index 2efda465..f148c142 100644 --- a/2d/physics_platformer/robot_demo.png.import +++ b/2d/physics_platformer/player/robot_demo.png.import @@ -2,21 +2,22 @@ importer="texture" type="StreamTexture" -path="res://.import/robot_demo.png-8502817e0037b3f31eaca3dae49dcfc5.stex" +path="res://.import/robot_demo.png-7165a8ae8f36b01883df6b585a93f592.stex" +metadata={ +"vram_texture": false +} [deps] -source_file="res://robot_demo.png" -source_md5="2a19cb85548217b26700914bd42617b4" - -dest_files=[ "res://.import/robot_demo.png-8502817e0037b3f31eaca3dae49dcfc5.stex" ] -dest_md5="a8591e098e3f1315468e7318da46cbb7" +source_file="res://player/robot_demo.png" +dest_files=[ "res://.import/robot_demo.png-7165a8ae8f36b01883df6b585a93f592.stex" ] [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=false @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/project.godot b/2d/physics_platformer/project.godot index e895fb59..2e501bc5 100644 --- a/2d/physics_platformer/project.godot +++ b/2d/physics_platformer/project.godot @@ -6,19 +6,62 @@ ; [section] ; section goes between [] ; param=value ; assign values to parameters -config_version=3 +config_version=4 + +_global_script_classes=[ { +"base": "RigidBody2D", +"class": "Bullet", +"language": "GDScript", +"path": "res://player/bullet.gd" +}, { +"base": "Area2D", +"class": "Coin", +"language": "GDScript", +"path": "res://coin/coin.gd" +}, { +"base": "RigidBody2D", +"class": "Enemy", +"language": "GDScript", +"path": "res://enemy/enemy.gd" +}, { +"base": "Node2D", +"class": "MovingPlatform", +"language": "GDScript", +"path": "res://platform/moving_platform.gd" +}, { +"base": "RigidBody2D", +"class": "Player", +"language": "GDScript", +"path": "res://player/player.gd" +} ] +_global_script_class_icons={ +"Bullet": "", +"Coin": "", +"Enemy": "", +"MovingPlatform": "", +"Player": "" +} [application] config/name="Dynamic Character Control-Based Platformer" -run/main_scene="res://stage.tscn" +run/main_scene="res://Stage.tscn" config/icon="res://icon.png" +[debug] + +gdscript/completion/autocomplete_setters_and_getters=true +gdscript/warnings/unsafe_property_access=true +gdscript/warnings/unsafe_method_access=true +gdscript/warnings/unsafe_cast=true +gdscript/warnings/unsafe_call_argument=true + [display] window/size/width=800 window/size/height=480 window/stretch/mode="2d" +window/stretch/aspect="keep" stretch/aspect="keep_height" stretch/mode="2d" @@ -32,22 +75,37 @@ repeat=false [input] -jump=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) +jump={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":0,"pressure":0.0,"pressed":false,"script":null) ] -move_left=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) +} +move_left={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) ] -move_right=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) +} +move_right={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) ] -shoot=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) +} +shoot={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":32,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":2,"pressure":0.0,"pressed":false,"script":null) , Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"unicode":0,"echo":false,"script":null) ] -spawn=[ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777244,"unicode":0,"echo":false,"script":null) +} +spawn={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777244,"unicode":0,"echo":false,"script":null) , Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":11,"pressure":0.0,"pressed":false,"script":null) ] +} [physics] @@ -61,6 +119,15 @@ use_pixel_snap=true mipmap_policy=1 +[rendering] + +quality/intended_usage/framebuffer_allocation=0 +quality/intended_usage/framebuffer_allocation.mobile=1 +quality/filters/anisotropic_filter_level=2 +quality/filters/use_nearest_mipmap_filter=true +quality/voxel_cone_tracing/high_quality=false +quality/depth/hdr=false + [texture_import] filter=false diff --git a/2d/physics_platformer/seesaw.tscn b/2d/physics_platformer/seesaw.tscn deleted file mode 100644 index de643e03..00000000 --- a/2d/physics_platformer/seesaw.tscn +++ /dev/null @@ -1,55 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://plank.png" type="Texture" id=1] -[ext_resource path="res://plankpin.png" type="Texture" id=2] - -[sub_resource type="RectangleShape2D" id=1] - -custom_solver_bias = 0.0 -extents = Vector2( 128, 8 ) - -[node name="seesaw" type="Node2D"] - -[node name="plank" type="RigidBody2D" parent="."] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -mode = 0 -mass = 5.10204 -friction = 1.0 -bounce = 0.0 -gravity_scale = 1.0 -custom_integrator = false -continuous_cd = 0 -contacts_reported = 0 -contact_monitor = false -sleeping = false -can_sleep = true -linear_velocity = Vector2( 0, 0 ) -linear_damp = -1.0 -angular_velocity = 0.0 -angular_damp = -1.0 - -[node name="sprite" type="Sprite" parent="plank"] - -texture = ExtResource( 1 ) - -[node name="CollisionShape2D" type="CollisionShape2D" parent="plank"] - -shape = SubResource( 1 ) - -[node name="pin" type="PinJoint2D" parent="."] - -node_a = NodePath("../plank") -node_b = NodePath("") -bias = 0.0 -disable_collision = true -softness = 0.0 - -[node name="Sprite" type="Sprite" parent="."] - -position = Vector2( -0.290825, 20.2425 ) -texture = ExtResource( 2 ) - - diff --git a/2d/physics_platformer/sound_coin.wav.import b/2d/physics_platformer/sound_coin.wav.import deleted file mode 100644 index 19cd1ff6..00000000 --- a/2d/physics_platformer/sound_coin.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -path="res://.import/sound_coin.wav-b4defacd1a1eab95585c7b5095506878.sample" - -[deps] - -source_file="res://sound_coin.wav" -source_md5="c9b8b4e85a53ce0e7add721a872d0479" - -dest_files=[ "res://.import/sound_coin.wav-b4defacd1a1eab95585c7b5095506878.sample" ] -dest_md5="e5a76bfdb2a7b57010209e1a78e45030" - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=true -edit/normalize=true -edit/loop=false -compress/mode=0 diff --git a/2d/physics_platformer/sound_explode.wav.import b/2d/physics_platformer/sound_explode.wav.import deleted file mode 100644 index 8e6102b6..00000000 --- a/2d/physics_platformer/sound_explode.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -path="res://.import/sound_explode.wav-23e94be75a4346bffb517c7e07035977.sample" - -[deps] - -source_file="res://sound_explode.wav" -source_md5="c49bffd6268c2fb061a578c559fbd988" - -dest_files=[ "res://.import/sound_explode.wav-23e94be75a4346bffb517c7e07035977.sample" ] -dest_md5="51dec829415973af026f4966d5e5d65a" - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=true -edit/normalize=true -edit/loop=false -compress/mode=0 diff --git a/2d/physics_platformer/sound_hit.wav.import b/2d/physics_platformer/sound_hit.wav.import deleted file mode 100644 index 1c6d3824..00000000 --- a/2d/physics_platformer/sound_hit.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -path="res://.import/sound_hit.wav-d8455980ada2d4a9a73508948d7317cc.sample" - -[deps] - -source_file="res://sound_hit.wav" -source_md5="ce60125d5b1639a3b88d652aea6ca0c3" - -dest_files=[ "res://.import/sound_hit.wav-d8455980ada2d4a9a73508948d7317cc.sample" ] -dest_md5="e433fcac326cc1a2c8dc44d629790a7d" - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=true -edit/normalize=true -edit/loop=false -compress/mode=0 diff --git a/2d/physics_platformer/sound_jump.wav.import b/2d/physics_platformer/sound_jump.wav.import deleted file mode 100644 index dd7c2e4a..00000000 --- a/2d/physics_platformer/sound_jump.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -path="res://.import/sound_jump.wav-4966d1f327e26a176b56ab335c03b5e1.sample" - -[deps] - -source_file="res://sound_jump.wav" -source_md5="f15f2f75683475fb46217cb108a91d44" - -dest_files=[ "res://.import/sound_jump.wav-4966d1f327e26a176b56ab335c03b5e1.sample" ] -dest_md5="d93302188764fedd122195b34b711ceb" - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=true -edit/normalize=true -edit/loop=false -compress/mode=0 diff --git a/2d/physics_platformer/sound_shoot.wav.import b/2d/physics_platformer/sound_shoot.wav.import deleted file mode 100644 index 7a6b6dde..00000000 --- a/2d/physics_platformer/sound_shoot.wav.import +++ /dev/null @@ -1,24 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -path="res://.import/sound_shoot.wav-f0f26619cba21d411b53ad23b8788116.sample" - -[deps] - -source_file="res://sound_shoot.wav" -source_md5="5c1909840119124623da414167fad697" - -dest_files=[ "res://.import/sound_shoot.wav-f0f26619cba21d411b53ad23b8788116.sample" ] -dest_md5="8c33ecb945ea94e05e6be5ee5a7b0c6b" - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=true -edit/normalize=true -edit/loop=false -compress/mode=0 diff --git a/2d/physics_platformer/stage.tscn b/2d/physics_platformer/stage.tscn deleted file mode 100644 index a02c9b98..00000000 --- a/2d/physics_platformer/stage.tscn +++ /dev/null @@ -1,306 +0,0 @@ -[gd_scene load_steps=9 format=2] - -[ext_resource path="res://tileset.tres" type="TileSet" id=1] -[ext_resource path="res://coin.tscn" type="PackedScene" id=2] -[ext_resource path="res://moving_platform.tscn" type="PackedScene" id=3] -[ext_resource path="res://seesaw.tscn" type="PackedScene" id=4] -[ext_resource path="res://one_way_platform.tscn" type="PackedScene" id=5] -[ext_resource path="res://player.tscn" type="PackedScene" id=6] -[ext_resource path="res://enemy.tscn" type="PackedScene" id=7] -[ext_resource path="res://parallax_bg.tscn" type="PackedScene" id=8] - -[node name="stage" type="Node"] - -[node name="tile_map" type="TileMap" parent="."] - -mode = 0 -tile_set = ExtResource( 1 ) -cell_size = Vector2( 64, 64 ) -cell_quadrant_size = 8 -cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -cell_half_offset = 2 -cell_tile_origin = 0 -cell_y_sort = false -collision_use_kinematic = false -collision_friction = 1.0 -collision_bounce = 0.0 -collision_layer = 1 -collision_mask = 1 -occluder_light_mask = 1 -tile_data = PoolIntArray( 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 0, 983052, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870914, 1048587, 536870922, 1048588, 2, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114122, 536870925, 1114123, 11, 1114124, 13, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179664, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 0, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 ) -__meta__ = { -"_edit_lock_": true -} - -[node name="coins" type="Node" parent="."] - -[node name="coin" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 672, 1179 ) - -[node name="coin 2" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 704, 1179 ) - -[node name="coin 3" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 736, 1179 ) - -[node name="coin 4" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1120, 992 ) - -[node name="coin 5" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1152, 992 ) - -[node name="coin 6" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1184, 992 ) - -[node name="coin 7" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1216, 992 ) - -[node name="coin 8" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1248, 992 ) - -[node name="coin 9" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1568, 864 ) - -[node name="coin 10" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1632, 864 ) - -[node name="coin 11" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1824, 768 ) - -[node name="coin 12" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1888, 768 ) - -[node name="coin 13" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 2080, 672 ) - -[node name="coin 14" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 2144, 672 ) - -[node name="coin 15" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1792, 1248 ) - -[node name="coin 16" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1856, 1248 ) - -[node name="coin 17" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1920, 1248 ) - -[node name="coin 18" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1920, 1184 ) - -[node name="coin 19" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1856, 1184 ) - -[node name="coin 20" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 1792, 1184 ) - -[node name="coin 21" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 98.8868, 488.515 ) - -[node name="coin 22" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 89.5989, 481.217 ) - -[node name="coin 23" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 108.175, 481.217 ) - -[node name="coin 24" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 116.136, 469.939 ) - -[node name="coin 25" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 117.463, 457.997 ) - -[node name="coin 26" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 106.184, 449.373 ) - -[node name="coin 27" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 98.2234, 458.661 ) - -[node name="coin 28" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 88.272, 448.71 ) - -[node name="coin 29" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 79.6476, 457.334 ) - -[node name="coin 30" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 82.9647, 468.612 ) - -[node name="coin 31" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 3357.42, 465.288 ) - -[node name="coin 31 2" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 3421.42, 465.288 ) - -[node name="coin 31 3" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 3485.42, 465.288 ) - -[node name="coin 31 4" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 3485.42, 401.288 ) - -[node name="coin 31 5" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 3421.42, 401.288 ) - -[node name="coin 31 6" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 3357.42, 401.288 ) - -[node name="coin 32" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 4172.75, 605.058 ) - -[node name="coin 31 7" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 4236.75, 605.058 ) - -[node name="coin 31 7 2" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 4300.75, 605.058 ) - -[node name="coin 31 7 3" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 4300.75, 541.058 ) - -[node name="coin 31 7 4" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 4236.75, 541.058 ) - -[node name="coin 31 7 5" parent="coins" instance=ExtResource( 2 )] - -position = Vector2( 4172.75, 541.058 ) - -[node name="props" type="Node" parent="."] - -[node name="moving_platform" parent="props" instance=ExtResource( 3 )] - -position = Vector2( 1451.86, 742.969 ) -motion = Vector2( 0, 140 ) -cycle = 5.0 - -[node name="moving_platform 2" parent="props" instance=ExtResource( 3 )] - -position = Vector2( 624.824, 545.544 ) -motion = Vector2( 300, 0 ) -cycle = 10.0 - -[node name="moving_platform 3" parent="props" instance=ExtResource( 3 )] - -position = Vector2( 3419.86, 739.662 ) -motion = Vector2( 450, 0 ) -cycle = 10.0 - -[node name="seesaw" parent="props" instance=ExtResource( 4 )] - -position = Vector2( 2402.79, 849.52 ) - -[node name="one_way_platform" parent="props" instance=ExtResource( 5 )] - -position = Vector2( 927.698, 1120.81 ) - -[node name="player" parent="." instance=ExtResource( 6 )] - -position = Vector2( 251.684, 1045.6 ) - -[node name="enemies" type="Node" parent="."] - -[node name="enemy 5" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 834.664, 1309.6 ) - -[node name="enemy 6" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 707.665, 1225.05 ) - -[node name="enemy 7" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 1125.21, 1053.06 ) - -[node name="enemy 8" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 1292.11, 1059.24 ) - -[node name="enemy 9" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 1607.38, 923.239 ) - -[node name="enemy 10" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 2586.9, 939.059 ) - -[node name="enemy 11" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 1457.6, 688.741 ) - -[node name="enemy 12" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 1193.63, 460.381 ) - -[node name="enemy 13" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 3429.73, 540.865 ) - -[node name="enemy 14" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 3546.2, 1356.19 ) - -[node name="enemy 15" parent="enemies" instance=ExtResource( 7 )] - -position = Vector2( 2406.63, 815.115 ) - -[node name="parallax_bg" parent="." instance=ExtResource( 8 )] - -[node name="Label" type="Label" parent="."] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_left = 12.0 -margin_top = -202.0 -margin_right = 358.0 -margin_bottom = -10.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 2 -size_flags_horizontal = 2 -size_flags_vertical = 0 -text = "This is a simple demo on how to make a platformer game with Godot.\"This version uses physics and the 2D physics engine for motion and collision.\"\"The demo also shows the benefits of using the scene system, where coins,\"enemies and the player are edited separatedly and instanced in the stage.\"\"To edit the base tiles for the tileset, open the tileset_edit.tscn file and follow \"instructions.\"" -autowrap = true -percent_visible = 1.0 -lines_skipped = 0 -max_lines_visible = -1 - - diff --git a/2d/physics_platformer/stage2.tscn b/2d/physics_platformer/stage2.tscn deleted file mode 100644 index 7e81f1b5..00000000 --- a/2d/physics_platformer/stage2.tscn +++ /dev/null @@ -1,57 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://tileset.tres" type="TileSet" id=1] -[ext_resource path="res://player.tscn" type="PackedScene" id=2] -[ext_resource path="res://parallax_bg.tscn" type="PackedScene" id=3] - -[node name="stage" type="Node"] - -[node name="tile_map" type="TileMap" parent="."] - -mode = 0 -tile_set = ExtResource( 1 ) -cell_size = Vector2( 64, 64 ) -cell_quadrant_size = 8 -cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -cell_half_offset = 2 -cell_tile_origin = 0 -cell_y_sort = false -collision_use_kinematic = false -collision_friction = 1.0 -collision_bounce = 0.0 -collision_layer = 1 -collision_mask = 1 -occluder_light_mask = 1 -tile_data = PoolIntArray( 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 0, 983052, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870914, 1048587, 536870922, 1048588, 2, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114122, 536870925, 1114123, 11, 1114124, 13, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179664, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 0, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 ) -__meta__ = { -"_edit_lock_": true -} - -[node name="player" parent="." instance=ExtResource( 2 )] - -position = Vector2( 251.684, 1045.6 ) - -[node name="parallax_bg" parent="." instance=ExtResource( 3 )] - -[node name="Label" type="Label" parent="."] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_left = 12.0 -margin_top = -202.0 -margin_right = 358.0 -margin_bottom = -10.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 2 -size_flags_horizontal = 2 -size_flags_vertical = 0 -text = "This is a simple demo on how to make a platformer game with Godot.\"This version uses physics and the 2D physics engine for motion and collision.\"\"The demo also shows the benefits of using the scene system, where coins,\"enemies and the player are edited separatedly and instanced in the stage.\"\"To edit the base tiles for the tileset, open the tileset_edit.tscn file and follow \"instructions.\"" -autowrap = true -percent_visible = 1.0 -lines_skipped = 0 -max_lines_visible = -1 - - diff --git a/2d/physics_platformer/tiles_demo.png.import b/2d/physics_platformer/tiles_demo.png.import index 87bb285a..26ccb23b 100644 --- a/2d/physics_platformer/tiles_demo.png.import +++ b/2d/physics_platformer/tiles_demo.png.import @@ -3,20 +3,21 @@ importer="texture" type="StreamTexture" path="res://.import/tiles_demo.png-7ca5c7c5c02ab8abe0d585a6a8f086bd.stex" +metadata={ +"vram_texture": false +} [deps] source_file="res://tiles_demo.png" -source_md5="34392fef9536a0df0c258a8cba521bf3" - dest_files=[ "res://.import/tiles_demo.png-7ca5c7c5c02ab8abe0d585a6a8f086bd.stex" ] -dest_md5="50bcf4fa0ff63c13469a9f9bba31f1a4" [params] compress/mode=0 compress/lossy_quality=0.7 compress/hdr_mode=0 +compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 flags/filter=false @@ -26,6 +27,7 @@ flags/srgb=2 process/fix_alpha_border=true process/premult_alpha=false process/HDR_as_SRGB=false +process/invert_color=false stream=false size_limit=0 detect_3d=true diff --git a/2d/physics_platformer/tileset_edit.tscn b/2d/physics_platformer/tileset_edit.tscn deleted file mode 100644 index 853fa97b..00000000 --- a/2d/physics_platformer/tileset_edit.tscn +++ /dev/null @@ -1,308 +0,0 @@ -[gd_scene load_steps=2 format=2] - -[ext_resource path="res://tiles_demo.png" type="Texture" id=1] - -[node name="Node" type="Node"] - -[node name="floor" type="Sprite" parent="."] - -texture = ExtResource( 1 ) -region_rect = Rect2( 0, 0, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="floor"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="floor/collision"] - -build_mode = 0 -polygon = PoolVector2Array( 32, -24, 32, 32, -32, 32, -32, -24 ) - -[node name="edge" type="Sprite" parent="."] - -position = Vector2( 64, 0 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 64, 0, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="edge"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="edge/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -32, -24, 24, -24, 24, 32, -32, 32 ) - -[node name="wall" type="Sprite" parent="."] - -position = Vector2( 64, 64 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 64, 64, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="wall"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="wall/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) - -[node name="wall_deco" type="Sprite" parent="."] - -position = Vector2( 96, 128 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 320, 128, 128, 64 ) - -[node name="collision" type="StaticBody2D" parent="wall_deco"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="wall_deco/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -64, -32, -8, -32, -8, 32, -64, 32 ) - -[node name="corner" type="Sprite" parent="."] - -position = Vector2( 64, 192 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 64, 128, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="corner"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="corner/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -32, -32, 24, -32, 32, -24, 32, 32, -32, 32 ) - -[node name="flowers" type="Sprite" parent="."] - -position = Vector2( 128, 192 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 192, 192, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="flowers"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="flowers/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) - -[node name="tree_base" type="Sprite" parent="."] - -position = Vector2( 192, 192 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 256, 192, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="tree_base"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="tree_base/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) - -[node name="tree_mid" type="Sprite" parent="."] - -position = Vector2( 192, 128 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 256, 128, 64, 64 ) - -[node name="tree_mid 2" type="Sprite" parent="."] - -position = Vector2( 192, 64 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 256, 64, 64, 64 ) - -[node name="tree_top" type="Sprite" parent="."] - -position = Vector2( 192, 0 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 256, 0, 64, 64 ) - -[node name="solid" type="Sprite" parent="."] - -position = Vector2( 0, 64 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 0, 64, 64, 64 ) - -[node name="ceiling" type="Sprite" parent="."] - -position = Vector2( 0, 128 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 384, 64, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="ceiling"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ceiling/collision"] - -build_mode = 0 -polygon = PoolVector2Array( 32, -32, 32, 32, -32, 32, -32, -32 ) - -[node name="ramp" type="Sprite" parent="."] - -position = Vector2( 256, 224 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 128, 128, 64, 128 ) - -[node name="collision" type="StaticBody2D" parent="ramp"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ramp/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) - -[node name="ceiling2wall" type="Sprite" parent="."] - -position = Vector2( 0, 192 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 448, 64, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="ceiling2wall"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ceiling2wall/collision"] - -build_mode = 0 -polygon = PoolVector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) - -[node name="platform_floor" type="Sprite" parent="."] - -position = Vector2( 0, 256 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 128, 0, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="platform_floor"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform_floor/collision"] - -build_mode = 0 -polygon = PoolVector2Array( 32, -24, 32, 24, -32, 24, -32, -24 ) - -[node name="platform_edge" type="Sprite" parent="."] - -position = Vector2( 64, 256 ) -texture = ExtResource( 1 ) -region_rect = Rect2( 192, 0, 64, 64 ) - -[node name="collision" type="StaticBody2D" parent="platform_edge"] - -input_pickable = false -collision_layer = 1 -collision_mask = 1 -constant_linear_velocity = Vector2( 0, 0 ) -constant_angular_velocity = 0.0 -friction = 1.0 -bounce = 0.0 - -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform_edge/collision"] - -build_mode = 0 -polygon = PoolVector2Array( 24, -24, 24, 24, -32, 24, -32, -24 ) - -[node name="help" type="Label" parent="."] - -anchor_left = 0.0 -anchor_top = 0.0 -anchor_right = 0.0 -anchor_bottom = 0.0 -margin_left = 1.0 -margin_top = 331.0 -margin_right = 727.0 -margin_bottom = 422.0 -rect_pivot_offset = Vector2( 0, 0 ) -rect_clip_content = false -mouse_filter = 2 -size_flags_horizontal = 2 -size_flags_vertical = 4 -text = "This scene serves as a tool for editing the tileset. -Nodes (sprites) and their respective collisionsare edited here. - -To create a tileset from this, a \"TileSet\" resoucre must be created. Use the helper in: Scene -> Convert To -> TileSet. -This will save a tileset. Saving over it will merge your changes. - -Finally, the saved tileset resource (tileset.tres in this case), can be opened to be used into a TileMap node for editing a tile map." -percent_visible = 1.0 -lines_skipped = 0 -max_lines_visible = -1 - -