From 23cf6a85bdb904a1833c6015222d9ee69842c1ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 2 Apr 2016 12:35:23 +0200 Subject: [PATCH] Port 2D demos to TSCN/TRES formats Part of #4196. --- demos/2d/area_input/engine.cfg | 2 +- demos/2d/area_input/input.scn | Bin 3118 -> 0 bytes demos/2d/area_input/input.tscn | 109 +++ demos/2d/dynamic_collision_shapes/ball.scn | Bin 1857 -> 0 bytes demos/2d/dynamic_collision_shapes/ball.tscn | 47 ++ .../dynamic_colobjs.gd | 2 +- .../dynamic_colobjs.scn | Bin 4399 -> 0 bytes .../dynamic_colobjs.tscn | 178 +++++ demos/2d/dynamic_collision_shapes/engine.cfg | 2 +- demos/2d/fog_of_war/engine.cfg | 2 +- demos/2d/fog_of_war/fog.scn | Bin 4159 -> 0 bytes demos/2d/fog_of_war/fog.tscn | 51 ++ demos/2d/fog_of_war/fog.xml | 29 - demos/2d/fog_of_war/tile_edit.scn | Bin 1570 -> 0 bytes demos/2d/fog_of_war/tileset.tres | 32 + demos/2d/fog_of_war/tileset_edit.tscn | 30 + demos/2d/fog_of_war/troll.scn | Bin 1979 -> 0 bytes demos/2d/fog_of_war/troll.tscn | 52 ++ demos/2d/hdr/beach_cave.scn | Bin 4834 -> 0 bytes demos/2d/hdr/beach_cave.tscn | 88 +++ demos/2d/hdr/engine.cfg | 2 +- demos/2d/hexamap/engine.cfg | 2 +- demos/2d/hexamap/map.scn | Bin 3517 -> 0 bytes demos/2d/hexamap/map.tscn | 31 + demos/2d/hexamap/tiles.scn | Bin 2217 -> 0 bytes demos/2d/hexamap/tileset.res | Bin 6863 -> 0 bytes demos/2d/hexamap/tileset.tres | 240 +++++++ demos/2d/hexamap/tileset_edit.tscn | 214 ++++++ demos/2d/hexamap/troll.scn | Bin 1983 -> 0 bytes demos/2d/hexamap/troll.tscn | 52 ++ demos/2d/isometric/bastiles.res | Bin 2918 -> 0 bytes demos/2d/isometric/dungeon.scn | Bin 4708 -> 0 bytes demos/2d/isometric/dungeon.tscn | 49 ++ demos/2d/isometric/engine.cfg | 2 +- demos/2d/isometric/tileset.scn | Bin 4476 -> 0 bytes demos/2d/isometric/tileset.tres | 67 ++ demos/2d/isometric/tileset_edit.tscn | 130 ++++ demos/2d/isometric/troll.scn | Bin 2116 -> 0 bytes demos/2d/isometric/troll.tscn | 53 ++ .../2d/isometric_light/character_shader.tres | 12 + demos/2d/isometric_light/character_shder.res | Bin 1152 -> 0 bytes demos/2d/isometric_light/column.scn | Bin 2026 -> 0 bytes demos/2d/isometric_light/column.tscn | 52 ++ demos/2d/isometric_light/cubio.gd | 2 +- demos/2d/isometric_light/cubio.scn | Bin 6952 -> 0 bytes demos/2d/isometric_light/cubio.tscn | 327 +++++++++ demos/2d/isometric_light/engine.cfg | 2 +- demos/2d/isometric_light/floor_shader.res | Bin 1027 -> 0 bytes demos/2d/isometric_light/floor_shader.tres | 14 + demos/2d/isometric_light/map.scn | Bin 9352 -> 0 bytes demos/2d/isometric_light/map.tscn | 261 +++++++ demos/2d/isometric_light/shoot.scn | Bin 4111 -> 0 bytes demos/2d/isometric_light/shoot.tscn | 172 +++++ demos/2d/isometric_light/tileset.res | Bin 2779 -> 0 bytes demos/2d/isometric_light/tileset.tres | 216 ++++++ demos/2d/isometric_light/tileset_edit.tscn | 446 ++++++++++++ demos/2d/isometric_light/tileset_scene.scn | Bin 5339 -> 0 bytes demos/2d/isometric_light/torch.scn | Bin 3861 -> 0 bytes demos/2d/isometric_light/torch.tscn | 138 ++++ demos/2d/isometric_light/torch_shader.res | Bin 746 -> 0 bytes demos/2d/isometric_light/torch_shader.tres | 14 + demos/2d/isometric_light/wall_shader.res | Bin 1687 -> 0 bytes demos/2d/isometric_light/wall_shader.tres | 16 + demos/2d/kinematic_char/colworld.scn | Bin 7366 -> 0 bytes demos/2d/kinematic_char/colworld.tscn | 422 +++++++++++ demos/2d/kinematic_char/engine.cfg | 2 +- demos/2d/kinematic_char/player.scn | Bin 1703 -> 0 bytes demos/2d/kinematic_char/player.tscn | 33 + demos/2d/kinematic_col/colworld.scn | Bin 4073 -> 0 bytes demos/2d/kinematic_col/colworld.tscn | 47 ++ demos/2d/kinematic_col/engine.cfg | 2 +- demos/2d/kinematic_col/player.scn | Bin 1625 -> 0 bytes demos/2d/kinematic_col/player.tscn | 32 + demos/2d/light_mask/engine.cfg | 2 +- demos/2d/light_mask/lightmask.scn | Bin 3829 -> 0 bytes demos/2d/light_mask/lightmask.tscn | 134 ++++ demos/2d/lights_shadows/engine.cfg | 2 +- demos/2d/lights_shadows/light_shadows.scn | Bin 4978 -> 0 bytes demos/2d/lights_shadows/light_shadows.tscn | 326 +++++++++ demos/2d/lookat/engine.cfg | 2 +- demos/2d/lookat/lookat.scn | Bin 1640 -> 0 bytes demos/2d/lookat/lookat.tscn | 32 + demos/2d/motion/engine.cfg | 2 +- demos/2d/motion/motion.scn | Bin 2738 -> 0 bytes demos/2d/motion/motion.tscn | 135 ++++ demos/2d/navpoly/engine.cfg | 2 +- demos/2d/navpoly/navigation.scn | Bin 5128 -> 0 bytes demos/2d/navpoly/navigation.tscn | 34 + demos/2d/normalmaps/engine.cfg | 2 +- demos/2d/normalmaps/normal_material.res | Bin 508 -> 0 bytes demos/2d/normalmaps/normal_material.tres | 14 + demos/2d/normalmaps/normalmap.scn | Bin 2829 -> 0 bytes demos/2d/normalmaps/normalmap.tscn | 63 ++ demos/2d/particles/engine.cfg | 2 +- demos/2d/particles/particles.tscn | 174 +++++ demos/2d/particles/particles.xml | 275 ------- demos/2d/platformer/bullet.tscn | 115 +++ demos/2d/platformer/bullet.xml | 333 --------- demos/2d/platformer/coin.tscn | 146 ++++ demos/2d/platformer/coin.xml | 430 ----------- demos/2d/platformer/enemy.tscn | 206 ++++++ demos/2d/platformer/enemy.xml | 494 ------------- demos/2d/platformer/engine.cfg | 2 +- demos/2d/platformer/moving_platform.tscn | 52 ++ demos/2d/platformer/moving_platform.xml | 224 ------ demos/2d/platformer/one_way_platform.tscn | 36 + demos/2d/platformer/one_way_platform.xml | 207 ------ demos/2d/platformer/parallax_bg.tscn | 101 +++ demos/2d/platformer/parallax_bg.xml | 230 ------ demos/2d/platformer/player.gd | 4 +- demos/2d/platformer/player.tscn | 330 +++++++++ demos/2d/platformer/player.xml | 669 ------------------ demos/2d/platformer/seesaw.tscn | 60 ++ demos/2d/platformer/seesaw.xml | 230 ------ demos/2d/platformer/stage.tscn | 352 +++++++++ demos/2d/platformer/stage.xml | 250 ------- demos/2d/platformer/tileset.tres | 195 +++++ demos/2d/platformer/tileset.xml | 191 ----- demos/2d/platformer/tileset_edit.tscn | 432 +++++++++++ demos/2d/platformer/tileset_edit.xml | 342 --------- demos/2d/platformer/types.cache | 64 -- demos/2d/pong/engine.cfg | 2 +- demos/2d/pong/pong.tscn | 33 + demos/2d/pong/pong.xml | 191 ----- demos/2d/rubegoldberg/ball.tscn | 44 ++ demos/2d/rubegoldberg/ball.xml | 215 ------ demos/2d/rubegoldberg/box.tscn | 44 ++ demos/2d/rubegoldberg/box.xml | 214 ------ demos/2d/rubegoldberg/domino.tscn | 44 ++ demos/2d/rubegoldberg/domino.xml | 215 ------ demos/2d/rubegoldberg/engine.cfg | 2 +- demos/2d/rubegoldberg/pendulum.tscn | 248 +++++++ demos/2d/rubegoldberg/pendulum.xml | 269 ------- demos/2d/rubegoldberg/platform.tscn | 33 + demos/2d/rubegoldberg/platform.xml | 200 ------ demos/2d/rubegoldberg/rubegoldberg.tscn | 98 +++ demos/2d/rubegoldberg/rubegoldberg.xml | 241 ------- demos/2d/rubegoldberg/seesaw.tscn | 89 +++ demos/2d/rubegoldberg/seesaw.xml | 243 ------- demos/2d/screen_space_shaders/engine.cfg | 2 +- .../screen_space_shaders/screen_shaders.scn | Bin 7897 -> 0 bytes .../screen_space_shaders/screen_shaders.tscn | 512 ++++++++++++++ demos/2d/sdf_font/engine.cfg | 2 +- demos/2d/sdf_font/sdf.scn | Bin 2820 -> 0 bytes demos/2d/sdf_font/sdf.tscn | 74 ++ demos/2d/shower_of_bullets/engine.cfg | 2 +- demos/2d/shower_of_bullets/shower.scn | Bin 1909 -> 0 bytes demos/2d/shower_of_bullets/shower.tscn | 51 ++ demos/2d/space_shooter/asteroid.scn | Bin 3548 -> 0 bytes demos/2d/space_shooter/asteroid.tscn | 129 ++++ demos/2d/space_shooter/enemy1.scn | Bin 3369 -> 0 bytes demos/2d/space_shooter/enemy1.tscn | 108 +++ demos/2d/space_shooter/enemy2.gd | 2 +- demos/2d/space_shooter/enemy2.scn | Bin 3253 -> 0 bytes demos/2d/space_shooter/enemy2.tscn | 98 +++ demos/2d/space_shooter/enemy_shot.scn | Bin 3218 -> 0 bytes demos/2d/space_shooter/enemy_shot.tscn | 99 +++ demos/2d/space_shooter/engine.cfg | 2 +- demos/2d/space_shooter/explosion.scn | Bin 1756 -> 0 bytes demos/2d/space_shooter/explosion.tscn | 37 + demos/2d/space_shooter/level.scn | Bin 6496 -> 0 bytes demos/2d/space_shooter/level.tscn | 354 +++++++++ demos/2d/space_shooter/level_tiles.res | Bin 720 -> 0 bytes demos/2d/space_shooter/level_tiles.scn | Bin 1825 -> 0 bytes demos/2d/space_shooter/main_menu.gd | 2 +- demos/2d/space_shooter/main_menu.scn | Bin 1903 -> 0 bytes demos/2d/space_shooter/main_menu.tscn | 64 ++ demos/2d/space_shooter/parallax.scn | Bin 2814 -> 0 bytes demos/2d/space_shooter/parallax.tscn | 201 ++++++ demos/2d/space_shooter/ship.gd | 4 +- demos/2d/space_shooter/ship.scn | Bin 4965 -> 0 bytes demos/2d/space_shooter/ship.tscn | 229 ++++++ demos/2d/space_shooter/shot.scn | Bin 3315 -> 0 bytes demos/2d/space_shooter/shot.tscn | 103 +++ demos/2d/space_shooter/tileset.tres | 20 + demos/2d/space_shooter/tileset_edit.tscn | 35 + demos/2d/splash/engine.cfg | 2 +- demos/2d/splash/splash.tscn | 274 +++++++ demos/2d/splash/splash.xml | 448 ------------ demos/2d/sprite_shaders/engine.cfg | 2 +- demos/2d/sprite_shaders/sprite_shaders.scn | Bin 5477 -> 0 bytes demos/2d/sprite_shaders/sprite_shaders.tscn | 163 +++++ demos/2d/tetris/engine.cfg | 2 +- demos/2d/tetris/grid.tscn | 47 ++ demos/2d/tetris/grid.xml | 209 ------ demos/2d/tetris/tetris.tscn | 67 ++ demos/2d/tetris/tetris.xml | 217 ------ demos/2d/texscreen/bubbles.gd | 2 +- demos/2d/texscreen/bubbles.scn | Bin 2626 -> 0 bytes demos/2d/texscreen/bubbles.tscn | 32 + demos/2d/texscreen/engine.cfg | 2 +- demos/2d/texscreen/lens.scn | Bin 1850 -> 0 bytes demos/2d/texscreen/lens.tscn | 29 + 193 files changed, 9957 insertions(+), 6666 deletions(-) delete mode 100644 demos/2d/area_input/input.scn create mode 100644 demos/2d/area_input/input.tscn delete mode 100644 demos/2d/dynamic_collision_shapes/ball.scn create mode 100644 demos/2d/dynamic_collision_shapes/ball.tscn delete mode 100644 demos/2d/dynamic_collision_shapes/dynamic_colobjs.scn create mode 100644 demos/2d/dynamic_collision_shapes/dynamic_colobjs.tscn delete mode 100644 demos/2d/fog_of_war/fog.scn create mode 100644 demos/2d/fog_of_war/fog.tscn delete mode 100644 demos/2d/fog_of_war/fog.xml delete mode 100644 demos/2d/fog_of_war/tile_edit.scn create mode 100644 demos/2d/fog_of_war/tileset.tres create mode 100644 demos/2d/fog_of_war/tileset_edit.tscn delete mode 100644 demos/2d/fog_of_war/troll.scn create mode 100644 demos/2d/fog_of_war/troll.tscn delete mode 100644 demos/2d/hdr/beach_cave.scn create mode 100644 demos/2d/hdr/beach_cave.tscn delete mode 100644 demos/2d/hexamap/map.scn create mode 100644 demos/2d/hexamap/map.tscn delete mode 100644 demos/2d/hexamap/tiles.scn delete mode 100644 demos/2d/hexamap/tileset.res create mode 100644 demos/2d/hexamap/tileset.tres create mode 100644 demos/2d/hexamap/tileset_edit.tscn delete mode 100644 demos/2d/hexamap/troll.scn create mode 100644 demos/2d/hexamap/troll.tscn delete mode 100644 demos/2d/isometric/bastiles.res delete mode 100644 demos/2d/isometric/dungeon.scn create mode 100644 demos/2d/isometric/dungeon.tscn delete mode 100644 demos/2d/isometric/tileset.scn create mode 100644 demos/2d/isometric/tileset.tres create mode 100644 demos/2d/isometric/tileset_edit.tscn delete mode 100644 demos/2d/isometric/troll.scn create mode 100644 demos/2d/isometric/troll.tscn create mode 100644 demos/2d/isometric_light/character_shader.tres delete mode 100644 demos/2d/isometric_light/character_shder.res delete mode 100644 demos/2d/isometric_light/column.scn create mode 100644 demos/2d/isometric_light/column.tscn delete mode 100644 demos/2d/isometric_light/cubio.scn create mode 100644 demos/2d/isometric_light/cubio.tscn delete mode 100644 demos/2d/isometric_light/floor_shader.res create mode 100644 demos/2d/isometric_light/floor_shader.tres delete mode 100644 demos/2d/isometric_light/map.scn create mode 100644 demos/2d/isometric_light/map.tscn delete mode 100644 demos/2d/isometric_light/shoot.scn create mode 100644 demos/2d/isometric_light/shoot.tscn delete mode 100644 demos/2d/isometric_light/tileset.res create mode 100644 demos/2d/isometric_light/tileset.tres create mode 100644 demos/2d/isometric_light/tileset_edit.tscn delete mode 100644 demos/2d/isometric_light/tileset_scene.scn delete mode 100644 demos/2d/isometric_light/torch.scn create mode 100644 demos/2d/isometric_light/torch.tscn delete mode 100644 demos/2d/isometric_light/torch_shader.res create mode 100644 demos/2d/isometric_light/torch_shader.tres delete mode 100644 demos/2d/isometric_light/wall_shader.res create mode 100644 demos/2d/isometric_light/wall_shader.tres delete mode 100644 demos/2d/kinematic_char/colworld.scn create mode 100644 demos/2d/kinematic_char/colworld.tscn delete mode 100644 demos/2d/kinematic_char/player.scn create mode 100644 demos/2d/kinematic_char/player.tscn delete mode 100644 demos/2d/kinematic_col/colworld.scn create mode 100644 demos/2d/kinematic_col/colworld.tscn delete mode 100644 demos/2d/kinematic_col/player.scn create mode 100644 demos/2d/kinematic_col/player.tscn delete mode 100644 demos/2d/light_mask/lightmask.scn create mode 100644 demos/2d/light_mask/lightmask.tscn delete mode 100644 demos/2d/lights_shadows/light_shadows.scn create mode 100644 demos/2d/lights_shadows/light_shadows.tscn delete mode 100644 demos/2d/lookat/lookat.scn create mode 100644 demos/2d/lookat/lookat.tscn delete mode 100644 demos/2d/motion/motion.scn create mode 100644 demos/2d/motion/motion.tscn delete mode 100644 demos/2d/navpoly/navigation.scn create mode 100644 demos/2d/navpoly/navigation.tscn delete mode 100644 demos/2d/normalmaps/normal_material.res create mode 100644 demos/2d/normalmaps/normal_material.tres delete mode 100644 demos/2d/normalmaps/normalmap.scn create mode 100644 demos/2d/normalmaps/normalmap.tscn create mode 100644 demos/2d/particles/particles.tscn delete mode 100644 demos/2d/particles/particles.xml create mode 100644 demos/2d/platformer/bullet.tscn delete mode 100644 demos/2d/platformer/bullet.xml create mode 100644 demos/2d/platformer/coin.tscn delete mode 100644 demos/2d/platformer/coin.xml create mode 100644 demos/2d/platformer/enemy.tscn delete mode 100644 demos/2d/platformer/enemy.xml create mode 100644 demos/2d/platformer/moving_platform.tscn delete mode 100644 demos/2d/platformer/moving_platform.xml create mode 100644 demos/2d/platformer/one_way_platform.tscn delete mode 100644 demos/2d/platformer/one_way_platform.xml create mode 100644 demos/2d/platformer/parallax_bg.tscn delete mode 100644 demos/2d/platformer/parallax_bg.xml create mode 100644 demos/2d/platformer/player.tscn delete mode 100644 demos/2d/platformer/player.xml create mode 100644 demos/2d/platformer/seesaw.tscn delete mode 100644 demos/2d/platformer/seesaw.xml create mode 100644 demos/2d/platformer/stage.tscn delete mode 100644 demos/2d/platformer/stage.xml create mode 100644 demos/2d/platformer/tileset.tres delete mode 100644 demos/2d/platformer/tileset.xml create mode 100644 demos/2d/platformer/tileset_edit.tscn delete mode 100644 demos/2d/platformer/tileset_edit.xml delete mode 100644 demos/2d/platformer/types.cache create mode 100644 demos/2d/pong/pong.tscn delete mode 100644 demos/2d/pong/pong.xml create mode 100644 demos/2d/rubegoldberg/ball.tscn delete mode 100644 demos/2d/rubegoldberg/ball.xml create mode 100644 demos/2d/rubegoldberg/box.tscn delete mode 100644 demos/2d/rubegoldberg/box.xml create mode 100644 demos/2d/rubegoldberg/domino.tscn delete mode 100644 demos/2d/rubegoldberg/domino.xml create mode 100644 demos/2d/rubegoldberg/pendulum.tscn delete mode 100644 demos/2d/rubegoldberg/pendulum.xml create mode 100644 demos/2d/rubegoldberg/platform.tscn delete mode 100644 demos/2d/rubegoldberg/platform.xml create mode 100644 demos/2d/rubegoldberg/rubegoldberg.tscn delete mode 100644 demos/2d/rubegoldberg/rubegoldberg.xml create mode 100644 demos/2d/rubegoldberg/seesaw.tscn delete mode 100644 demos/2d/rubegoldberg/seesaw.xml delete mode 100644 demos/2d/screen_space_shaders/screen_shaders.scn create mode 100644 demos/2d/screen_space_shaders/screen_shaders.tscn delete mode 100644 demos/2d/sdf_font/sdf.scn create mode 100644 demos/2d/sdf_font/sdf.tscn delete mode 100644 demos/2d/shower_of_bullets/shower.scn create mode 100644 demos/2d/shower_of_bullets/shower.tscn delete mode 100644 demos/2d/space_shooter/asteroid.scn create mode 100644 demos/2d/space_shooter/asteroid.tscn delete mode 100644 demos/2d/space_shooter/enemy1.scn create mode 100644 demos/2d/space_shooter/enemy1.tscn delete mode 100644 demos/2d/space_shooter/enemy2.scn create mode 100644 demos/2d/space_shooter/enemy2.tscn delete mode 100644 demos/2d/space_shooter/enemy_shot.scn create mode 100644 demos/2d/space_shooter/enemy_shot.tscn delete mode 100644 demos/2d/space_shooter/explosion.scn create mode 100644 demos/2d/space_shooter/explosion.tscn delete mode 100644 demos/2d/space_shooter/level.scn create mode 100644 demos/2d/space_shooter/level.tscn delete mode 100644 demos/2d/space_shooter/level_tiles.res delete mode 100644 demos/2d/space_shooter/level_tiles.scn delete mode 100644 demos/2d/space_shooter/main_menu.scn create mode 100644 demos/2d/space_shooter/main_menu.tscn delete mode 100644 demos/2d/space_shooter/parallax.scn create mode 100644 demos/2d/space_shooter/parallax.tscn delete mode 100644 demos/2d/space_shooter/ship.scn create mode 100644 demos/2d/space_shooter/ship.tscn delete mode 100644 demos/2d/space_shooter/shot.scn create mode 100644 demos/2d/space_shooter/shot.tscn create mode 100644 demos/2d/space_shooter/tileset.tres create mode 100644 demos/2d/space_shooter/tileset_edit.tscn create mode 100644 demos/2d/splash/splash.tscn delete mode 100644 demos/2d/splash/splash.xml delete mode 100644 demos/2d/sprite_shaders/sprite_shaders.scn create mode 100644 demos/2d/sprite_shaders/sprite_shaders.tscn create mode 100644 demos/2d/tetris/grid.tscn delete mode 100644 demos/2d/tetris/grid.xml create mode 100644 demos/2d/tetris/tetris.tscn delete mode 100644 demos/2d/tetris/tetris.xml delete mode 100644 demos/2d/texscreen/bubbles.scn create mode 100644 demos/2d/texscreen/bubbles.tscn delete mode 100644 demos/2d/texscreen/lens.scn create mode 100644 demos/2d/texscreen/lens.tscn diff --git a/demos/2d/area_input/engine.cfg b/demos/2d/area_input/engine.cfg index 8fa2e15bebc..ce87f395479 100644 --- a/demos/2d/area_input/engine.cfg +++ b/demos/2d/area_input/engine.cfg @@ -1,5 +1,5 @@ [application] name="Area 2D Input Events" -main_scene="res://input.scn" +main_scene="res://input.tscn" icon="res://icon.png" diff --git a/demos/2d/area_input/input.scn b/demos/2d/area_input/input.scn deleted file mode 100644 index f3a19f64daef3e45fa3d99dd9a8e95c129ad4cb9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3118 zcmXX}3w#qr8lTN3P5PiM^hra>B6 zTAs=qlmih9Qba%$U!cGd%7KS~;K7}Gcp4M|e-%XVfhcfO&;9NHH#@uE%>3s+-+bR} zUA@zZ`mbb!N>ULjHz9P6Mu?@W2#LNY&&3tIGZsL1En@uObspj}h85LDE#NEJpPxVo)pY zAHj&TjSBA-Ln?~Jaj~pBBzgUU7tuHY%&49lNuea1hy!sC78i?BFr*dvyxgOx0Z*qw zO1L9DG~O+@vAiPiMM23I)!R^d6fp*msCfKBl*)xUC=O@q{j!JmV_sK^+L$toqI8<> zKJ;odE=@NIo$pR#>XPaNkH$+rzfj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&!q)Gp>oe23wZB{Xd0R@yJq zs@%#lReQY(K3;!+i+absZ>d|`B9-&I9?u$l^5uK2m)DhD^=)G|GnLKH?zWyex4i8H zbtIv2xMIswS^lDR-|`1H#LqTuT=XPrW}noKnho>zU+$z<~O~L*`G42TTiGQ@eWpnu%1x zFnL{aX3_Mzskg@v(*~N?ZRNsU)8n@Y?At46N@2YyjMT}--6`w>gtD@;3|aWEgZ}}u)OQ;I diff --git a/demos/2d/fog_of_war/fog.tscn b/demos/2d/fog_of_war/fog.tscn new file mode 100644 index 00000000000..e86a23125cf --- /dev/null +++ b/demos/2d/fog_of_war/fog.tscn @@ -0,0 +1,51 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://tileset.tres" type="TileSet" id=1] +[ext_resource path="res://troll.tscn" type="PackedScene" id=2] +[ext_resource path="res://fog.gd" type="Script" id=3] + +[node name="Node2D" type="Node2D"] + +[node name="TileMap" type="TileMap" parent="."] + +transform/pos = Vector2( 206, 112 ) +mode = 0 +tile_set = ExtResource( 1 ) +cell/size = Vector2( 48, 48 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 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/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( -589834, 2, -589833, 2, -589832, 2, -589831, 2, -589830, 2, -589829, 2, -589828, 2, -589827, 2, -589826, 2, -589825, 2, -655360, 2, -655359, 2, -655358, 2, -655357, 2, -655356, 2, -655355, 2, -655354, 2, -655353, 2, -655352, 2, -655351, 2, -524298, 2, -524297, 2, -524296, 2, -524295, 2, -524294, 2, -524293, 2, -524292, 2, -524291, 2, -524290, 2, -524289, 2, -589824, 2, -589823, 2, -589822, 2, -589821, 2, -589820, 2, -589819, 2, -589818, 2, -589817, 2, -589816, 2, -589815, 2, -458762, 2, -458761, 2, -458760, 2, -458759, 2, -458758, 2, -458757, 2, -458756, 2, -458755, 2, -458754, 2, -458753, 2, -524288, 2, -524287, 2, -524286, 2, -524285, 2, -524284, 2, -524283, 2, -524282, 2, -524281, 2, -524280, 2, -524279, 2, -393226, 2, -393225, 2, -393224, 2, -393223, 2, -393222, 2, -393221, 2, -393220, 2, -393219, 2, -393218, 2, -393217, 2, -458752, 2, -458751, 2, -458750, 2, -458749, 2, -458748, 2, -458747, 2, -458746, 2, -458745, 2, -458744, 2, -458743, 2, -327690, 2, -327689, 2, -327688, 2, -327687, 2, -327686, 2, -327685, 2, -327684, 2, -327683, 2, -327682, 2, -327681, 2, -393216, 2, -393215, 2, -393214, 2, -393213, 2, -393212, 2, -393211, 2, -393210, 2, -393209, 2, -393208, 2, -393207, 2, -262154, 2, -262153, 2, -262152, 2, -262151, 2, -262150, 2, -262149, 2, -262148, 2, -262147, 2, -262146, 2, -262145, 2, -327680, 2, -327679, 2, -327678, 2, -327677, 2, -327676, 2, -327675, 2, -327674, 2, -327673, 2, -327672, 2, -327671, 2, -196618, 2, -196617, 2, -196616, 2, -196615, 2, -196614, 2, -196613, 2, -196612, 2, -196611, 2, -196610, 2, -196609, 2, -262144, 2, -262143, 2, -262142, 2, -262141, 2, -262140, 2, -262139, 2, -262138, 2, -262137, 2, -262136, 2, -262135, 2, -131082, 2, -131081, 2, -131080, 2, -131079, 2, -131078, 2, -131077, 2, -131076, 2, -131075, 2, -131074, 2, -131073, 2, -196608, 2, -196607, 2, -196606, 2, -196605, 2, -196604, 2, -196603, 2, -196602, 2, -196601, 2, -196600, 2, -196599, 2, -65546, 2, -65545, 2, -65544, 2, -65543, 2, -65542, 2, -65541, 2, -65540, 2, -65539, 2, -65538, 2, -65537, 2, -131072, 2, -131071, 2, -131070, 2, -131069, 2, -131068, 2, -131067, 2, -131066, 2, -131065, 2, -131064, 2, -131063, 2, -10, 2, -9, 2, -8, 2, -7, 2, -6, 2, -5, 2, -4, 2, -3, 2, -2, 2, -1, 2, -65536, 2, -65535, 2, -65534, 2, -65533, 2, -65532, 2, -65531, 2, -65530, 2, -65529, 2, -65528, 2, -65527, 2, 65526, 2, 65527, 2, 65528, 2, 65529, 2, 65530, 2, 65531, 2, 65532, 2, 65533, 2, 65534, 2, 65535, 2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 131062, 2, 131063, 2, 131064, 2, 131065, 2, 131066, 2, 131067, 2, 131068, 2, 131069, 2, 131070, 2, 131071, 2, 65536, 2, 65537, 2, 65538, 2, 65539, 2, 65540, 2, 65541, 2, 65542, 2, 65543, 2, 65544, 2, 65545, 2, 196598, 2, 196599, 2, 196600, 2, 196601, 2, 196602, 2, 196603, 2, 196604, 2, 196605, 2, 196606, 2, 196607, 2, 131072, 2, 131073, 2, 131074, 2, 131075, 2, 131076, 2, 131077, 2, 131078, 2, 131079, 2, 131080, 2, 131081, 2, 262134, 2, 262135, 2, 262136, 2, 262137, 2, 262138, 2, 262139, 2, 262140, 2, 262141, 2, 262142, 2, 262143, 2, 196608, 2, 196609, 2, 196610, 2, 196611, 2, 196612, 2, 196613, 2, 196614, 2, 196615, 2, 196616, 2, 196617, 2, 327670, 2, 327671, 2, 327672, 2, 327673, 2, 327674, 2, 327675, 2, 327676, 2, 327677, 2, 327678, 2, 327679, 2, 262144, 2, 262145, 2, 262146, 2, 262147, 2, 262148, 2, 262149, 2, 262150, 2, 262151, 2, 262152, 2, 262153, 2, 393206, 2, 393207, 2, 393208, 2, 393209, 2, 393210, 2, 393211, 2, 393212, 2, 393213, 2, 393214, 2, 393215, 2, 327680, 2, 327681, 2, 327682, 2, 327683, 2, 327684, 2, 327685, 2, 327686, 2, 327687, 2, 327688, 2, 327689, 2, 458742, 2, 458743, 2, 458744, 2, 458745, 2, 458746, 2, 458747, 2, 458748, 2, 458749, 2, 458750, 2, 458751, 2, 393216, 2, 393217, 2, 393218, 2, 393219, 2, 393220, 2, 393221, 2, 393222, 2, 393223, 2, 393224, 2, 393225, 2, 524278, 2, 524279, 2, 524280, 2, 524281, 2, 524282, 2, 524283, 2, 524284, 2, 524285, 2, 524286, 2, 524287, 2, 458752, 2, 458753, 2, 458754, 2, 458755, 2, 458756, 2, 458757, 2, 458758, 2, 458759, 2, 458760, 2, 458761, 2, 589814, 2, 589815, 2, 589816, 2, 589817, 2, 589818, 2, 589819, 2, 589820, 2, 589821, 2, 589822, 2, 589823, 2, 524288, 2, 524289, 2, 524290, 2, 524291, 2, 524292, 2, 524293, 2, 524294, 2, 524295, 2, 524296, 2, 524297, 2, 655350, 2, 655351, 2, 655352, 2, 655353, 2, 655354, 2, 655355, 2, 655356, 2, 655357, 2, 655358, 2, 655359, 2, 589824, 2, 589825, 2, 589826, 2, 589827, 2, 589828, 2, 589829, 2, 589830, 2, 589831, 2, 589832, 2, 589833, 2 ) + +[node name="troll" parent="." instance=ExtResource( 2 )] + +collision/margin = 0.001 + +[node name="Fog" type="TileMap" parent="."] + +mode = 0 +tile_set = ExtResource( 1 ) +cell/size = Vector2( 48, 48 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 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/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( ) +script/script = ExtResource( 3 ) + + diff --git a/demos/2d/fog_of_war/fog.xml b/demos/2d/fog_of_war/fog.xml deleted file mode 100644 index ed08d84a1fb..00000000000 --- a/demos/2d/fog_of_war/fog.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - "fog opaque" - - -48, -48 - 0, 0 - 0, 0, 144, 144 - - - "fog transparent" - - -48, -48 - 0, 0 - 144, 0, 144, 144 - - - "floor" - - 0, 0 - 0, 0 - 0, 0, 0, 0 - - - - - \ No newline at end of file diff --git a/demos/2d/fog_of_war/tile_edit.scn b/demos/2d/fog_of_war/tile_edit.scn deleted file mode 100644 index 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r!M%5C=nN?fUha+Y zYd7rr$M2U++p#*Z>-xJd`S{j#>kiFXP?S$Uc}Z zV3kY;zPP$?Yw?X{>uAuGABY1pc)8-EkB8!asS135&Hd*)&i(lEcP6G^xP9c$$Aiti zuf5v#neU#pd(+Tz`Pkc6F12P}dHat4M|W;-yBhqb8oc??%c(1i_I$za*-)80{`#hy z7h5y)K6fwGHgCIjfBmK-!T;VnF}41J=X7A@i=Rxf5OBTs@sjw!`QulT6~&e8JG~xg v_uF%rYjiJr0Mv;}|IZ?aTRP6({pq78$&E7T?OGLkJxX`<_4f&V&bR%4AU%9l diff --git a/demos/2d/fog_of_war/troll.tscn b/demos/2d/fog_of_war/troll.tscn new file mode 100644 index 00000000000..2dc8bdbf675 --- /dev/null +++ b/demos/2d/fog_of_war/troll.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://troll.gd" type="Script" id=1] +[ext_resource path="res://troll.png" type="Texture" id=2] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 16.0 + +[node name="troll" type="KinematicBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 3.24216, 19.453 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.001 +script/script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 3.24216, 19.453 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="Camera2D" type="Camera2D" parent="."] + +anchor_mode = 1 +rotating = false +current = true +zoom = Vector2( 1, 1 ) +limit/left = -10000000 +limit/top = -10000000 +limit/right = 10000000 +limit/bottom = 10000000 +drag_margin/h_enabled = true +drag_margin/v_enabled = true +smoothing/enable = 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 + + diff --git a/demos/2d/hdr/beach_cave.scn b/demos/2d/hdr/beach_cave.scn deleted file mode 100644 index 6a4108e7a52a906011a6a9c78a9c7e29aeeecdda..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4834 zcmW+)2Uru?7QT~72oQSLMP~>JMFcFkpdj27R1^^@QY^_Ngb)Y`CZSpg2#VOdSODEs z0Tp~IDzZWZaTR4PEc!%T2hnu_#kHd-yz$NV-FxTEIdji{?ws~bRJ1?3y3V2(SX z$vFgpTk3hh3bz6h{HmE;qs~+%`KGIrWWbta*y^KzEy=Jm(#djknHm|%bYMy|C9-rP z1Mrw6ZAs-C(kPy;l@dydSHO@f)!D$AWGF4Ager^BiqeT3k&?)jX~fr|2Oh7#4im&y zrV?eQMwCHlwKAr#j*B;w$*l%`4&5iG#MH&!~))M`pA ziC6#;9*k;J)JlCmElHh>&qOjcB-qU>CV?FsXV?!c@fZ?uLS=G=ie%W(HH1nolPp70 zl1L;1&VZIQom$0{f{Y_fXhWCfWT>^gt-usdfL8SE6opPk6hm|P9}+ofm@Bp~u;u-5k~Di>HVN#3W2MBPWr~QTRFO7A#@;Hhpe3v2y#T;1&{F@5pGpFA zAS#UIzk;?rwcgsmH6wI7nJSaeDby;!#5ItMNaSJ(O(NCeQwoORZD@%|Gy*47CDUpp z&d`P_RjYIwLaQTzE21UXXZ4E(OjN6pOGq#mmKbTJ8byZA_lL)r;5tMkakUeq02DWa z#UNVDmKeEwMP~Wp-DZR|MIh-P+wNyr^L}E|WCqpGC>0G`m ziE_nZkRwdyg&;~b`y!r#P6ZWod^rwC)E=D%9vk5{IN+^fhN`j@8nr5&Lng+3$$Ao>vaNFV=WVM2EZ00XDPpQw8Y$qM9ILn-_OnY?L`iUWKBJZ4}CgnE|# z1oYw+z%t)^y_cNco0Wo2a{d=@3p3o!`zwa^g)!QDz02!X%AXb5=m&=-n$rFvK7 z2A|)gXQ4RH3Fv*HD;S5f^o}$D#^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1q_MHqm z=9GTj*|WY7~!S zqbJ|qxNWf*^!$@4J2I*#lH=t*smWt!#;j%n9yHN;n!=}BV%l#k{CVzQ|E$zyajj#X zwhUQvxadNcbU7jags#e%v-e!Pbl6;7`n{rTu@uV1=1++8Gl9lpU3KzDWpD*|7)ww@i5wX@1ozvR-pG0V!& zym?xey|$`?ZXjuE=g6LlLE81?q>9=)$2o70JG_hE5_d{?_Ed-7ejudi%bcU;BFsL{S$AMEl*m8C#YGO1~2N*LL^R>}7}6NZc=Mw=yqA w{{1hLoF{=O5`}%~tJNh-$(+woW&rt1CavuYbnwH9>;y-Tx1Ydo^pa1{> diff --git a/demos/2d/hexamap/map.tscn b/demos/2d/hexamap/map.tscn new file mode 100644 index 00000000000..3abda31bb00 --- /dev/null +++ b/demos/2d/hexamap/map.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://tileset.tres" type="TileSet" id=1] +[ext_resource path="res://troll.tscn" type="PackedScene" id=2] + +[node name="Node2D" type="Node2D"] + +[node name="TileMap" type="TileMap" parent="."] + +mode = 0 +tile_set = ExtResource( 1 ) +cell/size = Vector2( 82, 94 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +cell/half_offset = 1 +cell/tile_origin = 0 +cell/y_sort = false +collision/use_kinematic = false +collision/friction = 1.0 +collision/bounce = 0.0 +collision/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( -458747, 1073741831, -393213, 1073741831, -393212, 1073741831, -393211, 6, -393210, 1073741831, -393209, 1073741830, -393208, 1073741830, -393207, 6, -393206, 8, -327679, 1073741831, -327678, 1073741831, -327677, 1073741831, -327676, 1073741830, -327675, 1073741831, -327674, 6, -327673, 6, -327672, 6, -327671, 6, -327670, 6, -327669, 0, -327668, 0, -262143, 1073741831, -262142, 1073741831, -262141, 6, -262140, 6, -262139, 0, -262138, 6, -262137, 1, -262136, 0, -262135, 1, -262134, 1, -262133, 0, -262132, 0, -262131, 0, -196608, 9, -196607, 1073741832, -196606, 1073741830, -196605, 2, -196604, 2, -196603, 1073741845, -196602, 21, -196601, 19, -196600, 1073741826, -196599, 0, -196598, 16, -196597, 0, -196596, 0, -196595, 0, -196594, 0, -196593, 0, -131071, 0, -131070, 1, -131069, 1073741827, -131068, 1073741846, -131067, 20, -131066, 19, -131065, 2, -131064, 0, -131063, 14, -131062, 0, -131061, 0, -131060, 0, -131059, 0, -131058, 0, -131057, 0, -131056, 0, -65534, 1, -65533, 2, -65532, 1073741827, -65531, 1, -65530, 1, -65529, 0, -65528, 10, -65527, 12, -65526, 0, -65525, 0, -65524, 0, -65523, 0, -65522, 0, -65521, 0, -65520, 0, 1, 0, 2, 0, 3, 2, 4, 1073741826, 5, 1, 6, 15, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 65537, 0, 65538, 1, 65539, 1610612749, 65540, 1, 65541, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 1610612753, 65546, 0, 65547, 0, 65548, 0, 65549, 0, 65550, 1073741848, 65551, 1073741849, 65552, 0, 131073, 0, 131074, 0, 131075, 0, 131076, 0, 131077, 1610612751, 131078, 1610612752, 131079, 1610612752, 131080, 1610612751, 131081, 1610612751, 131082, 0, 131083, 0, 131084, 0, 131085, 0, 131086, 0, 196612, 0, 196613, 1610612751, 196614, 1610612752, 196615, 1610612751, 196616, 1610612751, 196617, 1073741839, 196618, 1073741839, 196619, 0, 196620, 0, 196621, 0, 262150, 0, 262152, 0, 262154, 0, 262156, 0 ) + +[node name="troll" parent="." instance=ExtResource( 2 )] + +transform/pos = Vector2( 602.819, -39.2876 ) +collision/margin = 0.001 + + diff --git a/demos/2d/hexamap/tiles.scn b/demos/2d/hexamap/tiles.scn deleted file mode 100644 index a019bbb92d87ac1e8f00d0b5ca59499d2fc4227c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2217 zcma);e^3!3p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MgAIDC59|Zbth}ca}3b%5b z3}-8D#;oCP<@TAr!|=3nFPe7LwCkq*idrD&k!7^flL1=l2?KUygDk|tLj+(&c3`Q~ z%8#AkpplK5n^ryh=X24b??Np`dMh}QhmJ_EMfsyR^HJ>jJpS)|kYi*&ni&?Q%$>5_ zl;x!?KV_bj6{M^%W!{u6PFYdPic?mSGT;BqLU;OJ=4HAc8d*&bKQAzz zV-_fZRvuoGX?3EvOe5DYgs#xzNDs}Y$G0b91F|4R$z|wA`Dx?b8`otyytv4k)!7m1 zLA7ZZ0IJh1$mW|lx8oAcb4h22>wDtB-M3b6oWriM>k}`zA75)Eq0&b-y>P=-l$`aP zc|Q$>CL!b5=pC|mt;74%ZML6>H$2F_T6?K~>pk`Pg{zVFJ^HAW^k;o1zjVT;dn(F*?^YnAOM_Sh_ z)5mun`0Uy_{`bBu`M+>4>$o(2`@-QLoqFfPRZsre(R*!V?7&~FPdJ$&0!sb2H!m iSJKyXx4W$OtYZNXWOlY~3{3~f*P*AkC)h*(r2Gd3D#XYD diff --git a/demos/2d/hexamap/tileset.res b/demos/2d/hexamap/tileset.res deleted file mode 100644 index 05d89316a28c92a6745cc1afd0781822fb1a875d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6863 zcmbW62Xh=n5QT@FbIu}1`)=p52?mohNCuOQ5hqz-OX5xflQWo{vy0z?{~2$(XJ)%^ zr_A6MRH zC%F%NI|@5Xav79Q=Z><3^CqUeCw%3-<~E7Sn~lV4w~@HA8;Q^OjpU-?d?m%b2QdE?Ur6 zQrw%6#A_FlxUwOM&-jq!q7i*1#l00ty!IlAD>IV#j2lTV+R;~1+#8a_Ye$l}vLuPm zc#`CzDSaiyy)8++_9clcW0LrcGf6I5(^pd5o0G(AcapfWCyCGaljNd7eI>-La47O{ z%W~peN{6CDFAY5>hn{d~m|*)`;ZWpCyx~v`G{u!e!-N+X4z=2$Tn0*aSUD~E;& zFD@KvwL`g7;t7XhN?w+De{>s{6%IwNE=$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file mode 100644 index 00000000000..4538202335e --- /dev/null +++ b/demos/2d/hexamap/tileset.tres @@ -0,0 +1,240 @@ +[gd_resource type="TileSet" load_steps=27 format=1] + +[ext_resource path="res://WWT-01.png" type="Texture" id=1] +[ext_resource path="res://WWT-02.png" type="Texture" id=2] +[ext_resource path="res://WWT-11.png" type="Texture" id=3] +[ext_resource path="res://WWT-12.png" type="Texture" id=4] +[ext_resource path="res://WWT-13.png" type="Texture" id=5] +[ext_resource path="res://WWT-14.png" type="Texture" id=6] +[ext_resource path="res://WWT-15.png" type="Texture" id=7] +[ext_resource path="res://WWT-16.png" type="Texture" id=8] +[ext_resource path="res://WWT-17.png" type="Texture" id=9] +[ext_resource path="res://WWT-18.png" type="Texture" id=10] +[ext_resource path="res://WWT-19.png" type="Texture" id=11] +[ext_resource path="res://WWT-20.png" type="Texture" id=12] +[ext_resource path="res://WWT-03.png" type="Texture" id=13] +[ext_resource path="res://WWT-21.png" type="Texture" id=14] +[ext_resource path="res://WWT-22.png" type="Texture" id=15] +[ext_resource path="res://WWT-23.png" type="Texture" id=16] +[ext_resource path="res://WWT-24.png" type="Texture" id=17] +[ext_resource path="res://WWT-25.png" type="Texture" id=18] +[ext_resource path="res://WWT-26.png" type="Texture" id=19] +[ext_resource path="res://WWT-04.png" type="Texture" id=20] +[ext_resource path="res://WWT-05.png" type="Texture" id=21] +[ext_resource path="res://WWT-06.png" type="Texture" id=22] +[ext_resource path="res://WWT-07.png" type="Texture" id=23] +[ext_resource path="res://WWT-08.png" type="Texture" id=24] +[ext_resource path="res://WWT-09.png" type="Texture" id=25] +[ext_resource path="res://WWT-10.png" type="Texture" id=26] + +[resource] + +0/name = "Tile 1" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( -24, -17 ) +0/region = Rect2( 0, 0, 0, 0 ) +0/occluder_offset = Vector2( -0, -0 ) +0/navigation_offset = Vector2( -0, -0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shapes = [ ] +1/name = "Tile 2" +1/texture = ExtResource( 2 ) +1/tex_offset = Vector2( -24, -17 ) +1/region = Rect2( 0, 0, 0, 0 ) +1/occluder_offset = Vector2( -0, -0 ) +1/navigation_offset = Vector2( -0, -0 ) +1/shape_offset = Vector2( 0, 0 ) +1/shapes = [ ] +2/name = "Tile 3" +2/texture = ExtResource( 13 ) +2/tex_offset = Vector2( -24, -17 ) +2/region = Rect2( 0, 0, 0, 0 ) +2/occluder_offset = Vector2( -0, -0 ) +2/navigation_offset = Vector2( -0, -0 ) +2/shape_offset = Vector2( 0, 0 ) +2/shapes = [ ] +3/name = "Tile 4" +3/texture = ExtResource( 20 ) +3/tex_offset = Vector2( -24, -17 ) +3/region = Rect2( 0, 0, 0, 0 ) +3/occluder_offset = Vector2( -0, -0 ) +3/navigation_offset = Vector2( -0, -0 ) +3/shape_offset = Vector2( 0, 0 ) +3/shapes = [ ] +4/name = "Tile 5" +4/texture = ExtResource( 21 ) +4/tex_offset = Vector2( -24, -17 ) +4/region = Rect2( 0, 0, 0, 0 ) +4/occluder_offset = Vector2( -0, -0 ) +4/navigation_offset = Vector2( -0, -0 ) +4/shape_offset = Vector2( 0, 0 ) +4/shapes = [ ] +5/name = "Tile 6" +5/texture = ExtResource( 22 ) +5/tex_offset = Vector2( -24, -17 ) +5/region = Rect2( 0, 0, 0, 0 ) +5/occluder_offset = Vector2( -0, -0 ) +5/navigation_offset = Vector2( -0, -0 ) +5/shape_offset = Vector2( 0, 0 ) +5/shapes = [ ] +6/name = "Tile 7" +6/texture = ExtResource( 23 ) +6/tex_offset = Vector2( -24, -17 ) +6/region = Rect2( 0, 0, 0, 0 ) +6/occluder_offset = Vector2( -0, -0 ) +6/navigation_offset = Vector2( -0, -0 ) +6/shape_offset = Vector2( 0, 0 ) +6/shapes = [ ] +7/name = "Tile 8" +7/texture = ExtResource( 24 ) +7/tex_offset = Vector2( -24, -17 ) +7/region = Rect2( 0, 0, 0, 0 ) +7/occluder_offset = Vector2( -0, -0 ) +7/navigation_offset = Vector2( -0, -0 ) +7/shape_offset = Vector2( 0, 0 ) +7/shapes = [ ] +8/name = "Tile 9" +8/texture = ExtResource( 25 ) +8/tex_offset = Vector2( -24, -17 ) +8/region = Rect2( 0, 0, 0, 0 ) +8/occluder_offset = Vector2( -0, -0 ) +8/navigation_offset = Vector2( -0, -0 ) +8/shape_offset = Vector2( 0, 0 ) +8/shapes = [ ] +9/name = "Tile 10" +9/texture = ExtResource( 26 ) +9/tex_offset = Vector2( -24, -17 ) +9/region = Rect2( 0, 0, 0, 0 ) +9/occluder_offset = Vector2( -0, -0 ) +9/navigation_offset = Vector2( -0, -0 ) +9/shape_offset = Vector2( 0, 0 ) +9/shapes = [ ] +10/name = "Tile 11" +10/texture = ExtResource( 3 ) +10/tex_offset = Vector2( -24, -17 ) +10/region = Rect2( 0, 0, 0, 0 ) +10/occluder_offset = Vector2( -0, -0 ) +10/navigation_offset = Vector2( -0, -0 ) +10/shape_offset = Vector2( 0, 0 ) +10/shapes = [ ] +11/name = "Tile 12" +11/texture = ExtResource( 4 ) +11/tex_offset = Vector2( -24, -17 ) +11/region = Rect2( 0, 0, 0, 0 ) +11/occluder_offset = Vector2( -0, -0 ) +11/navigation_offset = Vector2( -0, -0 ) +11/shape_offset = Vector2( 0, 0 ) +11/shapes = [ ] +12/name = "Tile 13" +12/texture = ExtResource( 5 ) +12/tex_offset = Vector2( -24, -17 ) +12/region = Rect2( 0, 0, 0, 0 ) +12/occluder_offset = Vector2( -0, -0 ) +12/navigation_offset = Vector2( -0, -0 ) +12/shape_offset = Vector2( 0, 0 ) +12/shapes = [ ] +13/name = "Tile 14" +13/texture = ExtResource( 6 ) +13/tex_offset = Vector2( -24, -17 ) +13/region = Rect2( 0, 0, 0, 0 ) +13/occluder_offset = Vector2( -0, -0 ) +13/navigation_offset = Vector2( -0, -0 ) +13/shape_offset = Vector2( 0, 0 ) +13/shapes = [ ] +14/name = "Tile 15" +14/texture = ExtResource( 7 ) +14/tex_offset = Vector2( -24, -17 ) +14/region = Rect2( 0, 0, 0, 0 ) +14/occluder_offset = Vector2( -0, -0 ) +14/navigation_offset = Vector2( -0, -0 ) +14/shape_offset = Vector2( 0, 0 ) +14/shapes = [ ] +15/name = "Tile 16" +15/texture = ExtResource( 8 ) +15/tex_offset = Vector2( -24, -17 ) +15/region = Rect2( 0, 0, 0, 0 ) +15/occluder_offset = Vector2( -0, -0 ) +15/navigation_offset = Vector2( -0, -0 ) +15/shape_offset = Vector2( 0, 0 ) +15/shapes = [ ] +16/name = "Tile 17" +16/texture = ExtResource( 9 ) +16/tex_offset = Vector2( -24, -17 ) +16/region = Rect2( 0, 0, 0, 0 ) +16/occluder_offset = Vector2( -0, -0 ) +16/navigation_offset = Vector2( -0, -0 ) +16/shape_offset = Vector2( 0, 0 ) +16/shapes = [ ] +17/name = "Tile 18" +17/texture = ExtResource( 10 ) +17/tex_offset = Vector2( -24, -17 ) +17/region = Rect2( 0, 0, 0, 0 ) +17/occluder_offset = Vector2( -0, -0 ) +17/navigation_offset = Vector2( -0, -0 ) +17/shape_offset = Vector2( 0, 0 ) +17/shapes = [ ] +18/name = "Tile 19" +18/texture = ExtResource( 11 ) +18/tex_offset = Vector2( -24, -17 ) +18/region = Rect2( 0, 0, 0, 0 ) +18/occluder_offset = Vector2( -0, -0 ) +18/navigation_offset = Vector2( -0, -0 ) +18/shape_offset = Vector2( 0, 0 ) +18/shapes = [ ] +19/name = "Tile 20" +19/texture = ExtResource( 12 ) +19/tex_offset = Vector2( -24, -17 ) +19/region = Rect2( 0, 0, 0, 0 ) +19/occluder_offset = Vector2( -0, -0 ) +19/navigation_offset = Vector2( -0, -0 ) +19/shape_offset = Vector2( 0, 0 ) +19/shapes = [ ] +20/name = "Tile 21" +20/texture = ExtResource( 14 ) +20/tex_offset = Vector2( -24, -17 ) +20/region = Rect2( 0, 0, 0, 0 ) +20/occluder_offset = Vector2( -0, -0 ) +20/navigation_offset = Vector2( -0, -0 ) +20/shape_offset = Vector2( 0, 0 ) +20/shapes = [ ] +21/name = "Tile 22" +21/texture = ExtResource( 15 ) +21/tex_offset = Vector2( -24, -17 ) +21/region = Rect2( 0, 0, 0, 0 ) +21/occluder_offset = Vector2( -0, -0 ) +21/navigation_offset = Vector2( -0, -0 ) +21/shape_offset = Vector2( 0, 0 ) +21/shapes = [ ] +22/name = "Tile 23" +22/texture = ExtResource( 16 ) +22/tex_offset = Vector2( -24, -17 ) +22/region = Rect2( 0, 0, 0, 0 ) +22/occluder_offset = Vector2( -0, -0 ) +22/navigation_offset = Vector2( -0, -0 ) +22/shape_offset = Vector2( 0, 0 ) +22/shapes = [ ] +23/name = "Tile 24" +23/texture = ExtResource( 17 ) +23/tex_offset = Vector2( -24, -17 ) +23/region = Rect2( 0, 0, 0, 0 ) +23/occluder_offset = Vector2( -0, -0 ) +23/navigation_offset = Vector2( -0, -0 ) +23/shape_offset = Vector2( 0, 0 ) +23/shapes = [ ] +24/name = "Tile 25" +24/texture = ExtResource( 18 ) +24/tex_offset = Vector2( -24, -17 ) +24/region = Rect2( 0, 0, 0, 0 ) +24/occluder_offset = Vector2( -0, -0 ) +24/navigation_offset = Vector2( -0, -0 ) +24/shape_offset = Vector2( 0, 0 ) +24/shapes = [ ] +25/name = "Tile 26" +25/texture = ExtResource( 19 ) +25/tex_offset = Vector2( -24, -17 ) +25/region = Rect2( 0, 0, 0, 0 ) +25/occluder_offset = Vector2( -0, -0 ) +25/navigation_offset = Vector2( -0, -0 ) +25/shape_offset = Vector2( 0, 0 ) +25/shapes = [ ] + diff --git a/demos/2d/hexamap/tileset_edit.tscn b/demos/2d/hexamap/tileset_edit.tscn new file mode 100644 index 00000000000..d400d55fd08 --- /dev/null +++ b/demos/2d/hexamap/tileset_edit.tscn @@ -0,0 +1,214 @@ +[gd_scene load_steps=27 format=1] + +[ext_resource path="res://WWT-01.png" type="Texture" id=1] +[ext_resource path="res://WWT-02.png" type="Texture" id=2] +[ext_resource path="res://WWT-03.png" type="Texture" id=3] +[ext_resource path="res://WWT-04.png" type="Texture" id=4] +[ext_resource path="res://WWT-05.png" type="Texture" id=5] +[ext_resource path="res://WWT-06.png" type="Texture" id=6] +[ext_resource path="res://WWT-07.png" type="Texture" id=7] +[ext_resource path="res://WWT-08.png" type="Texture" id=8] +[ext_resource path="res://WWT-09.png" type="Texture" id=9] +[ext_resource path="res://WWT-10.png" type="Texture" id=10] +[ext_resource path="res://WWT-11.png" type="Texture" id=11] +[ext_resource path="res://WWT-12.png" type="Texture" id=12] +[ext_resource path="res://WWT-13.png" type="Texture" id=13] +[ext_resource path="res://WWT-14.png" type="Texture" id=14] +[ext_resource path="res://WWT-15.png" type="Texture" id=15] +[ext_resource path="res://WWT-16.png" type="Texture" id=16] +[ext_resource path="res://WWT-17.png" type="Texture" id=17] +[ext_resource path="res://WWT-18.png" type="Texture" id=18] +[ext_resource path="res://WWT-19.png" type="Texture" id=19] +[ext_resource path="res://WWT-20.png" type="Texture" id=20] +[ext_resource path="res://WWT-21.png" type="Texture" id=21] +[ext_resource path="res://WWT-22.png" type="Texture" id=22] +[ext_resource path="res://WWT-23.png" type="Texture" id=23] +[ext_resource path="res://WWT-24.png" type="Texture" id=24] +[ext_resource path="res://WWT-25.png" type="Texture" id=25] +[ext_resource path="res://WWT-26.png" type="Texture" id=26] + +[node name="Node2D" type="Node2D"] + +[node name="Tile 1" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 1 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 2" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 2 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 3" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 3 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 4" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 4 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 5" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 5 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 6" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 6 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 7" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 7 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 8" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 8 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 9" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 9 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 10" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 10 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 11" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 11 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 12" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 12 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 13" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 13 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 14" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 14 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 15" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 15 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 16" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 16 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 17" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 17 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 18" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 18 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 19" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 19 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 20" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 20 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 21" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 21 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 22" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 22 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 23" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 23 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 24" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 24 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 25" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 25 ) +centered = false +offset = Vector2( -24, -17 ) + +[node name="Tile 26" type="Sprite" parent="."] + +transform/pos = Vector2( 96.6174, 42.2665 ) +texture = ExtResource( 26 ) +centered = false +offset = Vector2( -24, -17 ) + + diff --git a/demos/2d/hexamap/troll.scn b/demos/2d/hexamap/troll.scn deleted file mode 100644 index 1f33dabf8e6c00f565948ca6b5542aea5d7121b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1983 zcmWkvYj6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g*xX&bi6QbMcUH@2s&viG z;~TNR@-;RG_7f#%gWdN1lKtBfe_1#>)x6IavnPLv&8@p#QZZ+W$^C=xmzsMsoRl9_ z!k=2r?f+(S+P8eRu8^Fz8I2a?Q(;He>T`Y!~ieEW4av;@nhsqhhBksmroDdnc0EPDmU)hKF!5 z{s#wdaDM~m8FOG`Ea1epvJQuHLX6deU7V$49#SuJbey)bAD>&9-o!8Iea2$|apb+8 zaAYL~i?^oZBtGe^hk~oHyz~^FawfGFz4!q(_RhgZ6tK}DvbWCBSph|U4R$$@KkL9& zd^DeK@=fGrlXf%fnKHsEUz;>4j=Ycjpd!@s_{tQp8hM39N3%L|G>eY zQ$QaUeP*_pA5PnN8qa|>t9t`w4cO!g^!LRE$b2_C9nbag6Wm8{44ozwp$q*n ze%<4H{_%&!({`;1?z#H@i$1<%{raP`=a=MD55MzvC_Hw@o-u3cy{F6T#)rn=`thQk z!&cc;@WG{n+e&Y>S;s@J!p1l-gBL14{cI@ym+IgT*WUYn_vBA5d~ag<*;~i{d?M7= z|N3j4|MK0n_HG_pA;0kM#q%B6SKqzuf93YA?UzFTR72Mvc{zP?;r<8g{>Q6QC*ItA z{aidj85y7J{yiK3g2$c;>{#RAp%u`(D2X wy8QNR<}y9N9tL%y%K!7oczgGUcYgM*m&mmW=wH4%_GXms8b}NX1J2j|e@PmCwEzGB diff --git a/demos/2d/hexamap/troll.tscn b/demos/2d/hexamap/troll.tscn new file mode 100644 index 00000000000..2dc8bdbf675 --- /dev/null +++ b/demos/2d/hexamap/troll.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://troll.gd" type="Script" id=1] +[ext_resource path="res://troll.png" type="Texture" id=2] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 16.0 + +[node name="troll" type="KinematicBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 3.24216, 19.453 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.001 +script/script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 3.24216, 19.453 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="Camera2D" type="Camera2D" parent="."] + +anchor_mode = 1 +rotating = false +current = true +zoom = Vector2( 1, 1 ) +limit/left = -10000000 +limit/top = -10000000 +limit/right = 10000000 +limit/bottom = 10000000 +drag_margin/h_enabled = true +drag_margin/v_enabled = true +smoothing/enable = 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 + + diff --git a/demos/2d/isometric/bastiles.res b/demos/2d/isometric/bastiles.res deleted file mode 100644 index 50f3c7832167de8a50ec0475bcc5e47d7ee7c070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2918 zcmbuBO;6N77{?z7BI5h|yP|^P8{KwyeL>OP1&K!k9!*GD3T{%ir0pWyIB?)&n0Vnp zqDNy)T)24g;79Nyc=6%||IbXjGwt@k#z}_G^MB@<`TaYaDO1x^;}o?nJh^l0Lw{X! zooOc&@&EjpMDY=H-wC{iUv-SSz39+MDAh&~dW$oG=Po<`%xujLXg}m7uT~EOQ4>`C z+EQr9he+mRc|YdmjL=yL8@@w_<7md4pAW!%PzZ~5==e3;r2``LorRiLrxPOZs#Ui! zhiwxTu}Y`Jq`JLaTd+e^#na?YN~fb@V(`{pa^g91Hz7$wreZb|%p!`*nAtQE%%-6+ zn?_8RtcX>?%v)tK>$+ezjW*^;lFXK3wi3)D(h002v!ydznaoNR%)C_=v#twftDQNL zBy(Od=M&5#(wXx~=Dg0F&tz7rVCJo|m~~w+=i8YhNir7{b0NVjBAvOAWG?8;g-m9p z3TECai&@tNbD^C%k|c9cF&7ieBGQ?QN#>%?T+C!vs$k}=vY2&UFc;gIBPkHKnz+%T z>w@nd+(x5@Q472f*IY2NR9~PT$b7H3Ue$Jy%#ptjA)2n5^gTnhXs}n#Rg2Hsfm|GW z(Q1@FjalPfec4%g<+-a1UVWOc4r_wCk>Kl>DY$Vwgf8Qa9SloEYfYlx+qfeuD($yW(j=upihXERY+^&cbiJu~SU>^2i(J_oVFmfEz<>LJI zn<%yyt7@GE=GlWJdjJR zwb=*lT#m}|5PPTtVK00jedAY=Q$98-1BhcE*HXFbTJA(^b diff --git a/demos/2d/isometric/dungeon.scn b/demos/2d/isometric/dungeon.scn deleted file mode 100644 index 8f0f316d7313bfed3ac658c896c852661adbd3b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4708 zcmai23pA8l``1u zlTT4cDUw4uQclv9BTh{bsY4e@>Xh%*cg|Vozy9mL{_k4Pp1q&v*}vzqpLaj+8vg(u z4@^9C0Nj`W=+FS*PXd4dfQA5w8VUgrP!iBbNd~J$;%G^DfLJ1zfM;}+uAK(}30(>d zQIerjqEf^w#S$mEC`JNwQDdqwEM6WilZ0baC@Qg18mo5FP_Tai8p@^xN@bD&i5g5s z^-xGz;^Y)2QmIi>f@(HusHL5TWheukMpG*lGTCgESdQHXlTddZnL;d*p_atC;45kX zftES|zd#aTqSo*@Afr@3K}ql&Q3cqjE-=UEd6e*Yd89-k$Lw^4!WfBKBoqQFYEAZ2 zgiGe}F=w3!nL?q&cpwHf#T;QZL8wA+!+kWdL?&}mNs}a4H)cSKix-6}MRK(eGlw$F zoGOl2sTDCoHOi!@A{5FPV2nyJOKOxz79mtbM8E(oFvTQfg;E+Rm1EDa>C{A_N}*H( z3+Q5FX(Clg6>_I|l|&dVl}lnoYN=S0p#@et5lX38jZW39)dF*Jm?B;-mS`!aRGBDI zqErDRt|Fr&xtb9nFK3^0JpV)Js*0&OV9*TbyadvtT0x(St8Tw%;M={OoCE@ zCZZqFRDvWHYb51N%5aBnkVHySC~!2=mbBF#kj_TceBwbm+)9j4Y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g+0C3F38zPkRdLO5M$=nh(7@lJ5=KkhojKI+`CjvR;L$j1WmLC1?XzkWkW^1+W z^<;rrTC3BZr*Zwys<3m&%}<|yKKy9?=)a3ROz-%=EITQOmL$CUIM{$JWc5%r!r@z< z-do|^Re>xih+Yuq=D~Vj)4%3ABG(1c`fQUSgeeaEj%d@q&VHwZUG5q|K~Yr}Qs^92 zzQznFeb=A1K$sgx=JQh=0N81ssq8TaFUk&#o$Smn7hcYLUemnuN955)L3CSeTgc^2 zEMwN~<{ew~)>ahAJg|zkD|C9fU^`M-=w<{i-%`(&7r0$|bMMvOrGkaGKY6nUng=VE zc~{;*P^%SlV@cZD<8G?=XKe;&DCpc&`swfoheMNxJ4D4CgrK&|`ss@29i7&J@RV8$ zql3aNN0d}hS8cOr*JS>VSIDB&cgKz(0YgO(Aq}0qzRvi;%WW1*I1N|m;OA0CRV~ta z^J>&+D)sU%m#V{0hh6ej7c%Bd(salFhQ5!EC-QG1{xeES?g$3F=K5aU(7{}3K?2tn zKR1+gpM97b+qd{Y95Ty5d{jBq9QPn9qczJU-6W9)j=Of#?fu$&5Z{vv!s61@d8v24gdn$spKB)bzZ<`C zdgb)&+{Ek;Sxb-^j4r+9V=uNV8OE>w7~6M$#=+@5S^al=8+Oa4{gL3&>FhfLWNy@I1-+%aG-z7m)(3kI z-xn0j9kT95zV4j!_<0Vf7MW_re#9qM%uA7UW8?5_OFNcF_^mh>WF+u*{f{e>13q~z zh|XTzIlqz!1d{~j-6LlnHfh(L^g-rMVV2+PadWEZASF1)ZmWI|8v5Epm+#y3x_zESr*d#8E1At5OT zv;EvI?7Z&it4U2qo>q-Btb0|5qI_u*5BZyMeI(hj*xfsnc66bWj^7am@l>l`>ixd- u2I(+Ydm+&#_L1%%dShQ5suLcb8kufl0DL_C_!V62d*C17&-2IsU-}OTHtoLv diff --git a/demos/2d/isometric/dungeon.tscn b/demos/2d/isometric/dungeon.tscn new file mode 100644 index 00000000000..a9f4cfa1e3d --- /dev/null +++ b/demos/2d/isometric/dungeon.tscn @@ -0,0 +1,49 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://tileset.tres" type="TileSet" id=1] +[ext_resource path="res://troll.tscn" type="PackedScene" id=2] + +[node name="dungeon" type="Node2D"] + +[node name="floor" type="TileMap" parent="."] + +mode = 1 +tile_set = ExtResource( 1 ) +cell/size = Vector2( 128, 64 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +cell/half_offset = 2 +cell/tile_origin = 1 +cell/y_sort = false +collision/use_kinematic = false +collision/friction = 1.0 +collision/bounce = 0.0 +collision/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( -851956, 0, -851955, 0, -851954, 0, -786420, 1, -786419, 0, -786418, 0, -720884, 0, -720883, 0, -720882, 0, -655348, 1, -655347, 0, -655346, 0, -589812, 1, -589811, 0, -589810, 0, -524276, 0, -524275, 1, -524274, 0, -458740, 0, -458739, 0, -458738, 0, -393210, 0, -393209, 0, -393208, 0, -393207, 0, -393206, 0, -393205, 0, -393204, 0, -393203, 0, -393202, 0, -327674, 0, -327673, 0, -327672, 1, -327671, 1, -327670, 1, -327669, 1, -327668, 1, -327667, 0, -327666, 0, -262138, 0, -262137, 0, -262136, 0, -262135, 0, -262134, 0, -262133, 0, -262132, 0, -262131, 0, -262130, 0, -196602, 0, -196601, 0, -196600, 0, -196599, 0, -196598, 0, -196597, 0, -196596, 0, -196595, 0, -196594, 0, -131066, 0, -131065, 0, -131064, 0, -131063, 0, -65530, 0, -65529, 0, -65528, 0, -65527, 0, 6, 0, 7, 1, 8, 0, 9, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 0, 131078, 0, 131079, 0, 131080, 0, 131081, 0, 196614, 0, 196615, 0, 196616, 0 ) + +[node name="walls" type="TileMap" parent="."] + +mode = 1 +tile_set = ExtResource( 1 ) +cell/size = Vector2( 128, 64 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +cell/half_offset = 2 +cell/tile_origin = 1 +cell/y_sort = true +collision/use_kinematic = false +collision/friction = 1.0 +collision/bounce = 0.0 +collision/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( -917493, 2, -917492, 2, -917491, 2, -917490, 2, -917489, 2, -851957, 2, -851956, 3, -851954, 3, -851953, 2, -786421, 2, -786420, 3, -786418, 3, -786417, 2, -720885, 2, -720881, 2, -655349, 2, -655348, 2, -655346, 3, -655345, 2, -589813, 2, -589809, 2, -524277, 2, -524273, 2, -458747, 2, -458746, 2, -458745, 2, -458744, 536870916, -458743, 536870916, -458742, 2, -458741, 2, -458740, 2, -458738, 2, -458737, 2, -393211, 2, -393209, 3, -393205, 3, -393201, 2, -327675, 4, -327665, 2, -262139, 4, -262134, 3, -262133, 3, -262129, 2, -196603, 2, -196601, 3, -196593, 2, -131067, 2, -131066, 3, -131062, 2, -131061, 2, -131060, 2, -131059, 2, -131058, 2, -131057, 2, -65531, 2, -65530, 2, -65527, 2, -65526, 2, 5, 2, 10, 2, 65541, 2, 65543, 3, 65546, 2, 131077, 2, 131082, 2, 196613, 2, 196618, 2, 262149, 2, 262150, 2, 262151, 2, 262152, 2, 262153, 2, 262154, 2 ) + +[node name="troll" parent="walls" instance=ExtResource( 2 )] + +transform/pos = Vector2( 299.38, 326.037 ) +collision/margin = 0.001 + + diff --git a/demos/2d/isometric/engine.cfg b/demos/2d/isometric/engine.cfg index 48f39826f90..4952b524a5c 100644 --- a/demos/2d/isometric/engine.cfg +++ b/demos/2d/isometric/engine.cfg @@ -1,7 +1,7 @@ [application] name="Isometric Game" -main_scene="res://dungeon.scn" +main_scene="res://dungeon.tscn" icon="res://icon.png" [image_loader] diff --git a/demos/2d/isometric/tileset.scn b/demos/2d/isometric/tileset.scn deleted file mode 100644 index e487285f83f7fc71b929d08939364c0e204f0216..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4476 zcmYjVcUTiy*T0iV2)#p)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x p_GH=Jr8CDkZkr?5{e9Tvy*JAggoi8*uICY(V&h`@vDAN;{{!y!uE_uZ diff --git a/demos/2d/isometric/tileset.tres b/demos/2d/isometric/tileset.tres new file mode 100644 index 00000000000..990ee01b65e --- /dev/null +++ b/demos/2d/isometric/tileset.tres @@ -0,0 +1,67 @@ +[gd_resource type="TileSet" load_steps=6 format=1] + +[ext_resource path="res://isotiles.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -68, 2, -4, -30, 60, 2, -4, 34 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -20, -6, -4, -22, 12, -22, 4, 10, -4, 10 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] + +custom_solver_bias = 0.0 +points = Vector2Array( 28, -6, 4, 10, 12, -22 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] + +custom_solver_bias = 0.0 +points = Vector2Array( 66.095, -0.62516, -5.90501, 31.3748, -21.905, 23.3748, 50.095, -8.62516 ) + +[resource] + +0/name = "base" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( -4, 6 ) +0/region = Rect2( 28, 92, 132, 84 ) +0/occluder_offset = Vector2( 66, 42 ) +0/navigation_offset = Vector2( 66, 42 ) +0/shape_offset = Vector2( 0, 0 ) +0/shapes = [ ] +1/name = "base2" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( -4, 6 ) +1/region = Rect2( 220, 92, 132, 84 ) +1/occluder_offset = Vector2( 66, 42 ) +1/navigation_offset = Vector2( 66, 42 ) +1/shape_offset = Vector2( 0, 0 ) +1/shapes = [ ] +2/name = "wall" +2/texture = ExtResource( 1 ) +2/tex_offset = Vector2( -4, -32 ) +2/region = Rect2( 28, 220, 132, 136 ) +2/occluder_offset = Vector2( 66, 68 ) +2/navigation_offset = Vector2( 66, 68 ) +2/shape_offset = Vector2( 66, 68 ) +2/shapes = [ SubResource( 1 ) ] +3/name = "column" +3/texture = ExtResource( 1 ) +3/tex_offset = Vector2( -2, -32 ) +3/region = Rect2( 220, 220, 132, 136 ) +3/occluder_offset = Vector2( 66, 68 ) +3/navigation_offset = Vector2( 66, 68 ) +3/shape_offset = Vector2( 66, 68 ) +3/shapes = [ SubResource( 2 ), SubResource( 3 ) ] +4/name = "door1" +4/texture = ExtResource( 1 ) +4/tex_offset = Vector2( 16, -22 ) +4/region = Rect2( 24, 408, 132, 136 ) +4/occluder_offset = Vector2( 66, 68 ) +4/navigation_offset = Vector2( 66, 68 ) +4/shape_offset = Vector2( 66, 68 ) +4/shapes = [ SubResource( 4 ) ] + diff --git a/demos/2d/isometric/tileset_edit.tscn b/demos/2d/isometric/tileset_edit.tscn new file mode 100644 index 00000000000..2c83c4b52ef --- /dev/null +++ b/demos/2d/isometric/tileset_edit.tscn @@ -0,0 +1,130 @@ +[gd_scene load_steps=6 format=1] + +[ext_resource path="res://isotiles.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -68, 2, -4, -30, 60, 2, -4, 34 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -20, -6, -4, -22, 12, -22, 4, 10, -4, 10 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] + +custom_solver_bias = 0.0 +points = Vector2Array( 28, -6, 4, 10, 12, -22 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] + +custom_solver_bias = 0.0 +points = Vector2Array( 66.095, -0.62516, -5.90501, 31.3748, -21.905, 23.3748, 50.095, -8.62516 ) + +[node name="Node2D" type="Node2D"] + +[node name="base" type="Sprite" parent="."] + +transform/pos = Vector2( 87.5658, 0.113792 ) +texture = ExtResource( 1 ) +offset = Vector2( -4, 6 ) +region = true +region_rect = Rect2( 28, 92, 132, 84 ) + +[node name="base2" type="Sprite" parent="."] + +transform/pos = Vector2( 196, 44 ) +texture = ExtResource( 1 ) +offset = Vector2( -4, 6 ) +region = true +region_rect = Rect2( 220, 92, 132, 84 ) + +[node name="wall" type="Sprite" parent="."] + +transform/pos = Vector2( 356, 70 ) +texture = ExtResource( 1 ) +offset = Vector2( -4, -32 ) +region = true +region_rect = Rect2( 28, 220, 132, 136 ) + +[node name="StaticBody2D" type="StaticBody2D" parent="wall"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="collision" type="CollisionPolygon2D" parent="wall/StaticBody2D"] + +build_mode = 0 +polygon = Vector2Array( -68, 2, -4, 34, 60, 2, -4, -30 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="column" type="Sprite" parent="."] + +transform/pos = Vector2( 292, 198 ) +texture = ExtResource( 1 ) +offset = Vector2( -2, -32 ) +region = true +region_rect = Rect2( 220, 220, 132, 136 ) + +[node name="StaticBody" type="StaticBody2D" parent="column"] + +input/pickable = false +shapes/0/shape = SubResource( 2 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +shapes/1/shape = SubResource( 3 ) +shapes/1/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/1/trigger = false +collision/layers = 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="column/StaticBody"] + +build_mode = 0 +polygon = Vector2Array( -20, -6, -4, 10, 4, 10, 28, -6, 12, -22, -4, -22 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="door1" type="Sprite" parent="."] + +transform/pos = Vector2( 85.905, 0.62516 ) +texture = ExtResource( 1 ) +offset = Vector2( 16, -22 ) +region = true +region_rect = Rect2( 24, 408, 132, 136 ) + +[node name="StaticBody2D" type="StaticBody2D" parent="door1"] + +input/pickable = false +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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="door1/StaticBody2D"] + +build_mode = 0 +polygon = Vector2Array( -5.90501, 31.3748, 66.095, -0.62516, 50.095, -8.62516, -21.905, 23.3748 ) +shape_range = Vector2( -1, -1 ) +trigger = false + + diff --git a/demos/2d/isometric/troll.scn b/demos/2d/isometric/troll.scn deleted file mode 100644 index d53aac4fbfe1715f05dee4b729569176edf6c70f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2116 zcmWkwd2kcg8GozQ3g zJmAoVDTxCGLRxbSNmHPZG%ZI1!qB8c$x)I_LXv6LgqXGyhJj89VQ}d3X5Jsa-<$cq z@BO~tJ6e1!i=K`Qgk0$e&9EXwArz;OA#SD+g=v(EY1?ux(8&jV0bb;hWWyO+B|;`V zAEjYBP39FTCI@)8$VGURg(qbNVu~t7{E8Ir;$?rEz$wUrb4@ZA6k-agGAjXDh^p?V z36gM;#orbagJC{M-h!FPM_d$2$Ay?nt#P|mSqg_M+Jnf7Gp((Bw;Gdqlz~$;dWs<` zwi5;=<2++n3UFaO*YFIQ2~RN6=o~{OS~HRZS5jF)4upAM2N&fly@Y`xWW-f~nEH4M z6=%jQ^@%b=0Yc>OOfE9x6vk#ykP9aP4ULNkpBb+J(JW{a7Y3E)uMrA?eNv(!nquo(S;SM78 z&_OtX*u*~M0}ax>iy$hijPLWKIlp zNU}d71$k0rkR=r#aQ@)QF$ZF@%!?{_+oVJ!N$r4q<|R|FBt=jP4qC%PL{QyfJ`^vF zrx{c!O4i10_+>+fidcI*-Owhft`8}ci))QRnQQkC%rm+>{Jh9qKt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af;T}gX5Z;^c!$S(@Cxg> z96Zr500{xq0ssPlFMxm{A`yU542oqY> zvt&t#Q}RNPmfvW)Ui*@0(}q9WznzT7Q?H@NaXXeGGRS&LbgCu1*#TLYM!X%!Xt8t@ zMJW}*SbIoFbs3WSabJyE6?DxT40%QWQ1DFrmE4E4E<+I)Ad6Bct<5|iO{eutkHbCc znY>PJh74ZcWsaxMo_-(X*l<}>p+csNPj@>|boC*)%BSYjbbt8l^hCv~t`48|1{1Kvle{V8s za9498(HL13oJdDF=MS|fA%fTNw$z}m+YwJg^6FaQ>cR@X-T@P)&tM&s2&FCPQ%&-p zz*>*OhtSi33wi{aI4C9(*nz5{gwSm`rpJ`QGf?ob&*9B#4JqzYXHPxGyErB>beM8Q za5#Pnrm~B}?H83*GJyXM$(sv>RJ^s9T`%N{oB4uz3+D8F<0H|m)_&`q&aLSa`X#tB zRZ;6wqhamo>nHaG>Z+5azr$s-QfayjwJA`)4ZB!o7232syeF1fWHBvdP+x^&dscnV zm{J~rrY?pu+RF0FOB;Ac%td3qEG*^8$iln&5M=cr6pa8(`@yhHTUwcWTC5|z3ekfT zDH2V_-~J}xHcPH|dCT_$*x;`D^@&;wQtK_c=VGXvx2`Oy?S&bs#6557=;MD5UQu}I z6R@W~2iIRwjsVp^!NhHm^Bo+W`c9@;GA*mbsZ;j9BoDfC#~JcT@9ExX^8`(EXnO0X*44mjD0& diff --git a/demos/2d/isometric_light/column.scn b/demos/2d/isometric_light/column.scn deleted file mode 100644 index 03f3c2c97644b51fc19bd23256ac488da61c0bb4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2026 zcmWkv4Q$lr8Gi44m%Chk2qfX)l8`S6`C$b@2`Xwxlh^ja5fa*vz<`a;_W67lH$MBY zeIY5dTu7n7U`zqV&r}EzDjn?@6m6PHRgR#csv~XbHf=3THEjn)E$cd|h@Xz`!_p`F z`+cA9d7tNXcMs3Qqo)X9Pa(iZJ^&X$#s%(7jtg9bfqcRgbV+ib66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^$cn0&rN9o9Nn#UFBTf7d-A`vWO>#&U0#!1+NHI#7nuT+K>KE}OB zrTqc6g?C`v(ucIo!4nY$7t$piUvZ<@fqRgrHL)1;B6(C`l;$AGr+b_59QBmNw&M@% z6@10%wR1GRg5I!YL z&W^69BL#sFmU{}?mxjB^6fgBSH2B#8=E56&?~we;SKGtv$~9YW|K&_zd|uI|Z_h3G z@xCo&?6r>d>%aQ?!TD{KKOg>MLw`d_=fzh(_+`_2mZ~J_nY_KlNu(jUfS0XUVnMTOrz`Md(H2@*?a%l%0=7rzFGbLSol)o@$WW$ zJ@@FHmgJqm;qJ8?vQMsk;`qtq!L=Jd;x#!Wzy0Z}vzFefxI1+8${lBze0{QKWpAMhmXbtV|>E^rXU;h8$KaZ3E diff --git a/demos/2d/isometric_light/column.tscn b/demos/2d/isometric_light/column.tscn new file mode 100644 index 00000000000..6693e39b85c --- /dev/null +++ b/demos/2d/isometric_light/column.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://wall_shader.tres" type="CanvasItemMaterial" id=1] +[ext_resource path="res://faceColor.png" type="Texture" id=2] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 20.0 + +[sub_resource type="OccluderPolygon2D" id=2] + +closed = false +cull_mode = 0 +polygon = Vector2Array( -16.1183, 62.9508, 4.32091, 74.9223, 23.3002, 65.2867 ) + +[node name="column" type="StaticBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 1.36365, 7.83751 ) +shapes/0/trigger = false +collision/layers = 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="."] + +material/material = ExtResource( 1 ) +transform/pos = Vector2( 0.487671, 0.487679 ) +texture = ExtResource( 2 ) +offset = Vector2( -4.37984, -50.8523 ) +region = true +region_rect = Rect2( 569, 179, 48, 154 ) + +[node name="occluder" type="LightOccluder2D" parent="."] + +transform/pos = Vector2( -3.90138, -50.97 ) +occluder = SubResource( 2 ) +light_mask = 1 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 1.36365, 7.83751 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/demos/2d/isometric_light/cubio.gd b/demos/2d/isometric_light/cubio.gd index 508cd3728cd..a26d5ae6fb7 100644 --- a/demos/2d/isometric_light/cubio.gd +++ b/demos/2d/isometric_light/cubio.gd @@ -19,7 +19,7 @@ func _input(event): if (event.type == InputEvent.MOUSE_BUTTON and event.button_index == 1 and event.pressed and shoot_countdown <= 0): var pos = get_canvas_transform().affine_inverse()*event.pos var dir = (pos - get_global_pos()).normalized() - var bullet = preload("res://shoot.scn").instance() + var bullet = preload("res://shoot.tscn").instance() bullet.advance_dir = dir bullet.set_pos(get_global_pos() + dir*60) get_parent().add_child(bullet) diff --git a/demos/2d/isometric_light/cubio.scn b/demos/2d/isometric_light/cubio.scn deleted file mode 100644 index 55e2185247a461ad2b4b2de62e1403ba3bf8359a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6952 zcmb7}3wRS%+JL{wq)nT&q-_eN*G!vI3bajcP~_5{Tndz%KmkQAnQ1a@W78z$QYfHA zu-ulLAeXWf0*Inq78eBsg#iA)C=}RLS5d%etK3vp6n{lz-R}h1-{;xqfBu!{dEb6H zGnvWEob#RU3=^tNCZPY~0ESipXjp)Wh&K`-Lje$lFaQAtWPwNq7>y2JM~Wz$ z=0XWoDOG=}0aRsF1F0U7GIE)sLJT{!tx)tIs+jKgyHrBI@w-$?zwx`&pMK+aX+TGG zE2Q0s{9~lkdso=I!`>J6t6{$;#r3(CA5Nh$uZaB%uzaPDF7ffV=H4dq9W-WB5lM^~&{O33SoegoYV?Fq+6!?7#{1Ew zY^HJ6p)TdD2iM)D^gj%|4}+P%23i;RD-U&K9OC`ErF7}hjA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4NvT3Uvk~O{r;}KnseHNhx2}Z{Py3nPi?zU-hbf0 zuf9)SyP)BxO=;FPBcfY+CIJfoqC1wV&6F)jR^x5Q!pSGrG z(rR%>JMtiW@fvs6CjwO5(PMqa<0z2VmGBtIVBsGZ*y}lBdpK~B0bK;x%3gUd6=XGF5ug-V&-JWJ2YHc9gu0o2w2Em-Sa~i zzox%H7Ax63-ig{FhbbJvPln#q^(M3UE%T*xDew*a7pEoDqXPlVOb^M?$A`F-i7#(qpe@iP$+jE-uEx{;$-kZ)=m1AzLVE1193asKK zP0eHOZVbpAZ4O{g>K3txw?Q$V!U#T19rF;sILiVI4Pe$RUb{@9WM5`c1fdggwDO-9q(V;?B}Lb33;m0E^K#Ow3YWE77;+n}&=;bJj=-{3R`zR+ z<#VM@cXhW>H}=;Xd+T?qrZ`BYoWrBD;YYRa&5P!%uu{_H zI=m%LAJR);Ec}u!l)?Tk26gJZ=!V^OjS`x=q%y*!QecAHeppDPQ8CKRX@I~bK z9ya}`_QL#-?vVS*x@*;uEOy-_*?-C8W`dgw>_ zCA#x?DuXTyF!Ie@N-+0K-X+NHhnYa|w(TPZa^QPTgx5)Ql)sU){C3O61CD+WIc~Ct z-FpU!xH1!tr}qCzmAZ+t3Uu(H?6RnW_$e5e#VeRjtc!mn%Ub>sDQfZPa9Oi_p@v0m ziEfdwn4EY#-dni#er<@Lhc^eXPZsh1lT20dO5N2ZlnbY4=>ti%gQ9gkvsmBR+G#AB3t*Tdq^kTm merHXl63i6-E!;K%WK7fZ6xQbH+}idZ^FK+A#Megh{{I2Hj2XWG diff --git a/demos/2d/isometric_light/floor_shader.tres b/demos/2d/isometric_light/floor_shader.tres new file mode 100644 index 00000000000..e8f616cf1fc --- /dev/null +++ b/demos/2d/isometric_light/floor_shader.tres @@ -0,0 +1,14 @@ +[gd_resource type="CanvasItemMaterial" load_steps=3 format=1] + +[ext_resource path="res://faceNormal.png" type="Texture" id=1] + +[sub_resource type="CanvasItemShader" id=1] + +_code = { "fragment":"// just pass the normal\n\nuniform texture normal;\nvec2 ywnormal=tex( normal,UV).wy * vec2(2.0,2.0) - vec2(1.0,1.0);\nNORMAL=vec3(ywnormal,sqrt(1 - (ywnormal.x * ywnormal.x) - (ywnormal.y * ywnormal.y) ));\n\n", "fragment_ofs":0, "light":"//the tile half size in pixels\nvec2 tile_vec=vec2(140,70);\nfloat z_scale = 1.0;\n//compute a 3D postion fot thelight\nvec3 light_3d = vec3(-LIGHT_VEC.x,LIGHT_HEIGHT,LIGHT_VEC.y);\n\n//rotate the normal map to the same coordinates as the pseudo 3d ponit\n//this could be optimized\nfloat r = asin(tile_vec.y/tile_vec.x);\nmat3 rot_mat = mat3( vec3(1,0,0), vec3(0,cos(r),-sin(r)), vec3(0,sin(r),cos(r)));\nvec3 n = rot_mat * NORMAL;\nn.y=-n.y;\n\n//compute diffuse light\nfloat dp = max(dot(normalize(n),-normalize(light_3d)),0);\nLIGHT=vec4(vec3(dp),1.0)*COLOR*LIGHT_COLOR;\n", "light_ofs":0, "vertex":"//pass the x1 in local sprite coordinates.\n//the sprite center (small red cross) is 0,0\nVAR1.xy=SRC_VERTEX;", "vertex_ofs":0 } + +[resource] + +shader/shader = SubResource( 1 ) +shader/shading_mode = 0 +shader_param/normal = ExtResource( 1 ) + diff --git a/demos/2d/isometric_light/map.scn b/demos/2d/isometric_light/map.scn deleted file mode 100644 index da3fc5654f033d334cb5a7e4b602e0de349c293d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9352 zcmbVSd0bP+_CLuD2@sITA_C$aHUUvUQBgpcYy$4$f?6>*fdHwH#3Vq`su6KTD{8An zt;XG=Qmb{t4fndDQfn2FxT2__wThyU--KG9?R)R{$K&()o_l8Q+2+jLIg|O2G*T=E z>z@F?EgFDr3lLxjP{jlIoDaYPFtUJc;9Ru0B<# z(i*~yTw{BiOnI78M_3lPBB{}yX>X@eXUMWOX-cp|?mU?yN1c|XOk+mkLKw*mW`QH} zLPhpbVPV;FZD>Xs*dl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v@=j(DIQegCrk1#bg9RHr}eJZoY7z@HZ-wQm^vs-Jyz zS(ubwQ%SSetR51-yM4>aVdqM}-8*jTwXAmLN8iOQ7=6n!cWt!f5xt?S&7GFFXE(gP zQT0HfP2%QjdBuDE79L!&Ufh@*@v0|1*!wyp*g78%&nj@(n3uA9V!#qX;X}^F@3eY5 zw((&s{eHsFU2OQxFY5jGDC*9Sz7l_a_v93%w@8?`Z*6Nq&N+J1_G=5KY}?!*&9)7@ zo8IlzumuyIG#}|fo6FzCxW98WPEJ|ob+h-n z@~T_&ByizHTK`o~rd;m9ZlG^JWS`kO^oBuDyFGVr{YU{jgZIO$89ST&Pp@*K7oHnW zUla=*WTt|GV|JlhSd2*K%6GuVnc`1=tR%Q zYU#B|XJKH$JgS~9d+0BH)Nb#N?KgK$7;%l&yRqo?^&fl+1ru#A%n47QzK4FIY3Nh7 zY~a3jF~ioie3yu3&pY0wQ1jJYr`prIUc8;!fi|M>S1-1D^bT)wbV$0^YjjKG(b-2* zE)Ff2w=!CJv%5F_ZBzALeQ;6dgx*Il4~R&vdGl-)C#9(T;Hr|+<>v>yVh47kCyyMl zaemLl9&_s(>9mk(3tsg)_44-83iFQfOToEafiInO;l}G<6kn~rcI(#UB@braox>k@ zKlhr>yU*JlePZe&_i~#O#J|LydF8W#9-UZ>UrW#2+n=2L^4ArIj~J&(j2xW9DLzL2j@|550> zu7Q&nOfNrw>Rsr1sjX`NaBtr8PM?)EPn%g^)&22WZstgP}jo?g9`;q(1p+4 zcf`_JP3xbH&FR73dc*CwHY7HALgTyXmtQ46YGy3_n1KWHD6iqg-MgM|2Z_?5k}?rf P0FX2?Nt{If2kHL+*29IT diff --git a/demos/2d/isometric_light/map.tscn b/demos/2d/isometric_light/map.tscn new file mode 100644 index 00000000000..3c65f9ecfc7 --- /dev/null +++ b/demos/2d/isometric_light/map.tscn @@ -0,0 +1,261 @@ +[gd_scene load_steps=10 format=1] + +[ext_resource path="res://map.gd" type="Script" id=1] +[ext_resource path="res://tileset.tres" type="TileSet" id=2] +[ext_resource path="res://cubio.tscn" type="PackedScene" id=3] +[ext_resource path="res://torch.tscn" type="PackedScene" id=4] +[ext_resource path="res://column.tscn" type="PackedScene" id=5] +[ext_resource path="res://cubio/idle0001.png" type="Texture" id=6] +[ext_resource path="res://light2.png" type="Texture" id=7] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 100.0 + +[sub_resource type="CanvasItemMaterial" id=2] + +shader/shading_mode = 1 + +[node name="node" type="Node2D"] + +transform/pos = Vector2( -0.735077, -20.5826 ) +script/script = ExtResource( 1 ) + +[node name="floor_map" type="TileMap" parent="."] + +mode = 1 +tile_set = ExtResource( 2 ) +cell/size = Vector2( 192, 88 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +cell/half_offset = 2 +cell/tile_origin = 1 +cell/y_sort = true +collision/use_kinematic = false +collision/friction = 1.0 +collision/bounce = 0.0 +collision/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( -1900531, 0, -1900530, 1, -1900529, 0, -1900528, 0, -1900527, 0, -1834995, 0, -1834994, 0, -1834993, 0, -1834992, 1, -1834991, 0, -1769459, 0, -1769458, 0, -1769457, 0, -1769456, 1, -1769455, 0, -1703923, 0, -1703922, 0, -1703921, 0, -1703920, 0, -1703919, 1, -1638387, 0, -1638386, 0, -1638385, 0, -1638384, 0, -1638383, 0, -1572855, 0, -1572854, 0, -1572853, 0, -1572852, 0, -1572851, 0, -1572850, 0, -1572849, 1, -1572848, 0, -1572847, 0, -1507319, 0, -1507318, 0, -1507317, 0, -1507316, 0, -1507315, 1, -1507314, 1, -1507313, 1, -1507312, 0, -1507311, 0, -1441783, 0, -1441782, 0, -1441781, 0, -1441780, 0, -1441779, 0, -1441778, 0, -1441777, 0, -1441776, 0, -1441775, 0, -1376247, 0, -1376246, 0, -1376245, 0, -1376244, 0, -1310711, 1, -1310710, 0, -1310709, 0, -1310708, 0, -1245175, 0, -1245174, 0, -1245173, 0, -1245172, 0, -1179639, 0, -1179638, 0, -1179637, 1, -1179636, 0, -1114103, 0, -1114102, 0, -1114101, 0, -1114100, 0, -1048567, 0, -1048566, 0, -1048565, 0, -1048564, 0, -983031, 0, -983030, 0, -983029, 0, -983028, 0, -917495, 0, -917494, 1, -917493, 1, -917492, 0, -851959, 0, -851958, 0, -851957, 0, -851956, 0, -786423, 0, -786422, 0, -786421, 0, -786420, 0, -720894, 0, -720893, 0, -720892, 0, -720891, 0, -720890, 0, -720889, 0, -720888, 0, -720887, 0, -720886, 0, -720885, 0, -720884, 0, -720883, 0, -720882, 0, -720881, 0, -655358, 0, -655357, 0, -655356, 0, -655355, 0, -655354, 0, -655353, 0, -655352, 0, -655351, 0, -655350, 0, -655349, 0, -655348, 0, -655347, 0, -655346, 0, -655345, 0, -589822, 0, -589821, 0, -589820, 0, -589819, 0, -589818, 0, -589817, 0, -589816, 0, -589815, 0, -589814, 0, -589813, 0, -589812, 0, -589811, 0, -589810, 0, -589809, 0, -524286, 0, -524285, 0, -524284, 1, -524283, 0, -524282, 0, -524281, 0, -524280, 0, -524279, 1, -524278, 1, -524277, 1, -524276, 1, -524275, 0, -524274, 0, -524273, 0, -458750, 0, -458749, 0, -458748, 1, -458747, 0, -458746, 0, -458745, 0, -458744, 0, -458743, 0, -458742, 0, -458741, 0, -458740, 0, -458739, 0, -458738, 1, -458737, 0, -393214, 0, -393213, 0, -393212, 0, -393211, 0, -393210, 0, -393209, 0, -393208, 0, -393207, 0, -393206, 0, -393205, 0, -393204, 0, -393203, 0, -393202, 0, -393201, 0, -262149, 0, -262148, 0, -262147, 0, -262146, 0, -262145, 0, -327680, 0, -327679, 0, -327678, 0, -327677, 0, -327676, 0, -327675, 0, -196613, 0, -196612, 0, -196611, 0, -196610, 0, -196609, 0, -262144, 0, -262143, 0, -262142, 0, -262141, 0, -262140, 0, -262139, 0, -131077, 0, -131076, 0, -131075, 0, -131074, 0, -131073, 0, -196608, 0, -196607, 0, -196606, 0, -196605, 0, -196604, 0, -196603, 0, -65541, 0, -65540, 0, -65539, 0, -65538, 0, -65537, 0, -131072, 0, -131071, 0, -131070, 0, -131069, 1, -131068, 0, -131067, 0, -5, 0, -4, 0, -3, 0, -2, 0, -1, 0, -65536, 0, -65535, 0, -65534, 0, -65533, 0, -65532, 1, -65531, 0, 65531, 0, 65532, 1, 65533, 0, 65534, 0, 65535, 1, 0, 0, 1, 0, 2, 0, 3, 0, 4, 1, 5, 0, 131067, 0, 131068, 1, 131069, 0, 131070, 0, 131071, 0, 65536, 0, 65537, 0, 65538, 0, 65539, 0, 65540, 0, 65541, 0, 196603, 0, 196604, 0, 196605, 0, 196606, 1, 196607, 0, 131072, 0, 131073, 0, 131074, 0, 131075, 0, 131076, 1, 131077, 0, 262139, 0, 262140, 0, 262141, 0, 262142, 0, 262143, 0, 196608, 0, 196609, 0, 196610, 0, 196611, 0, 196612, 0, 196613, 0, 327676, 0, 327677, 0, 327678, 0, 327679, 0, 262144, 0, 262145, 0, 262146, 0, 262147, 0, 262148, 0, 262149, 0 ) + +[node name="wall_map" type="TileMap" parent="."] + +mode = 1 +tile_set = ExtResource( 2 ) +cell/size = Vector2( 94, 43 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +cell/half_offset = 2 +cell/tile_origin = 1 +cell/y_sort = true +collision/use_kinematic = false +collision/friction = 1.0 +collision/bounce = 0.0 +collision/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( -3801060, 5, -3801059, 10, -3801058, 10, -3801057, 10, -3801056, 10, -3801055, 10, -3801054, 10, -3801053, 10, -3801052, 536870916, -3735524, 9, -3735516, 7, -3669988, 9, -3669980, 7, -3604452, 9, -3604444, 7, -3538916, 9, -3538908, 7, -3473380, 9, -3473372, 7, -3407844, 9, -3407836, 7, -3342308, 9, -3342300, 7, -3276772, 9, -3276764, 7, -3211236, 9, -3211228, 7, -3145709, 5, -3145708, 10, -3145707, 10, -3145706, 10, -3145705, 10, -3145704, 10, -3145703, 10, -3145702, 10, -3145701, 10, -3145692, 7, -3080173, 9, -3080156, 7, -3014637, 9, -3014634, 2, -3014620, 7, -2949101, 2, -2949084, 7, -2883565, 9, -2883558, 8, -2883557, 8, -2883556, 8, -2883555, 8, -2883554, 8, -2883553, 8, -2883552, 8, -2883551, 8, -2883550, 8, -2883549, 8, -2883548, 6, -2818029, 9, -2818023, 7, -2752493, 9, -2752487, 7, -2686957, 9, -2686955, 2, -2686951, 7, -2621421, 9, -2621415, 7, -2555885, 9, -2555879, 2, -2490349, 2, -2490343, 7, -2424813, 9, -2424807, 7, -2359277, 9, -2359274, 2, -2359271, 7, -2293741, 9, -2293735, 7, -2228205, 4, -2228199, 7, -2162669, 9, -2162668, 10, -2162667, 536870916, -2162663, 7, -2097133, 8, -2097132, 8, -2097131, 6, -2097127, 7, -2031597, 9, -2031591, 7, -1966061, 9, -1966055, 7, -1900525, 9, -1900519, 7, -1834989, 9, -1834986, 8, -1834985, 8, -1834984, 8, -1834983, 7, -1769453, 9, -1769450, 7, -1769447, 7, -1703917, 9, -1703916, 8, -1703915, 8, -1703914, 8, -1703911, 7, -1638381, 9, -1638375, 7, -1572845, 9, -1572839, 7, -1507309, 9, -1507303, 7, -1441787, 5, -1441786, 10, -1441785, 10, -1441784, 10, -1441783, 10, -1441782, 10, -1441781, 10, -1441780, 10, -1441779, 10, -1441778, 10, -1441777, 10, -1441776, 10, -1441775, 10, -1441774, 10, -1441766, 10, -1441765, 10, -1441764, 10, -1441763, 10, -1441762, 10, -1441761, 536870916, -1376251, 9, -1376225, 7, -1310715, 9, -1310689, 7, -1245179, 9, -1245153, 7, -1179643, 9, -1179617, 7, -1114107, 9, -1114081, 7, -1048571, 9, -1048545, 7, -983035, 9, -983009, 7, -917499, 9, -917473, 7, -851963, 9, -851937, 7, -786427, 9, -786401, 7, -720891, 9, -720884, 8, -720883, 8, -720882, 8, -720881, 8, -720880, 8, -720879, 8, -720878, 8, -720877, 8, -720876, 8, -720875, 8, -720874, 8, -720873, 8, -720872, 8, -720871, 8, -720870, 8, -720869, 8, -720868, 8, -720867, 8, -720866, 8, -720865, 6, -589834, 5, -589833, 10, -589832, 10, -589831, 10, -589830, 10, -589829, 10, -589828, 10, -589827, 10, -589826, 10, -589825, 10, -655360, 10, -655359, 10, -655358, 10, -655357, 10, -655356, 10, -655349, 7, -524298, 9, -589813, 7, -458762, 9, -524277, 7, -393226, 9, -458741, 7, -327690, 9, -393205, 7, -262154, 9, -262150, 5, -262149, 10, -262148, 10, -262147, 10, -262146, 10, -262145, 10, -327680, 10, -327679, 10, -327678, 10, -327677, 10, -327676, 3, -327669, 7, -196618, 9, -196614, 9, -262140, 7, -262133, 7, -131082, 9, -131078, 9, -196604, 7, -196597, 7, -65546, 9, -65542, 9, -131068, 7, -131061, 7, -10, 9, -6, 4, -5, 8, -4, 8, -3, 8, -2, 8, -65535, 8, -65534, 8, -65533, 8, -65532, 6, -65525, 7, 65526, 9, 11, 7, 131062, 9, 65547, 7, 196598, 9, 131083, 7, 262134, 9, 196619, 7, 327670, 9, 262155, 7, 393206, 9, 327691, 7, 458742, 9, 393227, 7, 524278, 4, 524279, 8, 458763, 7, 589816, 9, 524299, 7, 655352, 4, 655353, 8, 655354, 8, 655355, 8, 655356, 8, 655357, 8, 655358, 8, 655359, 8, 589824, 8, 589825, 8, 589826, 8, 589827, 8, 589828, 8, 589829, 8, 589830, 8, 589831, 8, 589832, 8, 589833, 8, 589834, 8, 589835, 6 ) +__meta__ = { "_editor_collapsed":true } + +[node name="cubio" parent="wall_map" instance=ExtResource( 3 )] + +transform/pos = Vector2( -184.284, 6.7328 ) +collision/margin = 0.08 + +[node name="toch" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( -42.0531, -74.8855 ) + +[node name="toch1" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 96.0294, -19.8329 ) + +[node name="toch2" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 954.802, -147.456 ) + +[node name="toch3" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1247.08, 42.9454 ) + +[node name="toch4" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1257.11, -167.498 ) + +[node name="toch5" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1632.9, -73.9674 ) + +[node name="toch6" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1566.09, 113.093 ) + +[node name="toch7" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1935.2, 64.6577 ) + +[node name="toch8" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 2000.34, 258.399 ) + +[node name="toch9" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 3738.07, -328.247 ) + +[node name="toch10" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 4034.17, -585.483 ) + +[node name="toch11" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 4261.79, -472.595 ) + +[node name="toch12" parent="wall_map" instance=ExtResource( 4 )] + +transform/pos = Vector2( 4006.41, -479.998 ) + +[node name="column" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( -122.203, 119.689 ) + +[node name="column1" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 95.2993, 99.8337 ) + +[node name="column2" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 138.619, 246.039 ) + +[node name="column3" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 324.534, 82.6862 ) + +[node name="column4" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 1046.53, -175.429 ) + +[node name="column5" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 1347.07, -179.039 ) + +[node name="column6" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 1184.62, -261.166 ) + +[node name="column7" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 1520.35, -139.329 ) + +[node name="column8" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 1409.34, 25.8286 ) + +[node name="column9" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 1804.63, -13.8814 ) + +[node name="column10" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 1782.97, 170.229 ) + +[node name="column11" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 2223.9, 158.537 ) + +[node name="column12" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 3744.95, -480.43 ) + +[node name="column13" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 3838.62, -526.042 ) + +[node name="column14" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 3937.17, -573.283 ) + +[node name="column15" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 4123.69, -474.728 ) + +[node name="column16" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 4027.58, -427.487 ) + +[node name="column17" parent="wall_map" instance=ExtResource( 5 )] + +transform/pos = Vector2( 3935.54, -377.802 ) + +[node name="prince_area" type="Area2D" parent="wall_map"] + +transform/pos = Vector2( 4133.07, -561.046 ) +input/pickable = true +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, -37.4897 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 + +[node name="prince" type="Sprite" parent="wall_map/prince_area"] + +material/material = SubResource( 2 ) +texture = ExtResource( 6 ) +offset = Vector2( -1.10803, -49.8615 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="wall_map/prince_area"] + +transform/pos = Vector2( 0, -37.4897 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="Light2D" type="Light2D" parent="."] + +transform/pos = Vector2( -191.788, 32.4743 ) +enabled = true +texture = ExtResource( 7 ) +offset = Vector2( 0, 0 ) +scale = 8.0 +color = Color( 1, 1, 1, 1 ) +energy = 1.0 +mode = 0 +range/height = 60.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = true +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="CanvasModulate" type="CanvasModulate" parent="."] + +color = Color( 0.361304, 0.36638, 0.384393, 1 ) + +[node name="message" type="Label" parent="."] + +visibility/visible = false +material/material = SubResource( 2 ) +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 4067.0 +margin/top = -597.0 +margin/right = 4200.0 +margin/bottom = -571.0 +text = "Thank You Cubio!\nYou saved The Prince!" +align = 1 +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[connection signal="body_enter" from="wall_map/prince_area" to="." method="_on_prince_area_body_enter"] + + diff --git a/demos/2d/isometric_light/shoot.scn b/demos/2d/isometric_light/shoot.scn deleted file mode 100644 index 6909ae0c7197e0620097eb8f772e6ba39784746d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4111 zcmYjV3wRV&mOjh6R*FhT(FN#E-3>Q0&NuC}T> z5QL!uqJ-D%>Vn`p^R+YM>WaFKD9#W+Xvp{&#ZN_NeZo}0k=<3t$GWqwj=Hxa^X=yQ za&r3Is&nr>=idMSI|J*yUda9w1Be7*jTK;}4Iscm9DvS&NzdVcBRu32zF>_Q9Fjuo zf>K<9le0;&(E_l5tN@TQBI(w1^b*UU7?M=xa!^ig*YjuzdD!faDItk=S))=sk{kpJaq&?_ zNl+WFC8Y%Ia^~8CLz;VmJ2{e=getv+ONeB#z!^|umg7lDHFDZaL(+);i*y|pW&c?197F(?Mc#d0?a9ER)I~xNblLooY z53T+{DjteTp&$gl4qU@Q5vg+B!7X>YToy%1Hb+9V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Xf!~cO5t*dJ19~IZx?hpx~0YZ<$?u z3y5FHIiL?eBDMGdGpcCew19Pz2E~V2S$({nt;NZVSm3?qc+-ctkVC9W6(wI*F(fW# zF@Kg276XP7RxuqeqiYVBhB2t47%nT-yK1?Nv*GT*rY>@9Nz^ed<$OUb9AnXkMWJwn zN_0rw3Ub@kFp7DUg^J?!&_D*NHySIchV3XktL8~d;8|ao@)Boh$l@cpwb|Zitm8u; zwjt-kHzBYET7;1d2^}z=NnS>uLL^AhvzeV!hyD(kz5ZqFP2;0JqnF?_78C0a?yqfW z+pEpOalKlq;e1o%_7L@j1iJPi<+~2<@2Pm$XPNi1>7d(ZI6Ys5<;D(Fyc}q!@9?V^ z70nZ-Wcq=*51OFny|}QpN?tTTPe5Il!&-B5eY2hOFP*|l9IufINf0_tf&%&MhA p;{xJWiHnt&M1*Plx$-x-tAr96C$RE?%r(@jR8wqs+Rb+G@_*2byz&45 diff --git a/demos/2d/isometric_light/torch_shader.tres b/demos/2d/isometric_light/torch_shader.tres new file mode 100644 index 00000000000..6a45b41fa2f --- /dev/null +++ b/demos/2d/isometric_light/torch_shader.tres @@ -0,0 +1,14 @@ +[gd_resource type="CanvasItemMaterial" load_steps=3 format=1] + +[ext_resource path="res://faceNormal.png" type="Texture" id=1] + +[sub_resource type="CanvasItemShader" id=1] + +_code = { "fragment":"uniform texture normaltex;\nvec4 ntex = tex(normaltex,UV);\nntex.rgb = ntex.rgb * vec3(-2,-2,1) - vec3(-1,-1,0);\nvec2 tile_vec=vec2(47,22);\nfloat r = asin(tile_vec.y / tile_vec.x);\nmat3 rot_mat = mat3( vec3(1,0,0), vec3(0,cos(r),-sin(r)), vec3(0,sin(r),cos(r)));\nNORMAL = rot_mat * ntex.rgb;\n\n\n\n\n", "fragment_ofs":0, "light":"LIGHT_VEC.y=40; //from light towards up, where is the torch\?\nvec3 light_normal = normalize(vec3(LIGHT_VEC,-LIGHT_HEIGHT));\nLIGHT=LIGHT_COLOR*COLOR*max(dot(-light_normal,NORMAL),0.0);\n\n", "light_ofs":0, "vertex":"", "vertex_ofs":0 } + +[resource] + +shader/shader = SubResource( 1 ) +shader/shading_mode = 0 +shader_param/normaltex = ExtResource( 1 ) + diff --git a/demos/2d/isometric_light/wall_shader.res b/demos/2d/isometric_light/wall_shader.res deleted file mode 100644 index 7e33c262010ae938a30746a19fc29d6a193c5db0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1687 zcmWlaU2Ggz701t=S+94;b!_LOv17|Vvum$r?e(s`PKBszb9XmRoZ9)QV;n+JcJ9vH z^$wn$S!QOv-awUc+6WMWhe|0#fMka+1);o9kWf)&R1gBGd^`n&sKzd|Ndzh_4-_f{ z)AMrA!@bh~p5I^RzjCQmf)A?~U{nIQ9t9u(J^_MJDpG(W80jl9Ym>QWJzhV@Jnk6G z#G}Cz0G&7whfqA^aMx}+8qZm*&LN6@k+Np%Tpf(MnqxG)oFDc3I%-VkPS_GSij%&i z_C*Y9y1&@t9;9AI$TxoYn@N# za#g1B^Xi3N4AYWpif0mvu!6KCtj6Y z^lW6f$((j#T99%%IsuxzNVpS3#sno4`1eSid0LIm;KhjBa11Yi3H)db6}M)$-0-as zN6oQa7h5&%Kev+^Fq zd+LDt7kE<+utmHYUPgi5>Z&obimq{uqg_>d1=qM_9=SpYBSxZ-biSD3c3?$}LBN9AgoE)v_p zCBiXL1&;m1YKH#W#D5-iw!h`!=VBGxHnGBM29{v1c>6ek%LKtW-5^=3%?= zU(Aakcg3HMr17&-T$bRfx+_X?DXu2zBL0s)60_~`e8Lx5#Z|UjiR&RaK>YWf0$Z{~ zoryZpoC}rF0!~l4+|M(a=VAFg5nR*F*yzs`($MIarJ(vxoPT&bO+iE&!{IJ zfsXG*7&^A+-%oy9aEz_uZ9#K*@<1L08&85&`amAo7Z2gff)|pSN0|S{krwCfO6u=r8$D7YbXC*7!o}0u-Wd*9E z?+B*Z#y4(Uq3;N~?G;H}Z)#o^FB$d5=!B>n)oSv6_A!4vs$-2iJR_%sO4E~%05297 zhIcH)TAl>X@ zq5zXOo+L9mesFrN(tqk6IjPWhMMZCB91bm2q_#%6^wHlbs60e~1}m)rHs9 zD+F6(-xRdEU3!-28T>MAY{&c|lBgz6Kmy;ctkaOTse>~Qp&vUJ*D35Bp^zF<2g7LTd@%Ie)1RWtLFZH$Fch4J01x0#;!3zG IR>Da7KP1=ahX4Qo diff --git a/demos/2d/isometric_light/wall_shader.tres b/demos/2d/isometric_light/wall_shader.tres new file mode 100644 index 00000000000..42d967cf769 --- /dev/null +++ b/demos/2d/isometric_light/wall_shader.tres @@ -0,0 +1,16 @@ +[gd_resource type="CanvasItemMaterial" load_steps=4 format=1] + +[ext_resource path="res://faceMask.png" type="Texture" id=1] +[ext_resource path="res://faceNormal.png" type="Texture" id=2] + +[sub_resource type="CanvasItemShader" id=1] + +_code = { "fragment":"uniform texture normal;\n\nvec2 ywnormal=tex( normal,UV).wy * vec2(2.0,2.0) - vec2(1.0,1.0);\nNORMAL=vec3(ywnormal,sqrt(1 - (ywnormal.x * ywnormal.x) - (ywnormal.y * ywnormal.y) ));\n", "fragment_ofs":0, "light":"// this is the half size of the tile in pixels\n\nvec2 tile_vec=vec2(47,22);\n\n// this mask is used to see which part of the tile is the background (^)\n// or the foregronud (v)\n\nuniform texture bg_mask;\n\nbool behind = tex(bg_mask,UV).a>0.5;\nfloat y_ofs;\n\nif (behind) {\n\t// ^ part\n\t\n\ty_ofs = tile_vec.y*2 - abs(VAR1.x * tile_vec.y / tile_vec.x);\n} else {\n\t// v part\n\t\n\ty_ofs = abs(VAR1.x * tile_vec.y / tile_vec.x);\n}\n\nvec2 point_2d = vec2(VAR1.x,(tile_vec.y - VAR1.y));\n\n// compute a pseudo 3D point for both the light and the texel\n// this makes the normalmap calculation work properly\n\nvec3 point_3d = vec3( point_2d.x, point_2d.y - y_ofs, y_ofs );\nvec3 light_3d = vec3(point_2d.x-LIGHT_VEC.x,LIGHT_HEIGHT,(-(VAR1.y - (LIGHT_VEC.y))+tile_vec.y));\n\n//this could be optimized\n//a rotation matrix is created to convert the normalmap vector\n//to the same coordinate space as our pseudo 3d point and light\n\nfloat r = asin(tile_vec.y / tile_vec.x);\nmat3 rot_mat = mat3( vec3(1,0,0), vec3(0,cos(r),-sin(r)), vec3(0,sin(r),cos(r)));\nvec3 n = rot_mat * NORMAL;\nn.y=-n.y;\n\n//finally compute the dot product. Simple diffuse is computed here,\n//but specular could be added and it will look prettier\n\nfloat dp = max(dot(normalize(n),-normalize(light_3d-point_3d)),0);\nLIGHT=vec4(vec3(dp),1.0)*COLOR*LIGHT_COLOR*3.0;\n\n//finally, after light was cmoputed, make the light \"flat\"\n//this makes the shadows work properly\n//the +2 is added to avoid z-fighting between caster and pseudo 3d coords.\n\nLIGHT_VEC.y+=point_3d.y+2;\n\n", "light_ofs":0, "vertex":"//assign the local vertex coordinates to a varying\n//the center coordinates (0,0) matches the sprite center \n// (shows as a cross when the sprite is selected)\n\nVAR1.xy=SRC_VERTEX;\n", "vertex_ofs":0 } + +[resource] + +shader/shader = SubResource( 1 ) +shader/shading_mode = 0 +shader_param/normal = ExtResource( 2 ) +shader_param/bg_mask = ExtResource( 1 ) + diff --git a/demos/2d/kinematic_char/colworld.scn b/demos/2d/kinematic_char/colworld.scn deleted file mode 100644 index ff108265637cbcdc28bb2f0e864ea317060bbbed..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7366 zcmcgxd3aORwqGYFZQ7=#BONK(X*xlnfew_h?30tW%u~x{Cg)^m8k#00Nm~jk0g8Z% zAY4K46M`rxAcNoqL?jG?g2PpwqF0bpCcQE#h=7WH>s0#W`F-zu|J{DyZ=IdB*4}&V zz1LoAozroZJP-0;48Y&|03@gY+7M$9gF^ur06zl?e<%YCVIh*RQDa0)t<73#vAJxZ z>P=##0)TWf09e8@`T4?hp;nO(ok)13&m+3L)oxFnzTWMXLSq#kw@--eV10I2o*_(UjD%l zAw+?&yUkvo zXmQ%|>s|H>VZ$MoOz>xi*E_{#nyj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xk4;FX5L%WvOVxZ{i2Z3oVGb*?Db)5r4rKl++9DeQ#r`HOuw0+V+yJC-{s zynA@XlGbF+^DoCXCJy2M>+fTBZTQF(ro1&>{o*TDV6XMqZU2xzeOr_FdCBH%Q{6Lb zbFVCUz3xcbIJ^q_>?}#%}Hh=W-(vMFZT4D~r zwDtYwwaOb2 zGcW4ybd9)q^huhYJv?#m&S{CcbK#%+HtyDJE!ulx;;wzm( zSq+vYXSP3gFTME0%O^>i zw@xtk?%#f+w>C8Y!5qIQW$wA&yZ4?sR&IUaNq4aH&M%s}Cd0nzFFqR>6a4ae|NgLZ zciYP=-N#nu+&gwUeRIT!cQik>B&6TJa zpsD@rw72W^0b_q%J8$y9-@kkA%!T{!8k^ml>LbTl_m&o4)tq^~=EQ-0x|`XKwkC^i z`uehg<4S+ubo-+(e#)Es+^+2{nr(-jjt};0Zr|UKGG?Lj%iu1HW$2dDV`JZa|KLlj zJ!~({{rUH@4{YDE`IW zcz+%GpwrYhUj6o)yJPb-bHq_sZ6?h#x{NJG#g4NFC!gIo?|tjCr3as1^wn4I&4pn9 z6+e&aeJDM>h CQQ$=Y diff --git a/demos/2d/kinematic_char/colworld.tscn b/demos/2d/kinematic_char/colworld.tscn new file mode 100644 index 00000000000..3bc4a21d6b9 --- /dev/null +++ b/demos/2d/kinematic_char/colworld.tscn @@ -0,0 +1,422 @@ +[gd_scene load_steps=19 format=1] + +[ext_resource path="res://colworld.gd" type="Script" id=1] +[ext_resource path="res://obstacle.png" type="Texture" id=2] +[ext_resource path="res://player.tscn" type="PackedScene" id=3] +[ext_resource path="res://princess.png" type="Texture" id=4] +[ext_resource path="res://circle.png" type="Texture" id=5] +[ext_resource path="res://long_obstacle.png" type="Texture" id=6] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 8, 8 ) + +[sub_resource type="TileSet" id=2] + +0/name = "" +0/texture = ExtResource( 2 ) +0/tex_offset = Vector2( 0, 0 ) +0/region = Rect2( 0, 0, 0, 0 ) +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 8, 8 ) +0/shapes = [ SubResource( 1 ) ] + +[sub_resource type="RectangleShape2D" id=3] + +custom_solver_bias = 0.0 +extents = Vector2( 8, 8 ) + +[sub_resource type="Animation" id=4] + +length = 10.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 1, 5, 6 ), "transitions":FloatArray( 1, 1, 1, 1 ), "values":[ Vector2( 184, 152 ), Vector2( 184, 152 ), Vector2( 328.086, 152 ), Vector2( 328.086, 152 ) ] } + +[sub_resource type="Animation" id=5] + +resource/name = "leftright" +length = 10.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 1, 5, 6 ), "transitions":FloatArray( 1, 1, 1, 1 ), "values":[ Vector2( 184, 152 ), Vector2( 184, 152 ), Vector2( 328.086, 152 ), Vector2( 328.086, 152 ) ] } + +[sub_resource type="Animation" id=6] + +length = 10.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 1, 5, 6 ), "transitions":FloatArray( 1, 1, 1, 1 ), "values":[ Vector2( 88.3493, 296 ), Vector2( 88.3493, 296 ), Vector2( 88.3493, 152 ), Vector2( 88.3493, 152 ) ] } + +[sub_resource type="RectangleShape2D" id=7] + +custom_solver_bias = 0.0 +extents = Vector2( 8, 8 ) + +[sub_resource type="RectangleShape2D" id=8] + +custom_solver_bias = 0.0 +extents = Vector2( 10, 4 ) + +[sub_resource type="CircleShape2D" id=9] + +custom_solver_bias = 0.0 +radius = 32.0 + +[sub_resource type="RectangleShape2D" id=10] + +custom_solver_bias = 0.0 +extents = Vector2( 8, 8 ) + +[sub_resource type="Animation" id=11] + +length = 20.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/rot") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 5, 10, 15 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ 0.0, 90.0, 0.0, -90.0 ] } + +[sub_resource type="RectangleShape2D" id=12] + +custom_solver_bias = 0.0 +extents = Vector2( 32, 8 ) + +[node name="colworld" type="Node2D"] + +script/script = ExtResource( 1 ) + +[node name="TileMap" type="TileMap" parent="."] + +mode = 0 +tile_set = SubResource( 2 ) +cell/size = Vector2( 16, 16 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 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/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 65536, 0, 65537, 0, 65538, 0, 65539, 0, 65540, 0, 65541, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 0, 65546, 0, 65547, 0, 65548, 0, 65549, 0, 65550, 0, 65551, 0, 65552, 0, 65553, 0, 65554, 0, 65555, 0, 65556, 0, 65557, 0, 65558, 0, 65559, 0, 65560, 0, 65561, 0, 65562, 0, 65563, 0, 65564, 0, 65565, 0, 65566, 0, 65567, 0, 65568, 0, 131072, 0, 131073, 0, 131103, 0, 131104, 0, 196608, 0, 196609, 0, 196639, 0, 196640, 0, 262144, 0, 262145, 0, 262175, 0, 262176, 0, 327680, 0, 327681, 0, 327685, 0, 327686, 0, 327687, 0, 327688, 0, 327689, 0, 327690, 0, 327691, 0, 327692, 0, 327693, 0, 327697, 0, 327711, 0, 327712, 0, 393216, 0, 393217, 0, 393237, 0, 393238, 0, 393247, 0, 393248, 0, 458752, 0, 458753, 0, 458783, 0, 458784, 0, 524288, 0, 524289, 0, 524313, 0, 524314, 0, 524319, 0, 524320, 0, 589824, 0, 589825, 0, 589830, 0, 589831, 0, 589832, 0, 589833, 0, 589834, 0, 589845, 0, 589846, 0, 589847, 0, 589855, 0, 589856, 0, 655360, 0, 655361, 0, 655391, 0, 655392, 0, 720896, 0, 720897, 0, 720927, 0, 720928, 0, 786432, 0, 786433, 0, 786463, 0, 786464, 0, 851968, 0, 851969, 0, 851999, 0, 852000, 0, 917504, 0, 917505, 0, 917535, 0, 917536, 0, 983040, 0, 983041, 0, 983071, 0, 983072, 0, 1048576, 0, 1048577, 0, 1048607, 0, 1048608, 0, 1114112, 0, 1114113, 0, 1114143, 0, 1114144, 0, 1179648, 0, 1179649, 0, 1179654, 0, 1179655, 0, 1179656, 0, 1179679, 0, 1179680, 0, 1245184, 0, 1245185, 0, 1245204, 0, 1245205, 0, 1245206, 0, 1245207, 0, 1245215, 0, 1245216, 0, 1310720, 0, 1310721, 0, 1310751, 0, 1310752, 0, 1376256, 0, 1376257, 0, 1376285, 0, 1376286, 0, 1376287, 0, 1376288, 0, 1441792, 0, 1441793, 0, 1441823, 0, 1441824, 0, 1507328, 0, 1507329, 0, 1507355, 0, 1507356, 0, 1507359, 0, 1507360, 0, 1572864, 0, 1572865, 0, 1572895, 0, 1572896, 0, 1638400, 0, 1638401, 0, 1638413, 0, 1638425, 0, 1638426, 0, 1638431, 0, 1638432, 0, 1703936, 0, 1703937, 0, 1703948, 0, 1703965, 0, 1703966, 0, 1703967, 0, 1703968, 0, 1769472, 0, 1769473, 0, 1769482, 0, 1769483, 0, 1769500, 0, 1769501, 0, 1769503, 0, 1769504, 0, 1835008, 0, 1835009, 0, 1835012, 0, 1835018, 0, 1835019, 0, 1835034, 0, 1835035, 0, 1835039, 0, 1835040, 0, 1900544, 0, 1900545, 0, 1900546, 0, 1900547, 0, 1900548, 0, 1900549, 0, 1900550, 0, 1900551, 0, 1900552, 0, 1900553, 0, 1900554, 0, 1900555, 0, 1900556, 0, 1900557, 0, 1900558, 0, 1900559, 0, 1900560, 0, 1900561, 0, 1900562, 0, 1900563, 0, 1900564, 0, 1900565, 0, 1900566, 0, 1900567, 0, 1900568, 0, 1900569, 0, 1900570, 0, 1900571, 0, 1900572, 0, 1900573, 0, 1900574, 0, 1900575, 0, 1900576, 0, 1966080, 0, 1966081, 0, 1966082, 0, 1966083, 0, 1966084, 0, 1966085, 0, 1966086, 0, 1966087, 0, 1966088, 0, 1966089, 0, 1966090, 0, 1966091, 0, 1966092, 0, 1966093, 0, 1966094, 0, 1966095, 0, 1966096, 0, 1966097, 0, 1966098, 0, 1966099, 0, 1966100, 0, 1966101, 0, 1966102, 0, 1966103, 0, 1966104, 0, 1966105, 0, 1966106, 0, 1966107, 0, 1966108, 0, 1966109, 0, 1966110, 0, 1966111, 0, 1966112, 0, 2031616, 0, 2031617, 0, 2031618, 0, 2031619, 0, 2031620, 0, 2031621, 0, 2031622, 0, 2031623, 0, 2031624, 0, 2031625, 0, 2031626, 0, 2031627, 0, 2031628, 0, 2031629, 0, 2031630, 0, 2031631, 0, 2031632, 0, 2031633, 0, 2031634, 0, 2031635, 0, 2031636, 0, 2031637, 0, 2031638, 0, 2031639, 0, 2031640, 0, 2031641, 0, 2031642, 0, 2031643, 0, 2031644, 0, 2031645, 0, 2031646, 0, 2031647, 0, 2031648, 0 ) + +[node name="player" parent="." instance=ExtResource( 3 )] + +transform/pos = Vector2( 72, 430 ) +collision/margin = 0.05 + +[node name="moving_platform1" type="KinematicBody2D" parent="."] + +transform/pos = Vector2( 274.142, 152 ) +input/pickable = false +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.01 + +[node name="collision" type="CollisionShape2D" parent="moving_platform1"] + +shape = SubResource( 3 ) +trigger = false +_update_shape_index = -1 + +[node name="sprite" type="Sprite" parent="moving_platform1"] + +texture = ExtResource( 2 ) + +[node name="anim" type="AnimationPlayer" parent="moving_platform1"] + +playback/process_mode = 0 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/leftright = SubResource( 4 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "leftright" + +[node name="moving_platform2" type="KinematicBody2D" parent="."] + +transform/pos = Vector2( 88.3493, 284.689 ) +input/pickable = false +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.01 + +[node name="collision" type="CollisionShape2D" parent="moving_platform2"] + +shape = SubResource( 3 ) +trigger = false +_update_shape_index = -1 + +[node name="sprite" type="Sprite" parent="moving_platform2"] + +texture = ExtResource( 2 ) + +[node name="anim" type="AnimationPlayer" parent="moving_platform2"] + +playback/process_mode = 0 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/leftright = SubResource( 5 ) +anims/updown = SubResource( 6 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "updown" + +[node name="princess" type="Area2D" parent="."] + +transform/pos = Vector2( 97, 72 ) +input/pickable = true +shapes/0/shape = SubResource( 7 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 + +[node name="collision" type="CollisionShape2D" parent="princess"] + +shape = SubResource( 7 ) +trigger = false +_update_shape_index = -1 + +[node name="Sprite" type="Sprite" parent="princess"] + +texture = ExtResource( 4 ) + +[node name="youwin" type="Label" parent="."] + +visibility/visible = false +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 196.0 +margin/top = 41.0 +margin/right = 344.0 +margin/bottom = 67.0 +text = "Thank You Cubio\nYou Saved The Princess!" +align = 1 +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="oneway1" type="KinematicBody2D" parent="."] + +transform/pos = Vector2( 439, 301 ) +input/pickable = false +shapes/0/shape = SubResource( 8 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +one_way_collision/direction = Vector2( 0, 1 ) +one_way_collision/max_depth = 6.0 +collision/margin = 0.01 + +[node name="sprite" type="Sprite" parent="oneway1"] + +transform/scale = Vector2( 1, 0.3 ) +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway1"] + +shape = SubResource( 8 ) +trigger = false +_update_shape_index = -1 + +[node name="oneway2" type="KinematicBody2D" parent="."] + +transform/pos = Vector2( 456, 301 ) +input/pickable = false +shapes/0/shape = SubResource( 8 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +one_way_collision/direction = Vector2( 0, 1 ) +one_way_collision/max_depth = 6.0 +collision/margin = 0.01 + +[node name="sprite" type="Sprite" parent="oneway2"] + +transform/scale = Vector2( 1, 0.3 ) +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway2"] + +shape = SubResource( 8 ) +trigger = false +_update_shape_index = -1 + +[node name="oneway3" type="KinematicBody2D" parent="."] + +transform/pos = Vector2( 472, 301 ) +input/pickable = false +shapes/0/shape = SubResource( 8 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +one_way_collision/direction = Vector2( 0, 1 ) +one_way_collision/max_depth = 6.0 +collision/margin = 0.01 + +[node name="sprite" type="Sprite" parent="oneway3"] + +transform/scale = Vector2( 1, 0.3 ) +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway3"] + +shape = SubResource( 8 ) +trigger = false +_update_shape_index = -1 + +[node name="oneway4" type="KinematicBody2D" parent="."] + +transform/pos = Vector2( 487, 301 ) +input/pickable = false +shapes/0/shape = SubResource( 8 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +one_way_collision/direction = Vector2( 0, 1 ) +one_way_collision/max_depth = 6.0 +collision/margin = 0.01 + +[node name="sprite" type="Sprite" parent="oneway4"] + +transform/scale = Vector2( 1, 0.3 ) +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="oneway4"] + +shape = SubResource( 8 ) +trigger = false +_update_shape_index = -1 + +[node name="circle" type="KinematicBody2D" parent="."] + +transform/pos = Vector2( 241.169, 304.126 ) +input/pickable = false +shapes/0/shape = SubResource( 9 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +shapes/1/shape = SubResource( 10 ) +shapes/1/transform = Matrix32( 1, 0, 0, 1, -0.440125, -37.0904 ) +shapes/1/trigger = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.08 + +[node name="sprite" type="Sprite" parent="circle"] + +texture = ExtResource( 5 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="circle"] + +shape = SubResource( 9 ) +trigger = false +_update_shape_index = -1 + +[node name="anim" type="AnimationPlayer" parent="circle"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/turn = SubResource( 11 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "turn" + +[node name="box" type="CollisionShape2D" parent="circle"] + +transform/pos = Vector2( -0.440125, -37.0904 ) +shape = SubResource( 10 ) +trigger = false +_update_shape_index = -1 + +[node name="boxsprite" type="Sprite" parent="circle"] + +transform/pos = Vector2( 0, -37.4108 ) +texture = ExtResource( 2 ) + +[node name="platform" type="StaticBody2D" parent="."] + +transform/pos = Vector2( 251.44, 396.557 ) +transform/rot = 24.5257 +input/pickable = false +shapes/0/shape = SubResource( 12 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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="platform"] + +texture = ExtResource( 6 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="platform"] + +shape = SubResource( 12 ) +trigger = false +_update_shape_index = -1 + +[node name="platform1" type="StaticBody2D" parent="."] + +transform/pos = Vector2( 369.116, 394.016 ) +transform/rot = -26.6959 +input/pickable = false +shapes/0/shape = SubResource( 12 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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="platform1"] + +texture = ExtResource( 6 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="platform1"] + +shape = SubResource( 12 ) +trigger = false +_update_shape_index = -1 + +[connection signal="body_enter" from="princess" to="." method="_on_princess_body_enter"] + + diff --git a/demos/2d/kinematic_char/engine.cfg b/demos/2d/kinematic_char/engine.cfg index 8bdd5e2fc54..0ab2a552ca5 100644 --- a/demos/2d/kinematic_char/engine.cfg +++ b/demos/2d/kinematic_char/engine.cfg @@ -1,7 +1,7 @@ [application] name="Kinematic Character" -main_scene="res://colworld.scn" +main_scene="res://colworld.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/kinematic_char/player.scn b/demos/2d/kinematic_char/player.scn deleted file mode 100644 index 5ee86ce85d5909f920b50d06e2343faf9849c05e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal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}W6O)5zq@GD-Wk+LkM8kT|G1DRp!ia)>#M6>U9Wh4 z{NxGY>3w_m-L_S1q+a_tr+bWL>AEj+mtF7b`St#jdze-^15{B^y>B*lXfk-iPz z|8CXJ?>T91!>W$vc~tD8>0$hlY?Q5DwrpT~&Edmq4MT^%cRZzF-#c^cex#xr6O(s8 zy=3mCPR;jO8PlE_Gxo%_o1Zi~qps|Y*H1pxP(%H2`$(ZsUov*}OY`QfJvjc2#mVj$ zUn_ijSKaVyC9l_5wo$e$^XXmPjUgrU*VRv7m^*%sS9NXKpbw60+i(46u{yGu(x0kq z=eKWPyz@=}LrmMOk@0z)Zb(baIN&-h3Vy^1YT@#OFFkkp#|*YT^!)iXTCe$uufK{h z3`uM9ti6k4-Pwl AxBvhE diff --git a/demos/2d/kinematic_col/colworld.tscn b/demos/2d/kinematic_col/colworld.tscn new file mode 100644 index 00000000000..43eb58545e8 --- /dev/null +++ b/demos/2d/kinematic_col/colworld.tscn @@ -0,0 +1,47 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://obstacle.png" type="Texture" id=1] +[ext_resource path="res://player.tscn" type="PackedScene" id=2] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 8, 8 ) + +[sub_resource type="TileSet" id=2] + +0/name = "" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/region = Rect2( 0, 0, 0, 0 ) +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 8, 8 ) +0/shapes = [ SubResource( 1 ) ] + +[node name="colworld" type="Node2D"] + +[node name="TileMap" type="TileMap" parent="."] + +mode = 0 +tile_set = SubResource( 2 ) +cell/size = Vector2( 16, 16 ) +cell/quadrant_size = 16 +cell/custom_transform = Matrix32( 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/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( 0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, 9, 0, 10, 0, 11, 0, 12, 0, 13, 0, 14, 0, 15, 0, 16, 0, 17, 0, 18, 0, 19, 0, 20, 0, 21, 0, 22, 0, 23, 0, 24, 0, 25, 0, 26, 0, 27, 0, 28, 0, 29, 0, 30, 0, 31, 0, 32, 0, 65536, 0, 65537, 0, 65538, 0, 65539, 0, 65540, 0, 65541, 0, 65542, 0, 65543, 0, 65544, 0, 65545, 0, 65546, 0, 65547, 0, 65548, 0, 65549, 0, 65550, 0, 65551, 0, 65552, 0, 65553, 0, 65554, 0, 65555, 0, 65556, 0, 65557, 0, 65558, 0, 65559, 0, 65560, 0, 65561, 0, 65562, 0, 65563, 0, 65564, 0, 65565, 0, 65566, 0, 65567, 0, 65568, 0, 131072, 0, 131073, 0, 131103, 0, 131104, 0, 196608, 0, 196609, 0, 196639, 0, 196640, 0, 262144, 0, 262145, 0, 262175, 0, 262176, 0, 327680, 0, 327681, 0, 327685, 0, 327686, 0, 327687, 0, 327688, 0, 327689, 0, 327690, 0, 327691, 0, 327692, 0, 327693, 0, 327711, 0, 327712, 0, 393216, 0, 393217, 0, 393247, 0, 393248, 0, 458752, 0, 458753, 0, 458783, 0, 458784, 0, 524288, 0, 524289, 0, 524319, 0, 524320, 0, 589824, 0, 589825, 0, 589855, 0, 589856, 0, 655360, 0, 655361, 0, 655373, 0, 655374, 0, 655375, 0, 655376, 0, 655377, 0, 655378, 0, 655379, 0, 655380, 0, 655381, 0, 655391, 0, 655392, 0, 720896, 0, 720897, 0, 720909, 0, 720910, 0, 720911, 0, 720912, 0, 720913, 0, 720914, 0, 720915, 0, 720916, 0, 720917, 0, 720927, 0, 720928, 0, 786432, 0, 786433, 0, 786445, 0, 786446, 0, 786447, 0, 786448, 0, 786449, 0, 786450, 0, 786451, 0, 786452, 0, 786453, 0, 786463, 0, 786464, 0, 851968, 0, 851969, 0, 851981, 0, 851982, 0, 851988, 0, 851989, 0, 851999, 0, 852000, 0, 917504, 0, 917505, 0, 917517, 0, 917518, 0, 917524, 0, 917525, 0, 917535, 0, 917536, 0, 983040, 0, 983041, 0, 983053, 0, 983054, 0, 983060, 0, 983061, 0, 983071, 0, 983072, 0, 1048576, 0, 1048577, 0, 1048596, 0, 1048597, 0, 1048607, 0, 1048608, 0, 1114112, 0, 1114113, 0, 1114132, 0, 1114133, 0, 1114143, 0, 1114144, 0, 1179648, 0, 1179649, 0, 1179668, 0, 1179669, 0, 1179679, 0, 1179680, 0, 1245184, 0, 1245185, 0, 1245204, 0, 1245205, 0, 1245215, 0, 1245216, 0, 1310720, 0, 1310721, 0, 1310730, 0, 1310731, 0, 1310748, 0, 1310751, 0, 1310752, 0, 1376256, 0, 1376257, 0, 1376266, 0, 1376267, 0, 1376284, 0, 1376287, 0, 1376288, 0, 1441792, 0, 1441793, 0, 1441802, 0, 1441803, 0, 1441804, 0, 1441805, 0, 1441820, 0, 1441823, 0, 1441824, 0, 1507328, 0, 1507329, 0, 1507338, 0, 1507339, 0, 1507340, 0, 1507341, 0, 1507359, 0, 1507360, 0, 1572864, 0, 1572865, 0, 1572874, 0, 1572875, 0, 1572876, 0, 1572877, 0, 1572878, 0, 1572879, 0, 1572880, 0, 1572881, 0, 1572882, 0, 1572895, 0, 1572896, 0, 1638400, 0, 1638401, 0, 1638410, 0, 1638411, 0, 1638412, 0, 1638413, 0, 1638414, 0, 1638415, 0, 1638416, 0, 1638417, 0, 1638418, 0, 1638431, 0, 1638432, 0, 1703936, 0, 1703937, 0, 1703946, 0, 1703947, 0, 1703967, 0, 1703968, 0, 1769472, 0, 1769473, 0, 1769482, 0, 1769483, 0, 1769503, 0, 1769504, 0, 1835008, 0, 1835009, 0, 1835018, 0, 1835019, 0, 1835039, 0, 1835040, 0, 1900544, 0, 1900545, 0, 1900546, 0, 1900547, 0, 1900548, 0, 1900549, 0, 1900550, 0, 1900551, 0, 1900552, 0, 1900553, 0, 1900554, 0, 1900555, 0, 1900556, 0, 1900557, 0, 1900558, 0, 1900559, 0, 1900560, 0, 1900561, 0, 1900562, 0, 1900563, 0, 1900564, 0, 1900565, 0, 1900566, 0, 1900567, 0, 1900568, 0, 1900569, 0, 1900570, 0, 1900571, 0, 1900572, 0, 1900573, 0, 1900574, 0, 1900575, 0, 1900576, 0, 1966080, 0, 1966081, 0, 1966082, 0, 1966083, 0, 1966084, 0, 1966085, 0, 1966086, 0, 1966087, 0, 1966088, 0, 1966089, 0, 1966090, 0, 1966091, 0, 1966092, 0, 1966093, 0, 1966094, 0, 1966095, 0, 1966096, 0, 1966097, 0, 1966098, 0, 1966099, 0, 1966100, 0, 1966101, 0, 1966102, 0, 1966103, 0, 1966104, 0, 1966105, 0, 1966106, 0, 1966107, 0, 1966108, 0, 1966109, 0, 1966110, 0, 1966111, 0, 1966112, 0, 2031616, 0, 2031617, 0, 2031618, 0, 2031619, 0, 2031620, 0, 2031621, 0, 2031622, 0, 2031623, 0, 2031624, 0, 2031625, 0, 2031626, 0, 2031627, 0, 2031628, 0, 2031629, 0, 2031630, 0, 2031631, 0, 2031632, 0, 2031633, 0, 2031634, 0, 2031635, 0, 2031636, 0, 2031637, 0, 2031638, 0, 2031639, 0, 2031640, 0, 2031641, 0, 2031642, 0, 2031643, 0, 2031644, 0, 2031645, 0, 2031646, 0, 2031647, 0, 2031648, 0 ) + +[node name="player" parent="." instance=ExtResource( 2 )] + +transform/pos = Vector2( 115.243, 222.134 ) +collision/margin = 0.01 + + diff --git a/demos/2d/kinematic_col/engine.cfg b/demos/2d/kinematic_col/engine.cfg index 654288a9bd4..7e2435a34eb 100644 --- a/demos/2d/kinematic_col/engine.cfg +++ b/demos/2d/kinematic_col/engine.cfg @@ -1,7 +1,7 @@ [application] name="Kinematic Collision" -main_scene="res://colworld.scn" +main_scene="res://colworld.tscn" icon="res://icon.png" [input] diff --git a/demos/2d/kinematic_col/player.scn b/demos/2d/kinematic_col/player.scn deleted file mode 100644 index 28ad204472b16bf585c51cf2d5cfd62ee914171d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1625 zcmWkveQXrR6@R;XAHF*qAI9e|I6OXoK@vFE0o=F=etUcPqXY^*Xp=_G&febmyz$=d zb$8F$goq2ofiyxDAVLx;k!c$gRDzNsRc&K6SEDvcLsijAZBo%{N!vvJqoNT_MAKGu zn15#8yqWiYzc;_9nan8)+#PWMRu3SD00e-l0Ae*HfIuXuCsM;6O`lOje+mAxz?sqbUL6BuetJ;dHueYV*w5TrALCu#fBxR2&AY{cxvP zwu)4NC}|6rwyv3ESo{(U$RYt>N{EBN7896loMgJESw)lOrnNE~%+f4&LV#>TkRQhF zgcC;TMtD!{Ug#j}@S02@L}GHQ=t7D_povKMr|NqGG?G;fhE=Y3>9V2EXnB*-CUEhv z;L@BgG)pDTo$*8c z!II__4eLhZ*^pXdo~EkW@%o*H#Y&oI=oz~(-<86vLAUG}9@9>PckVQ{K(5+?Cqb#5 zgdBcIw#fhiO@=ZdWXib|BO`=q_LA;QqDPA^#*Wt2u_2xqwp`$4LZeBLR%b zEAsmRu9gw-0em5b4`X-c0V(>&?gw!Q*C1q)7()}itYCPyqn6D|*Mg|J9=QW< zm+ea%@IFblj1q0eM=?%scdcZG@C*V+^{uV~j>r-=VL0MiT3Ia{bIkMuo0K~?$zCF!7T^H|cpV}posB|?YjW^51vNO!A1WK3q;Xi{{TN%q66 zA3TSfxLI_JqyOY7haf@fXuA(5g7(yu%RG9J@AfD|v`2EM?E`*9QO?r!i^Eu|0dAMi zi1w6ATf--IR+r6pH!fqVFI+wsxe@4>_rv{9??;LQcr09CQ>Iaz_Hc`!&eO-FLm!e6 zTz?nql;&`(0ADD)u!qDcdzOZ|xh2EPw-}l=*nzU`^sdi%*ek!IjAK{k8KGdLIz&rn zbRB0^)fSWqn8PO*6V=U_fO)@;3%{qm_nDrJnStf;9r;+rWh%2~4ac@hy|2+u&gd!p z1Ut#A!D+i_TiQoK883=u+tpfp3H(QE{KTUFzncH+ntWY(;Yw0aOMR05o#nSN*?lyi zRZLISkLQ0{OO8%TS}AX&u2qx0p9-e^>=V+09F?~yUT~O!rQE_s|ag_F@cS zdX29VWBp?nCeCkoapC!eH@Llr0@mTbquz9-l(#g)gig{5?-MEX+@9TI4bcu<7igFm z&rXu2An!TYP$vhZUtFB|IjQeFHIbF~J+knR-@g?-I?%kJHOL?JHGct#f3YK%fBTnn zdgsdHPi*+5A1i#dYvkmu69mxUp+hzuTAmu;Ee-QoJd+zW0FC7=Bql+7>=iz0)u`V(T gyPH=hp8q`X2zjLeCU)%3UdqrTFqxZFCi$oGe|9hSwg3PC diff --git a/demos/2d/kinematic_col/player.tscn b/demos/2d/kinematic_col/player.tscn new file mode 100644 index 00000000000..92ad6936901 --- /dev/null +++ b/demos/2d/kinematic_col/player.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://player.gd" type="Script" id=1] +[ext_resource path="res://player.png" type="Texture" id=2] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 8, 8 ) + +[node name="player" type="KinematicBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +collision/margin = 0.01 +script/script = ExtResource( 1 ) + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/demos/2d/light_mask/engine.cfg b/demos/2d/light_mask/engine.cfg index 39608669ab0..3c2f1f3a790 100644 --- a/demos/2d/light_mask/engine.cfg +++ b/demos/2d/light_mask/engine.cfg @@ -1,7 +1,7 @@ [application] name="Using Lights As Mask" -main_scene="res://lightmask.scn" +main_scene="res://lightmask.tscn" icon="res://icon.png" [rasterizer] diff --git a/demos/2d/light_mask/lightmask.scn b/demos/2d/light_mask/lightmask.scn deleted file mode 100644 index fcf56b5b84dc831d802ff628b7ee1cdf03cd4594..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3829 zcmYjU30M=?_P;X|2oMmEHEeSsEFwx2^|_OqOhiyn1QqwpkW4}($;3({_5D2NDLe5yun~IIRg9ig6V2G3jKnxrRC`b{R znd}q-$RQ=SSuJJmo}d#92z0wRhiDdDcC}LwB_a-FNkjnX#ij+icu}Zu8F{sXv-51I zuUN*Jc$fP9Y~gUYCjfU@9TtOKFx98~7+qGU8$a`m^W_~DcNy@3y(ya@I9WeRbn{Mj z99-gOEEm;1)b47h2T355aB{E@2!VaDEweh@yi4-!OO^B0qD19^o|4~RD&W6X*89Hy zD%_Xl$pijyzuZt-;V{{F6ZZu8!4SXE{B(DPiwB`lk;uyisMVzviFGm|)9J8CGKijg zpiFeyI5$gcFM#*86w^eYktAH;|LL-3!%6;sdSZ){C7}N#G zU}p-S8A35=(BU=|<#VE?WpEJi3_v=nlCxFJd^vyYI{In7`d4S%rLKN*i7I7&X+)v(NQrKOC^+{09(7aS18rcgGRGI6z(DZd3HmE7 zHVo9Y?>J^k*)eQY9_*^$F=6TTg!4MvZE7DnK`4Re1oIp{(8UkYU^gT|CFlVu-D!Ry z)6>Ub;_U)p0_B{;SSGmCt|1MkAL~PWN(HxDu$RUw%!08(R9h_$!NsRcB`U<(T2Ca7 zRl!*wuC)h<)*9Ymws96w4aXAJ8dVq7FS-(mRLUxOm)n{=gxw}L80@^8GZ>7I0Rz>f zORyPLvsahyR=qN%0kzkUJ%A72WwAOW@<4q^{Q*4#+#7yJcQ?Eta$GrMnb};>9mQ&< z!+65H4Tx|H;MoEh@8C*pDI?J!AHi%EF}}qEwbNuq!6vxagtU>Q%TmqFH?Kh+IZj;* zuP)=csoEo+5Lu1Ej;HboCb;SBEDtTSan-zwRiWjQEKHK60c%Pj>`aK|+`XZRq)?^y z?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2U zKen}zcAX#NzpmumKTp1%AD_LlIKa>IHm*G|dOP`)J$PkG&2!pQb$4&=gUd4)i|dcx z*-Ni&y}L0d{cfN0m&-R^T$(WaEPbcr+siMj_ob}&o`?+_`=X=yhBC9X;P1_a7bCdF z#BWS=-O{E%v?Kd0@B3;)S>cnOf4z!M*53-;KbTIf1&Qdh zc^5k!az^x!W{q0iK4M&5Et=WBW!j|~23J$u( zyBRJzZfRSF@Zq!5dpAy8T|TN}ow3K!adVg+Yta1YvU{=XYU$b@wP*LCx7+w=(={U3D+Yc>IU+>>Hn;sa|Ddup$Rga#x{MzyRGxo-Xl?&HaoZL0Y6V&&} z;&Xnjv}#kx=XIbcwP&jThAoq~PR+>wRJXV2)Q?Hd$OSPsC!e8L)pTEdls|MddrhA? zVY$5tWcjUeVV_aW>hp^4#&k&2=|4JVor%wnvp>JoQ|y!(E|nfAtBKPW>;chkf*mL09vvgj)z8h>(L?-s@F z-kVNqqxY7y`in=ytMkLpd>xcwQBI;wpFdn`+S&8d;+>5Vb6pRJMLX||h>F+P_33%! zMx?OP<{ig1pVfNKoqBWo*F%4AjhUB!BQ+chCNDLS_cN4xH$~RGErAtUtLb?nCg6craSMfivJKglpz AbpQYW diff --git a/demos/2d/light_mask/lightmask.tscn b/demos/2d/light_mask/lightmask.tscn new file mode 100644 index 00000000000..d489b735b04 --- /dev/null +++ b/demos/2d/light_mask/lightmask.tscn @@ -0,0 +1,134 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://burano.png" type="Texture" id=1] +[ext_resource path="res://splat.png" type="Texture" id=2] + +[sub_resource type="CanvasItemMaterial" id=1] + +shader/shading_mode = 2 + +[sub_resource type="Animation" id=2] + +length = 4.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("light1:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 1, 2, 3 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ Vector2( 601.028, 242.639 ), Vector2( 318.649, 327.353 ), Vector2( 381.263, 130.915 ), Vector2( 462.294, 389.968 ) ] } +tracks/1/type = "value" +tracks/1/path = NodePath("light2:transform/pos") +tracks/1/interp = 1 +tracks/1/keys = { "cont":true, "times":FloatArray( 0, 1, 2, 3 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ Vector2( 196.528, 185.139 ), Vector2( 135.142, 454.013 ), Vector2( 638.105, 334.923 ), Vector2( 331.375, 101.653 ) ] } +tracks/2/type = "value" +tracks/2/path = NodePath("light3:transform/pos") +tracks/2/interp = 1 +tracks/2/keys = { "cont":true, "times":FloatArray( 0, 1, 2, 3 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ Vector2( 442.528, 411.139 ), Vector2( 635.283, 236.8 ), Vector2( 216.215, 396.815 ), Vector2( 682.96, 294.708 ) ] } + +[node name="lightmask_demo" type="Control"] + +anchor/right = 1 +anchor/bottom = 1 +focus/ignore_mouse = false +focus/stop_mouse = true +size_flags/horizontal = 2 +size_flags/vertical = 2 +margin/left = 0.0 +margin/top = 0.0 +margin/right = 0.0 +margin/bottom = 0.0 + +[node name="burano" type="TextureFrame" parent="."] + +material/material = SubResource( 1 ) +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +size_flags/vertical = 2 +margin/left = 0.0 +margin/top = 0.0 +margin/right = 800.0 +margin/bottom = 600.0 +texture = ExtResource( 1 ) + +[node name="light1" type="Light2D" parent="."] + +transform/pos = Vector2( 601.028, 242.639 ) +transform/scale = Vector2( 1.62522, 1.62999 ) +enabled = true +texture = ExtResource( 2 ) +offset = Vector2( 0, 0 ) +scale = 1.0 +color = Color( 1, 1, 1, 1 ) +energy = 1.0 +mode = 2 +range/height = 0.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = false +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="light2" type="Light2D" parent="."] + +transform/pos = Vector2( 196.528, 185.139 ) +transform/scale = Vector2( 1.76194, 1.71984 ) +enabled = true +texture = ExtResource( 2 ) +offset = Vector2( 0, 0 ) +scale = 1.0 +color = Color( 1, 1, 1, 1 ) +energy = 1.0 +mode = 2 +range/height = 0.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = false +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="light3" type="Light2D" parent="."] + +transform/pos = Vector2( 442.528, 411.139 ) +transform/scale = Vector2( 1.76194, 1.71984 ) +enabled = true +texture = ExtResource( 2 ) +offset = Vector2( 0, 0 ) +scale = 1.0 +color = Color( 1, 1, 1, 1 ) +energy = 1.0 +mode = 2 +range/height = 0.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = false +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/maskmotion = SubResource( 2 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "maskmotion" + + diff --git a/demos/2d/lights_shadows/engine.cfg b/demos/2d/lights_shadows/engine.cfg index 80142633d3a..51a98eddd70 100644 --- a/demos/2d/lights_shadows/engine.cfg +++ b/demos/2d/lights_shadows/engine.cfg @@ -1,7 +1,7 @@ [application] name="2D Lighting" -main_scene="res://light_shadows.scn" +main_scene="res://light_shadows.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/lights_shadows/light_shadows.scn b/demos/2d/lights_shadows/light_shadows.scn deleted file mode 100644 index 24ccd1e0be6d2fa184b69d3bcda0fbb232cffd09..0000000000000000000000000000000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_L)b_=fJ;a8oVKtfcz%I-`^W@ad$}yJieUaC- z+8?)kk#_GduDglI%c{5)pBFycw{ca*{hE?pN7t-fILF=faW;9vA%bwUSL~iNGEuIz9Asi+tF(?Z3ENzx*^Vi5S0kw7YQm zQ(rbQt)2FN@VMU;qu`Eha^LrR+x|HoPBp~Kj@@8gc<|+G?Tcm8&u!}1exu7bujAr_ z?xWB8yNUVz#J-}#r5|j#mE8VSO}+n$)Nd=>jvrFh%&uQrwj-dqWML4&F2E*vz>Y`b zkMCdCxOL1&UnO`ZACHTadGAsk{(8#JWMb*Gc3mL`ChnR#!p}SW)64B23j+JQq;tY8 zuP@e96P^5_|0Yo|PNNznbu@ z?s#CDbad$^eB-`z*twZ~K-a-r_xfHU8BJ6xdBrUo-dhGe8b$|q(dD#<`yX5o& P)OZ(8E>skvU)%m0nC22- diff --git a/demos/2d/lights_shadows/light_shadows.tscn b/demos/2d/lights_shadows/light_shadows.tscn new file mode 100644 index 00000000000..f31692889e5 --- /dev/null +++ b/demos/2d/lights_shadows/light_shadows.tscn @@ -0,0 +1,326 @@ +[gd_scene load_steps=9 format=1] + +[ext_resource path="res://bg.png" type="Texture" id=1] +[ext_resource path="res://caster.png" type="Texture" id=2] +[ext_resource path="res://light.png" type="Texture" id=3] +[ext_resource path="res://spot.png" type="Texture" id=4] + +[sub_resource type="OccluderPolygon2D" id=1] + +closed = true +cull_mode = 0 +polygon = Vector2Array( -15.913, -15.9738, 15.9079, -16.0785, 15.6986, 15.847, -16.1223, 15.9517 ) + +[sub_resource type="Animation" id=2] + +length = 16.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 4, 8, 12 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ Vector2( 159.289, 452.441 ), Vector2( 132.279, 80.4366 ), Vector2( 700.722, 241.27 ), Vector2( 429.392, 571.532 ) ] } + +[sub_resource type="Animation" id=3] + +length = 16.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 4.1, 8.1, 11.8 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ Vector2( 753.756, 314.336 ), Vector2( 69.7562, 234.336 ), Vector2( 256.756, 575.336 ), Vector2( 516.756, 530.336 ) ] } + +[sub_resource type="Animation" id=4] + +length = 16.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 4.1, 7.9, 12.1 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ Vector2( 692.078, 29.8849 ), Vector2( 309.606, 31.5551 ), Vector2( 40.7064, 238.658 ), Vector2( 685.397, 282.082 ) ] } + +[node name="base" type="Node2D"] + +[node name="ambient" type="CanvasModulate" parent="."] + +color = Color( 0.479177, 0.464761, 0.498946, 1 ) + +[node name="bg" type="Sprite" parent="."] + +transform/pos = Vector2( 401.251, 301.906 ) +transform/scale = Vector2( 6.39454, 4.82665 ) +texture = ExtResource( 1 ) + +[node name="casters" type="Node2D" parent="."] + +[node name="shadow_caster" type="Sprite" parent="casters"] + +transform/pos = Vector2( 95.2909, 85.3186 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster1" type="Sprite" parent="casters"] + +transform/pos = Vector2( 200.291, 313.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster1"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster2" type="Sprite" parent="casters"] + +transform/pos = Vector2( 76.2909, 405.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster2"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster3" type="Sprite" parent="casters"] + +transform/pos = Vector2( 348.291, 206.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster3"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster4" type="Sprite" parent="casters"] + +transform/pos = Vector2( 239.291, 48.3186 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster4"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster5" type="Sprite" parent="casters"] + +transform/pos = Vector2( 140.291, 561.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster5"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster6" type="Sprite" parent="casters"] + +transform/pos = Vector2( 392.291, 499.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster6"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster7" type="Sprite" parent="casters"] + +transform/pos = Vector2( 735.291, 552.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster7"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster8" type="Sprite" parent="casters"] + +transform/pos = Vector2( 661.291, 371.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster8"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster9" type="Sprite" parent="casters"] + +transform/pos = Vector2( 567.291, 574.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster9"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster10" type="Sprite" parent="casters"] + +transform/pos = Vector2( 420.291, 350.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster10"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster11" type="Sprite" parent="casters"] + +transform/pos = Vector2( 463.291, 106.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster11"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster12" type="Sprite" parent="casters"] + +transform/pos = Vector2( 621.291, 78.3186 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster12"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster13" type="Sprite" parent="casters"] + +transform/pos = Vector2( 761.291, 240.319 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster13"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="shadow_caster14" type="Sprite" parent="casters"] + +transform/pos = Vector2( 771.291, 29.3186 ) +texture = ExtResource( 2 ) + +[node name="occluder" type="LightOccluder2D" parent="casters/shadow_caster14"] + +occluder = SubResource( 1 ) +light_mask = 1 + +[node name="red_light" type="Light2D" parent="."] + +transform/pos = Vector2( 159.289, 452.441 ) +enabled = true +texture = ExtResource( 3 ) +offset = Vector2( 0, 0 ) +scale = 1.0 +color = Color( 1, 0.446392, 0.0576646, 1 ) +energy = 1.0 +mode = 0 +range/height = 0.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = true +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="blob" type="Sprite" parent="red_light"] + +visibility/blend_mode = 1 +texture = ExtResource( 4 ) + +[node name="anim" type="AnimationPlayer" parent="red_light"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/motion = SubResource( 2 ) +anims/motion2 = SubResource( 3 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "motion" + +[node name="green_light" type="Light2D" parent="."] + +transform/pos = Vector2( 753.756, 314.336 ) +enabled = true +texture = ExtResource( 3 ) +offset = Vector2( 0, 0 ) +scale = 1.0 +color = Color( 0.49247, 0.878537, 0.409146, 1 ) +energy = 1.0 +mode = 0 +range/height = 0.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = true +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="blob" type="Sprite" parent="green_light"] + +visibility/blend_mode = 1 +texture = ExtResource( 4 ) + +[node name="anim" type="AnimationPlayer" parent="green_light"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/m2 = SubResource( 3 ) +anims/motion = SubResource( 2 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "m2" + +[node name="blue_light" type="Light2D" parent="."] + +transform/pos = Vector2( 692.078, 29.8849 ) +enabled = true +texture = ExtResource( 3 ) +offset = Vector2( 0, 0 ) +scale = 1.0 +color = Color( 0.396752, 0.446392, 0.929792, 1 ) +energy = 1.0 +mode = 0 +range/height = 0.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = true +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="blob" type="Sprite" parent="blue_light"] + +visibility/blend_mode = 1 +texture = ExtResource( 4 ) + +[node name="anim" type="AnimationPlayer" parent="blue_light"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/motion = SubResource( 2 ) +anims/motion2 = SubResource( 3 ) +anims/motion3 = SubResource( 4 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "motion3" + + diff --git a/demos/2d/lookat/engine.cfg b/demos/2d/lookat/engine.cfg index 81df107f0e7..c37f39386e9 100644 --- a/demos/2d/lookat/engine.cfg +++ b/demos/2d/lookat/engine.cfg @@ -1,5 +1,5 @@ [application] name="Look At Pointer" -main_scene="res://lookat.scn" +main_scene="res://lookat.tscn" icon="res://icon.png" diff --git a/demos/2d/lookat/lookat.scn b/demos/2d/lookat/lookat.scn deleted file mode 100644 index 66be060c06da4b69179ad5af44faa1ff394658e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1640 zcmW-ie{2-T702K1-rf5A1H1Ug*$4K`8El`^!eN^v)DZmk_VACYxQ>lgS_C`myYbz| zce}^#o^2cu2MK9QM3W|MTGA3-nx-WRiXgN^v{kr-3Zf>iR7ePcMA;+=LVuv95)mPd z(skyKr=Y8kRcQm78vJ4BO27puojQ9XJfC2}6!N&nd1gIoJ)rgvyV#%=t(;3W{ zlNzTRKp<;j5fK)d%rf$3f<<*T%fL^*CMpwoJ(*!i+Tybkrk1m#1s{DB%1CS3CN^v5 zO$Ifjf?!o|G^(1WF|#tKr$8jNFh=im_?EJaVN9v^%2blRj(_xIjD(sYYxpksl&nH< z#1HT$3J@eq@#o+rBKU}ahj|NHi66UAC~O5w4Pd9JC|PE!ib5au4jW0<9jE2qq-L^& zP2aAxO;xuh4Ko|f85TVccJVx-m^G65jA}D_N8$5Vc-%)?fYA|QEN5z@4ZFpJpDQrx{0?*y6_uQ7r!8n9ix9A18Y-J+rllFW+o?L~1_rR34107XVdTk( zn+qb8f^?(91;Im>U=SY^rd7Ah1BFScNm`42NT7*CsuhJLHQO+iTqd8=bcMXg+sq1g zIzj}$AxOHGrFGICtf5D|nx#!-7(MLP58&4DHka`dE=JLB>1s~NX|pWjcve6yxr+ul z(;z#@EwYDWIeJ=nto)(%cn=D~oME^?!Sz5N*2KE#-E<{Zxl1CUfX%V9w3#zm_z#>m z?RcNY6|`AMnOf5E9N_Aq*yO+guQ54kF}pZdco?dQNY@Ki+L&?tvczahu@|!?z+XyF z@y4W847f%(&J{`+aJb`7`yJ0gX&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 +1,32 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://arrow.png" type="Texture" id=1] +[ext_resource path="res://lookat.gd" type="Script" id=2] + +[node name="lookatscene" type="Node2D"] + +[node name="direct" type="Sprite" parent="."] + +transform/pos = Vector2( 132, 105 ) +texture = ExtResource( 1 ) +modulate = Color( 1, 0.799619, 0.734765, 1 ) +script/script = ExtResource( 2 ) +mode = 0 + +[node name="constant" type="Sprite" parent="."] + +transform/pos = Vector2( 611, 216 ) +texture = ExtResource( 1 ) +modulate = Color( 0.751241, 0.662843, 1, 1 ) +script/script = ExtResource( 2 ) +mode = 1 + +[node name="smooth" type="Sprite" parent="."] + +transform/pos = Vector2( 314, 457 ) +texture = ExtResource( 1 ) +modulate = Color( 0.749446, 1, 0.782884, 1 ) +script/script = ExtResource( 2 ) +mode = 2 + + diff --git a/demos/2d/motion/engine.cfg b/demos/2d/motion/engine.cfg index 6e660572d6f..5395398e162 100644 --- a/demos/2d/motion/engine.cfg +++ b/demos/2d/motion/engine.cfg @@ -1,7 +1,7 @@ [application] name="Motion Test" -main_scene="res://motion.scn" +main_scene="res://motion.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/motion/motion.scn b/demos/2d/motion/motion.scn deleted file mode 100644 index 6e1935667421c81c86210ea8ff48cb0b8bd4e6b7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2738 zcmX9=32+o;7Jfb5N#`Vi+<`Fv%!DKuk_m^2h9j?MVkQBMF^~e5TBmy^J(I4?bPwG< zAql#Sa_cG{;DMH#upo-4tZd3!ww4{px@;k+$RUDabBN^@h=f|TTrKwxJ5{e{{&)QE z`@i|$dw=H=uNTHYxd2D=06yaBw+(;+NHAbaq%yz|7P1JN-5~{gMN0!vt?wpM&d?1fsfAj{Mx)d*>N)E(0dapDABHng}Nl-;Tnm4PQUd_-2mW)Gxb zhE3CAVj63ha!jlxm>%pk+;whqASPQW6PcJq?uJ})w*@XvQB7I5QX6c&@<5_L)d=cJ z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5~T<<>4q- z6CveB<*Ln}cz?v^OE8aaxZqmWS}v%|vRbhgiJ(+0#7=-W&fpF#q-I_q%?v_oHs*}4 zup0MbW|B`-vxz3!umD5N*Y=JjrZVS*1kVh4537~cwhC6G9b0H9!6hlJH6g>Ju|TZ&tXGr6E5>;==NN|YVRXh?fLLdY%jt>H}zYIO+q83 zBOiUHo+*GRX$k97++|=9W<;LOQ2lW4V2Yr`Z zcC5aXZKst141mQkU?6&N<_K|2T5V-mX3B` zc19^q;j-IWn>$H)3grT-(uC9Y!~1#AYV-br!h;p|=XTwHMf&vkNZzyUV_%#< z^}{nwZJDE&a-*})jU@fIn78dKN}m3D;MK3|yXswahjyR1=)1D(iHoPNZpeRkWYLV? z?MLnVZJi5SFK&I`D6ja#m1XsNz8^UjT+X}|_kPmj$n|uz+HL0#cBN!7Qn7P=aS-Z? zv-VYYjn;V%e0E(qIdJ_;v!M2!k+a**4zAB)Je!w~d@_3bmv6rrJ4t5StsfppcW{pK zwBwt)%9blF)88+C??UwD`pIJP@I6o697w-;>H4=l<_E*t5$v3vuJiqnq zTX*db<#eyuIJ08cp@v(><|psv6IJ%dBj+OtY2LO@5C7%iS1)ea*12%{e}D7UOfL4} z(J|}I)j4Ob`^(#&eeI1$-WuEY8GGM@j=-eld3%rTn7sFzFZZX9)^=ZbEGPD)m1)a5 nahCrXUcBp(SEjuCFP79#fVTVEo8R_`j{$Tp>GXEe*XsWOY0O@t diff --git a/demos/2d/motion/motion.tscn b/demos/2d/motion/motion.tscn new file mode 100644 index 00000000000..920ee55423d --- /dev/null +++ b/demos/2d/motion/motion.tscn @@ -0,0 +1,135 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://car.png" type="Texture" id=1] +[ext_resource path="res://motion.gd" type="Script" id=2] + +[sub_resource type="Animation" id=1] + +resource/name = "motion" +length = 5.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 5 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( -113, 154 ), Vector2( 907, 154 ) ] } + +[node name="Node2D" type="Node2D"] + +[node name="idle" type="Node2D" parent="."] + +[node name="car" type="Sprite" parent="idle"] + +transform/pos = Vector2( -113, 154 ) +texture = ExtResource( 1 ) + +[node name="anim" type="AnimationPlayer" parent="idle/car"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/motion = SubResource( 1 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "motion" + +[node name="Label" type="Label" parent="idle"] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 27.0 +margin/top = 80.0 +margin/right = 104.0 +margin/bottom = 93.0 +text = "Idle Process Animation" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="fixed" type="Node2D" parent="."] + +transform/pos = Vector2( 0, 106 ) + +[node name="car" type="Sprite" parent="fixed"] + +transform/pos = Vector2( -113, 154 ) +texture = ExtResource( 1 ) + +[node name="anim" type="AnimationPlayer" parent="fixed/car"] + +playback/process_mode = 0 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/motion = SubResource( 1 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "motion" + +[node name="Label1" type="Label" parent="fixed"] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 27.0 +margin/top = 80.0 +margin/right = 104.0 +margin/bottom = 93.0 +text = "Fixed Process Animation" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="code_idle" type="Node2D" parent="."] + +transform/pos = Vector2( 0, 215 ) + +[node name="car" type="Sprite" parent="code_idle"] + +transform/pos = Vector2( -113, 154 ) +texture = ExtResource( 1 ) +script/script = ExtResource( 2 ) +use_idle = true + +[node name="Label1" type="Label" parent="code_idle"] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 27.0 +margin/top = 80.0 +margin/right = 104.0 +margin/bottom = 93.0 +text = "Idle Process Code" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="code_fixed" type="Node2D" parent="."] + +transform/pos = Vector2( 0, 324 ) + +[node name="car" type="Sprite" parent="code_fixed"] + +transform/pos = Vector2( -113, 154 ) +texture = ExtResource( 1 ) +script/script = ExtResource( 2 ) +use_idle = false + +[node name="Label1" type="Label" parent="code_fixed"] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 27.0 +margin/top = 80.0 +margin/right = 104.0 +margin/bottom = 93.0 +text = "Fixed Process Code" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + + diff --git a/demos/2d/navpoly/engine.cfg b/demos/2d/navpoly/engine.cfg index b7504199154..e9921c4b5b3 100644 --- a/demos/2d/navpoly/engine.cfg +++ b/demos/2d/navpoly/engine.cfg @@ -1,7 +1,7 @@ [application] name="Navigation Polygon (2D)" -main_scene="res://navigation.scn" +main_scene="res://navigation.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/navpoly/navigation.scn b/demos/2d/navpoly/navigation.scn deleted file mode 100644 index c56270bfd3cb2d5ae2d758f7bf1a5c048f220a9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5128 zcmX|F3s_8B`(JaZsivAPGIX(b7wS|L9lF<=S-YDE<(iY((==sNGntu$IEG4fgd9RT zC{YI;w_Nf?hUg~u+!Ds=P$Y3e2z@L6@A=R3>}U3R_iw+y_qx_Q6CHyP82*?6aLEpU zN<#obi~wK&pkV-}MxOx~BnudmER&gHNwPE{Mk19@mPh2gb0)Nm99*CIoiCh~%?V6cTX?`3rL*m@9B0fsSRxoCKB& z{73*SFjtfgXuwR(0|4M*I0cL)?SPnM5m6s3sHq=w(O)s+^wI` zMQRNq4$O3>cD~w%ZumM-`u~=q;A0L{;Fe6(aNC+X5i^8LlU#qInub0i#THL$TJ;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8>}!g#}U ztA9q+1hq#gwjU3xd+=rb&e1-fM~1~ZukBmMdr)h{EjqHNW8;z2dq9;Au#D>lz>wY{ fv#f^s-@5tEQ6?ZFB#JsBq}PGym}nG@{{#Fl@*tMJ diff --git a/demos/2d/navpoly/navigation.tscn b/demos/2d/navpoly/navigation.tscn new file mode 100644 index 00000000000..b28c917be5e --- /dev/null +++ b/demos/2d/navpoly/navigation.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://navigation.gd" type="Script" id=1] +[ext_resource path="res://path.png" type="Texture" id=2] +[ext_resource path="res://agent.png" type="Texture" id=3] + +[sub_resource type="NavigationPolygon" id=1] + +vertices = Vector2Array( 587.833, 271.924, 530.464, 284.878, 508.256, 281.177, 497.153, 255.269, 669.26, 297.833, 648.903, 321.891, 650.754, 251.567, 619.293, 510.654, 676.663, 493.998, 706.272, 501.401, 669.26, 529.16, 602.638, 523.608, 587.833, 179.393, 573.028, 140.53, 645.202, 159.036, 710.106, 179.216, 630.397, 212.704, 597.086, 192.348, 648.903, 394.065, 621.144, 486.596, 618.011, 402.479, 624.926, 359.595, 605.437, 456.366, 598.937, 492.148, 471.244, 251.567, 421.277, 270.074, 428.68, 246.015, 502.704, 97.9661, 517.509, 55.4019, 537.866, 99.8167, 536.016, 175.692, 495.302, 164.588, 487.899, 85.0117, 310.24, 75.7586, 308.39, 92.4142, 345.402, 210.854, 360.207, 223.808, 297.286, 258.97, 288.033, 231.211, 319.493, 190.497, 193.651, 423.675, 245.469, 477.343, 221.41, 488.446, 147.386, 408.87, 182.548, 382.961, 145.584, 224.311, 175.145, 332.995, 202.904, 99.8167, 310.24, 62.8043, 695.169, 303.385, 682.214, 284.878, 524.608, 359.37, 526.762, 342.248, 538.077, 499.891, 571.177, 501.401, 395.879, 501.87, 536.407, 524.944, 371.311, 518.056, 573.028, 94.2648, 582.281, 47.9994, 667.409, 75.7586, 350.954, 447.733, 363.908, 351.501, 384.265, 351.501, 376.862, 418.123, 373.441, 436.494, 424.978, 334.845, 421.277, 360.754, 352.804, 320.04, 321.344, 338.546, 299.136, 283.028, 241.767, 327.443, 234.365, 244.165, 325.228, 486.302, 300.441, 497.494, 317.643, 447.733, 332.441, 457.494, 366.441, 467.494, 480.497, 434.779, 518.035, 461.477, 476.441, 468.494, 265.825, 407.019, 184.398, 349.65, 310.24, 112.771, 267.676, 153.485, 221.41, 171.991, 700.721, 268.223, 397.219, 188.646, 415.725, 177.543, 465.692, 179.393, 476.796, 207.152, 443.485, 192.348, 437.933, 170.14, 452.738, 166.439, 460.14, 123.875, 476.796, 149.783, 189.95, 231.211 ) +polygons = [ IntArray( 0, 1, 2, 3 ), IntArray( 4, 5, 6 ), IntArray( 7, 8, 9, 10, 11 ), IntArray( 12, 13, 14, 15, 16, 17 ), IntArray( 18, 19, 20, 21 ), IntArray( 22, 20, 19, 23 ), IntArray( 24, 3, 2, 25, 26 ), IntArray( 27, 28, 29, 30, 31 ), IntArray( 28, 27, 32 ), IntArray( 33, 28, 32, 34 ), IntArray( 35, 36, 37, 38, 39 ), IntArray( 40, 41, 42, 43 ), IntArray( 44, 40, 43 ), IntArray( 44, 43, 45, 46 ), IntArray( 47, 48, 33, 34 ), IntArray( 49, 9, 8, 4, 50 ), IntArray( 50, 4, 6 ), IntArray( 21, 20, 51, 52 ), IntArray( 53, 22, 23, 54 ), IntArray( 23, 7, 11, 54 ), IntArray( 55, 53, 54, 56, 57 ), IntArray( 14, 58, 59, 60, 15 ), IntArray( 61, 62, 63, 64, 65 ), IntArray( 66, 67, 63, 68 ), IntArray( 68, 63, 62, 69, 70 ), IntArray( 70, 69, 71, 72 ), IntArray( 70, 72, 38, 37 ), IntArray( 73, 55, 57, 74 ), IntArray( 73, 74, 75, 76 ), IntArray( 65, 77, 76, 61 ), IntArray( 78, 2, 1, 52, 51 ), IntArray( 78, 51, 79, 80 ), IntArray( 78, 80, 65, 64 ), IntArray( 81, 61, 76, 75 ), IntArray( 81, 75, 44, 82 ), IntArray( 47, 34, 83, 84, 85 ), IntArray( 15, 86, 50, 6, 16 ), IntArray( 12, 17, 3, 24 ), IntArray( 26, 25, 87, 88 ), IntArray( 89, 31, 30, 90, 91 ), IntArray( 89, 91, 92, 93 ), IntArray( 39, 94, 95, 93, 92 ), IntArray( 39, 92, 88 ), IntArray( 39, 88, 87, 35 ), IntArray( 39, 38, 85, 84 ), IntArray( 45, 47, 85, 96 ), IntArray( 45, 96, 46 ), IntArray( 44, 46, 82 ) ] +outlines = [ Vector2Array( 221.41, 488.446, 147.386, 408.87, 145.584, 224.311, 202.904, 99.8167, 310.24, 62.8043, 310.24, 75.7586, 517.509, 55.4019, 537.866, 99.8167, 536.016, 175.692, 476.796, 207.152, 443.485, 192.348, 437.933, 170.14, 415.725, 177.543, 428.68, 246.015, 471.244, 251.567, 587.833, 179.393, 573.028, 140.53, 645.202, 159.036, 573.028, 94.2648, 582.281, 47.9994, 667.409, 75.7586, 710.106, 179.216, 700.721, 268.223, 682.214, 284.878, 695.169, 303.385, 706.272, 501.401, 669.26, 529.16, 602.638, 523.608, 571.177, 501.401, 536.407, 524.944, 371.311, 518.056, 300.441, 497.494, 317.643, 447.733, 182.548, 382.961, 193.651, 423.675, 245.469, 477.343 ), Vector2Array( 350.954, 447.733, 363.908, 351.501, 321.344, 338.546, 241.767, 327.443, 234.365, 244.165, 288.033, 231.211, 221.41, 171.991, 189.95, 231.211, 175.145, 332.995, 184.398, 349.65, 265.825, 407.019 ), Vector2Array( 267.676, 153.485, 310.24, 112.771, 308.39, 92.4142, 487.899, 85.0117, 502.704, 97.9661, 495.302, 164.588, 465.692, 179.393, 452.738, 166.439, 476.796, 149.783, 460.14, 123.875, 319.493, 190.497 ), Vector2Array( 397.219, 188.646, 345.402, 210.854, 360.207, 223.808, 297.286, 258.97, 299.136, 283.028, 352.804, 320.04, 424.978, 334.845, 421.277, 360.754, 384.265, 351.501, 376.862, 418.123, 480.497, 434.779, 508.256, 281.177, 421.277, 270.074 ), Vector2Array( 497.153, 255.269, 597.086, 192.348, 630.397, 212.704, 650.754, 251.567, 648.903, 321.891, 669.26, 297.833, 676.663, 493.998, 619.293, 510.654, 598.937, 492.148, 621.144, 486.596, 648.903, 394.065, 624.926, 359.595, 526.762, 342.248, 530.464, 284.878, 587.833, 271.924 ), Vector2Array( 325.228, 486.302, 332.441, 457.494, 366.441, 467.494, 373.441, 436.494, 476.441, 468.494, 518.035, 461.477, 524.608, 359.37, 618.011, 402.479, 605.437, 456.366, 538.077, 499.891, 395.879, 501.87 ) ] + +[node name="navigation" type="Navigation2D"] + +script/script = ExtResource( 1 ) + +[node name="path" type="Sprite" parent="."] + +transform/pos = Vector2( 429.585, 287.32 ) +texture = ExtResource( 2 ) + +[node name="navpoly" type="NavigationPolygonInstance" parent="."] + +navpoly = SubResource( 1 ) +enabled = true + +[node name="agent" type="Sprite" parent="."] + +transform/pos = Vector2( 228.464, 132.594 ) +transform/scale = Vector2( 0.5, 0.5 ) +texture = ExtResource( 3 ) +offset = Vector2( 0, -26 ) + + diff --git a/demos/2d/normalmaps/engine.cfg b/demos/2d/normalmaps/engine.cfg index 4f9f4f67f0d..ba5fcca8534 100644 --- a/demos/2d/normalmaps/engine.cfg +++ b/demos/2d/normalmaps/engine.cfg @@ -1,7 +1,7 @@ [application] name="2D Normal Mapping" -main_scene="res://normalmap.scn" +main_scene="res://normalmap.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/normalmaps/normal_material.res b/demos/2d/normalmaps/normal_material.res deleted file mode 100644 index 27928519f8e4656e86ad805a48e2c77ab1564653..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 508 zcmXAmO>YuW7=_FC}_ygLl8&}3PHSS#-H`4gzEY7n#$?0_4ZMvX9^jjnP#fauf7->m{5ra-E z(2H%$n^@uFNVqwkYpEmOp06ltTeQn>gQyIBrW>s9P8Z3*Dx*)+o4j|<8q^h^#T)*JKjeQX zjVH7OeQBtykt@BZ?+-)LQQ*YaX#v@@by1)x3VQ50Lwse3l2bzRgSB#JrxmzX5JDaY z(vI+=9tSlX#u2u6;e@z+ZQ#H5Y6yL}aTvjMl=2m#u@f4(XU{u(ruG!~_)FSI4obEC zgQ}rMhq!@>w0AbPjb^RRQ|T?ESw%f5A~>-3*ax6|&-fBy&cAA=?U diff --git a/demos/2d/normalmaps/normal_material.tres b/demos/2d/normalmaps/normal_material.tres new file mode 100644 index 00000000000..2741fbfe94b --- /dev/null +++ b/demos/2d/normalmaps/normal_material.tres @@ -0,0 +1,14 @@ +[gd_resource type="CanvasItemMaterial" load_steps=3 format=1] + +[ext_resource path="res://normal.jpg" type="Texture" id=1] + +[sub_resource type="CanvasItemShader" id=1] + +_code = { "fragment":"uniform texture normal;\n//normal maps expect Y-up, but 2D is Y-down, so must mirror this.\nNORMAL = tex(normal,UV).rgb * vec3(2.0,-2.0,1.0) - vec3(1.0,-1.0,0.0);", "fragment_ofs":0, "light":"", "light_ofs":0, "vertex":"", "vertex_ofs":0 } + +[resource] + +shader/shader = SubResource( 1 ) +shader/shading_mode = 0 +shader_param/normal = ExtResource( 1 ) + diff --git a/demos/2d/normalmaps/normalmap.scn b/demos/2d/normalmaps/normalmap.scn deleted file mode 100644 index 4501e7116ad6556b77f218340633ba9d5b5b8f9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2829 zcmWkw2~<-@7oL|F2#Y}2WzjbQ6mbCrsS64>B*>z;fVfm3?4J*Z^;==zr=ggd$d*khiTVVdo+Mv*@bjA>~ zHA3)8Ad{OkN;Rvbn~^Jyx0f)QJjRe>oi$R1+v34`D(3# zQR7J7RCGgJg^`7H=Y=5~u>vD-=ZQ5cyn(0EYUp&t$L``taUzkcr9HqAJV=DFSiD_4 z0;%8!p5&E|jyZ4!0)gV^F=`XbxDX!590XHgHE2KpbC5mu5j%nyW&%knv>GEl888TA zGDO>X8iNYTcm^cG(;yThUJF7Nf`m!%1-*teps~n29<+kI$5SN}OM@j~Z#~Vq~d>le9{c8fVbH^4WA4pVcsO zw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+P zeC$UpYS@TZNH=#i9h_`GUjB(xSsqc>x^Kq1{ar`xkdWY0snE}Vbn3q`N3I>2^?p|H z(yjSD>5IGgK~ION-XfpE5vuRXwb+z*=OeJXc4b+32r%Lk%}zZL`0w48NG01k z%{s8`c*Y!Fi{@<4k0aT4hK7!3R0(^}eg5XDCMTY{bMyYOH;Q}#lr_dL$SCm@xR=DF z@P2YT8PQj}^+s-c@w8&B4(XrmVIP8$5p^61!vAjJEj^AN>djn-*US6$EM=KTftxcdW5a{raSj`^2&a_`~F zi9z){A5mpqoqn-3wKIv!FP^^!!I(DNnc@xR0GCD-^Kr+A%ZI5y?T|~{?}txJEb9u5 zXg$nSxMJ(#&u1)6WfB^ufZH%7S$blUUBA5Im%f0l!rdnqmBwamVV6^7A1+3U2+=heb+jUT|dE2 zu3UVeth6`BbmoMY-Yj<;imW z$-c`QyWA@bUl5_sCZ5+0Y+QZqe;roGE zg5xVHz4nw)E;VVV47{}TjJl;c4bM-H-LPuQuHQf8Y$|6~PQ;Agcq(thVZJjUzm+x0 zi;ZpBDa)>mZ2w&lm@^dj^~m4UN|`I_>-01?y|SV;ADjf&3DI50+N^-PPADOEf%I4m RUCRA^lT(r<$te=a{{dntCI0{b diff --git a/demos/2d/normalmaps/normalmap.tscn b/demos/2d/normalmaps/normalmap.tscn new file mode 100644 index 00000000000..c7f8feb0f44 --- /dev/null +++ b/demos/2d/normalmaps/normalmap.tscn @@ -0,0 +1,63 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://normal_material.tres" type="CanvasItemMaterial" id=1] +[ext_resource path="res://diffuse.jpg" type="Texture" id=2] +[ext_resource path="res://light.png" type="Texture" id=3] + +[sub_resource type="Animation" id=1] + +resource/name = "motion" +length = 10.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("light:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2.5, 5, 7.5 ), "transitions":FloatArray( -2, -2, -2, -2 ), "values":[ Vector2( 177.912, 174.508 ), Vector2( 612.159, 161.147 ), Vector2( 667.275, 526.917 ), Vector2( 177.912, 526.917 ) ] } + +[node name="base" type="Node2D"] + +[node name="sprite" type="Sprite" parent="."] + +material/material = ExtResource( 1 ) +transform/pos = Vector2( 400, 300 ) +texture = ExtResource( 2 ) + +[node name="ambient" type="CanvasModulate" parent="."] + +color = Color( 0.0657094, 0.202485, 0.328838, 1 ) + +[node name="light" type="Light2D" parent="."] + +transform/pos = Vector2( 177.912, 174.508 ) +enabled = true +texture = ExtResource( 3 ) +offset = Vector2( 0, 0 ) +scale = 0.8 +color = Color( 1, 1, 1, 1 ) +energy = 1.0 +mode = 0 +range/height = 200.0 +range/z_min = -1024 +range/z_max = 1024 +range/layer_min = 0 +range/layer_max = 0 +range/item_mask = 1 +shadow/enabled = false +shadow/color = Color( 0, 0, 0, 0 ) +shadow/buffer_size = 2048 +shadow/esm_multiplier = 80.0 +shadow/item_mask = 1 + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/motion = SubResource( 1 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "motion" + + diff --git a/demos/2d/particles/engine.cfg b/demos/2d/particles/engine.cfg index b3dd540561e..4b91966d8a7 100644 --- a/demos/2d/particles/engine.cfg +++ b/demos/2d/particles/engine.cfg @@ -1,5 +1,5 @@ [application] name="Particle Systems" -main_scene="res://particles.xml" +main_scene="res://particles.tscn" icon="res://icon.png" diff --git a/demos/2d/particles/particles.tscn b/demos/2d/particles/particles.tscn new file mode 100644 index 00000000000..c9aca0518f4 --- /dev/null +++ b/demos/2d/particles/particles.tscn @@ -0,0 +1,174 @@ +[gd_scene load_steps=8 format=1] + +[ext_resource path="res://fire_particle.png" type="Texture" id=1] +[ext_resource path="res://smoke_particle.png" type="Texture" id=2] +[ext_resource path="res://spark_particle2.png" type="Texture" id=3] + +[sub_resource type="ColorRamp" id=1] + +offsets = FloatArray( 0, 0.1, 1 ) +colors = ColorArray( 1, 1, 1, 0, 0.886275, 0.371681, 0, 1, 1, 0.99115, 1, 0 ) + +[sub_resource type="ColorRamp" id=2] + +offsets = FloatArray( 0, 0.2, 1 ) +colors = ColorArray( 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0 ) + +[sub_resource type="ColorRamp" id=3] + +offsets = FloatArray( 0, 0.1, 0.5, 1 ) +colors = ColorArray( 1, 1, 1, 0.870518, 1, 0.47451, 0.6, 1, 0.529412, 0.74902, 1, 1, 0, 1, 0.698039, 0 ) + +[sub_resource type="ColorRamp" id=4] + +offsets = FloatArray( 0, 0.1, 0.7, 1 ) +colors = ColorArray( 1, 1, 1, 0, 0.886275, 0.401015, 0, 1, 1, 0.679866, 0.432123, 0.12654, 0, 0, 0, 0 ) + +[node name="Node" type="Node"] + +[node name="Fire" type="Particles2D" parent="."] + +visibility/blend_mode = 1 +transform/pos = Vector2( 165.787, 527.801 ) +transform/rot = -179.791 +config/amount = 32 +config/lifetime = 1.0 +config/half_extents = Vector2( 15, 15 ) +config/local_space = false +config/texture = ExtResource( 1 ) +params/direction = 0.0 +params/spread = 0.0 +params/linear_velocity = 20.0 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 180.0 +params/gravity_strength = 80.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 180.0 +params/initial_size = 0.7 +params/final_size = 0.3 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/initial_angle = 2.0 +color/color_ramp = SubResource( 1 ) + +[node name="Smoke" type="Particles2D" parent="."] + +transform/pos = Vector2( 377.396, 543.147 ) +transform/rot = 176.576 +config/amount = 32 +config/lifetime = 4.0 +config/local_space = false +config/texture = ExtResource( 2 ) +params/direction = 0.0 +params/spread = 20.9073 +params/linear_velocity = 47.1515 +params/spin_velocity = 1.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 180.0 +params/initial_size = 1.0 +params/final_size = 3.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/spin_velocity = 1.0 +randomness/initial_angle = 1.0 +color/color_ramp = SubResource( 2 ) + +[node name="Magic" type="Particles2D" parent="."] + +transform/pos = Vector2( 593.848, 531.064 ) +config/amount = 32 +config/lifetime = 2.0 +config/half_extents = Vector2( 40, 40 ) +config/local_space = false +config/texture = ExtResource( 3 ) +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 20.0 +params/spin_velocity = 0.3 +params/orbit_velocity = 0.01 +params/gravity_direction = 0.0 +params/gravity_strength = 9.8 +params/radial_accel = 0.0 +params/tangential_accel = 15.5152 +params/damping = 0.0 +params/initial_angle = 45.0 +params/initial_size = 3.0 +params/final_size = 1.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/spin_velocity = 1.0 +randomness/orbit_velocity = 100.0 +randomness/initial_angle = 1.0 +color/color_ramp = SubResource( 3 ) + +[node name="Explosion" type="Particles2D" parent="."] + +visibility/behind_parent = true +visibility/blend_mode = 1 +transform/pos = Vector2( 613.467, 182.62 ) +transform/rot = -179.791 +config/amount = 32 +config/lifetime = 2.0 +config/time_scale = 2.0 +config/half_extents = Vector2( 15, 15 ) +config/local_space = false +config/explosiveness = 0.05 +config/texture = ExtResource( 2 ) +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 184.547 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 180.0 +params/gravity_strength = 80.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 366.3 +params/initial_angle = 1.0 +params/initial_size = 0.7 +params/final_size = 3.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +color/color_ramp = SubResource( 4 ) + +[node name="Mask" type="Particles2D" parent="."] + +transform/pos = Vector2( 192.975, 141.598 ) +config/amount = 170 +config/lifetime = 0.1 +config/half_extents = Vector2( 128, 128 ) +config/local_space = false +config/texture = ExtResource( 3 ) +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 0.0 +params/spin_velocity = 2.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 1.0 +params/initial_size = 1.0 +params/final_size = 1.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/spin_velocity = 1.0 +color/color = Color( 1, 0.477876, 0.60177, 1 ) +emission_points = Vector2Array( -0.125, -0.03125, 0.65625, -0.148438, 0.609375, 0.0234375, -0.757812, 0.375, 0.265625, 0.078125, 0.632812, 0.382812, 0.671875, 0.414062, 0.367188, -0.226562, 0.75, -0.125, 0.4375, 0.421875, 0.335938, -0.148438, -0.125, 0.257812, -0.171875, 0.359375, -0.601562, -0.265625, 0.375, 0.382812, -0.296875, 0.09375, -0.664062, -0.21875, -0.554688, -0.226562, -0.320312, 0.367188, -0.320312, -0.257812, 0, -0.257812, 0.578125, -0.25, -0.164062, 0.109375, -0.578125, -0.015625, -0.445312, 0, 0.273438, 0.101562, 0.320312, 0.03125, -0.125, 0.0703125, -0.570312, 0.289062, 0.257812, -0.09375, -0.585938, 0.179688, -0.664062, 0.0234375, -0.25, -0.0859375, 0.6875, -0.109375, 0.234375, 0, -0.5, -0.265625, 0.710938, 0.335938, 0.609375, -0.046875, 0.664062, -0.210938, -0.242188, -0.21875, -0.484375, -0.257812, -0.453125, 0.414062, 0.609375, -0.203125, 0.289062, 0.132812, -0.03125, -0.257812, -0.492188, -0.1875, 0.5625, -0.140625, -0.5625, 0.148438, -0.257812, -0.234375, -0.140625, 0.15625, -0.5625, 0.109375, 0.132812, 0.398438, -0.640625, -0.25, -0.585938, 0.304688, -0.328125, -0.257812, 0.226562, 0.148438, -0.546875, 0.210938, 0.625, 0.179688, 0.648438, -0.0078125, 0.367188, 0.328125, 0.265625, 0.0546875, -0.59375, -0.273438, -0.203125, 0.21875, 0.570312, -0.21875, -0.695312, 0.078125, -0.375, 0.03125, -0.164062, 0.0390625, 0.265625, 0.226562, -0.625, -0.109375, 0.203125, -0.132812, -0.671875, 0.328125, 0.625, -0.179688, -0.640625, 0.0859375, 0.65625, 0, -0.242188, 0.414062, 0.242188, 0.25, -0.148438, -0.0625, 0.390625, -0.25, 0.664062, 0.351562, 0.320312, 0.203125, -0.546875, 0.335938, 0.328125, -0.148438, 0.609375, -0.0625, -0.171875, 0.046875, -0.578125, 0.0546875, -0.304688, -0.28125, 0.734375, -0.0546875, 0.679688, 0.390625, -0.460938, 0.0859375, -0.703125, 0.101562, -0.140625, 0.234375, -0.507812, 0.078125, -0.25, 0.304688, -0.046875, 0.359375, 0.1875, 0.0703125, -0.570312, 0.242188, 0.65625, 0.0859375, -0.203125, -0.265625, -0.164062, -0.179688, 0.367188, -0.1875, -0.601562, -0.101562, -0.117188, -0.210938, -0.546875, 0.109375, -0.585938, -0.28125, -0.59375, -0.03125, 0.3125, -0.179688, 0.414062, 0.429688, -0.476562, -0.195312, -0.0703125, -0.21875, -0.5625, 0.304688, -0.609375, 0.226562, 0.429688, 0.429688, 0.203125, 0.242188, 0.078125, 0.367188, 0.242188, 0.03125, 0.601562, -0.0390625, 0.328125, 0.03125, -0.53125, -0.195312, -0.53125, -0.210938, 0.3125, -0.257812, 0.445312, -0.273438, 0.273438, -0.273438, -0.695312, -0.179688, 0.234375, -0.15625, -0.546875, -0.242188, -0.234375, -0.125, 0.734375, -0.226562, 0.367188, -0.234375, -0.15625, 0.046875, -0.445312, -0.226562, 0.625, 0.03125, -0.0859375, 0.210938, -0.648438, 0.296875, 0.335938, -0.109375, 0.625, -0.078125, 0.601562, 0.351562, 0.242188, 0.140625, 0.0234375, -0.273438, -0.679688, -0.109375, 0.640625, 0.15625, 0.171875, 0.0859375, -0.273438, -0.273438, -0.242188, 0.34375, 0.179688, 0.15625, -0.179688, -0.117188, 0.671875, 0.03125, -0.640625, 0.304688, 0.109375, -0.242188, -0.210938, 0.382812, -0.0859375, 0.0078125, -0.695312, 0.078125, 0.296875, 0.320312, 0.304688, -0.226562, 0.257812, -0.0234375, -0.203125, -0.015625, -0.648438, 0.335938, -0.703125, -0.132812, -0.273438, -0.210938, -0.15625, -0.273438, -0.0390625, 0.335938, 0.617188, 0.179688, 0.34375, 0.390625, -0.210938, -0.132812, -0.226562, -0.117188, 0.617188, -0.289062, 0.125, -0.21875, 0.71875, -0.164062, -0.570312, 0.1875, -0.1875, 0.382812, 0.640625, -0.296875, -0.125, 0.109375, 0.671875, 0.289062, -0.515625, 0.382812, 0.359375, -0.179688, 0.726562, -0.226562, 0.25, 0.320312, -0.328125, 0, -0.117188, -0.234375, -0.210938, -0.148438, -0.546875, -0.117188, 0.359375, 0.429688, -0.15625, -0.226562, 0.632812, -0.257812, -0.28125, -0.273438, 0.265625, 0.015625, -0.765625, 0.351562, 0.703125, 0.421875, -0.585938, 0.0078125, 0.28125, 0.109375, 0.304688, 0.171875, 0.65625, 0.421875, 0.078125, 0.382812, 0.179688, 0.25, -0.382812, 0.0703125, 0.585938, -0.140625, -0.109375, 0.382812, -0.59375, -0.09375, 0.4375, 0.398438, -0.132812, 0.0234375, -0.625, 0.0078125, -0.210938, -0.21875, -0.25, 0.257812, 0.257812, 0.398438, 0.625, 0.195312, 0.148438, -0.234375, -0.476562, 0.398438, -0.210938, 0.046875, 0.695312, -0.101562, 0.695312, 0.140625, -0.492188, -0.1875, 0.25, -0.09375, -0.195312, -0.195312, -0.328125, 0.0703125, -0.242188, -0.0625, 0.296875, 0.34375, -0.632812, 0.0078125, -0.265625, 0.09375, 0.421875, -0.203125, 0.171875, 0.03125, -0.09375, -0.0703125, 0.289062, 0.0859375, -0.609375, 0.390625, -0.554688, 0.257812, -0.6875, 0.0078125, 0.304688, 0.414062, 0.226562, 0.390625, -0.21875, -0.28125, 0.265625, 0.320312, -0.671875, 0.234375, -0.210938, 0.03125, 0.679688, -0.0234375, 0.359375, -0.203125, 0.3125, 0.289062, 0.671875, 0.140625, -0.78125, 0.414062, -0.546875, 0.40625, 0.625, 0.367188, 0.0859375, 0.421875, 0.1875, -0.09375, 0.617188, 0.40625, -0.078125, -0.0390625, 0.695312, 0.0859375, -0.6875, -0.265625, 0.421875, -0.265625, 0.601562, -0.0234375, -0.3125, -0.265625, -0.078125, 0.046875, 0.617188, 0.164062, 0.273438, -0.03125, -0.695312, -0.015625, -0.5625, 0.164062, -0.578125, 0.265625, -0.726562, 0.421875, -0.078125, -0.25, -0.171875, 0.171875, -0.234375, -0.0390625, 0.257812, 0.429688, -0.179688, -0.117188, 0.351562, -0.03125, -0.78125, -0.234375, -0.546875, -0.171875, -0.460938, -0.234375, -0.164062, 0.09375, -0.65625, 0.398438, -0.445312, 0.0859375, -0.71875, -0.226562, 0.671875, 0.101562, -0.46875, -0.195312, -0.71875, -0.265625, 0.617188, 0.125, -0.78125, -0.21875, -0.226562, -0.15625, 0.21875, 0.0234375, 0.289062, 0.101562, 0.648438, -0.171875, 0.390625, -0.273438, -0.257812, 0.078125, -0.21875, 0, 0.65625, -0.203125, -0.679688, 0.171875, -0.1875, 0.328125, -0.46875, -0.28125, 0.273438, 0, 0.664062, 0.296875, -0.140625, 0.335938, -0.625, 0.382812, -0.34375, -0.21875, -0.171875, -0.25, -0.546875, -0.117188, -0.117188, -0.203125, -0.1875, 0.351562, -0.585938, -0.109375, -0.203125, -0.0625, -0.570312, 0.03125, -0.5625, -0.109375, 0.601562, -0.195312, 0.3125, 0.140625, -0.101562, 0.25, 0.25, 0.3125, 0.125, -0.203125, -0.09375, -0.140625, -0.242188, 0.414062, 0.664062, -0.0625, -0.21875, -0.078125, 0.6875, -0.210938, -0.140625, 0.015625, -0.632812, -0.25, -0.109375, 0.234375, -0.695312, 0.015625, -0.3125, -0.28125, 0.296875, -0.0234375, 0.296875, 0.203125, -0.125, 0.234375, 0.570312, 0.390625, -0.554688, 0.203125, -0.5625, 0.351562, -0.15625, 0.21875, -0.375, 0.0390625, -0.226562, -0.140625, 0.695312, 0.164062, 0.632812, 0.367188, -0.328125, -0.210938, -0.59375, 0.34375, 0.304688, -0.242188, -0.34375, 0.0703125, -0.679688, -0.179688, 0.664062, 0.101562, 0.34375, 0.171875, -0.695312, -0.078125, -0.242188, -0.0546875, 0.304688, -0.234375, -0.0078125, -0.21875, -0.632812, 0.203125, 0.625, 0.03125, -0.414062, 0.015625, 0.273438, -0.078125, 0.695312, 0.28125, 0.34375, 0.101562, -0.164062, 0.289062, -0.1875, 0.273438, -0.203125, 0.0703125, 0.734375, -0.171875, -0.59375, 0.34375, -0.15625, 0.210938, 0.429688, 0.375, -0.234375, 0.34375, 0.617188, 0.101562, 0.703125, 0, -0.578125, 0.148438, 0.21875, -0.171875, -0.304688, 0.375, -0.65625, -0.09375, -0.101562, 0.25, -0.4375, 0.03125, -0.242188, 0.421875, -0.546875, 0.0625, -0.632812, -0.148438, -0.125, 0.179688, 0.179688, 0.304688, -0.265625, 0.078125, -0.289062, 0.421875, -0.585938, 0.1875, -0.289062, 0.34375, 0.273438, 0.367188, -0.109375, 0.117188, 0.34375, 0.046875, -0.0625, 0.320312, 0.6875, -0.234375, -0.523438, 0.320312, -0.09375, -0.242188, -0.65625, 0.25, -0.609375, -0.117188, -0.140625, 0.140625, 0.28125, -0.09375, -0.625, -0.28125, 0.34375, 0.328125, 0.265625, 0.109375, -0.609375, 0.0078125, -0.078125, -0.234375, -0.289062, -0.203125, 0.289062, 0.289062, -0.0859375, 0.0078125, -0.101562, -0.28125, -0.625, -0.101562, -0.546875, 0.382812, -0.539062, -0.195312, -0.210938, 0.046875, -0.492188, 0.390625, -0.664062, -0.0703125, 0.71875, -0.101562, -0.140625, -0.046875, 0.695312, 0.289062, -0.710938, 0.429688, -0.703125, 0.3125, -0.203125, 0.109375, 0.421875, -0.273438, 0.304688, 0.21875, 0.328125, 0.257812, -0.632812, -0.0703125, 0.320312, -0.140625, 0.265625, -0.203125, -0.109375, -0.179688, 0.25, -0.210938, 0.65625, 0.109375, -0.648438, -0.0625, -0.0859375, 0.375, -0.429688, 0.398438, 0.320312, 0.3125, -0.0703125, 0.265625, 0.648438, 0.0078125, 0.320312, 0.335938, 0.398438, 0.421875, -0.101562, -0.0625, -0.296875, 0.40625, 0.695312, -0.0390625, 0.335938, 0.21875, -0.546875, 0.117188, -0.476562, 0.390625, -0.648438, 0.117188, -0.078125, -0.28125, 0.328125, 0.289062, -0.226562, 0.179688, 0.226562, 0.375, -0.429688, 0.382812, -0.0546875, 0.34375, 0.59375, -0.125, 0.632812, 0.265625, 0.226562, 0.3125, -0.523438, -0.140625, -0.546875, 0.046875, 0.242188, -0.148438, -0.648438, 0.0234375, -0.289062, 0, -0.546875, 0.101562, -0.125, -0.0625, -0.492188, 0.367188, 0.328125, 0.15625, -0.351562, 0.0546875, -0.609375, 0.414062, -0.296875, 0.09375, 0.671875, -0.203125, -0.257812, -0.273438, -0.335938, 0.414062, 0.65625, -0.195312, -0.601562, -0.101562, -0.203125, -0.078125, 0.210938, 0.242188, 0.296875, 0.335938, -0.578125, 0.40625, -0.664062, -0.078125, -0.0859375, 0.390625, 0.171875, 0.304688, -0.6875, 0.390625, -0.554688, 0.0078125, -0.570312, -0.179688, -0.210938, -0.09375, 0.726562, -0.03125, -0.546875, -0.0859375, -0.265625, -0.171875, -0.65625, 0.179688, -0.171875, 0.257812, -0.164062, -0.171875, 0.203125, 0.335938, -0.640625, 0.21875, 0.390625, 0.375, 0.6875, -0.234375, 0.742188, 0.34375, -0.0546875, 0.351562, -0.632812, 0.195312, 0.671875, -0.21875, 0.195312, 0.015625, 0.226562, 0.117188, -0.507812, 0.078125, -0.140625, -0.15625, 0.703125, -0.28125, 0.226562, -0.140625, 0.328125, 0.421875, 0.3125, 0.1875, 0.703125, 0.078125, 0.351562, 0.289062, 0.21875, -0.242188, -0.328125, 0, 0.171875, 0.101562, -0.304688, -0.242188, -0.210938, 0.078125, 0.625, -0.0078125, 0.25, 0.242188, -0.664062, 0.117188, 0.203125, -0.140625, 0.226562, 0.429688, 0.328125, -0.203125, -0.679688, 0.0703125, -0.195312, -0.148438, -0.523438, 0.328125, 0.382812, -0.257812, 0.578125, -0.171875, 0.65625, 0.320312, -0.632812, -0.148438, 0.703125, 0.0703125, -0.53125, 0.398438, -0.414062, 0.03125, -0.0859375, 0.0546875, -0.53125, 0.335938, 0.304688, 0.429688, -0.234375, -0.148438, -0.375, 0.046875, -0.148438, 0.289062, -0.0390625, 0.421875, 0.226562, -0.125, -0.570312, 0.398438, -0.0703125, -0.0234375, 0.257812, -0.132812 ) + + diff --git a/demos/2d/particles/particles.xml b/demos/2d/particles/particles.xml deleted file mode 100644 index c21ccb1f55b..00000000000 --- a/demos/2d/particles/particles.xml +++ /dev/null @@ -1,275 +0,0 @@ - - - - - - - 0, 0.1, 1 - 1, 1, 1, 0, 0.886275, 0.371681, 0, 1, 1, 0.99115, 1, 0 - - - - 0, 0.2, 1 - 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0 - - - - 0, 0.1, 0.5, 1 - 1, 1, 1, 0.870518, 1, 0.47451, 0.6, 1, 0.529412, 0.74902, 1, 1, 0, 1, 0.698039, 0 - - - - 0, 0.1, 0.7, 1 - 1, 1, 1, 0, 0.886275, 0.401015, 0, 1, 1, 0.679866, 0.432123, 0.12654, 0, 0, 0, 0 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "Node" - "__meta__" - "Fire" - "visibility/blend_mode" - "transform/pos" - "transform/rot" - "config/amount" - "config/lifetime" - "config/half_extents" - "config/local_space" - "config/texture" - "params/direction" - "params/spread" - "params/linear_velocity" - "params/spin_velocity" - "params/orbit_velocity" - "params/gravity_direction" - "params/gravity_strength" - "params/radial_accel" - "params/tangential_accel" - "params/damping" - "params/initial_angle" - "params/initial_size" - "params/final_size" - "params/hue_variation" - "params/anim_speed_scale" - "params/anim_initial_pos" - "randomness/initial_angle" - "color/color_ramp" - "Particles2D" - "Smoke" - "randomness/spin_velocity" - "Magic" - "randomness/orbit_velocity" - "Explosion" - "visibility/behind_parent" - "config/time_scale" - "config/explosiveness" - "Mask" - "color/color" - "emission_points" - - "node_count" - 6 - "node_paths" - - - "nodes" - -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 29, 2, -1, 26, 3, 1, 4, 2, 5, 3, 6, 4, 7, 5, 8, 6, 9, 7, 10, 8, 11, 9, 12, 9, 13, 10, 14, 9, 15, 9, 16, 11, 17, 12, 18, 9, 19, 9, 20, 9, 21, 11, 22, 13, 23, 14, 24, 9, 25, 5, 26, 9, 27, 15, 28, 16, 0, 0, 0, 29, 30, -1, 25, 4, 17, 5, 18, 6, 4, 7, 19, 9, 7, 10, 20, 11, 9, 12, 21, 13, 22, 14, 5, 15, 9, 16, 9, 17, 9, 18, 9, 19, 9, 20, 9, 21, 11, 22, 5, 23, 23, 24, 9, 25, 5, 26, 9, 31, 5, 27, 5, 28, 24, 0, 0, 0, 29, 32, -1, 26, 4, 25, 6, 4, 7, 15, 8, 26, 9, 7, 10, 27, 11, 9, 12, 11, 13, 10, 14, 14, 15, 28, 16, 9, 17, 29, 18, 9, 19, 30, 20, 9, 21, 31, 22, 23, 23, 5, 24, 9, 25, 5, 26, 9, 31, 5, 33, 32, 27, 5, 28, 33, 0, 0, 0, 29, 34, -1, 28, 35, 34, 3, 1, 4, 35, 5, 3, 6, 4, 7, 15, 36, 15, 8, 6, 9, 7, 37, 36, 10, 20, 11, 9, 12, 11, 13, 37, 14, 9, 15, 9, 16, 11, 17, 12, 18, 9, 19, 9, 20, 38, 21, 5, 22, 13, 23, 23, 24, 9, 25, 5, 26, 9, 28, 39, 0, 0, 0, 29, 38, -1, 25, 4, 40, 6, 41, 7, 42, 8, 43, 9, 7, 10, 27, 11, 9, 12, 11, 13, 9, 14, 15, 15, 9, 16, 9, 17, 9, 18, 9, 19, 9, 20, 9, 21, 5, 22, 5, 23, 5, 24, 9, 25, 5, 26, 9, 31, 5, 39, 44, 40, 45, 0 - "variants" - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -193.367, -465.428 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 0.440127 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 1 - 165.787, 527.801 - -179.790649 - 32 - 1 - 15, 15 - False - - 0 - 20 - 180 - 80 - 0.7 - 0.3 - 2 - - 377.396, 543.147 - 176.575912 - 4 - - 20.907272 - 47.151516 - 3 - - 593.848, 531.064 - 40, 40 - - 0.01 - 9.8 - 15.515152 - 45 - 100 - - True - 613.467, 182.62 - 0.05 - 184.546997 - 366.300415 - - 192.975, 141.598 - 170 - 0.1 - 128, 128 - 1, 0.477876, 0.60177, 1 - -0.125, -0.03125, 0.65625, -0.148438, 0.609375, 0.0234375, -0.757812, 0.375, 0.265625, 0.078125, 0.632812, 0.382812, 0.671875, 0.414062, 0.367188, -0.226562, 0.75, -0.125, 0.4375, 0.421875, 0.335938, -0.148438, -0.125, 0.257812, -0.171875, 0.359375, -0.601562, -0.265625, 0.375, 0.382812, -0.296875, 0.09375, -0.664062, -0.21875, -0.554688, -0.226562, -0.320312, 0.367188, -0.320312, -0.257812, 0, -0.257812, 0.578125, -0.25, -0.164062, 0.109375, -0.578125, -0.015625, -0.445312, 0, 0.273438, 0.101562, 0.320312, 0.03125, -0.125, 0.0703125, -0.570312, 0.289062, 0.257812, -0.09375, -0.585938, 0.179688, -0.664062, 0.0234375, -0.25, -0.0859375, 0.6875, -0.109375, 0.234375, 0, -0.5, -0.265625, 0.710938, 0.335938, 0.609375, -0.046875, 0.664062, -0.210938, -0.242188, -0.21875, -0.484375, -0.257812, -0.453125, 0.414062, 0.609375, -0.203125, 0.289062, 0.132812, -0.03125, -0.257812, -0.492188, -0.1875, 0.5625, -0.140625, -0.5625, 0.148438, -0.257812, -0.234375, -0.140625, 0.15625, -0.5625, 0.109375, 0.132812, 0.398438, -0.640625, -0.25, -0.585938, 0.304688, -0.328125, -0.257812, 0.226562, 0.148438, -0.546875, 0.210938, 0.625, 0.179688, 0.648438, -0.0078125, 0.367188, 0.328125, 0.265625, 0.0546875, -0.59375, -0.273438, -0.203125, 0.21875, 0.570312, -0.21875, -0.695312, 0.078125, -0.375, 0.03125, -0.164062, 0.0390625, 0.265625, 0.226562, -0.625, -0.109375, 0.203125, -0.132812, -0.671875, 0.328125, 0.625, -0.179688, -0.640625, 0.0859375, 0.65625, 0, -0.242188, 0.414062, 0.242188, 0.25, -0.148438, -0.0625, 0.390625, -0.25, 0.664062, 0.351562, 0.320312, 0.203125, -0.546875, 0.335938, 0.328125, -0.148438, 0.609375, -0.0625, -0.171875, 0.046875, -0.578125, 0.0546875, -0.304688, -0.28125, 0.734375, -0.0546875, 0.679688, 0.390625, -0.460938, 0.0859375, -0.703125, 0.101562, -0.140625, 0.234375, -0.507812, 0.078125, -0.25, 0.304688, -0.046875, 0.359375, 0.1875, 0.0703125, -0.570312, 0.242188, 0.65625, 0.0859375, -0.203125, -0.265625, -0.164062, -0.179688, 0.367188, -0.1875, -0.601562, -0.101562, -0.117188, -0.210938, -0.546875, 0.109375, -0.585938, -0.28125, -0.59375, -0.03125, 0.3125, -0.179688, 0.414062, 0.429688, -0.476562, -0.195312, -0.0703125, -0.21875, -0.5625, 0.304688, -0.609375, 0.226562, 0.429688, 0.429688, 0.203125, 0.242188, 0.078125, 0.367188, 0.242188, 0.03125, 0.601562, -0.0390625, 0.328125, 0.03125, -0.53125, -0.195312, -0.53125, -0.210938, 0.3125, -0.257812, 0.445312, -0.273438, 0.273438, -0.273438, -0.695312, -0.179688, 0.234375, -0.15625, -0.546875, -0.242188, -0.234375, -0.125, 0.734375, -0.226562, 0.367188, -0.234375, -0.15625, 0.046875, -0.445312, -0.226562, 0.625, 0.03125, -0.0859375, 0.210938, -0.648438, 0.296875, 0.335938, -0.109375, 0.625, -0.078125, 0.601562, 0.351562, 0.242188, 0.140625, 0.0234375, -0.273438, -0.679688, -0.109375, 0.640625, 0.15625, 0.171875, 0.0859375, -0.273438, -0.273438, -0.242188, 0.34375, 0.179688, 0.15625, -0.179688, -0.117188, 0.671875, 0.03125, -0.640625, 0.304688, 0.109375, -0.242188, -0.210938, 0.382812, -0.0859375, 0.0078125, -0.695312, 0.078125, 0.296875, 0.320312, 0.304688, -0.226562, 0.257812, -0.0234375, -0.203125, -0.015625, -0.648438, 0.335938, -0.703125, -0.132812, -0.273438, -0.210938, -0.15625, -0.273438, -0.0390625, 0.335938, 0.617188, 0.179688, 0.34375, 0.390625, -0.210938, -0.132812, -0.226562, -0.117188, 0.617188, -0.289062, 0.125, -0.21875, 0.71875, -0.164062, -0.570312, 0.1875, -0.1875, 0.382812, 0.640625, -0.296875, -0.125, 0.109375, 0.671875, 0.289062, -0.515625, 0.382812, 0.359375, -0.179688, 0.726562, -0.226562, 0.25, 0.320312, -0.328125, 0, -0.117188, -0.234375, -0.210938, -0.148438, -0.546875, -0.117188, 0.359375, 0.429688, -0.15625, -0.226562, 0.632812, -0.257812, -0.28125, -0.273438, 0.265625, 0.015625, -0.765625, 0.351562, 0.703125, 0.421875, -0.585938, 0.0078125, 0.28125, 0.109375, 0.304688, 0.171875, 0.65625, 0.421875, 0.078125, 0.382812, 0.179688, 0.25, -0.382812, 0.0703125, 0.585938, -0.140625, -0.109375, 0.382812, -0.59375, -0.09375, 0.4375, 0.398438, -0.132812, 0.0234375, -0.625, 0.0078125, -0.210938, -0.21875, -0.25, 0.257812, 0.257812, 0.398438, 0.625, 0.195312, 0.148438, -0.234375, -0.476562, 0.398438, -0.210938, 0.046875, 0.695312, -0.101562, 0.695312, 0.140625, -0.492188, -0.1875, 0.25, -0.09375, -0.195312, -0.195312, -0.328125, 0.0703125, -0.242188, -0.0625, 0.296875, 0.34375, -0.632812, 0.0078125, -0.265625, 0.09375, 0.421875, -0.203125, 0.171875, 0.03125, -0.09375, -0.0703125, 0.289062, 0.0859375, -0.609375, 0.390625, -0.554688, 0.257812, -0.6875, 0.0078125, 0.304688, 0.414062, 0.226562, 0.390625, -0.21875, -0.28125, 0.265625, 0.320312, -0.671875, 0.234375, -0.210938, 0.03125, 0.679688, -0.0234375, 0.359375, -0.203125, 0.3125, 0.289062, 0.671875, 0.140625, -0.78125, 0.414062, -0.546875, 0.40625, 0.625, 0.367188, 0.0859375, 0.421875, 0.1875, -0.09375, 0.617188, 0.40625, -0.078125, -0.0390625, 0.695312, 0.0859375, -0.6875, -0.265625, 0.421875, -0.265625, 0.601562, -0.0234375, -0.3125, -0.265625, -0.078125, 0.046875, 0.617188, 0.164062, 0.273438, -0.03125, -0.695312, -0.015625, -0.5625, 0.164062, -0.578125, 0.265625, -0.726562, 0.421875, -0.078125, -0.25, -0.171875, 0.171875, -0.234375, -0.0390625, 0.257812, 0.429688, -0.179688, -0.117188, 0.351562, -0.03125, -0.78125, -0.234375, -0.546875, -0.171875, -0.460938, -0.234375, -0.164062, 0.09375, -0.65625, 0.398438, -0.445312, 0.0859375, -0.71875, -0.226562, 0.671875, 0.101562, -0.46875, -0.195312, -0.71875, -0.265625, 0.617188, 0.125, -0.78125, -0.21875, -0.226562, -0.15625, 0.21875, 0.0234375, 0.289062, 0.101562, 0.648438, -0.171875, 0.390625, -0.273438, -0.257812, 0.078125, -0.21875, 0, 0.65625, -0.203125, -0.679688, 0.171875, -0.1875, 0.328125, -0.46875, -0.28125, 0.273438, 0, 0.664062, 0.296875, -0.140625, 0.335938, -0.625, 0.382812, -0.34375, -0.21875, -0.171875, -0.25, -0.546875, -0.117188, -0.117188, -0.203125, -0.1875, 0.351562, -0.585938, -0.109375, -0.203125, -0.0625, -0.570312, 0.03125, -0.5625, -0.109375, 0.601562, -0.195312, 0.3125, 0.140625, -0.101562, 0.25, 0.25, 0.3125, 0.125, -0.203125, -0.09375, -0.140625, -0.242188, 0.414062, 0.664062, -0.0625, -0.21875, -0.078125, 0.6875, -0.210938, -0.140625, 0.015625, -0.632812, -0.25, -0.109375, 0.234375, -0.695312, 0.015625, -0.3125, -0.28125, 0.296875, -0.0234375, 0.296875, 0.203125, -0.125, 0.234375, 0.570312, 0.390625, -0.554688, 0.203125, -0.5625, 0.351562, -0.15625, 0.21875, -0.375, 0.0390625, -0.226562, -0.140625, 0.695312, 0.164062, 0.632812, 0.367188, -0.328125, -0.210938, -0.59375, 0.34375, 0.304688, -0.242188, -0.34375, 0.0703125, -0.679688, -0.179688, 0.664062, 0.101562, 0.34375, 0.171875, -0.695312, -0.078125, -0.242188, -0.0546875, 0.304688, -0.234375, -0.0078125, -0.21875, -0.632812, 0.203125, 0.625, 0.03125, -0.414062, 0.015625, 0.273438, -0.078125, 0.695312, 0.28125, 0.34375, 0.101562, -0.164062, 0.289062, -0.1875, 0.273438, -0.203125, 0.0703125, 0.734375, -0.171875, -0.59375, 0.34375, -0.15625, 0.210938, 0.429688, 0.375, -0.234375, 0.34375, 0.617188, 0.101562, 0.703125, 0, -0.578125, 0.148438, 0.21875, -0.171875, -0.304688, 0.375, -0.65625, -0.09375, -0.101562, 0.25, -0.4375, 0.03125, -0.242188, 0.421875, -0.546875, 0.0625, -0.632812, -0.148438, -0.125, 0.179688, 0.179688, 0.304688, -0.265625, 0.078125, -0.289062, 0.421875, -0.585938, 0.1875, -0.289062, 0.34375, 0.273438, 0.367188, -0.109375, 0.117188, 0.34375, 0.046875, -0.0625, 0.320312, 0.6875, -0.234375, -0.523438, 0.320312, -0.09375, -0.242188, -0.65625, 0.25, -0.609375, -0.117188, -0.140625, 0.140625, 0.28125, -0.09375, -0.625, -0.28125, 0.34375, 0.328125, 0.265625, 0.109375, -0.609375, 0.0078125, -0.078125, -0.234375, -0.289062, -0.203125, 0.289062, 0.289062, -0.0859375, 0.0078125, -0.101562, -0.28125, -0.625, -0.101562, -0.546875, 0.382812, -0.539062, -0.195312, -0.210938, 0.046875, -0.492188, 0.390625, -0.664062, -0.0703125, 0.71875, -0.101562, -0.140625, -0.046875, 0.695312, 0.289062, -0.710938, 0.429688, -0.703125, 0.3125, -0.203125, 0.109375, 0.421875, -0.273438, 0.304688, 0.21875, 0.328125, 0.257812, -0.632812, -0.0703125, 0.320312, -0.140625, 0.265625, -0.203125, -0.109375, -0.179688, 0.25, -0.210938, 0.65625, 0.109375, -0.648438, -0.0625, -0.0859375, 0.375, -0.429688, 0.398438, 0.320312, 0.3125, -0.0703125, 0.265625, 0.648438, 0.0078125, 0.320312, 0.335938, 0.398438, 0.421875, -0.101562, -0.0625, -0.296875, 0.40625, 0.695312, -0.0390625, 0.335938, 0.21875, -0.546875, 0.117188, -0.476562, 0.390625, -0.648438, 0.117188, -0.078125, -0.28125, 0.328125, 0.289062, -0.226562, 0.179688, 0.226562, 0.375, -0.429688, 0.382812, -0.0546875, 0.34375, 0.59375, -0.125, 0.632812, 0.265625, 0.226562, 0.3125, -0.523438, -0.140625, -0.546875, 0.046875, 0.242188, -0.148438, -0.648438, 0.0234375, -0.289062, 0, -0.546875, 0.101562, -0.125, -0.0625, -0.492188, 0.367188, 0.328125, 0.15625, -0.351562, 0.0546875, -0.609375, 0.414062, -0.296875, 0.09375, 0.671875, -0.203125, -0.257812, -0.273438, -0.335938, 0.414062, 0.65625, -0.195312, -0.601562, -0.101562, -0.203125, -0.078125, 0.210938, 0.242188, 0.296875, 0.335938, -0.578125, 0.40625, -0.664062, -0.078125, -0.0859375, 0.390625, 0.171875, 0.304688, -0.6875, 0.390625, -0.554688, 0.0078125, -0.570312, -0.179688, -0.210938, -0.09375, 0.726562, -0.03125, -0.546875, -0.0859375, -0.265625, -0.171875, -0.65625, 0.179688, -0.171875, 0.257812, -0.164062, -0.171875, 0.203125, 0.335938, -0.640625, 0.21875, 0.390625, 0.375, 0.6875, -0.234375, 0.742188, 0.34375, -0.0546875, 0.351562, -0.632812, 0.195312, 0.671875, -0.21875, 0.195312, 0.015625, 0.226562, 0.117188, -0.507812, 0.078125, -0.140625, -0.15625, 0.703125, -0.28125, 0.226562, -0.140625, 0.328125, 0.421875, 0.3125, 0.1875, 0.703125, 0.078125, 0.351562, 0.289062, 0.21875, -0.242188, -0.328125, 0, 0.171875, 0.101562, -0.304688, -0.242188, -0.210938, 0.078125, 0.625, -0.0078125, 0.25, 0.242188, -0.664062, 0.117188, 0.203125, -0.140625, 0.226562, 0.429688, 0.328125, -0.203125, -0.679688, 0.0703125, -0.195312, -0.148438, -0.523438, 0.328125, 0.382812, -0.257812, 0.578125, -0.171875, 0.65625, 0.320312, -0.632812, -0.148438, 0.703125, 0.0703125, -0.53125, 0.398438, -0.414062, 0.03125, -0.0859375, 0.0546875, -0.53125, 0.335938, 0.304688, 0.429688, -0.234375, -0.148438, -0.375, 0.046875, -0.148438, 0.289062, -0.0390625, 0.421875, 0.226562, -0.125, -0.570312, 0.398438, -0.0703125, -0.0234375, 0.257812, -0.132812 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/bullet.tscn b/demos/2d/platformer/bullet.tscn new file mode 100644 index 00000000000..78f566c3b39 --- /dev/null +++ b/demos/2d/platformer/bullet.tscn @@ -0,0 +1,115 @@ +[gd_scene load_steps=6 format=1] + +[ext_resource path="res://bullet.gd" type="Script" id=1] +[ext_resource path="res://bullet.png" type="Texture" id=2] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 10.0 + +[sub_resource type="ColorRamp" id=2] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 1, 1, 1, 1, 0, 0, 0 ) + +[sub_resource type="Animation" id=3] + +length = 1.5 +loop = false +step = 0.0 +tracks/0/type = "value" +tracks/0/path = NodePath("particles:config/emitting") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] } +tracks/1/type = "value" +tracks/1/path = NodePath("sprite:visibility/self_opacity") +tracks/1/interp = 1 +tracks/1/keys = { "cont":true, "times":FloatArray( 0, 1.00394 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/2/type = "method" +tracks/2/path = NodePath(".") +tracks/2/interp = 1 +tracks/2/keys = { "times":FloatArray( 1.31 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } + +[node name="bullet" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +script/script = ExtResource( 1 ) + +[node name="particles" type="Particles2D" parent="."] + +visibility/opacity = 0.559322 +visibility/blend_mode = 1 +config/amount = 24 +config/lifetime = 0.1 +config/local_space = false +config/texture = ExtResource( 2 ) +params/direction = 0.0 +params/spread = 10.0 +params/linear_velocity = 0.0 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 1.0 +params/final_size = 0.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +color/color_ramp = SubResource( 2 ) + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="Timer" type="Timer" parent="."] + +process_mode = 1 +wait_time = 1.0 +one_shot = true +autostart = false + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = 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/demos/2d/platformer/bullet.xml b/demos/2d/platformer/bullet.xml deleted file mode 100644 index 63938581ad7..00000000000 --- a/demos/2d/platformer/bullet.xml +++ /dev/null @@ -1,333 +0,0 @@ - - - - - - 0 - 10 - - - - 0, 1 - 1, 1, 1, 1, 1, 0, 0, 0 - - - - "shutdown" - 1.5 - False - 0 - "value" - "particles:config/emitting" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - False - - - "value" - "sprite:visibility/self_opacity" - 1 - - "cont" - True - "times" - 0, 1.00394 - "transitions" - 1, 1 - "values" - - 1 - 0 - - - "method" - "." - 1 - - "times" - 1.31 - "transitions" - 1 - "values" - - - "args" - - - "method" - "queue_free" - - - - - - - - "conn_count" - 1 - "conns" - 4, 0, 73, 72, 2, 0 - "editable_instances" - - - "names" - - "bullet" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "script/script" - "__meta__" - "RigidBody2D" - "particles" - "visibility/opacity" - "visibility/blend_mode" - "config/amount" - "config/lifetime" - "config/local_space" - "config/texture" - "params/direction" - "params/spread" - "params/linear_velocity" - "params/spin_velocity" - "params/orbit_velocity" - "params/gravity_direction" - "params/gravity_strength" - "params/radial_accel" - "params/tangential_accel" - "params/damping" - "params/initial_angle" - "params/initial_size" - "params/final_size" - "params/hue_variation" - "params/anim_speed_scale" - "params/anim_initial_pos" - "color/color_ramp" - "Particles2D" - "sprite" - "texture" - "Sprite" - "CollisionShape2D" - "shape" - "trigger" - "_update_shape_index" - "Timer" - "process_mode" - "wait_time" - "one_shot" - "autostart" - "anim" - "playback/process_mode" - "playback/default_blend_time" - "root/root" - "anims/shutdown" - "playback/active" - "playback/speed" - "blend_times" - "autoplay" - "AnimationPlayer" - "disable" - "timeout" - - "node_count" - 6 - "node_paths" - - - "nodes" - -1, -1, 24, 0, -1, 23, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 5, 10, 6, 11, 5, 12, 0, 13, 7, 14, 4, 15, 0, 16, 0, 17, 8, 18, 9, 19, 6, 20, 10, 21, 10, 22, 11, 23, 12, 0, 0, 0, 49, 25, -1, 23, 26, 13, 27, 3, 28, 14, 29, 15, 30, 0, 31, 16, 32, 6, 33, 17, 34, 6, 35, 6, 36, 6, 37, 6, 38, 6, 39, 6, 40, 6, 41, 6, 42, 6, 43, 5, 44, 6, 45, 6, 46, 5, 47, 6, 48, 18, 0, 0, 0, 52, 50, -1, 1, 51, 16, 0, 0, 0, 53, 53, -1, 3, 54, 1, 55, 0, 56, 19, 0, 0, 0, 57, 57, -1, 4, 58, 3, 59, 5, 60, 8, 61, 0, 0, 0, 0, 71, 62, -1, 8, 63, 3, 64, 6, 65, 20, 66, 21, 67, 8, 68, 5, 69, 22, 70, 23, 0 - "variants" - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0 - 1 - 0 - 2 - True - 0, 0 - -1 - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -74.7573, -35.9676 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 3.424785 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 0.559322 - 24 - 0.1 - - 10 - - -1 - ".." - - - - "" - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/coin.tscn b/demos/2d/platformer/coin.tscn new file mode 100644 index 00000000000..76730c83d44 --- /dev/null +++ b/demos/2d/platformer/coin.tscn @@ -0,0 +1,146 @@ +[gd_scene load_steps=10 format=1] + +[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="Sample" id=3] +[ext_resource path="res://bullet.png" type="Texture" id=4] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 10.0 + +[sub_resource type="Animation" id=2] + +resource/name = "spin" +length = 1.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 2, 1, 0 ] } + +[sub_resource type="Animation" id=3] + +length = 8.0 +loop = false +step = 0.0 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 0 ] } +tracks/1/type = "value" +tracks/1/path = NodePath("sound:play/play") +tracks/1/interp = 1 +tracks/1/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ "coin" ] } +tracks/2/type = "value" +tracks/2/path = NodePath("particles:visibility/self_opacity") +tracks/2/interp = 1 +tracks/2/keys = { "cont":true, "times":FloatArray( 0, 1.66 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/3/type = "value" +tracks/3/path = NodePath("sprite:visibility/self_opacity") +tracks/3/interp = 1 +tracks/3/keys = { "cont":true, "times":FloatArray( 0, 0.4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/4/type = "value" +tracks/4/path = NodePath("particles:config/emitting") +tracks/4/interp = 1 +tracks/4/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ true ] } +tracks/5/type = "method" +tracks/5/path = NodePath(".") +tracks/5/interp = 1 +tracks/5/keys = { "times":FloatArray( 2.7 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } + +[sub_resource type="SampleLibrary" id=4] + +samples/coin = { "db":0.0, "pitch":1.0, "sample":ExtResource( 3 ) } + +[sub_resource type="ColorRamp" id=5] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 1, 1, 1, 0, 0, 0, 1 ) + +[node name="coin" type="Area2D"] + +input/pickable = true +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +script/script = ExtResource( 1 ) + +[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/root = NodePath("..") +anims/spin = SubResource( 2 ) +anims/taken = SubResource( 3 ) +playback/active = true +playback/speed = 3.0 +blend_times = [ ] +autoplay = "spin" + +[node name="collision" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="sound" type="SamplePlayer2D" parent="."] + +params/volume_db = 0.0 +params/pitch_scale = 1.0 +params/attenuation/min_distance = 1.0 +params/attenuation/max_distance = 2048.0 +params/attenuation/distance_exp = 1.0 +config/polyphony = 1 +config/samples = SubResource( 4 ) +config/pitch_random = 0.0 + +[node name="particles" type="Particles2D" parent="."] + +visibility/blend_mode = 1 +config/amount = 8 +config/lifetime = 0.4 +config/emitting = false +config/half_extents = Vector2( 5, 5 ) +config/texture = ExtResource( 4 ) +params/direction = 0.0 +params/spread = 10.0 +params/linear_velocity = 0.0 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 0.2 +params/final_size = 0.2 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +color/color_ramp = SubResource( 5 ) + +[node name="enabler" type="VisibilityEnabler2D" parent="."] + +rect = Rect2( -10, -10, 20, 20 ) +enabler/pause_animations = true +enabler/freeze_bodies = true +enabler/pause_particles = true +enabler/process_parent = false +enabler/fixed_process_parent = false + +[connection signal="body_enter" from="." to="." method="_on_body_enter"] + + diff --git a/demos/2d/platformer/coin.xml b/demos/2d/platformer/coin.xml deleted file mode 100644 index f33a63bd57f..00000000000 --- a/demos/2d/platformer/coin.xml +++ /dev/null @@ -1,430 +0,0 @@ - - - - - - - - 0 - 10 - - - - "taken" - 8 - False - 0 - "value" - "sprite:frame" - 1 - - "cont" - True - "times" - 0 - "transitions" - 1 - "values" - - 0 - - - "value" - "sound:play/play" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - "coin" - - - "value" - "particles:visibility/self_opacity" - 1 - - "cont" - True - "times" - 0, 1.66 - "transitions" - 1, 1 - "values" - - 1 - 0 - - - "value" - "sprite:visibility/self_opacity" - 1 - - "cont" - True - "times" - 0, 0.4 - "transitions" - 1, 1 - "values" - - 1 - 0 - - - "value" - "particles:config/emitting" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - True - - - "method" - "." - 1 - - "times" - 2.7 - "transitions" - 1 - "values" - - - "args" - - - "method" - "queue_free" - - - - - - - "spin" - 1.5 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 - "transitions" - 1, 1, 1, 1, 1, 1, 1 - "values" - - 0 - 1 - 2 - 3 - 2 - 1 - 0 - - - - - - - "db" - 0 - "pitch" - 1 - "sample" - - - - - - 0, 1 - 1, 1, 1, 1, 0, 0, 0, 1 - - - - - "conn_count" - 1 - "conns" - 0, 0, 76, 75, 2, 0 - "editable_instances" - - - "names" - - "coin" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "gravity_vec" - "gravity" - "linear_damp" - "angular_damp" - "script/script" - "__meta__" - "Area2D" - "sprite" - "texture" - "hframes" - "Sprite" - "anim" - "playback/process_mode" - "playback/default_blend_time" - "root/root" - "anims/taken" - "anims/spin" - "playback/active" - "playback/speed" - "blend_times" - "autoplay" - "AnimationPlayer" - "collision" - "shape" - "trigger" - "_update_shape_index" - "CollisionShape2D" - "sound" - "params/volume_db" - "params/pitch_scale" - "params/attenuation/min_distance" - "params/attenuation/max_distance" - "params/attenuation/distance_exp" - "config/polyphony" - "config/samples" - "config/pitch_random" - "SamplePlayer2D" - "particles" - "visibility/blend_mode" - "config/amount" - "config/lifetime" - "config/emitting" - "config/half_extents" - "config/texture" - "params/direction" - "params/spread" - "params/linear_velocity" - "params/spin_velocity" - "params/orbit_velocity" - "params/gravity_direction" - "params/gravity_strength" - "params/radial_accel" - "params/tangential_accel" - "params/damping" - "params/initial_angle" - "params/initial_size" - "params/final_size" - "params/hue_variation" - "params/anim_speed_scale" - "params/anim_initial_pos" - "color/color_ramp" - "Particles2D" - "enabler" - "rect" - "enabler/pause_animations" - "enabler/freeze_bodies" - "enabler/pause_particles" - "enabler/process_parent" - "enabler/fixed_process_parent" - "VisibilityEnabler2D" - "_on_body_enter" - "body_enter" - - "node_count" - 7 - "node_paths" - - - "nodes" - -1, -1, 11, 0, -1, 10, 1, 0, 2, 1, 3, 2, 4, 3, 5, 4, 6, 5, 7, 6, 8, 7, 9, 8, 10, 9, 0, 0, 0, 15, 12, -1, 2, 13, 10, 14, 11, 0, 0, 0, 26, 16, -1, 9, 17, 12, 18, 13, 19, 14, 20, 15, 21, 16, 22, 0, 23, 17, 24, 18, 25, 19, 0, 0, 0, 31, 27, -1, 3, 28, 1, 29, 3, 30, 20, 0, 0, 0, 41, 32, -1, 8, 33, 13, 34, 7, 35, 7, 36, 21, 37, 7, 38, 12, 39, 22, 40, 13, 0, 0, 0, 66, 42, -1, 23, 43, 12, 44, 23, 45, 24, 46, 3, 47, 25, 48, 26, 49, 13, 50, 27, 51, 13, 52, 13, 53, 13, 54, 13, 55, 13, 56, 13, 57, 13, 58, 13, 59, 13, 60, 28, 61, 28, 62, 13, 63, 7, 64, 13, 65, 29, 0, 0, 0, 74, 67, -1, 6, 68, 30, 69, 0, 70, 0, 71, 0, 72, 3, 73, 3, 0 - "variants" - - True - - 1, 0, 0, 1, 0, 0 - False - 0, 1 - 98 - 0.1 - 1 - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -34.3697, -21.6562 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 3.794776 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - 4 - 1 - 0 - ".." - - - 3 - - - "spin" - -1 - 2048 - - 8 - 0.4 - 5, 5 - - 10 - 0.2 - - -10, -10, 20, 20 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/enemy.tscn b/demos/2d/platformer/enemy.tscn new file mode 100644 index 00000000000..b01bd9fcf6e --- /dev/null +++ b/demos/2d/platformer/enemy.tscn @@ -0,0 +1,206 @@ +[gd_scene load_steps=12 format=1] + +[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_explode.wav" type="Sample" id=4] +[ext_resource path="res://sound_hit.wav" type="Sample" id=5] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 14.0 + +[sub_resource type="Animation" id=2] + +resource/name = "explode" +length = 6.0 +loop = false +step = 0.0 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:visibility/self_opacity") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 3.58422, 4.33851 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/1/type = "value" +tracks/1/path = NodePath("sprite:frame") +tracks/1/interp = 1 +tracks/1/keys = { "cont":true, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 4 ] } +tracks/2/type = "value" +tracks/2/path = NodePath("Particles2D:config/emitting") +tracks/2/interp = 1 +tracks/2/keys = { "cont":false, "times":FloatArray( 3.47394 ), "transitions":FloatArray( 1 ), "values":[ true ] } +tracks/3/type = "method" +tracks/3/path = NodePath(".") +tracks/3/interp = 1 +tracks/3/keys = { "times":FloatArray( 3.20357, 5.07305 ), "transitions":FloatArray( 1, 1 ), "values":[ { "args":[ ], "method":"_pre_explode" }, { "args":[ ], "method":"_die" } ] } + +[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/keys = { "cont":false, "times":FloatArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ] } + +[sub_resource type="Animation" id=4] + +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/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 0 ] } + +[sub_resource type="ColorRamp" id=5] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 0.884956, 0.823009, 1, 0.768627, 0.389381, 0, 0 ) + +[sub_resource type="SampleLibrary" id=6] + +samples/explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } +samples/hit = { "db":0.0, "pitch":1.0, "sample":ExtResource( 5 ) } + +[node name="enemy" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, -1.08072, -2.16144 ) +shapes/0/trigger = false +shapes/1/shape = SubResource( 1 ) +shapes/1/transform = Matrix32( 1, 0, 0, 1, 6.48431, 3.24216 ) +shapes/1/trigger = false +shapes/2/shape = SubResource( 1 ) +shapes/2/transform = Matrix32( 1, 0, 0, 1, -12.495, 3.53415 ) +shapes/2/trigger = false +collision/layers = 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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +script/script = ExtResource( 1 ) + +[node name="enabler" type="VisibilityEnabler2D" parent="."] + +transform/pos = Vector2( 16.2569, 11.0034 ) +transform/scale = Vector2( 23.5056, 10.8629 ) +rect = Rect2( -10, -10, 20, 20 ) +enabler/pause_animations = true +enabler/freeze_bodies = true +enabler/pause_particles = true +enabler/process_parent = false +enabler/fixed_process_parent = false + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/explode = SubResource( 2 ) +anims/idle = SubResource( 3 ) +anims/walk = SubResource( 4 ) +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="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( -1.08072, -2.16144 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="CollisionShape2D 2" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 6.48431, 3.24216 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="CollisionShape2D 3" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( -12.495, 3.53415 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="raycast_left" type="RayCast2D" parent="."] + +transform/pos = Vector2( -33.2868, -9.34363 ) +enabled = true +cast_to = Vector2( 0, 45 ) +layer_mask = 1 +type_mask = 15 + +[node name="raycast_right" type="RayCast2D" parent="."] + +transform/pos = Vector2( 29.1987, -9.34363 ) +enabled = true +cast_to = Vector2( 0, 45 ) +layer_mask = 1 +type_mask = 15 + +[node name="Particles2D" type="Particles2D" parent="."] + +visibility/self_opacity = 0.121212 +visibility/blend_mode = 1 +config/amount = 32 +config/lifetime = 0.5 +config/emit_timeout = 0.5 +config/emitting = false +config/explosiveness = 0.1 +config/texture = ExtResource( 3 ) +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 90.0 +params/spin_velocity = 2.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 9.8 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 2.0 +params/final_size = 3.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/spin_velocity = 1.0 +color/color_ramp = SubResource( 5 ) + +[node name="sound" type="SamplePlayer2D" parent="."] + +params/volume_db = 0.0 +params/pitch_scale = 1.0 +params/attenuation/min_distance = 1.0 +params/attenuation/max_distance = 2048.0 +params/attenuation/distance_exp = 1.0 +config/polyphony = 3 +config/samples = SubResource( 6 ) +config/pitch_random = 0.0 + + diff --git a/demos/2d/platformer/enemy.xml b/demos/2d/platformer/enemy.xml deleted file mode 100644 index 72d2ff068ec..00000000000 --- a/demos/2d/platformer/enemy.xml +++ /dev/null @@ -1,494 +0,0 @@ - - - - - - - - - 0 - 14 - - - - "idle" - 6.75 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 - "transitions" - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - "values" - - 5 - 6 - 5 - 6 - 5 - 6 - 7 - 6 - 7 - 5 - - - - - - "explode" - 6 - False - 0 - "value" - "sprite:visibility/self_opacity" - 1 - - "cont" - True - "times" - 3.58422, 4.33851 - "transitions" - 1, 1 - "values" - - 1 - 0 - - - "value" - "sprite:frame" - 1 - - "cont" - True - "times" - 0 - "transitions" - 1 - "values" - - 4 - - - "value" - "Particles2D:config/emitting" - 1 - - "cont" - False - "times" - 3.47394 - "transitions" - 1 - "values" - - True - - - "method" - "." - 1 - - "times" - 3.20357, 5.07305 - "transitions" - 1, 1 - "values" - - - "args" - - - "method" - "_pre_explode" - - - "args" - - - "method" - "_die" - - - - - - - "walk" - 1.25 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 0.25, 0.5, 0.75, 1, 1.25 - "transitions" - 1, 1, 1, 1, 1, 1 - "values" - - 0 - 1 - 2 - 3 - 4 - 0 - - - - - - 0, 1 - 1, 0.884956, 0.823009, 1, 0.768627, 0.389381, 0, 0 - - - - - "db" - 0 - "pitch" - 1 - "sample" - - - - "db" - 0 - "pitch" - 1 - "sample" - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "enemy" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "shapes/1/shape" - "shapes/1/transform" - "shapes/1/trigger" - "shapes/2/shape" - "shapes/2/transform" - "shapes/2/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "script/script" - "__meta__" - "RigidBody2D" - "enabler" - "transform/pos" - "transform/scale" - "rect" - "enabler/pause_animations" - "enabler/freeze_bodies" - "enabler/pause_particles" - "enabler/process_parent" - "enabler/fixed_process_parent" - "VisibilityEnabler2D" - "anim" - "playback/process_mode" - "playback/default_blend_time" - "root/root" - "anims/idle" - "anims/explode" - "anims/walk" - "playback/active" - "playback/speed" - "blend_times" - "autoplay" - "AnimationPlayer" - "sprite" - "texture" - "hframes" - "frame" - "Sprite" - "CollisionShape2D" - "shape" - "trigger" - "_update_shape_index" - "CollisionShape2D 2" - "CollisionShape2D 3" - "raycast_left" - "enabled" - "cast_to" - "layer_mask" - "type_mask" - "RayCast2D" - "raycast_right" - "Particles2D" - "visibility/self_opacity" - "visibility/blend_mode" - "config/amount" - "config/lifetime" - "config/emit_timeout" - "config/emitting" - "config/explosiveness" - "config/texture" - "params/direction" - "params/spread" - "params/linear_velocity" - "params/spin_velocity" - "params/orbit_velocity" - "params/gravity_direction" - "params/gravity_strength" - "params/radial_accel" - "params/tangential_accel" - "params/damping" - "params/initial_angle" - "params/initial_size" - "params/final_size" - "params/hue_variation" - "params/anim_speed_scale" - "params/anim_initial_pos" - "randomness/spin_velocity" - "color/color_ramp" - "sound" - "params/volume_db" - "params/pitch_scale" - "params/attenuation/min_distance" - "params/attenuation/max_distance" - "params/attenuation/distance_exp" - "config/polyphony" - "config/samples" - "config/pitch_random" - "SamplePlayer2D" - - "node_count" - 11 - "node_paths" - - - "nodes" - -1, -1, 30, 0, -1, 29, 1, 0, 2, 1, 3, 2, 4, 0, 5, 1, 6, 3, 7, 0, 8, 1, 9, 4, 10, 0, 11, 5, 12, 5, 13, 6, 14, 7, 15, 8, 16, 8, 17, 7, 18, 0, 19, 9, 20, 10, 21, 0, 22, 0, 23, 11, 24, 12, 25, 8, 26, 13, 27, 13, 28, 14, 29, 15, 0, 0, 0, 40, 31, -1, 8, 32, 16, 33, 17, 34, 18, 35, 11, 36, 11, 37, 11, 38, 0, 39, 0, 0, 0, 0, 52, 41, -1, 10, 42, 5, 43, 8, 44, 19, 45, 20, 46, 21, 47, 22, 48, 11, 49, 23, 50, 24, 51, 25, 0, 0, 0, 57, 53, -1, 3, 54, 26, 55, 27, 56, 10, 0, 0, 0, 58, 58, -1, 4, 32, 28, 59, 1, 60, 0, 61, 29, 0, 0, 0, 58, 62, -1, 4, 32, 30, 59, 1, 60, 0, 61, 29, 0, 0, 0, 58, 63, -1, 4, 32, 31, 59, 1, 60, 0, 61, 29, 0, 0, 0, 69, 64, -1, 5, 32, 32, 65, 11, 66, 33, 67, 5, 68, 34, 0, 0, 0, 69, 70, -1, 5, 32, 35, 65, 11, 66, 33, 67, 5, 68, 34, 0, 0, 0, 71, 71, -1, 26, 72, 36, 73, 5, 74, 37, 75, 38, 76, 38, 77, 0, 78, 39, 79, 40, 80, 8, 81, 41, 82, 42, 83, 43, 84, 8, 85, 8, 86, 44, 87, 8, 88, 8, 89, 8, 90, 8, 91, 43, 92, 23, 93, 8, 94, 7, 95, 8, 96, 7, 97, 45, 0, 0, 0, 107, 98, -1, 8, 99, 8, 100, 7, 101, 7, 102, 46, 103, 7, 104, 47, 105, 48, 106, 8, 0 - "variants" - - False - - 1, -0, 0, 1, -1.08072, -2.16144 - 1, -0, 0, 1, 6.48431, 3.24216 - 1, -0, 0, 1, -12.495, 3.53415 - 1 - 2 - 1 - 0 - 0 - 4 - True - 0, 0 - -1 - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -227.625, -197.9 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1.108033 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 16.2569, 11.0034 - 23.5056, 10.8629 - -10, -10, 20, 20 - ".." - - - - 3 - - - "" - - 8 - -1.08072, -2.16144 - -1 - 6.48431, 3.24216 - -12.495, 3.53415 - -33.2868, -9.34363 - 0, 45 - 15 - 29.1987, -9.34363 - 0.121212 - 32 - 0.5 - 0.1 - - 180 - 90 - 2 - 9.8 - - 2048 - 3 - - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/engine.cfg b/demos/2d/platformer/engine.cfg index 044d661e3eb..dddef264d48 100644 --- a/demos/2d/platformer/engine.cfg +++ b/demos/2d/platformer/engine.cfg @@ -1,7 +1,7 @@ [application] name="Platformer" -main_scene="res://stage.xml" +main_scene="res://stage.tscn" icon="res://icon.png" name_es="Plataformero" target_fps="60" diff --git a/demos/2d/platformer/moving_platform.tscn b/demos/2d/platformer/moving_platform.tscn new file mode 100644 index 00000000000..c6269d6ee74 --- /dev/null +++ b/demos/2d/platformer/moving_platform.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://moving_platform.gd" type="Script" id=1] +[ext_resource path="res://moving_platform.png" type="Texture" id=2] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -88, 24, -88, -24, 88, -24, 88, 24 ) + +[node name="moving_platform" type="Node2D"] + +script/script = ExtResource( 1 ) +motion = Vector2( 0, 0 ) +cycle = 1.0 + +[node name="platform" type="RigidBody2D" parent="."] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 + +[node name="Sprite" type="Sprite" parent="platform"] + +texture = ExtResource( 2 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform"] + +build_mode = 0 +polygon = Vector2Array( -88, -24, 88, -24, 88, 24, -88, 24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + + diff --git a/demos/2d/platformer/moving_platform.xml b/demos/2d/platformer/moving_platform.xml deleted file mode 100644 index 4b94a7af482..00000000000 --- a/demos/2d/platformer/moving_platform.xml +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - 0 - -88, 24, -88, -24, 88, -24, 88, 24 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "moving_platform" - "script/script" - "__meta__" - "motion" - "cycle" - "Node2D" - "platform" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "RigidBody2D" - "Sprite" - "texture" - "CollisionPolygon2D" - "build_mode" - "polygon" - "shape_range" - "trigger" - - "node_count" - 4 - "node_paths" - - - "nodes" - -1, -1, 5, 0, -1, 4, 1, 0, 2, 1, 3, 2, 4, 3, 0, 0, 0, 28, 6, -1, 21, 7, 4, 8, 5, 9, 6, 10, 4, 11, 7, 12, 7, 13, 8, 14, 3, 15, 3, 16, 9, 17, 3, 18, 4, 19, 10, 20, 10, 21, 4, 22, 4, 23, 11, 24, 2, 25, 9, 26, 12, 27, 12, 0, 1, 0, 29, 29, -1, 1, 30, 13, 0, 1, 0, 31, 31, -1, 4, 32, 10, 33, 14, 34, 15, 35, 4, 0 - "variants" - - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -210.652, -172.81 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1.360373 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 179 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 0, 0 - 1 - False - - 1, -0, 0, 1, 0, 0 - 1 - 3 - 0 - 0 - True - -1 - - -88, -24, 88, -24, 88, 24, -88, 24 - -1, -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/one_way_platform.tscn b/demos/2d/platformer/one_way_platform.tscn new file mode 100644 index 00000000000..88c4b0d61ae --- /dev/null +++ b/demos/2d/platformer/one_way_platform.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=3 format=1] + +[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 +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 1.46304, -13.1672 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +one_way_collision/direction = Vector2( 0, 1 ) +one_way_collision/max_depth = 20.0 +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="."] + +transform/pos = Vector2( 1.46304, -13.1672 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/demos/2d/platformer/one_way_platform.xml b/demos/2d/platformer/one_way_platform.xml deleted file mode 100644 index 85b23227115..00000000000 --- a/demos/2d/platformer/one_way_platform.xml +++ /dev/null @@ -1,207 +0,0 @@ - - - - - 0 - 100, 10 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "one_way_platform" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "one_way_collision/direction" - "one_way_collision/max_depth" - "constant_linear_velocity" - "constant_angular_velocity" - "friction" - "bounce" - "__meta__" - "StaticBody2D" - "sprite" - "texture" - "Sprite" - "CollisionShape2D" - "transform/pos" - "shape" - "trigger" - "_update_shape_index" - - "node_count" - 3 - "node_paths" - - - "nodes" - -1, -1, 14, 0, -1, 13, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 8, 12, 7, 13, 9, 0, 0, 0, 17, 15, -1, 1, 16, 10, 0, 0, 0, 18, 18, -1, 4, 19, 11, 20, 1, 21, 0, 22, 12, 0 - "variants" - - False - - 1, -0, 0, 1, 1.46304, -13.1672 - 1 - 0, 1 - 20 - 0, 0 - 0 - 1 - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -133.699, -110.553 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 2.050546 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - 1.46304, -13.1672 - -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/parallax_bg.tscn b/demos/2d/platformer/parallax_bg.tscn new file mode 100644 index 00000000000..cf5815e28c2 --- /dev/null +++ b/demos/2d/platformer/parallax_bg.tscn @@ -0,0 +1,101 @@ +[gd_scene load_steps=7 format=1] + +[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/mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="sky"] + +transform/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="Sprite" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 28, 127 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite 2" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 404, 24 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite 3" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 154, 46 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite 4" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 525, 130 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite 5" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 255, 158 ) +texture = ExtResource( 4 ) +centered = false + +[node name="Sprite 6" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 674, 70 ) +texture = ExtResource( 4 ) +centered = false + +[node name="mount_ 2" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 0.2, 1 ) +motion/mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="mount_ 2"] + +transform/pos = Vector2( 0, 225 ) +texture = ExtResource( 5 ) +centered = false +region = true +region_rect = Rect2( 0, 0, 800, 256 ) + +[node name="mount_1" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 0.4, 1 ) +motion/mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="mount_1"] + +transform/pos = Vector2( 0, 225 ) +texture = ExtResource( 6 ) +centered = false +region = true +region_rect = Rect2( 0, 0, 800, 256 ) + + diff --git a/demos/2d/platformer/parallax_bg.xml b/demos/2d/platformer/parallax_bg.xml deleted file mode 100644 index 3b306aecab4..00000000000 --- a/demos/2d/platformer/parallax_bg.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "parallax_bg" - "layer" - "offset" - "rotation" - "scale" - "scroll/offset" - "scroll/base_offset" - "scroll/base_scale" - "scroll/limit_begin" - "scroll/limit_end" - "scroll/ignore_camera_zoom" - "__meta__" - "ParallaxBackground" - "sky" - "motion/scale" - "motion/mirroring" - "ParallaxLayer" - "Sprite" - "transform/scale" - "texture" - "centered" - "clouds" - "transform/pos" - "Sprite 2" - "Sprite 3" - "Sprite 4" - "Sprite 5" - "Sprite 6" - "mount_ 2" - "region" - "region_rect" - "mount_1" - - "node_count" - 14 - "node_paths" - - - "nodes" - -1, -1, 12, 0, -1, 11, 1, 0, 2, 1, 3, 2, 4, 3, 5, 1, 6, 1, 7, 4, 8, 1, 9, 1, 10, 5, 11, 6, 0, 0, 0, 16, 13, -1, 2, 14, 3, 15, 7, 0, 1, 0, 17, 17, -1, 3, 18, 8, 19, 9, 20, 5, 0, 0, 0, 16, 21, -1, 2, 14, 10, 15, 7, 0, 3, 0, 17, 17, -1, 3, 22, 11, 19, 12, 20, 5, 0, 3, 0, 17, 23, -1, 3, 22, 13, 19, 12, 20, 5, 0, 3, 0, 17, 24, -1, 3, 22, 14, 19, 15, 20, 5, 0, 3, 0, 17, 25, -1, 3, 22, 16, 19, 15, 20, 5, 0, 3, 0, 17, 26, -1, 3, 22, 17, 19, 18, 20, 5, 0, 3, 0, 17, 27, -1, 3, 22, 19, 19, 18, 20, 5, 0, 0, 0, 16, 28, -1, 2, 14, 20, 15, 7, 0, 10, 0, 17, 17, -1, 5, 22, 21, 19, 22, 20, 5, 29, 23, 30, 24, 0, 0, 0, 16, 31, -1, 2, 14, 25, 15, 7, 0, 12, 0, 17, 17, -1, 5, 22, 21, 19, 26, 20, 5, 29, 23, 30, 24, 0 - "variants" - - -1 - 0, 0 - 0 - 1, 1 - 0.7, 0 - False - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -5, -25 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 800, 0 - 32, 0.94 - - 0.1, 1 - 28, 127 - - 404, 24 - 154, 46 - - 525, 130 - 255, 158 - - 674, 70 - 0.2, 1 - 0, 225 - - True - 0, 0, 800, 256 - 0.4, 1 - - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/player.gd b/demos/2d/platformer/player.gd index 7ed99df9bda..8cafd8b9336 100644 --- a/demos/2d/platformer/player.gd +++ b/demos/2d/platformer/player.gd @@ -47,7 +47,7 @@ var shoot_time = 1e20 var MAX_SHOOT_POSE_TIME = 0.3 -var bullet = preload("res://bullet.xml") +var bullet = preload("res://bullet.tscn") var floor_h_velocity = 0.0 var enemy @@ -220,7 +220,7 @@ func _integrate_forces(s): func _ready(): - enemy = ResourceLoader.load("res://enemy.xml") + enemy = ResourceLoader.load("res://enemy.tscn") # if !Globals.has_singleton("Facebook"): # return diff --git a/demos/2d/platformer/player.tscn b/demos/2d/platformer/player.tscn new file mode 100644 index 00000000000..77a2e272a61 --- /dev/null +++ b/demos/2d/platformer/player.tscn @@ -0,0 +1,330 @@ +[gd_scene load_steps=25 format=1] + +[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://sound_coin.wav" type="Sample" id=4] +[ext_resource path="res://sound_jump.wav" type="Sample" id=5] +[ext_resource path="res://sound_shoot.wav" type="Sample" id=6] +[ext_resource path="res://osb_left.png" type="Texture" id=7] +[ext_resource path="res://osb_right.png" type="Texture" id=8] +[ext_resource path="res://osb_jump.png" type="Texture" id=9] +[ext_resource path="res://osb_fire.png" type="Texture" id=10] + +[sub_resource type="RayShape2D" id=1] + +custom_solver_bias = 0.5 +length = 20.0 + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -19.902, -24.8691, 19.3625, -24.6056, -0.138023, 16.5036 ) + +[sub_resource type="ColorRamp" id=3] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 1, 1, 1, 0, 0, 0, 0.0442478 ) + +[sub_resource type="Animation" id=4] + +resource/name = "crouch" +length = 0.01 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 22 ] } + +[sub_resource type="Animation" id=5] + +resource/name = "falling" +length = 0.01 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 21 ] } + +[sub_resource type="Animation" id=6] + +resource/name = "falling_weapon" +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 26 ] } + +[sub_resource type="Animation" id=7] + +length = 7.0 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 16, 17, 18, 16, 19, 20, 19, 16 ] } + +[sub_resource type="Animation" id=8] + +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 25 ] } + +[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/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5 ), "transitions":FloatArray( 1, 1, 1 ), "values":[ 23, 24, 23 ] } + +[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/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 26 ] } + +[sub_resource type="Animation" id=11] + +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 0 ] } + +[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/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 5, 6, 7, 8, 9, 5 ] } + +[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/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 10, 11, 12, 13, 14, 5 ] } + +[sub_resource type="SampleLibrary" id=14] + +samples/jump = { "db":0.0, "pitch":1.0, "sample":ExtResource( 5 ) } +samples/shoot = { "db":0.0, "pitch":1.0, "sample":ExtResource( 6 ) } +samples/coin = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } + +[node name="player" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1.76469, 0.291992, -12.1587 ) +shapes/0/trigger = false +shapes/1/shape = SubResource( 2 ) +shapes/1/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/1/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 2 +mass = 3.0 +friction = 0.0 +bounce = 0.0 +gravity_scale = 1.0 +custom_integrator = true +continuous_cd = 0 +contacts_reported = 3 +contact_monitor = false +sleeping = false +can_sleep = true +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +script/script = ExtResource( 1 ) + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) +vframes = 2 +hframes = 16 + +[node name="smoke" type="Particles2D" parent="sprite"] + +visibility/self_opacity = 0.363636 +visibility/blend_mode = 1 +transform/pos = Vector2( 20.7312, 3.21187 ) +transform/rot = 83.4504 +config/amount = 4 +config/lifetime = 0.3 +config/emit_timeout = 0.3 +config/emitting = false +config/local_space = false +config/explosiveness = 0.1 +config/texture = ExtResource( 3 ) +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 20.0 +params/spin_velocity = 1.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 9.8 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 2.0 +params/final_size = 2.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/spin_velocity = 2.0 +color/color_ramp = SubResource( 3 ) + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = 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 +current = true +zoom = Vector2( 1, 1 ) +limit/left = 0 +limit/top = 0 +limit/right = 10000000 +limit/bottom = 10000000 +drag_margin/h_enabled = true +drag_margin/v_enabled = true +smoothing/enable = 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 + +[node name="bullet_shoot" type="Position2D" parent="."] + +transform/pos = Vector2( 31.2428, 4.08784 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 0.291992, -12.1587 ) +transform/scale = Vector2( 1, 1.76469 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="sound" type="SamplePlayer" parent="."] + +config/polyphony = 1 +config/samples = SubResource( 14 ) +default/volume_db = 0.0 +default/pitch_scale = 1.0 +default/pan = 0.0 +default/depth = 0.0 +default/height = 0.0 +default/filter/type = 0 +default/filter/cutoff = 0.0 +default/filter/resonance = 0.0 +default/filter/gain = 0.0 +default/reverb_room = 2 +default/reverb_send = 0.0 +default/chorus_send = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] + +build_mode = 0 +polygon = Vector2Array( -0.138023, 16.5036, -19.902, -24.8691, 19.3625, -24.6056 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[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"] + +transform/pos = Vector2( 27.7593, 360.87 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 7 ) +pressed = null +bitmask = null +passby_press = true +action = "move_left" +visibility_mode = 1 + +[node name="right" type="TouchScreenButton" parent="ui"] + +transform/pos = Vector2( 121.542, 361.415 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 8 ) +pressed = null +bitmask = null +passby_press = true +action = "move_right" +visibility_mode = 1 + +[node name="jump" type="TouchScreenButton" parent="ui"] + +transform/pos = Vector2( 666.224, 359.02 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 9 ) +pressed = null +bitmask = null +passby_press = false +action = "jump" +visibility_mode = 1 + +[node name="fire" type="TouchScreenButton" parent="ui"] + +transform/pos = Vector2( 668.073, 262.788 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 10 ) +pressed = null +bitmask = null +passby_press = false +action = "shoot" +visibility_mode = 1 + + diff --git a/demos/2d/platformer/player.xml b/demos/2d/platformer/player.xml deleted file mode 100644 index 493279672f3..00000000000 --- a/demos/2d/platformer/player.xml +++ /dev/null @@ -1,669 +0,0 @@ - - - - - - - - - - - - - - 0.5 - 20 - - - - 0 - -19.902, -24.8691, 19.3625, -24.6056, -0.138023, 16.5036 - - - - 0, 1 - 1, 1, 1, 1, 0, 0, 0, 0.0442478 - - - - "idle" - 7 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 - "transitions" - 1, 1, 1, 1, 1, 1, 1, 1 - "values" - - 16 - 17 - 18 - 16 - 19 - 20 - 19 - 16 - - - - - - "jumping" - 0.5 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 0.25, 0.5 - "transitions" - 1, 1, 1 - "values" - - 23 - 24 - 23 - - - - - - "falling_weapon" - 0.5 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - 26 - - - - - - "idle_weapon" - 0.5 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - 25 - - - - - - "crouch" - 0.01 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - 22 - - - - - - "falling" - 0.01 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - 21 - - - - - - 1.25 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 0.25, 0.5, 0.75, 1, 1.25 - "transitions" - 1, 1, 1, 1, 1, 1 - "values" - - 10 - 11 - 12 - 13 - 14 - 5 - - - - - - 0.5 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0 - "transitions" - 1 - "values" - - 26 - - - - - - 1.25 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 0.25, 0.5, 0.75, 1, 1.25 - "transitions" - 1, 1, 1, 1, 1, 1 - "values" - - 0 - 1 - 2 - 3 - 4 - 0 - - - - - - 1.25 - True - 0.25 - "value" - "sprite:frame" - 1 - - "cont" - False - "times" - 0, 0.25, 0.5, 0.75, 1, 1.25 - "transitions" - 1, 1, 1, 1, 1, 1 - "values" - - 5 - 6 - 7 - 8 - 9 - 5 - - - - - - - "db" - 0 - "pitch" - 1 - "sample" - - - - "db" - 0 - "pitch" - 1 - "sample" - - - - "db" - 0 - "pitch" - 1 - "sample" - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "player" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "shapes/1/shape" - "shapes/1/transform" - "shapes/1/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "script/script" - "__meta__" - "RigidBody2D" - "sprite" - "texture" - "vframes" - "hframes" - "Sprite" - "smoke" - "visibility/self_opacity" - "visibility/blend_mode" - "transform/pos" - "transform/rot" - "config/amount" - "config/lifetime" - "config/emit_timeout" - "config/emitting" - "config/local_space" - "config/explosiveness" - "config/texture" - "params/direction" - "params/spread" - "params/linear_velocity" - "params/spin_velocity" - "params/orbit_velocity" - "params/gravity_direction" - "params/gravity_strength" - "params/radial_accel" - "params/tangential_accel" - "params/damping" - "params/initial_angle" - "params/initial_size" - "params/final_size" - "params/hue_variation" - "params/anim_speed_scale" - "params/anim_initial_pos" - "randomness/spin_velocity" - "color/color_ramp" - "Particles2D" - "anim" - "playback/process_mode" - "playback/default_blend_time" - "root/root" - "anims/idle" - "anims/jumping" - "anims/falling_weapon" - "anims/idle_weapon" - "anims/crouch" - "anims/falling" - "anims/standing_weapon_ready" - "anims/jumping_weapon" - "anims/run" - "anims/run_weapon" - "playback/active" - "playback/speed" - "blend_times" - "autoplay" - "AnimationPlayer" - "camera" - "anchor_mode" - "rotating" - "current" - "smoothing" - "zoom" - "limit/left" - "limit/top" - "limit/right" - "limit/bottom" - "drag_margin/h_enabled" - "drag_margin/v_enabled" - "drag_margin/left" - "drag_margin/top" - "drag_margin/right" - "drag_margin/bottom" - "Camera2D" - "bullet_shoot" - "Position2D" - "CollisionShape2D" - "transform/scale" - "shape" - "trigger" - "_update_shape_index" - "sound" - "config/polyphony" - "config/samples" - "default/volume_db" - "default/pitch_scale" - "default/pan" - "default/depth" - "default/height" - "default/filter/type" - "default/filter/cutoff" - "default/filter/resonance" - "default/filter/gain" - "default/reverb_room" - "default/reverb_send" - "default/chorus_send" - "SamplePlayer" - "CollisionPolygon2D" - "build_mode" - "polygon" - "shape_range" - "ui" - "layer" - "offset" - "rotation" - "scale" - "CanvasLayer" - "left" - "normal" - "pressed" - "bitmask" - "passby_press" - "action" - "visibility_mode" - "TouchScreenButton" - "right" - "jump" - "fire" - - "node_count" - 14 - "node_paths" - - - "nodes" - -1, -1, 27, 0, -1, 26, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 4, 7, 0, 8, 5, 9, 5, 10, 6, 11, 7, 12, 8, 13, 8, 14, 9, 15, 10, 16, 11, 17, 12, 18, 0, 19, 0, 20, 10, 21, 13, 22, 8, 23, 14, 24, 14, 25, 15, 26, 16, 0, 0, 0, 32, 28, -1, 3, 29, 17, 30, 6, 31, 18, 0, 1, 0, 63, 33, -1, 29, 34, 19, 35, 5, 36, 20, 37, 21, 38, 22, 39, 23, 40, 23, 41, 0, 42, 0, 43, 24, 44, 25, 45, 8, 46, 26, 47, 27, 48, 9, 49, 8, 50, 8, 51, 28, 52, 8, 53, 8, 54, 8, 55, 8, 56, 29, 57, 29, 58, 8, 59, 9, 60, 8, 61, 29, 62, 30, 0, 0, 0, 82, 64, -1, 17, 65, 5, 66, 8, 67, 31, 68, 32, 69, 33, 70, 34, 71, 35, 72, 36, 73, 37, 74, 38, 75, 39, 76, 40, 77, 41, 78, 10, 79, 29, 80, 42, 81, 43, 0, 0, 0, 99, 83, -1, 15, 84, 5, 85, 0, 86, 10, 87, 8, 88, 44, 89, 11, 90, 11, 91, 45, 92, 45, 93, 10, 94, 10, 95, 46, 96, 46, 97, 46, 98, 46, 0, 0, 0, 101, 100, -1, 1, 36, 47, 0, 0, 0, 102, 102, -1, 5, 36, 48, 103, 49, 104, 1, 105, 0, 106, 50, 0, 0, 0, 122, 107, -1, 14, 108, 5, 109, 51, 110, 8, 111, 9, 112, 8, 113, 8, 114, 8, 115, 11, 116, 8, 117, 8, 118, 8, 119, 6, 120, 8, 121, 8, 0, 0, 0, 123, 123, -1, 4, 124, 11, 125, 52, 126, 53, 105, 0, 0, 0, 0, 132, 127, -1, 4, 128, 11, 129, 13, 130, 8, 131, 44, 0, 9, 0, 140, 133, -1, 8, 36, 54, 103, 55, 134, 56, 135, 57, 136, 57, 137, 10, 138, 58, 139, 5, 0, 9, 0, 140, 141, -1, 8, 36, 59, 103, 55, 134, 60, 135, 57, 136, 57, 137, 10, 138, 61, 139, 5, 0, 9, 0, 140, 142, -1, 8, 36, 62, 103, 55, 134, 63, 135, 57, 136, 57, 137, 0, 138, 64, 139, 5, 0, 9, 0, 140, 143, -1, 8, 36, 65, 103, 55, 134, 66, 135, 57, 136, 57, 137, 0, 138, 67, 139, 5, 0 - "variants" - - False - - 1, -0, 0, 1.76469, 0.291992, -12.1587 - - 1, -0, 0, 1, 0, 0 - 1 - 2 - 3 - 0 - 1 - True - 0 - 3 - 0, 0 - -1 - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -110.795, -101.2 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 2.050546 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - 16 - 0.363636 - 20.7312, 3.21187 - 83.450417 - 4 - 0.3 - 0.1 - - 180 - 20 - 9.8 - 2 - - ".." - - - - - - - - - - - - - "" - 1, 1 - 10000000 - 0.2 - 31.2428, 4.08784 - 0.291992, -12.1587 - 1, 1.76469 - -1 - - -0.138023, 16.5036, -19.902, -24.8691, 19.3625, -24.6056 - -1, -1 - 27.7593, 360.87 - 1.49157, 1.46265 - - "move_left" - 121.542, 361.415 - - "move_right" - 666.224, 359.02 - - "jump" - 668.073, 262.788 - - "shoot" - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/seesaw.tscn b/demos/2d/platformer/seesaw.tscn new file mode 100644 index 00000000000..9af07dc07b9 --- /dev/null +++ b/demos/2d/platformer/seesaw.tscn @@ -0,0 +1,60 @@ +[gd_scene load_steps=4 format=1] + +[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 +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 + +[node name="sprite" type="Sprite" parent="plank"] + +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="plank"] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="pin" type="PinJoint2D" parent="."] + +node_a = NodePath("../plank") +node_b = NodePath("") +bias/bias = 0.0 +collision/exclude_nodes = true +softness = 0.0 + +[node name="Sprite" type="Sprite" parent="."] + +transform/pos = Vector2( -0.290825, 20.2425 ) +texture = ExtResource( 2 ) + + diff --git a/demos/2d/platformer/seesaw.xml b/demos/2d/platformer/seesaw.xml deleted file mode 100644 index 760423167f2..00000000000 --- a/demos/2d/platformer/seesaw.xml +++ /dev/null @@ -1,230 +0,0 @@ - - - - - - 0 - 128, 8 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "seesaw" - "__meta__" - "Node2D" - "plank" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "RigidBody2D" - "sprite" - "texture" - "Sprite" - "CollisionShape2D" - "shape" - "trigger" - "_update_shape_index" - "pin" - "node_a" - "node_b" - "bias/bias" - "softness" - "PinJoint2D" - "transform/pos" - - "node_count" - 6 - "node_paths" - - - "nodes" - -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 25, 3, -1, 21, 4, 1, 5, 2, 6, 3, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 0, 1, 0, 28, 26, -1, 1, 27, 12, 0, 1, 0, 29, 29, -1, 3, 30, 2, 31, 1, 32, 13, 0, 0, 0, 38, 33, -1, 4, 34, 14, 35, 15, 36, 8, 37, 8, 0, 0, 0, 28, 28, -1, 2, 39, 16, 27, 17, 0 - "variants" - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -116.979, -109.897 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 2.050547 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 179 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0 - 5.102041 - 1 - 0 - True - 0, 0 - -1 - - -1 - "../plank" - "" - -0.290825, 20.2425 - - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/stage.tscn b/demos/2d/platformer/stage.tscn new file mode 100644 index 00000000000..9709efefa93 --- /dev/null +++ b/demos/2d/platformer/stage.tscn @@ -0,0 +1,352 @@ +[gd_scene load_steps=10 format=1] + +[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://music.ogg" type="AudioStream" id=7] +[ext_resource path="res://enemy.tscn" type="PackedScene" id=8] +[ext_resource path="res://parallax_bg.tscn" type="PackedScene" id=9] + +[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 = Matrix32( 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/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( 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 )] + +transform/pos = Vector2( 672, 1179 ) +linear_damp = 0.1 + +[node name="coin 2" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 704, 1179 ) +linear_damp = 0.1 + +[node name="coin 3" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 736, 1179 ) +linear_damp = 0.1 + +[node name="coin 4" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1120, 992 ) +linear_damp = 0.1 + +[node name="coin 5" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1152, 992 ) +linear_damp = 0.1 + +[node name="coin 6" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1184, 992 ) +linear_damp = 0.1 + +[node name="coin 7" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1216, 992 ) +linear_damp = 0.1 + +[node name="coin 8" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1248, 992 ) +linear_damp = 0.1 + +[node name="coin 9" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1568, 864 ) +linear_damp = 0.1 + +[node name="coin 10" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1632, 864 ) +linear_damp = 0.1 + +[node name="coin 11" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1824, 768 ) +linear_damp = 0.1 + +[node name="coin 12" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1888, 768 ) +linear_damp = 0.1 + +[node name="coin 13" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 2080, 672 ) +linear_damp = 0.1 + +[node name="coin 14" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 2144, 672 ) +linear_damp = 0.1 + +[node name="coin 15" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1792, 1248 ) +linear_damp = 0.1 + +[node name="coin 16" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1856, 1248 ) +linear_damp = 0.1 + +[node name="coin 17" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1920, 1248 ) +linear_damp = 0.1 + +[node name="coin 18" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1920, 1184 ) +linear_damp = 0.1 + +[node name="coin 19" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1856, 1184 ) +linear_damp = 0.1 + +[node name="coin 20" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1792, 1184 ) +linear_damp = 0.1 + +[node name="coin 21" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 98.8868, 488.515 ) +linear_damp = 0.1 + +[node name="coin 22" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 89.5989, 481.217 ) +linear_damp = 0.1 + +[node name="coin 23" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 108.175, 481.217 ) +linear_damp = 0.1 + +[node name="coin 24" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 116.136, 469.939 ) +linear_damp = 0.1 + +[node name="coin 25" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 117.463, 457.997 ) +linear_damp = 0.1 + +[node name="coin 26" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 106.184, 449.373 ) +linear_damp = 0.1 + +[node name="coin 27" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 98.2234, 458.661 ) +linear_damp = 0.1 + +[node name="coin 28" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 88.272, 448.71 ) +linear_damp = 0.1 + +[node name="coin 29" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 79.6476, 457.334 ) +linear_damp = 0.1 + +[node name="coin 30" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 82.9647, 468.612 ) +linear_damp = 0.1 + +[node name="coin 31" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3357.42, 465.288 ) +linear_damp = 0.1 + +[node name="coin 31 2" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3421.42, 465.288 ) +linear_damp = 0.1 + +[node name="coin 31 3" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3485.42, 465.288 ) +linear_damp = 0.1 + +[node name="coin 31 4" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3485.42, 401.288 ) +linear_damp = 0.1 + +[node name="coin 31 5" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3421.42, 401.288 ) +linear_damp = 0.1 + +[node name="coin 31 6" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3357.42, 401.288 ) +linear_damp = 0.1 + +[node name="coin 32" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4172.75, 605.058 ) +linear_damp = 0.1 + +[node name="coin 31 7" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4236.75, 605.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 2" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4300.75, 605.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 3" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4300.75, 541.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 4" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4236.75, 541.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 5" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4172.75, 541.058 ) +linear_damp = 0.1 + +[node name="props" type="Node" parent="."] + +[node name="moving_platform" parent="props" instance=ExtResource( 3 )] + +transform/pos = Vector2( 1451.86, 742.969 ) +motion = Vector2( 0, 140 ) +cycle = 5.0 + +[node name="moving_platform 2" parent="props" instance=ExtResource( 3 )] + +transform/pos = Vector2( 624.824, 545.544 ) +motion = Vector2( 300, 0 ) +cycle = 10.0 + +[node name="moving_platform 3" parent="props" instance=ExtResource( 3 )] + +transform/pos = Vector2( 3419.86, 739.662 ) +motion = Vector2( 450, 0 ) +cycle = 10.0 + +[node name="seesaw" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 2402.79, 849.52 ) + +[node name="one_way_platform" parent="props" instance=ExtResource( 5 )] + +transform/pos = Vector2( 927.698, 1120.81 ) + +[node name="player" parent="." instance=ExtResource( 6 )] + +transform/pos = Vector2( 251.684, 1045.6 ) + +[node name="music" type="StreamPlayer" parent="."] + +stream/stream = ExtResource( 7 ) +stream/play = false +stream/loop = true +stream/volume_db = 2.0 +stream/autoplay = true +stream/paused = false +stream/loop_restart_time = 0.0 +stream/buffering_ms = 500 + +[node name="enemies" type="Node" parent="."] + +[node name="enemy 5" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 834.664, 1309.6 ) + +[node name="enemy 6" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 707.665, 1225.05 ) + +[node name="enemy 7" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1125.21, 1053.06 ) + +[node name="enemy 8" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1292.11, 1059.24 ) + +[node name="enemy 9" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1607.38, 923.239 ) + +[node name="enemy 10" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 2586.9, 939.059 ) + +[node name="enemy 11" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1457.6, 688.741 ) + +[node name="enemy 12" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1193.63, 460.381 ) + +[node name="enemy 13" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 3429.73, 540.865 ) + +[node name="enemy 14" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 3546.2, 1356.19 ) + +[node name="enemy 15" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 2406.63, 815.115 ) + +[node name="parallax_bg" parent="." instance=ExtResource( 9 )] + +[node name="Label" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 12.0 +margin/top = -202.0 +margin/right = 358.0 +margin/bottom = -10.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/demos/2d/platformer/stage.xml b/demos/2d/platformer/stage.xml deleted file mode 100644 index ea0daf3ff8f..00000000000 --- a/demos/2d/platformer/stage.xml +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "stage" - "__meta__" - "Node" - "tile_map" - "mode" - "tile_set" - "cell/size" - "cell/quadrant_size" - "cell/custom_transform" - "cell/half_offset" - "cell/tile_origin" - "cell/y_sort" - "collision/use_kinematic" - "collision/friction" - "collision/bounce" - "collision/layers" - "collision/mask" - "occluder/light_mask" - "tile_data" - "TileMap" - "coins" - "coin" - "transform/pos" - "linear_damp" - "coin 2" - "coin 3" - "coin 4" - "coin 5" - "coin 6" - "coin 7" - "coin 8" - "coin 9" - "coin 10" - "coin 11" - "coin 12" - "coin 13" - "coin 14" - "coin 15" - "coin 16" - "coin 17" - "coin 18" - "coin 19" - "coin 20" - "coin 21" - "coin 22" - "coin 23" - "coin 24" - "coin 25" - "coin 26" - "coin 27" - "coin 28" - "coin 29" - "coin 30" - "coin 31" - "coin 31 2" - "coin 31 3" - "coin 31 4" - "coin 31 5" - "coin 31 6" - "coin 32" - "coin 31 7" - "coin 31 7 2" - "coin 31 7 3" - "coin 31 7 4" - "coin 31 7 5" - "props" - "moving_platform" - "motion" - "cycle" - "moving_platform 2" - "moving_platform 3" - "seesaw" - "one_way_platform" - "player" - "music" - "stream/stream" - "stream/play" - "stream/loop" - "stream/volume_db" - "stream/autoplay" - "stream/paused" - "stream/loop_restart_time" - "stream/buffering_ms" - "StreamPlayer" - "enemies" - "enemy 5" - "enemy 6" - "enemy 7" - "enemy 8" - "enemy 9" - "enemy 10" - "enemy 11" - "enemy 12" - "enemy 13" - "enemy 14" - "enemy 15" - "parallax_bg" - "Label" - "margin/left" - "margin/top" - "margin/right" - "margin/bottom" - "focus/ignore_mouse" - "focus/stop_mouse" - "size_flags/horizontal" - "text" - "autowrap" - "percent_visible" - "lines_skipped" - "max_lines_visible" - - "node_count" - 67 - "node_paths" - - - "nodes" - -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 19, 3, -1, 16, 4, 1, 5, 2, 6, 3, 7, 4, 8, 5, 9, 6, 10, 1, 11, 7, 12, 7, 13, 8, 14, 9, 15, 10, 16, 10, 17, 10, 18, 11, 1, 12, 0, 0, 0, 2, 20, -1, 0, 0, 2, 0, 2147483647, 21, 13, 2, 22, 14, 23, 15, 0, 2, 0, 2147483647, 24, 13, 2, 22, 16, 23, 15, 0, 2, 0, 2147483647, 25, 13, 2, 22, 17, 23, 15, 0, 2, 0, 2147483647, 26, 13, 2, 22, 18, 23, 15, 0, 2, 0, 2147483647, 27, 13, 2, 22, 19, 23, 15, 0, 2, 0, 2147483647, 28, 13, 2, 22, 20, 23, 15, 0, 2, 0, 2147483647, 29, 13, 2, 22, 21, 23, 15, 0, 2, 0, 2147483647, 30, 13, 2, 22, 22, 23, 15, 0, 2, 0, 2147483647, 31, 13, 2, 22, 23, 23, 15, 0, 2, 0, 2147483647, 32, 13, 2, 22, 24, 23, 15, 0, 2, 0, 2147483647, 33, 13, 2, 22, 25, 23, 15, 0, 2, 0, 2147483647, 34, 13, 2, 22, 26, 23, 15, 0, 2, 0, 2147483647, 35, 13, 2, 22, 27, 23, 15, 0, 2, 0, 2147483647, 36, 13, 2, 22, 28, 23, 15, 0, 2, 0, 2147483647, 37, 13, 2, 22, 29, 23, 15, 0, 2, 0, 2147483647, 38, 13, 2, 22, 30, 23, 15, 0, 2, 0, 2147483647, 39, 13, 2, 22, 31, 23, 15, 0, 2, 0, 2147483647, 40, 13, 2, 22, 32, 23, 15, 0, 2, 0, 2147483647, 41, 13, 2, 22, 33, 23, 15, 0, 2, 0, 2147483647, 42, 13, 2, 22, 34, 23, 15, 0, 2, 0, 2147483647, 43, 13, 2, 22, 35, 23, 15, 0, 2, 0, 2147483647, 44, 13, 2, 22, 36, 23, 15, 0, 2, 0, 2147483647, 45, 13, 2, 22, 37, 23, 15, 0, 2, 0, 2147483647, 46, 13, 2, 22, 38, 23, 15, 0, 2, 0, 2147483647, 47, 13, 2, 22, 39, 23, 15, 0, 2, 0, 2147483647, 48, 13, 2, 22, 40, 23, 15, 0, 2, 0, 2147483647, 49, 13, 2, 22, 41, 23, 15, 0, 2, 0, 2147483647, 50, 13, 2, 22, 42, 23, 15, 0, 2, 0, 2147483647, 51, 13, 2, 22, 43, 23, 15, 0, 2, 0, 2147483647, 52, 13, 2, 22, 44, 23, 15, 0, 2, 0, 2147483647, 53, 13, 2, 22, 45, 23, 15, 0, 2, 0, 2147483647, 54, 13, 2, 22, 46, 23, 15, 0, 2, 0, 2147483647, 55, 13, 2, 22, 47, 23, 15, 0, 2, 0, 2147483647, 56, 13, 2, 22, 48, 23, 15, 0, 2, 0, 2147483647, 57, 13, 2, 22, 49, 23, 15, 0, 2, 0, 2147483647, 58, 13, 2, 22, 50, 23, 15, 0, 2, 0, 2147483647, 59, 13, 2, 22, 51, 23, 15, 0, 2, 0, 2147483647, 60, 13, 2, 22, 52, 23, 15, 0, 2, 0, 2147483647, 61, 13, 2, 22, 53, 23, 15, 0, 2, 0, 2147483647, 62, 13, 2, 22, 54, 23, 15, 0, 2, 0, 2147483647, 63, 13, 2, 22, 55, 23, 15, 0, 2, 0, 2147483647, 64, 13, 2, 22, 56, 23, 15, 0, 0, 0, 2, 65, -1, 0, 0, 45, 0, 2147483647, 66, 57, 3, 22, 58, 67, 59, 68, 60, 0, 45, 0, 2147483647, 69, 57, 3, 22, 61, 67, 62, 68, 63, 0, 45, 0, 2147483647, 70, 57, 3, 22, 64, 67, 65, 68, 63, 0, 45, 0, 2147483647, 71, 66, 1, 22, 67, 0, 45, 0, 2147483647, 72, 68, 1, 22, 69, 0, 0, 0, 2147483647, 73, 70, 1, 22, 71, 0, 0, 0, 83, 74, -1, 8, 75, 72, 76, 7, 77, 73, 78, 74, 79, 73, 80, 7, 81, 9, 82, 75, 0, 0, 0, 2, 84, -1, 0, 0, 53, 0, 2147483647, 85, 76, 1, 22, 77, 0, 53, 0, 2147483647, 86, 76, 1, 22, 78, 0, 53, 0, 2147483647, 87, 76, 1, 22, 79, 0, 53, 0, 2147483647, 88, 76, 1, 22, 80, 0, 53, 0, 2147483647, 89, 76, 1, 22, 81, 0, 53, 0, 2147483647, 90, 76, 1, 22, 82, 0, 53, 0, 2147483647, 91, 76, 1, 22, 83, 0, 53, 0, 2147483647, 92, 76, 1, 22, 84, 0, 53, 0, 2147483647, 93, 76, 1, 22, 85, 0, 53, 0, 2147483647, 94, 76, 1, 22, 86, 0, 53, 0, 2147483647, 95, 76, 1, 22, 87, 0, 0, 0, 2147483647, 96, 88, 0, 0, 0, 0, 97, 97, -1, 12, 98, 89, 99, 90, 100, 91, 101, 92, 102, 73, 103, 73, 104, 6, 105, 93, 106, 73, 107, 8, 108, 1, 109, 94, 0 - "variants" - - - "__editor_plugin_screen__" - "2D" - - 0 - - 64, 64 - 8 - 1, 0, 0, 1, 0, 0 - 2 - False - 1 - 0 - 1 - 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 - - "_edit_lock_" - True - - - 672, 1179 - 0.1 - 704, 1179 - 736, 1179 - 1120, 992 - 1152, 992 - 1184, 992 - 1216, 992 - 1248, 992 - 1568, 864 - 1632, 864 - 1824, 768 - 1888, 768 - 2080, 672 - 2144, 672 - 1792, 1248 - 1856, 1248 - 1920, 1248 - 1920, 1184 - 1856, 1184 - 1792, 1184 - 98.8868, 488.515 - 89.5989, 481.217 - 108.175, 481.217 - 116.136, 469.939 - 117.463, 457.997 - 106.184, 449.373 - 98.2234, 458.661 - 88.272, 448.71 - 79.6476, 457.334 - 82.9647, 468.612 - 3357.42, 465.288 - 3421.42, 465.288 - 3485.42, 465.288 - 3485.42, 401.288 - 3421.42, 401.288 - 3357.42, 401.288 - 4172.75, 605.058 - 4236.75, 605.058 - 4300.75, 605.058 - 4300.75, 541.058 - 4236.75, 541.058 - 4172.75, 541.058 - - 1451.86, 742.969 - 0, 140 - 5 - 624.824, 545.544 - 300, 0 - 10 - 3419.86, 739.662 - 450, 0 - - 2402.79, 849.52 - - 927.698, 1120.81 - - 251.684, 1045.6 - - True - 2 - 500 - - 834.664, 1309.6 - 707.665, 1225.05 - 1125.21, 1053.06 - 1292.11, 1059.24 - 1607.38, 923.239 - 2586.9, 939.059 - 1457.6, 688.741 - 1193.63, 460.381 - 3429.73, 540.865 - 3546.2, 1356.19 - 2406.63, 815.115 - - 12 - -202 - 358 - -10 - "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.xml file and follow "instructions."" - -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/tileset.tres b/demos/2d/platformer/tileset.tres new file mode 100644 index 00000000000..17b7dd3b4df --- /dev/null +++ b/demos/2d/platformer/tileset.tres @@ -0,0 +1,195 @@ +[gd_resource type="TileSet" load_steps=14 format=1] + +[ext_resource path="res://tiles_demo.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 24, -24, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -32, 32, -32, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=5] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=6] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 24, -32, 24 ) + +[sub_resource type="ConvexPolygonShape2D" id=7] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 24, -24, 24, 24, -32, 24 ) + +[sub_resource type="ConvexPolygonShape2D" id=8] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=9] + +custom_solver_bias = 0.0 +points = Vector2Array( -64, 32, -64, -32, -8, -32, -8, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=10] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=11] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=12] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[resource] + +0/name = "floor" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/region = Rect2( 0, 0, 64, 64 ) +0/occluder_offset = Vector2( 32, 32 ) +0/navigation_offset = Vector2( 32, 32 ) +0/shape_offset = Vector2( 32, 32 ) +0/shapes = [ SubResource( 1 ) ] +1/name = "edge" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( 0, 0 ) +1/region = Rect2( 64, 0, 64, 64 ) +1/occluder_offset = Vector2( 32, 32 ) +1/navigation_offset = Vector2( 32, 32 ) +1/shape_offset = Vector2( 32, 32 ) +1/shapes = [ SubResource( 2 ) ] +2/name = "wall" +2/texture = ExtResource( 1 ) +2/tex_offset = Vector2( 0, 0 ) +2/region = Rect2( 64, 64, 64, 64 ) +2/occluder_offset = Vector2( 32, 32 ) +2/navigation_offset = Vector2( 32, 32 ) +2/shape_offset = Vector2( 32, 32 ) +2/shapes = [ SubResource( 8 ) ] +3/name = "wall_deco" +3/texture = ExtResource( 1 ) +3/tex_offset = Vector2( 0, 0 ) +3/region = Rect2( 320, 128, 128, 64 ) +3/occluder_offset = Vector2( 64, 32 ) +3/navigation_offset = Vector2( 64, 32 ) +3/shape_offset = Vector2( 64, 32 ) +3/shapes = [ SubResource( 9 ) ] +4/name = "corner" +4/texture = ExtResource( 1 ) +4/tex_offset = Vector2( 0, 0 ) +4/region = Rect2( 64, 128, 64, 64 ) +4/occluder_offset = Vector2( 32, 32 ) +4/navigation_offset = Vector2( 32, 32 ) +4/shape_offset = Vector2( 32, 32 ) +4/shapes = [ SubResource( 10 ) ] +5/name = "flowers" +5/texture = ExtResource( 1 ) +5/tex_offset = Vector2( 0, 0 ) +5/region = Rect2( 192, 192, 64, 64 ) +5/occluder_offset = Vector2( 32, 32 ) +5/navigation_offset = Vector2( 32, 32 ) +5/shape_offset = Vector2( 32, 32 ) +5/shapes = [ SubResource( 11 ) ] +6/name = "tree_base" +6/texture = ExtResource( 1 ) +6/tex_offset = Vector2( 0, 0 ) +6/region = Rect2( 256, 192, 64, 64 ) +6/occluder_offset = Vector2( 32, 32 ) +6/navigation_offset = Vector2( 32, 32 ) +6/shape_offset = Vector2( 32, 32 ) +6/shapes = [ SubResource( 12 ) ] +7/name = "tree_mid" +7/texture = ExtResource( 1 ) +7/tex_offset = Vector2( 0, 0 ) +7/region = Rect2( 256, 128, 64, 64 ) +7/occluder_offset = Vector2( 32, 32 ) +7/navigation_offset = Vector2( 32, 32 ) +7/shape_offset = Vector2( 0, 0 ) +7/shapes = [ ] +8/name = "tree_mid 2" +8/texture = ExtResource( 1 ) +8/tex_offset = Vector2( 0, 0 ) +8/region = Rect2( 256, 64, 64, 64 ) +8/occluder_offset = Vector2( 32, 32 ) +8/navigation_offset = Vector2( 32, 32 ) +8/shape_offset = Vector2( 0, 0 ) +8/shapes = [ ] +9/name = "tree_top" +9/texture = ExtResource( 1 ) +9/tex_offset = Vector2( 0, 0 ) +9/region = Rect2( 256, 0, 64, 64 ) +9/occluder_offset = Vector2( 32, 32 ) +9/navigation_offset = Vector2( 32, 32 ) +9/shape_offset = Vector2( 0, 0 ) +9/shapes = [ ] +10/name = "solid" +10/texture = ExtResource( 1 ) +10/tex_offset = Vector2( 0, 0 ) +10/region = Rect2( 0, 64, 64, 64 ) +10/occluder_offset = Vector2( 32, 32 ) +10/navigation_offset = Vector2( 32, 32 ) +10/shape_offset = Vector2( 0, 0 ) +10/shapes = [ ] +11/name = "ceiling" +11/texture = ExtResource( 1 ) +11/tex_offset = Vector2( 0, 0 ) +11/region = Rect2( 384, 64, 64, 64 ) +11/occluder_offset = Vector2( 32, 32 ) +11/navigation_offset = Vector2( 32, 32 ) +11/shape_offset = Vector2( 32, 32 ) +11/shapes = [ SubResource( 3 ) ] +12/name = "ramp" +12/texture = ExtResource( 1 ) +12/tex_offset = Vector2( 0, 0 ) +12/region = Rect2( 128, 128, 64, 128 ) +12/occluder_offset = Vector2( 32, 64 ) +12/navigation_offset = Vector2( 32, 64 ) +12/shape_offset = Vector2( 32, 64 ) +12/shapes = [ SubResource( 4 ) ] +13/name = "ceiling2wall" +13/texture = ExtResource( 1 ) +13/tex_offset = Vector2( 0, 0 ) +13/region = Rect2( 448, 64, 64, 64 ) +13/occluder_offset = Vector2( 32, 32 ) +13/navigation_offset = Vector2( 32, 32 ) +13/shape_offset = Vector2( 32, 32 ) +13/shapes = [ SubResource( 5 ) ] +14/name = "platform_floor" +14/texture = ExtResource( 1 ) +14/tex_offset = Vector2( 0, 0 ) +14/region = Rect2( 128, 0, 64, 64 ) +14/occluder_offset = Vector2( 32, 32 ) +14/navigation_offset = Vector2( 32, 32 ) +14/shape_offset = Vector2( 32, 32 ) +14/shapes = [ SubResource( 6 ) ] +15/name = "platform_edge" +15/texture = ExtResource( 1 ) +15/tex_offset = Vector2( 0, 0 ) +15/region = Rect2( 192, 0, 64, 64 ) +15/occluder_offset = Vector2( 32, 32 ) +15/navigation_offset = Vector2( 32, 32 ) +15/shape_offset = Vector2( 32, 32 ) +15/shapes = [ SubResource( 7 ) ] + diff --git a/demos/2d/platformer/tileset.xml b/demos/2d/platformer/tileset.xml deleted file mode 100644 index d8f9a651ee8..00000000000 --- a/demos/2d/platformer/tileset.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - 0 - -32, -24, 32, -24, 32, 32, -32, 32 - - - - 0 - -32, 32, -32, -24, 24, -24, 24, 32 - - - - 0 - -32, 32, -32, -32, 24, -32, 24, 32 - - - - 0 - -64, 32, -64, -32, -8, -32, -8, 32 - - - - 0 - -32, 32, -32, -32, 24, -32, 32, -24, 32, 32 - - - - 0 - -32, 32, -32, -24, 32, -24, 32, 32 - - - - 0 - -32, 32, -32, -24, 32, -24, 32, 32 - - - - 0 - -32, -32, 32, -32, 32, 32, -32, 32 - - - - 0 - -32, -56, 32, 8, 32, 64, -32, 64 - - - - 0 - -32, 32, -32, -32, 24, -32, 24, 32 - - - - 0 - -32, -24, 32, -24, 32, 24, -32, 24 - - - - 0 - -32, -24, 24, -24, 24, 24, -32, 24 - - - - "floor" - - 0, 0 - 32, 32 - 0, 0, 64, 64 - - - - "edge" - - 0, 0 - 32, 32 - 64, 0, 64, 64 - - - - "wall" - - 0, 0 - 32, 32 - 64, 64, 64, 64 - - - - "wall_deco" - - 0, 0 - 64, 32 - 320, 128, 128, 64 - - - - "corner" - - 0, 0 - 32, 32 - 64, 128, 64, 64 - - - - "flowers" - - 0, 0 - 32, 32 - 192, 192, 64, 64 - - - - "tree_base" - - 0, 0 - 32, 32 - 256, 192, 64, 64 - - - - "tree_mid" - - 0, 0 - 0, 0 - 256, 128, 64, 64 - - - "tree_mid 2" - - 0, 0 - 0, 0 - 256, 64, 64, 64 - - - "tree_top" - - 0, 0 - 0, 0 - 256, 0, 64, 64 - - - "solid" - - 0, 0 - 0, 0 - 0, 64, 64, 64 - - - "ceiling" - - 0, 0 - 32, 32 - 384, 64, 64, 64 - - - - "ramp" - - 0, 0 - 32, 64 - 128, 128, 64, 128 - - - - "ceiling2wall" - - 0, 0 - 32, 32 - 448, 64, 64, 64 - - - - "platform_floor" - - 0, 0 - 32, 32 - 128, 0, 64, 64 - - - - "platform_edge" - - 0, 0 - 32, 32 - 192, 0, 64, 64 - - - - - - \ No newline at end of file diff --git a/demos/2d/platformer/tileset_edit.tscn b/demos/2d/platformer/tileset_edit.tscn new file mode 100644 index 00000000000..733fada55de --- /dev/null +++ b/demos/2d/platformer/tileset_edit.tscn @@ -0,0 +1,432 @@ +[gd_scene load_steps=14 format=1] + +[ext_resource path="res://tiles_demo.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 24, -24, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] + +custom_solver_bias = 0.0 +points = Vector2Array( -64, 32, -64, -32, -8, -32, -8, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=5] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=6] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=7] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=8] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -32, 32, -32, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=9] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=10] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=11] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 24, -32, 24 ) + +[sub_resource type="ConvexPolygonShape2D" id=12] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 24, -24, 24, 24, -32, 24 ) + +[node name="Node" type="Node"] + +[node name="floor" type="Sprite" parent="."] + +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 0, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="floor"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( 32, -24, 32, 32, -32, 32, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="edge" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 0 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 64, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="edge"] + +input/pickable = false +shapes/0/shape = SubResource( 2 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -32, -24, 24, -24, 24, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="wall" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 64 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 64, 64, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="wall"] + +input/pickable = false +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="wall_deco" type="Sprite" parent="."] + +transform/pos = Vector2( 96, 128 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 320, 128, 128, 64 ) + +[node name="collision" type="StaticBody2D" parent="wall_deco"] + +input/pickable = false +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -64, -32, -8, -32, -8, 32, -64, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="corner" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 64, 128, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="corner"] + +input/pickable = false +shapes/0/shape = SubResource( 5 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -32, -32, 24, -32, 32, -24, 32, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="flowers" type="Sprite" parent="."] + +transform/pos = Vector2( 128, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 192, 192, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="flowers"] + +input/pickable = false +shapes/0/shape = SubResource( 6 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="tree_base" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 192, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="tree_base"] + +input/pickable = false +shapes/0/shape = SubResource( 7 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="tree_mid" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 128 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 128, 64, 64 ) + +[node name="tree_mid 2" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 64 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 64, 64, 64 ) + +[node name="tree_top" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 0 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 0, 64, 64 ) + +[node name="solid" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 64 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 0, 64, 64, 64 ) + +[node name="ceiling" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 128 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 384, 64, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="ceiling"] + +input/pickable = false +shapes/0/shape = SubResource( 8 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( 32, -32, 32, 32, -32, 32, -32, -32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="ramp" type="Sprite" parent="."] + +transform/pos = Vector2( 256, 224 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 128, 128, 64, 128 ) + +[node name="collision" type="StaticBody2D" parent="ramp"] + +input/pickable = false +shapes/0/shape = SubResource( 9 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="ceiling2wall" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 448, 64, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="ceiling2wall"] + +input/pickable = false +shapes/0/shape = SubResource( 10 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="platform_floor" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 256 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 128, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="platform_floor"] + +input/pickable = false +shapes/0/shape = SubResource( 11 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( 32, -24, 32, 24, -32, 24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="platform_edge" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 256 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 192, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="platform_edge"] + +input/pickable = false +shapes/0/shape = SubResource( 12 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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 = Vector2Array( 24, -24, 24, 24, -32, 24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="help" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 1.0 +margin/top = 331.0 +margin/right = 727.0 +margin/bottom = 422.0 +text = "This scene serves as a tool for editing the tileset.\nNodes (sprites) and their respective collisionsare edited here.\n\nTo create a tileset from this, a \"TileSet\" resoucre must be created. Use the helper in: Scene -> Convert To -> TileSet.\nThis will save a tileset. Saving over it will merge your changes.\n\nFinally, 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 + + diff --git a/demos/2d/platformer/tileset_edit.xml b/demos/2d/platformer/tileset_edit.xml deleted file mode 100644 index 3ae9f1bd2ac..00000000000 --- a/demos/2d/platformer/tileset_edit.xml +++ /dev/null @@ -1,342 +0,0 @@ - - - - - 0 - -32, -24, 32, -24, 32, 32, -32, 32 - - - - 0 - -32, 32, -32, -24, 24, -24, 24, 32 - - - - 0 - -32, 32, -32, -32, 24, -32, 24, 32 - - - - 0 - -64, 32, -64, -32, -8, -32, -8, 32 - - - - 0 - -32, 32, -32, -32, 24, -32, 32, -24, 32, 32 - - - - 0 - -32, 32, -32, -24, 32, -24, 32, 32 - - - - 0 - -32, 32, -32, -24, 32, -24, 32, 32 - - - - 0 - -32, -32, 32, -32, 32, 32, -32, 32 - - - - 0 - -32, -56, 32, 8, 32, 64, -32, 64 - - - - 0 - -32, 32, -32, -32, 24, -32, 24, 32 - - - - 0 - -32, -24, 32, -24, 32, 24, -32, 24 - - - - 0 - -32, -24, 24, -24, 24, 24, -32, 24 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "Node" - "__meta__" - "floor" - "texture" - "region" - "region_rect" - "Sprite" - "collision" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "constant_linear_velocity" - "constant_angular_velocity" - "friction" - "bounce" - "StaticBody2D" - "CollisionPolygon2D" - "build_mode" - "polygon" - "shape_range" - "trigger" - "edge" - "transform/pos" - "wall" - "wall_deco" - "corner" - "flowers" - "tree_base" - "tree_mid" - "tree_mid 2" - "tree_top" - "solid" - "ceiling" - "ramp" - "ceiling2wall" - "help" - "focus/ignore_mouse" - "focus/stop_mouse" - "size_flags/horizontal" - "text" - "percent_visible" - "lines_skipped" - "max_lines_visible" - "Label" - "platform_floor" - "platform_edge" - - "node_count" - 42 - "node_paths" - - - "nodes" - -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 6, 2, -1, 3, 3, 1, 4, 2, 5, 3, 0, 1, 0, 18, 7, -1, 10, 8, 4, 9, 5, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 2, 0, 19, 19, -1, 4, 20, 11, 21, 12, 22, 13, 23, 4, 0, 0, 0, 6, 24, -1, 4, 25, 14, 3, 1, 4, 2, 5, 15, 0, 4, 0, 18, 7, -1, 10, 8, 4, 9, 16, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 5, 0, 19, 19, -1, 4, 20, 11, 21, 17, 22, 13, 23, 4, 0, 0, 0, 6, 26, -1, 4, 25, 18, 3, 1, 4, 2, 5, 19, 0, 7, 0, 18, 7, -1, 10, 8, 4, 9, 20, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 8, 0, 19, 19, -1, 4, 20, 11, 21, 21, 22, 13, 23, 4, 0, 0, 0, 6, 27, -1, 4, 25, 22, 3, 1, 4, 2, 5, 23, 0, 10, 0, 18, 7, -1, 10, 8, 4, 9, 24, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 11, 0, 19, 19, -1, 4, 20, 11, 21, 25, 22, 13, 23, 4, 0, 0, 0, 6, 28, -1, 4, 25, 26, 3, 1, 4, 2, 5, 27, 0, 13, 0, 18, 7, -1, 10, 8, 4, 9, 28, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 14, 0, 19, 19, -1, 4, 20, 11, 21, 29, 22, 13, 23, 4, 0, 0, 0, 6, 29, -1, 4, 25, 30, 3, 1, 4, 2, 5, 31, 0, 16, 0, 18, 7, -1, 10, 8, 4, 9, 32, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 17, 0, 19, 19, -1, 4, 20, 11, 21, 33, 22, 13, 23, 4, 0, 0, 0, 6, 30, -1, 4, 25, 34, 3, 1, 4, 2, 5, 35, 0, 19, 0, 18, 7, -1, 10, 8, 4, 9, 36, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 20, 0, 19, 19, -1, 4, 20, 11, 21, 33, 22, 13, 23, 4, 0, 0, 0, 6, 31, -1, 4, 25, 37, 3, 1, 4, 2, 5, 38, 0, 0, 0, 6, 32, -1, 4, 25, 39, 3, 1, 4, 2, 5, 40, 0, 0, 0, 6, 33, -1, 4, 25, 41, 3, 1, 4, 2, 5, 42, 0, 0, 0, 6, 34, -1, 4, 25, 43, 3, 1, 4, 2, 5, 44, 0, 0, 0, 6, 35, -1, 4, 25, 45, 3, 1, 4, 2, 5, 46, 0, 26, 0, 18, 7, -1, 10, 8, 4, 9, 47, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 27, 0, 19, 19, -1, 4, 20, 11, 21, 48, 22, 13, 23, 4, 0, 0, 0, 6, 36, -1, 4, 25, 49, 3, 1, 4, 2, 5, 50, 0, 29, 0, 18, 7, -1, 10, 8, 4, 9, 51, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 30, 0, 19, 19, -1, 4, 20, 11, 21, 52, 22, 13, 23, 4, 0, 0, 0, 6, 37, -1, 4, 25, 53, 3, 1, 4, 2, 5, 54, 0, 32, 0, 18, 7, -1, 10, 8, 4, 9, 55, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 33, 0, 19, 19, -1, 4, 20, 11, 21, 21, 22, 13, 23, 4, 0, 0, 0, 46, 38, -1, 7, 39, 2, 40, 2, 41, 56, 42, 57, 43, 10, 44, 11, 45, 58, 0, 0, 0, 6, 47, -1, 4, 25, 59, 3, 1, 4, 2, 5, 60, 0, 36, 0, 18, 7, -1, 10, 8, 4, 9, 61, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 37, 0, 19, 19, -1, 4, 20, 11, 21, 62, 22, 13, 23, 4, 0, 0, 0, 6, 48, -1, 4, 25, 63, 3, 1, 4, 2, 5, 64, 0, 39, 0, 18, 7, -1, 10, 8, 4, 9, 65, 10, 6, 11, 4, 12, 7, 13, 7, 14, 8, 15, 9, 16, 10, 17, 9, 0, 40, 0, 19, 19, -1, 4, 20, 11, 21, 66, 22, 13, 23, 4, 0 - "variants" - - - "__editor_plugin_screen__" - "Script" - "__editor_plugin_states__" - - "2D" - - "ofs" - -446.534, -87.6905 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1.670183 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - True - 0, 0, 64, 64 - False - - 1, -0, 0, 1, 0, 0 - 1 - 0, 0 - 0 - 1 - 0 - 32, -24, 32, 32, -32, 32, -32, -24 - -1, -1 - 64, 0 - 64, 0, 64, 64 - - -32, -24, 24, -24, 24, 32, -32, 32 - 64, 64 - 64, 64, 64, 64 - - -32, -32, 24, -32, 24, 32, -32, 32 - 96, 128 - 320, 128, 128, 64 - - -64, -32, -8, -32, -8, 32, -64, 32 - 64, 192 - 64, 128, 64, 64 - - -32, -32, 24, -32, 32, -24, 32, 32, -32, 32 - 128, 192 - 192, 192, 64, 64 - - -32, 32, 32, 32, 32, -24, -32, -24 - 192, 192 - 256, 192, 64, 64 - - 192, 128 - 256, 128, 64, 64 - 192, 64 - 256, 64, 64, 64 - 192, 0 - 256, 0, 64, 64 - 0, 64 - 0, 64, 64, 64 - 0, 128 - 384, 64, 64, 64 - - 32, -32, 32, 32, -32, 32, -32, -32 - 256, 224 - 128, 128, 64, 128 - - -32, -56, 32, 8, 32, 64, -32, 64 - 0, 192 - 448, 64, 64, 64 - - 2 - "This scene serves as a tool for editing the tileset. Nodes (sprites) and their respective collisions are 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.xml in this case), can be opened to be used into a TileMap node for editing a tile map. " - -1 - 0, 256 - 128, 0, 64, 64 - - 32, -24, 32, 24, -32, 24, -32, -24 - 64, 256 - 192, 0, 64, 64 - - 24, -24, 24, 24, -32, 24, -32, -24 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/platformer/types.cache b/demos/2d/platformer/types.cache deleted file mode 100644 index a215e5f1377..00000000000 --- a/demos/2d/platformer/types.cache +++ /dev/null @@ -1,64 +0,0 @@ -res://tileset.xml -TileSet -res://sound_shoot.wav -Sample -res://sound_hit.wav -Sample -res://scroll_bg_cloud_2.png -Texture -res://enemy.png -Texture -res://bullet.gd -GDScript -res://scroll_bg_cloud_3.png -Texture -res://coin.gd -GDScript -res://stage.xml -PackedScene -res://moving_platform.xml -PackedScene -res://bullet.png -Texture -res://player.xml -PackedScene -res://parallax_bg.xml -PackedScene -res://music.ogg -AudioStreamOGGVorbis -res://coin.png -Texture -res://sound_explode.wav -Sample -res://sound_coin.wav -Sample -res://robot_demo.png -Texture -res://moving_platform.gd -GDScript -res://enemy.xml -PackedScene -res://tileset_edit.xml -PackedScene -res://scroll_bg_fg_1.png -Texture -res://player.gd -GDScript -res://scroll_bg_fg_2.png -Texture -res://moving_platform.png -Texture -res://enemy.gd -GDScript -res://bullet.xml -PackedScene -res://tiles_demo.png -Texture -res://sound_jump.wav -Sample -res://scroll_bg_sky.png -Texture -res://scroll_bg_cloud_1.png -Texture -res://coin.xml -PackedScene diff --git a/demos/2d/pong/engine.cfg b/demos/2d/pong/engine.cfg index 9e76449bcf8..418f02c06b5 100644 --- a/demos/2d/pong/engine.cfg +++ b/demos/2d/pong/engine.cfg @@ -1,7 +1,7 @@ [application] name="Pong" -main_scene="pong.xml" +main_scene="pong.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/pong/pong.tscn b/demos/2d/pong/pong.tscn new file mode 100644 index 00000000000..95aecc60f32 --- /dev/null +++ b/demos/2d/pong/pong.tscn @@ -0,0 +1,33 @@ +[gd_scene load_steps=6 format=1] + +[ext_resource path="res://pong.gd" type="Script" id=1] +[ext_resource path="res://left_pallete.png" type="Texture" id=2] +[ext_resource path="res://right_pallete.png" type="Texture" id=3] +[ext_resource path="res://separator.png" type="Texture" id=4] +[ext_resource path="res://ball.png" type="Texture" id=5] + +[node name="game" type="Node2D"] + +script/script = ExtResource( 1 ) + +[node name="left" type="Sprite" parent="."] + +transform/pos = Vector2( 67.6875, 183.208 ) +texture = ExtResource( 2 ) + +[node name="right" type="Sprite" parent="."] + +transform/pos = Vector2( 577, 187 ) +texture = ExtResource( 3 ) + +[node name="separator" type="Sprite" parent="."] + +transform/pos = Vector2( 320, 200 ) +texture = ExtResource( 4 ) + +[node name="ball" type="Sprite" parent="."] + +transform/pos = Vector2( 320.283, 188 ) +texture = ExtResource( 5 ) + + diff --git a/demos/2d/pong/pong.xml b/demos/2d/pong/pong.xml deleted file mode 100644 index 2189be7c620..00000000000 --- a/demos/2d/pong/pong.xml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "game" - "script/script" - "__meta__" - "Node2D" - "left" - "transform/pos" - "texture" - "Sprite" - "right" - "separator" - "ball" - - "node_count" - 5 - "node_paths" - - - "nodes" - -1, -1, 3, 0, -1, 2, 1, 0, 2, 1, 0, 0, 0, 7, 4, -1, 2, 5, 2, 6, 3, 0, 0, 0, 7, 8, -1, 2, 5, 4, 6, 5, 0, 0, 0, 7, 9, -1, 2, 5, 6, 6, 7, 0, 0, 0, 7, 10, -1, 2, 5, 8, 6, 9, 0 - "variants" - - - - "__editor_plugin_screen__" - "Script" - "__editor_plugin_states__" - - "2D" - - "ofs" - -54.59, -36.0052 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1.108033 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 67.6875, 183.208 - - 577, 187 - - 320, 200 - - 320.283, 188 - - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/rubegoldberg/ball.tscn b/demos/2d/rubegoldberg/ball.tscn new file mode 100644 index 00000000000..0b11461c3b6 --- /dev/null +++ b/demos/2d/rubegoldberg/ball.tscn @@ -0,0 +1,44 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://art/bowling_ball.png" type="Texture" id=1] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 32.0 + +[node name="Ball" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 3.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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 + +[node name="Sprite" type="Sprite" parent="."] + +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/demos/2d/rubegoldberg/ball.xml b/demos/2d/rubegoldberg/ball.xml deleted file mode 100644 index 73b699514c4..00000000000 --- a/demos/2d/rubegoldberg/ball.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - - 0 - 32 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "Ball" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "__meta__" - "RigidBody2D" - "Sprite" - "texture" - "CollisionShape2D" - "shape" - "trigger" - "_update_shape_index" - - "node_count" - 3 - "node_paths" - - - "nodes" - -1, -1, 23, 0, -1, 22, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 6, 12, 0, 13, 4, 14, 4, 15, 0, 16, 0, 17, 8, 18, 9, 19, 7, 20, 10, 21, 10, 22, 11, 0, 0, 0, 24, 24, -1, 1, 25, 12, 0, 0, 0, 26, 26, -1, 3, 27, 1, 28, 0, 29, 13, 0 - "variants" - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0 - 3 - 1 - 0 - True - 0, 0 - -1 - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -80.5995, -149.825 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1.50734 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/rubegoldberg/box.tscn b/demos/2d/rubegoldberg/box.tscn new file mode 100644 index 00000000000..f9f0455c1ff --- /dev/null +++ b/demos/2d/rubegoldberg/box.tscn @@ -0,0 +1,44 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://art/box.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 32, 32 ) + +[node name="box" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 + +[node name="Sprite" type="Sprite" parent="."] + +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/demos/2d/rubegoldberg/box.xml b/demos/2d/rubegoldberg/box.xml deleted file mode 100644 index c30d30e9f9d..00000000000 --- a/demos/2d/rubegoldberg/box.xml +++ /dev/null @@ -1,214 +0,0 @@ - - - - - 0 - 32, 32 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "box" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "__meta__" - "RigidBody2D" - "Sprite" - "texture" - "CollisionShape2D" - "shape" - "trigger" - "_update_shape_index" - - "node_count" - 3 - "node_paths" - - - "nodes" - -1, -1, 23, 0, -1, 22, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 5, 10, 6, 11, 5, 12, 0, 13, 4, 14, 4, 15, 0, 16, 0, 17, 7, 18, 8, 19, 6, 20, 9, 21, 9, 22, 10, 0, 0, 0, 24, 24, -1, 1, 25, 11, 0, 0, 0, 26, 26, -1, 3, 27, 1, 28, 0, 29, 12, 0 - "variants" - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0 - 1 - 0 - True - 0, 0 - -1 - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -125, -163 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/rubegoldberg/domino.tscn b/demos/2d/rubegoldberg/domino.tscn new file mode 100644 index 00000000000..3b2dc134dc5 --- /dev/null +++ b/demos/2d/rubegoldberg/domino.tscn @@ -0,0 +1,44 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://art/domino.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 16, 64 ) + +[node name="domino" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 1.0 +friction = 0.5 +bounce = 0.0 +gravity_scale = 1.0 +custom_integrator = false +continuous_cd = 0 +contacts_reported = 0 +contact_monitor = false +sleeping = false +can_sleep = true +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 + +[node name="Sprite" type="Sprite" parent="."] + +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/demos/2d/rubegoldberg/domino.xml b/demos/2d/rubegoldberg/domino.xml deleted file mode 100644 index ec86c833df2..00000000000 --- a/demos/2d/rubegoldberg/domino.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - - 0 - 16, 64 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "domino" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "__meta__" - "RigidBody2D" - "Sprite" - "texture" - "CollisionShape2D" - "shape" - "trigger" - "_update_shape_index" - - "node_count" - 3 - "node_paths" - - - "nodes" - -1, -1, 23, 0, -1, 22, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 7, 11, 5, 12, 0, 13, 4, 14, 4, 15, 0, 16, 0, 17, 8, 18, 9, 19, 7, 20, 10, 21, 10, 22, 11, 0, 0, 0, 24, 24, -1, 1, 25, 12, 0, 0, 0, 26, 26, -1, 3, 27, 1, 28, 0, 29, 13, 0 - "variants" - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0 - 1 - 0.5 - 0 - True - 0, 0 - -1 - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -135, -114 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/rubegoldberg/engine.cfg b/demos/2d/rubegoldberg/engine.cfg index bd1cc79ddba..1f746c136d5 100644 --- a/demos/2d/rubegoldberg/engine.cfg +++ b/demos/2d/rubegoldberg/engine.cfg @@ -1,7 +1,7 @@ [application] name="Rube Goldberg" -main_scene="res://rubegoldberg.xml" +main_scene="res://rubegoldberg.tscn" icon="res://icon.png" [physics_2d] diff --git a/demos/2d/rubegoldberg/pendulum.tscn b/demos/2d/rubegoldberg/pendulum.tscn new file mode 100644 index 00000000000..b9e1bcd1f99 --- /dev/null +++ b/demos/2d/rubegoldberg/pendulum.tscn @@ -0,0 +1,248 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://art/box.png" type="Texture" id=1] +[ext_resource path="res://art/bowling_ball.png" type="Texture" id=2] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 3, 12 ) + +[sub_resource type="CircleShape2D" id=2] + +custom_solver_bias = 0.0 +radius = 16.0 + +[node name="pendulum" type="Node2D"] + +[node name="union_0" type="RigidBody2D" parent="."] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 0.2 +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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +__meta__ = { "_edit_group_":true } + +[node name="Sprite" type="Sprite" parent="union_0"] + +transform/scale = Vector2( 0.1, 0.4 ) +texture = ExtResource( 1 ) + +[node name="collision" type="CollisionShape2D" parent="union_0"] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="union_ 2" type="RigidBody2D" parent="."] + +transform/pos = Vector2( 0, 26.9432 ) +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 0.2 +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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +__meta__ = { "_edit_group_":true } + +[node name="Sprite" type="Sprite" parent="union_ 2"] + +transform/scale = Vector2( 0.1, 0.4 ) +texture = ExtResource( 1 ) + +[node name="collision" type="CollisionShape2D" parent="union_ 2"] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="union_ 3" type="RigidBody2D" parent="."] + +transform/pos = Vector2( 0, 53.8863 ) +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 0.2 +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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +__meta__ = { "_edit_group_":true } + +[node name="Sprite" type="Sprite" parent="union_ 3"] + +transform/scale = Vector2( 0.1, 0.4 ) +texture = ExtResource( 1 ) + +[node name="collision" type="CollisionShape2D" parent="union_ 3"] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="union_ 4" type="RigidBody2D" parent="."] + +transform/pos = Vector2( 0, 81.4282 ) +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 0.2 +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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +__meta__ = { "_edit_group_":true } + +[node name="Sprite" type="Sprite" parent="union_ 4"] + +transform/scale = Vector2( 0.1, 0.4 ) +texture = ExtResource( 1 ) + +[node name="collision" type="CollisionShape2D" parent="union_ 4"] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="joint1" type="PinJoint2D" parent="."] + +transform/pos = Vector2( 0, 13.771 ) +node_a = NodePath("../union_0") +node_b = NodePath("../union_ 2") +bias/bias = 0.0 +collision/exclude_nodes = true +softness = 0.0 + +[node name="joint 2_3" type="PinJoint2D" parent="."] + +transform/pos = Vector2( 0, 40.7141 ) +node_a = NodePath("../union_ 2") +node_b = NodePath("../union_ 3") +bias/bias = 0.0 +collision/exclude_nodes = true +softness = 0.0 + +[node name="joint 3_4" type="PinJoint2D" parent="."] + +transform/pos = Vector2( 0, 67.6573 ) +node_a = NodePath("../union_ 3") +node_b = NodePath("../union_ 4") +bias/bias = 0.2 +collision/exclude_nodes = true +softness = 0.0 + +[node name="ball" type="RigidBody2D" parent="."] + +transform/pos = Vector2( 0, 106.787 ) +transform/scale = Vector2( 0.98476, 1 ) +input/pickable = false +shapes/0/shape = SubResource( 2 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 0.2 +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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +__meta__ = { "_edit_group_":true } + +[node name="Sprite" type="Sprite" parent="ball"] + +transform/scale = Vector2( 0.5, 0.5 ) +texture = ExtResource( 2 ) + +[node name="collision" type="CollisionShape2D" parent="ball"] + +shape = SubResource( 2 ) +trigger = false +_update_shape_index = -1 + +[node name="joint 4_ball" type="PinJoint2D" parent="."] + +transform/pos = Vector2( 0, 92.5287 ) +node_a = NodePath("../union_ 4") +node_b = NodePath("../ball") +bias/bias = 0.0 +collision/exclude_nodes = true +softness = 0.0 + +[node name="joint wall" type="PinJoint2D" parent="."] + +transform/pos = Vector2( 0, -12.1024 ) +node_a = NodePath("../union_0") +node_b = NodePath("") +bias/bias = 0.0 +collision/exclude_nodes = true +softness = 0.0 + + diff --git a/demos/2d/rubegoldberg/pendulum.xml b/demos/2d/rubegoldberg/pendulum.xml deleted file mode 100644 index 90ad45f2873..00000000000 --- a/demos/2d/rubegoldberg/pendulum.xml +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - 0 - 3, 12 - - - - 0 - 16 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "pendulum" - "__meta__" - "Node2D" - "union_0" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "mode" - "mass" - "friction" - "bounce" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "RigidBody2D" - "Sprite" - "transform/scale" - "texture" - "collision" - "shape" - "trigger" - "_update_shape_index" - "CollisionShape2D" - "union_ 2" - "transform/pos" - "union_ 3" - "union_ 4" - "joint1" - "node_a" - "node_b" - "bias/bias" - "softness" - "PinJoint2D" - "joint 2_3" - "joint 3_4" - "ball" - "joint 4_ball" - "joint wall" - - "node_count" - 21 - "node_paths" - - - "nodes" - -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 25, 3, -1, 22, 4, 1, 5, 2, 6, 3, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 12, 0, 1, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 1, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 25, 34, -1, 23, 35, 16, 4, 1, 5, 2, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 4, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 4, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 25, 36, -1, 23, 35, 19, 4, 1, 5, 2, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 7, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 7, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 25, 37, -1, 23, 35, 20, 4, 1, 5, 2, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 10, 0, 26, 26, -1, 2, 27, 13, 28, 14, 0, 10, 0, 33, 29, -1, 3, 30, 2, 31, 1, 32, 15, 0, 0, 0, 43, 38, -1, 5, 35, 21, 39, 22, 40, 23, 41, 8, 42, 8, 0, 0, 0, 43, 44, -1, 5, 35, 24, 39, 23, 40, 25, 41, 8, 42, 8, 0, 0, 0, 43, 45, -1, 5, 35, 26, 39, 25, 40, 27, 41, 6, 42, 8, 0, 0, 0, 25, 46, -1, 24, 35, 28, 27, 29, 4, 1, 5, 30, 6, 17, 7, 1, 8, 4, 9, 4, 10, 5, 11, 6, 12, 7, 13, 8, 14, 7, 15, 1, 16, 5, 17, 5, 18, 1, 19, 1, 20, 9, 21, 10, 22, 8, 23, 11, 24, 11, 1, 18, 0, 16, 0, 26, 26, -1, 2, 27, 31, 28, 32, 0, 16, 0, 33, 29, -1, 3, 30, 30, 31, 1, 32, 15, 0, 0, 0, 43, 47, -1, 5, 35, 33, 39, 27, 40, 34, 41, 8, 42, 8, 0, 0, 0, 43, 48, -1, 5, 35, 35, 39, 22, 40, 36, 41, 8, 42, 8, 0 - "variants" - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -121.028, 0.923909 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 2.78951 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0 - 0.2 - 1 - 0 - True - 0, 0 - -1 - - "_edit_group_" - True - - 0.1, 0.4 - - -1 - 0, 26.9432 - 1, -0, 0, 1, 0, 0 - - "_edit_group_" - True - - 0, 53.8863 - 0, 81.4282 - 0, 13.771 - "../union_0" - "../union_ 2" - 0, 40.7141 - "../union_ 3" - 0, 67.6573 - "../union_ 4" - 0, 106.787 - 0.98476, 1 - - 0.5, 0.5 - - 0, 92.5287 - "../ball" - 0, -12.1024 - "" - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/rubegoldberg/platform.tscn b/demos/2d/rubegoldberg/platform.tscn new file mode 100644 index 00000000000..70584ca75ce --- /dev/null +++ b/demos/2d/rubegoldberg/platform.tscn @@ -0,0 +1,33 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://art/platform.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 128, 16 ) + +[node name="platform" type="StaticBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/demos/2d/rubegoldberg/platform.xml b/demos/2d/rubegoldberg/platform.xml deleted file mode 100644 index 09cd0fdda6e..00000000000 --- a/demos/2d/rubegoldberg/platform.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - - 0 - 128, 16 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "platform" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "constant_linear_velocity" - "constant_angular_velocity" - "friction" - "bounce" - "__meta__" - "StaticBody2D" - "Sprite" - "texture" - "CollisionShape2D" - "shape" - "trigger" - "_update_shape_index" - - "node_count" - 3 - "node_paths" - - - "nodes" - -1, -1, 12, 0, -1, 11, 1, 0, 2, 1, 3, 2, 4, 0, 5, 3, 6, 3, 7, 4, 8, 5, 9, 6, 10, 5, 11, 7, 0, 0, 0, 13, 13, -1, 1, 14, 8, 0, 0, 0, 15, 15, -1, 3, 16, 1, 17, 0, 18, 9, 0 - "variants" - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0, 0 - 0 - 1 - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -135, -114 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/rubegoldberg/rubegoldberg.tscn b/demos/2d/rubegoldberg/rubegoldberg.tscn new file mode 100644 index 00000000000..995901d4ae7 --- /dev/null +++ b/demos/2d/rubegoldberg/rubegoldberg.tscn @@ -0,0 +1,98 @@ +[gd_scene load_steps=7 format=1] + +[ext_resource path="res://platform.tscn" type="PackedScene" id=1] +[ext_resource path="res://ball.tscn" type="PackedScene" id=2] +[ext_resource path="res://domino.tscn" type="PackedScene" id=3] +[ext_resource path="res://seesaw.tscn" type="PackedScene" id=4] +[ext_resource path="res://box.tscn" type="PackedScene" id=5] +[ext_resource path="res://pendulum.tscn" type="PackedScene" id=6] + +[node name="Node" type="Node"] + +[node name="platform" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 116.881, 145.589 ) +transform/rot = -20.8796 + +[node name="platform 2" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 336.29, 264.52 ) + +[node name="platform 3" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 526.99, 264.52 ) + +[node name="Ball" parent="." instance=ExtResource( 2 )] + +transform/pos = Vector2( 76.0801, 67.2141 ) + +[node name="domino" parent="." instance=ExtResource( 3 )] + +transform/pos = Vector2( 262.764, 182.008 ) + +[node name="domino 2" parent="." instance=ExtResource( 3 )] + +transform/pos = Vector2( 356.951, 182.008 ) + +[node name="domino 4" parent="." instance=ExtResource( 3 )] + +transform/pos = Vector2( 448.834, 179.291 ) + +[node name="platform 4" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 772.686, 345.917 ) +transform/rot = 76.7716 + +[node name="platform 5" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 640.041, 335.365 ) +transform/rot = 90.0 +transform/scale = Vector2( 0.5, 1 ) + +[node name="Ball 2" parent="." instance=ExtResource( 2 )] + +transform/pos = Vector2( 616.342, 214.247 ) + +[node name="platform 6" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 679.231, 588.598 ) + +[node name="platform 7" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 424.491, 588.598 ) + +[node name="platform 8" parent="." instance=ExtResource( 1 )] + +transform/pos = Vector2( 185.655, 588.598 ) + +[node name="SeeSaw" parent="." instance=ExtResource( 4 )] + +transform/pos = Vector2( 602.935, 554.501 ) + +[node name="box" parent="." instance=ExtResource( 5 )] + +transform/pos = Vector2( 476.002, 509.406 ) +transform/rot = 21.7373 + +[node name="pendulum" parent="." instance=ExtResource( 6 )] + +transform/pos = Vector2( 391.607, 305.444 ) + +[node name="pendulum 2" parent="." instance=ExtResource( 6 )] + +transform/pos = Vector2( 343.172, 303.774 ) + +[node name="pendulum 3" parent="." instance=ExtResource( 6 )] + +transform/pos = Vector2( 288.056, 303.774 ) + +[node name="pendulum 4" parent="." instance=ExtResource( 6 )] + +transform/pos = Vector2( 236.28, 303.774 ) + +[node name="Ball 5" parent="." instance=ExtResource( 2 )] + +transform/pos = Vector2( 116.165, 526.515 ) +velocity/linear = Vector2( 0, -200 ) + + diff --git a/demos/2d/rubegoldberg/rubegoldberg.xml b/demos/2d/rubegoldberg/rubegoldberg.xml deleted file mode 100644 index 490b0f9d34c..00000000000 --- a/demos/2d/rubegoldberg/rubegoldberg.xml +++ /dev/null @@ -1,241 +0,0 @@ - - - - - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "Node" - "__meta__" - "platform" - "transform/pos" - "transform/rot" - "input/pickable" - "collision/layers" - "collision/mask" - "platform 2" - "platform 3" - "Ball" - "gravity_scale" - "sleeping" - "damp_override/linear" - "damp_override/angular" - "domino" - "domino 2" - "domino 4" - "platform 4" - "platform 5" - "transform/scale" - "Ball 2" - "platform 6" - "platform 7" - "platform 8" - "SeeSaw" - "box" - "pendulum" - "pendulum 2" - "pendulum 3" - "pendulum 4" - "Ball 5" - "velocity/linear" - - "node_count" - 21 - "node_paths" - - - "nodes" - -1, -1, 0, 0, -1, 1, 1, 0, 0, 0, 0, 2147483647, 2, 1, 5, 3, 2, 4, 3, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 8, 1, 4, 3, 6, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 9, 1, 4, 3, 7, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 10, 8, 8, 3, 9, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 15, 12, 8, 3, 13, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 16, 12, 8, 3, 14, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 17, 12, 8, 3, 15, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 18, 1, 5, 3, 16, 4, 17, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 19, 1, 6, 3, 18, 4, 19, 20, 20, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 21, 8, 8, 3, 21, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 22, 1, 4, 3, 22, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 23, 1, 4, 3, 23, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 24, 1, 4, 3, 24, 5, 4, 6, 5, 7, 5, 0, 0, 0, 2147483647, 25, 25, 1, 3, 26, 0, 0, 0, 2147483647, 26, 27, 9, 3, 28, 4, 29, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 13, 11, 14, 11, 0, 0, 0, 2147483647, 27, 30, 1, 3, 31, 0, 0, 0, 2147483647, 28, 30, 1, 3, 32, 0, 0, 0, 2147483647, 29, 30, 1, 3, 33, 0, 0, 0, 2147483647, 30, 30, 1, 3, 34, 0, 0, 0, 2147483647, 31, 8, 9, 3, 35, 5, 4, 6, 5, 7, 5, 11, 10, 12, 4, 32, 36, 13, 11, 14, 11, 0 - "variants" - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -717.096, -249.162 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 0.598737 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - 116.881, 145.589 - -20.87962 - False - 1 - 336.29, 264.52 - 526.99, 264.52 - - 76.0801, 67.2141 - 1 - -1 - - 262.764, 182.008 - 356.951, 182.008 - 448.834, 179.291 - 772.686, 345.917 - 76.771606 - 640.041, 335.365 - 90 - 0.5, 1 - 616.342, 214.247 - 679.231, 588.598 - 424.491, 588.598 - 185.655, 588.598 - - 602.935, 554.501 - - 476.002, 509.406 - 21.737282 - - 391.607, 305.444 - 343.172, 303.774 - 288.056, 303.774 - 236.28, 303.774 - 116.165, 526.515 - 0, -200 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/rubegoldberg/seesaw.tscn b/demos/2d/rubegoldberg/seesaw.tscn new file mode 100644 index 00000000000..3b915d3e7ff --- /dev/null +++ b/demos/2d/rubegoldberg/seesaw.tscn @@ -0,0 +1,89 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://art/seesaw_base.png" type="Texture" id=1] +[ext_resource path="res://art/seesaw_top.png" type="Texture" id=2] + +[sub_resource type="ConcavePolygonShape2D" id=1] + +custom_solver_bias = 0.0 +segments = Vector2Array( -32.6231, 32.0838, -1.28218, -31.1383, -1.28218, -31.1383, 33.8412, 33.1645, 33.8412, 33.1645, -32.6231, 32.0838 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -99.0874, 7.76759, -125.025, -8.98358, 125.162, -8.44321, 99.2248, 7.22723 ) + +[node name="SeeSaw" type="Node2D"] + +[node name="Sprite" type="Sprite" parent="."] + +texture = ExtResource( 1 ) + +[node name="StaticBody2D" type="StaticBody2D" parent="Sprite"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 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="Sprite/StaticBody2D"] + +build_mode = 0 +polygon = Vector2Array( -32.6231, 32.0838, -1.28218, -31.1383, 33.8412, 33.1645 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="RigidBody2D" type="RigidBody2D" parent="."] + +transform/pos = Vector2( 1.19748, -29.9368 ) +transform/rot = 16.2233 +input/pickable = false +shapes/0/shape = SubResource( 2 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +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 +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 + +[node name="Sprite" type="Sprite" parent="RigidBody2D"] + +transform/scale = Vector2( 1, 0.5 ) +texture = ExtResource( 2 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="RigidBody2D"] + +build_mode = 0 +polygon = Vector2Array( -125.025, -8.98358, 125.162, -8.44321, 99.2248, 7.22723, -99.0874, 7.76759 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="PinJoint2D" type="PinJoint2D" parent="."] + +transform/pos = Vector2( 0, -31.1343 ) +node_a = NodePath("../RigidBody2D") +node_b = NodePath("../Sprite/StaticBody2D") +bias/bias = 0.0 +collision/exclude_nodes = true +softness = 0.0 + + diff --git a/demos/2d/rubegoldberg/seesaw.xml b/demos/2d/rubegoldberg/seesaw.xml deleted file mode 100644 index 281e4e7c0d2..00000000000 --- a/demos/2d/rubegoldberg/seesaw.xml +++ /dev/null @@ -1,243 +0,0 @@ - - - - - - 0 - -32.6231, 32.0838, -1.28218, -31.1383, -1.28218, -31.1383, 33.8412, 33.1645, 33.8412, 33.1645, -32.6231, 32.0838 - - - - 0 - -99.0874, 7.76759, -125.025, -8.98358, 125.162, -8.44321, 99.2248, 7.22723 - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "SeeSaw" - "__meta__" - "Node2D" - "Sprite" - "texture" - "StaticBody2D" - "input/pickable" - "shapes/0/shape" - "shapes/0/transform" - "shapes/0/trigger" - "collision/layers" - "collision/mask" - "constant_linear_velocity" - "constant_angular_velocity" - "friction" - "bounce" - "CollisionPolygon2D" - "build_mode" - "polygon" - "shape_range" - "trigger" - "RigidBody2D" - "transform/pos" - "transform/rot" - "mode" - "mass" - "gravity_scale" - "custom_integrator" - "continuous_cd" - "contacts_reported" - "contact_monitor" - "sleeping" - "can_sleep" - "velocity/linear" - "velocity/angular" - "damp_override/linear" - "damp_override/angular" - "transform/scale" - "PinJoint2D" - "node_a" - "node_b" - "bias/bias" - "softness" - - "node_count" - 8 - "node_paths" - - - "nodes" - -1, -1, 2, 0, -1, 1, 1, 0, 0, 0, 0, 3, 3, -1, 1, 4, 1, 0, 1, 0, 5, 5, -1, 10, 6, 2, 7, 3, 8, 4, 9, 2, 10, 5, 11, 5, 12, 6, 13, 7, 14, 8, 15, 7, 0, 2, 0, 16, 16, -1, 4, 17, 9, 18, 10, 19, 11, 20, 2, 0, 0, 0, 21, 21, -1, 23, 22, 12, 23, 13, 6, 2, 7, 14, 8, 4, 9, 2, 10, 5, 11, 5, 24, 9, 25, 8, 14, 8, 15, 7, 26, 8, 27, 2, 28, 9, 29, 9, 30, 2, 31, 2, 32, 15, 33, 6, 34, 7, 35, 16, 36, 16, 0, 4, 0, 3, 3, -1, 2, 37, 17, 4, 18, 0, 4, 0, 16, 16, -1, 4, 17, 9, 18, 19, 19, 11, 20, 2, 0, 0, 0, 38, 38, -1, 5, 22, 20, 39, 21, 40, 22, 41, 7, 42, 7, 0 - "variants" - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -277.779, -292.484 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1.670183 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - False - - 1, 0, 0, 1, 0, 0 - 1 - 0, 0 - 0 - 1 - 0 - -32.6231, 32.0838, -1.28218, -31.1383, 33.8412, 33.1645 - -1, -1 - 1.19748, -29.9368 - 16.223282 - - True - -1 - 1, 0.5 - - -125.025, -8.98358, 125.162, -8.44321, 99.2248, 7.22723, -99.0874, 7.76759 - 0, -31.1343 - "../RigidBody2D" - "../Sprite/StaticBody2D" - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/screen_space_shaders/engine.cfg b/demos/2d/screen_space_shaders/engine.cfg index f7caa7abbc2..9a74e7b7bd3 100644 --- a/demos/2d/screen_space_shaders/engine.cfg +++ b/demos/2d/screen_space_shaders/engine.cfg @@ -1,7 +1,7 @@ [application] name="Screen-Space Shaders" -main_scene="res://screen_shaders.scn" +main_scene="res://screen_shaders.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/screen_space_shaders/screen_shaders.scn b/demos/2d/screen_space_shaders/screen_shaders.scn deleted file mode 100644 index 00c7fe8eba02c8d08ace1991d680ff5c96d8ddb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7897 zcmZ`;2UJtb)}E6>LLya)6gd-$1PFwpq9QU$r~-1Ohz*kvLI|W_5)j1_6f5f0YcE$( zuDxBwU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b>-5HYWr+p3uu diff --git a/demos/2d/sdf_font/sdf.tscn b/demos/2d/sdf_font/sdf.tscn new file mode 100644 index 00000000000..a3305c2edc8 --- /dev/null +++ b/demos/2d/sdf_font/sdf.tscn @@ -0,0 +1,74 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://font.fnt" type="Font" id=1] + +[sub_resource type="Animation" id=1] + +resource/name = "zoomin_zoomout" +length = 10.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("base:transform/scale") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 5 ), "transitions":FloatArray( -2, -2 ), "values":[ Vector2( 0.5, 0.5 ), Vector2( 20, 20 ) ] } + +[sub_resource type="Animation" id=2] + +length = 15.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("base:transform/rot") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 15 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, -360.0 ] } + +[node name="node" type="Node2D"] + +[node name="base" type="Position2D" parent="."] + +transform/pos = Vector2( 376.532, 275.119 ) +transform/scale = Vector2( 0.5, 0.5 ) + +[node name="Label" type="Label" parent="base"] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = -132.0 +margin/top = -34.0 +margin/right = 124.0 +margin/bottom = 64.0 +custom_fonts/font = ExtResource( 1 ) +custom_colors/font_color = Color( 0.853858, 0.771714, 0.753746, 1 ) +custom_colors/font_color_shadow = Color( 0.56592, 0.454525, 0.518426, 1 ) +text = "Signed Distance\nField Font!!" +align = 1 +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="zoom" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/zoomin_zoomout = SubResource( 1 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "zoomin_zoomout" + +[node name="rotate" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/rotate = SubResource( 2 ) +anims/zoomin_zoomout = SubResource( 1 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "rotate" + + diff --git a/demos/2d/shower_of_bullets/engine.cfg b/demos/2d/shower_of_bullets/engine.cfg index cad5751985a..8db2ae90065 100644 --- a/demos/2d/shower_of_bullets/engine.cfg +++ b/demos/2d/shower_of_bullets/engine.cfg @@ -1,7 +1,7 @@ [application] name="Bullet Shower" -main_scene="res://shower.scn" +main_scene="res://shower.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/shower_of_bullets/shower.scn b/demos/2d/shower_of_bullets/shower.scn deleted file mode 100644 index 9e2181e9c6f6df9a25901e6cd4c2a4b77ed00a84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1909 zcmWkvX>b(B6@D|bmsY2B-|E$cTms#N9AVI#-Iau#2xA?w9YUsOXJ=Ov&CV<{vqAz~ zTG?E7MYsaKh)KMVU>wJ|Ob&305LQya32{>KkxB(Sslk;3JBN>oNhPi_&d~o}cfap_ z@9S4zk57a`aC;R2SOoyvy#NeAngKTLVSphVLL(FsY`WRUYok=+B}Ase88 za0P~J>M28#J2f#OLkYQ~L`s>Ko)Ao3os|tCqKGDVNx9n)qe{x8y&h9Cl%&;}_Rv}; zW{{1n2{~jQiZmleRGAioi8ooZ zvn!A#x5OEmgT+3}5H&NV8wv5(He1dr@i@5;-}1)|aaOVBg;`mmbD2U~ldCG4EE+;o zOeBH7%Oz^@l$tHVs~m60VjzirFvZEpy*8xC`yi5&SbyR%Ty^uBk`S$??sPZ*51*u~ zs$wd-CI;y#`mO8>P)a`Igj6z0)`LLn+=8M-wQ8*kIoCS zW)VLfpnbNl6lzeky?yMQVr66pz_V>fcacK57kD5BO_8vIf4KP%561P?e_K3oe`#Ouf{ zM-@vq0v=B)u4sa31?~p3aoXnEa4mm`mae=(Ukx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/shower_of_bullets/shower.tscn @@ -0,0 +1,51 @@ +[gd_scene load_steps=7 format=1] + +[ext_resource path="res://shower.gd" type="Script" id=1] +[ext_resource path="res://bullets.gd" type="Script" id=2] +[ext_resource path="res://face_happy.png" type="Texture" id=3] +[ext_resource path="res://face_sad.png" type="Texture" id=4] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 14.0 + +[sub_resource type="SpriteFrames" id=2] + +frames = [ ExtResource( 3 ), ExtResource( 4 ) ] + +[node name="shower" type="Node2D"] + +script/script = ExtResource( 1 ) + +[node name="bullets" type="Node2D" parent="."] + +script/script = ExtResource( 2 ) + +[node name="player" type="Area2D" parent="."] + +input/pickable = true +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 + +[node name="sprite" type="AnimatedSprite" parent="player"] + +transform/scale = Vector2( 0.5, 0.5 ) +frames = SubResource( 2 ) + +[node name="collision" type="CollisionShape2D" parent="player"] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[connection signal="body_enter_shape" from="player" to="." method="_on_player_body_enter_shape"] + +[connection signal="body_exit_shape" from="player" to="." method="_on_player_body_exit_shape"] + + diff --git a/demos/2d/space_shooter/asteroid.scn b/demos/2d/space_shooter/asteroid.scn deleted file mode 100644 index 6bca98cd30d2b6a6134396c662256bf05c981a77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3548 zcmXw63z!tul|EIsr@Lo{VcyJ}x!v>RH4O|n$ZJk@_Y5<FF4?_MGRN z(K2@-Kr>wigc7c+OS+Q-A0<93V`{bv(`nIk+mv-HVVLQVY1mLi%ZoCyX=_SKwV;fa zlqrUu(2^lFt=YDwC!vy77L96_7SmFiJsy&ZxRfeQK$o;}nyFew)>PDxE~izgt6a%i zwviSsBQ>g;VoZ}QX?KAs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ou68=S5}PB2NyEaCyW7@RgsP(rxV1LK995rF zs=m3Lu8fGgXq(qC)x4^^o_4X%GhH20^0h)0-0&)>BUe@K7A!NLrUNYeCE}}O2|Xn$ zoHR+-@oP8UKxbhQ>23XYWt$~kV&zjMK$axQKTE8`jrh&b1?t1*yhWSv1@9`2^jMi_ zjxH3R#MC@|ni*eTg$oyQJnIhfhEHOQNKtf>MjR`#y-%()9aqEOsS7 z!gj{G5Ze<1wlm0X$5U)AGHo5{WxoKgMo3ux#CX{f91=fbt0q#i|_QE>u4Vv`x-)nO2g+F>+Ph-tbI{)ks9%*{;_$#$*$f-IQ V86Hi2H$iWK?PJ@M+u1)!{|}@(7XSbN diff --git a/demos/2d/space_shooter/enemy1.tscn b/demos/2d/space_shooter/enemy1.tscn new file mode 100644 index 00000000000..5fd44353823 --- /dev/null +++ b/demos/2d/space_shooter/enemy1.tscn @@ -0,0 +1,108 @@ +[gd_scene load_steps=9 format=1] + +[ext_resource path="res://enemy1.gd" type="Script" id=1] +[ext_resource path="res://enemy1.png" type="Texture" id=2] +[ext_resource path="res://explosion.tscn" type="PackedScene" id=3] +[ext_resource path="res://sound_explode.wav" type="Sample" id=4] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -25.3272, 15.4072, -31.2711, -7.28794, -1.01097, -20.7969, 24.9263, -4.58614, 30.3299, 13.2457, -2.63205, 17.5686 ) + +[sub_resource type="Animation" id=2] + +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:visibility/visible") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] } +tracks/1/type = "value" +tracks/1/path = NodePath("explosion:config/emitting") +tracks/1/interp = 1 +tracks/1/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] } +tracks/2/type = "method" +tracks/2/path = NodePath("..") +tracks/2/interp = 1 +tracks/2/keys = { "times":FloatArray( 0.9 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } + +[sub_resource type="Animation" id=3] + +length = 2.0 +loop = true +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath(".:transform/pos") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0, 1 ), "transitions":FloatArray( -1.86607, -1.86607 ), "values":[ Vector2( 0, -100 ), Vector2( 0, 100 ) ] } + +[sub_resource type="SampleLibrary" id=4] + +samples/sound_explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } + +[node name="enemy1" type="Node2D"] + +[node name="area" type="Area2D" parent="."] + +transform/pos = Vector2( 0, -100 ) +input/pickable = true +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +script/script = ExtResource( 1 ) + +[node name="collision" type="CollisionPolygon2D" parent="area"] + +build_mode = 0 +polygon = Vector2Array( -31.2711, -7.28794, -1.01097, -20.7969, 24.9263, -4.58614, 30.3299, 13.2457, -2.63205, 17.5686, -25.3272, 15.4072 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="sprite" type="Sprite" parent="area"] + +texture = ExtResource( 2 ) + +[node name="explosion" parent="area" instance=ExtResource( 3 )] + +transform/rot = -91.1436 +config/explosiveness = 0.1 +params/gravity_strength = 9.8 + +[node name="anim" type="AnimationPlayer" parent="area"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/explode = SubResource( 2 ) +anims/zigzag = SubResource( 3 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[node name="visibility" type="VisibilityNotifier2D" parent="area"] + +rect = Rect2( -10, -10, 20, 20 ) + +[node name="sfx" type="SamplePlayer2D" parent="area"] + +params/volume_db = 0.0 +params/pitch_scale = 1.0 +params/attenuation/min_distance = 1.0 +params/attenuation/max_distance = 2048.0 +params/attenuation/distance_exp = 1.0 +config/polyphony = 1 +config/samples = SubResource( 4 ) +config/pitch_random = 0.0 + +[connection signal="enter_screen" from="area/visibility" to="area" method="_on_visibility_enter_screen"] + +[connection signal="exit_screen" from="area/visibility" to="area" method="_on_visibility_exit_screen"] + + diff --git a/demos/2d/space_shooter/enemy2.gd b/demos/2d/space_shooter/enemy2.gd index bfdb743103a..cd06579d745 100644 --- a/demos/2d/space_shooter/enemy2.gd +++ b/demos/2d/space_shooter/enemy2.gd @@ -17,7 +17,7 @@ func _process(delta): shoot_timeout = SHOOT_INTERVAL # Instance a shot - var shot = preload("res://enemy_shot.scn").instance() + var shot = preload("res://enemy_shot.tscn").instance() # Set pos as "shoot_from" Position2D node shot.set_pos(get_node("shoot_from").get_global_pos()) # Add it to parent, so it has world coordinates diff --git a/demos/2d/space_shooter/enemy2.scn b/demos/2d/space_shooter/enemy2.scn deleted file mode 100644 index 644add77aa105eb6eb3f284757a91c4f1255d056..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3253 zcmb7Hdvp_J7Qd58lhRQ8ez)XH8Vd4gXel7?JChVz6)03z0ng4%l1Vy}%*2^VX?aMB zAc*T@QC0zwAd2f+a4T~3$Z<^p5s%{WfatPk*BxFi?&>1SF0RVDUpemnzd8BtncO+| z@qORD_xH=9&OiW$K7{~JmIGXH0vxmhFaT)=Y-tAr3}In7Ve>nr@NzlQ8J1NUNEs=# zngMFbbYKa~G&YJqXCRNTd2&xOt{IA^LLtd73~OpsiTUM(Vw#E?11BkQ8cAI-Whfze zdEJVkgp{~q_WH#d@{0slUmK1YY!<3U^BV+2Ge5c``;5U1dvXxWB zBqcHl4_i=AB8;qCjw!a~a&NjPGZLDt-1h&9yq}($hjc#)s%uWSLpizZG^9i_E*pN& z9Ge;uq^H=348uqjBZNqiJuXMUPKI-jL#H$a055yGZPWaI?+9n2x4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<@@7?5o8+{Qvb zGGyTtP8^k%@oV0rL%&BiSrwKI<{!Yfe&*jAKCBN*PWCv(hsBu699EUvLmcadXe2bzRIU|1rYJJjs}fe>T>MqekL3&_A5$vEmor+TwB8K5_DY4qGuV9& zX0hq#Frvw_AS;PhR(*p>e7kt4VwYs1j!eZ`FK`pXFYCYiTo^+ZA_Lj zxtWo$lU~ns7Ik8-5Mgcotf(O1r^4@8Y0~ej!6x4axXD+5b*veR>A0~{20QRRD5AMI zZS3x^_|7vF`3aQLYP?=(Wc*%6^D#Kq-%G~{-?H9b-_3X@W8yO0&sf%povbo-;+?`$ zTn%-s^Dl+h(d1l^ECYAS2_7c(Od6OpGHGJc%;dVUK`@b7*E1^ulc-Zz2rbOchgPOf zjjcI@`PjyMd|5DIGV}2gw6j+o(7`%a!4zg+f*Y6ym`WYE45l&r8<;+(85F)PoFc3! z*4DLPo-m(v>ZA^sNr|tJ9e0b6=ilp;15t&Mr>QIlQ*J{@&t&KRd6qSlhy^rRjmrIS zmR4lmy=cL_yqrp`cI5T-b`Q`Z4#DMyEDV#E4y=5Uj;njDuUigBC@uI&#gpK_7Ou$3Dc zSBL#`(oe1MCcb)RfwtlA&z^X9VSCTcue+9~UpR2@S1a%MW379`>WaJnaHCN6#XsIZ zdF5&C%Fm=1r%JbM>g^ogf2Fu1>CX*9B{^N5d=;i-rcz6#qU_ diff --git a/demos/2d/space_shooter/enemy_shot.tscn b/demos/2d/space_shooter/enemy_shot.tscn new file mode 100644 index 00000000000..da6ed6f8062 --- /dev/null +++ b/demos/2d/space_shooter/enemy_shot.tscn @@ -0,0 +1,99 @@ +[gd_scene load_steps=6 format=1] + +[ext_resource path="res://enemy_shot.gd" type="Script" id=1] +[ext_resource path="res://enemy_shot.png" type="Texture" id=2] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 10, 4 ) + +[sub_resource type="ColorRamp" id=2] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 0.0491249, 0.0113636, 1, 1, 1, 1, 0 ) + +[sub_resource type="Animation" id=3] + +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("hit_splash:config/emitting") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] } +tracks/1/type = "method" +tracks/1/path = NodePath(".") +tracks/1/interp = 1 +tracks/1/keys = { "times":FloatArray( 0.9 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } +tracks/2/type = "value" +tracks/2/path = NodePath("sprite:visibility/visible") +tracks/2/interp = 1 +tracks/2/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] } + +[node name="enemy_shot" type="Area2D"] + +input/pickable = true +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +script/script = ExtResource( 1 ) + +[node name="visibility" type="VisibilityNotifier2D" parent="."] + +transform/pos = Vector2( 1.8353, -0.0742126 ) +transform/scale = Vector2( 1.54149, 0.770745 ) +rect = Rect2( -10, -10, 20, 20 ) + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) + +[node name="collision" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="hit_splash" type="Particles2D" parent="."] + +config/amount = 32 +config/lifetime = 0.5 +config/emitting = false +config/explosiveness = 0.1 +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 50.0 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 3.0 +params/final_size = 3.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +color/color_ramp = SubResource( 2 ) + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/splash = SubResource( 3 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[connection signal="exit_screen" from="visibility" to="." method="_on_visibility_exit_screen"] + + diff --git a/demos/2d/space_shooter/engine.cfg b/demos/2d/space_shooter/engine.cfg index 8047cebdd3b..8563bd8aa96 100644 --- a/demos/2d/space_shooter/engine.cfg +++ b/demos/2d/space_shooter/engine.cfg @@ -1,7 +1,7 @@ [application] name="Simple Shooter" -main_scene="res://main_menu.scn" +main_scene="res://main_menu.tscn" icon="res://icon.png" [autoload] diff --git a/demos/2d/space_shooter/explosion.scn b/demos/2d/space_shooter/explosion.scn deleted file mode 100644 index 6fc105fac3a9b89c3cf03e199d82967f73724d84..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1756 zcmWkveQX@X6@R;X=RN!U8QbxP`KQIZh*?d|z&6G4fch_saM?Cs5+x8B>m z?(Ur(W5Oko3Al|)TY{8;k_$?!ilV3#ghanMoPsDyMEgh8La92Dtnf!$Rh5bqP*J-X z>COAio0<1}Z|03=enC~?Zfgd(*Z}a`8UO*HEPz<95kMdk)Dx-x5#3l~nFWK{4E}}9 zd>kN54niZ58eQf&Mb}_)ThB9ykd}y(&3erDKqk?!;aHCA(XkrOaLs}rzw5M?^vYVg zXlE>zp_g%g-hpbgq;v0aR?C!A$sqxe=)h5PE7@gOetgHFhHdT%Cwb-4Oqb^D(&Sx*bXOnq#cuBk>tpu;L?vbXQ#gx zEqY92cFA-dJ3qWZ2ZDs2#7}X6T#^=@oHKlwhx+l=WUaEDOTfQY4dyHS%PRk%s(hlp zaJ^5^@}m>R#^x`vZ|F=&FIv84Jd?gy?VEW*((`F^@DJs_(bzrzr5)163tf}dAe)h^ zxTHS26+T*>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^y^G)sRS{GwDC;DF9GZ%HWu&%WQ8Y)HQ|?$MIuBZ-R#In60$)GaZ=-SYCKJ+dTwN! z3nD3!@Pn(reuNLvm;?OPv8(hb0at*AJE^`2SVi3fIuS?zwm3^|&hboxzoZ4Na$ic$<-0?m8Q1`zaGQ#MyDmu3bQxP(&Hz8vJg- z9%p$5UoOC|hC2b$oWxr_#fss%iqxTJDfpWy5GEz=MZWRvEWM~F+ z++SfEZ71WeRCg9JLubc zW9pv8haZnR?a_0kU0)v^Gh;a0RZV*90w*4Rx>da6+s04izF*a{w^s2x&JVPtzh8}Z z+DkVUzFE2H;Nevprk7bhNJgFGpM24J*%bE4=RTTx?AUEiyZDa-P`mS!U*ElOZ0|2m z=U(OC+t=igEcfI%RwgW&!!5Nh*?;Ky#sP4hN;>zNYu&!vUouA;z1FVm-tGSW$Tt~j z_5#P2)hxG_c{iOMPG_Ap4{X1}2OIc`UGT40w)D(U?GJB6ufP1=J1=ZH@!nv6^o32| zTO6+9>8?8l4y}d7yT+ciR~P*8_)o*V`@ZxH?>qAO{XgFRmv0jmH=>5k!-vj0>ONaw zKYxVzdf=<`ZTstNyKjB-%-Me*|KZoSANuI?)2C+be7*0aDP_yX6QBO!`i;3i{M6b_ rBHIj>wdS7XRSRG7>Vw^vg&hl1q2ZcFX_t$vrAMcEUbEOtZ@&KlU+IXy diff --git a/demos/2d/space_shooter/parallax.tscn b/demos/2d/space_shooter/parallax.tscn new file mode 100644 index 00000000000..0cbd0f5b192 --- /dev/null +++ b/demos/2d/space_shooter/parallax.tscn @@ -0,0 +1,201 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://bg_gradient.png" type="Texture" id=1] +[ext_resource path="res://small_star.png" type="Texture" id=2] +[ext_resource path="res://big_star.png" type="Texture" id=3] + +[node name="parallax" 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( 1, 1 ) +scroll/limit_begin = Vector2( 0, 0 ) +scroll/limit_end = Vector2( 0, 0 ) +scroll/ignore_camera_zoom = true + +[node name="bg_layer" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 0.2, 1 ) +motion/mirroring = Vector2( 1024, 0 ) + +[node name="gradient" type="Sprite" parent="bg_layer"] + +transform/scale = Vector2( 128, 1 ) +texture = ExtResource( 1 ) +centered = false + +[node name="Sprite" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 73.6643, 65.0701 ) +texture = ExtResource( 2 ) + +[node name="Sprite1" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 127.685, 206.26 ) +texture = ExtResource( 2 ) + +[node name="Sprite2" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 60.1591, 255.369 ) +texture = ExtResource( 2 ) + +[node name="Sprite3" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 252.914, 142.418 ) +texture = ExtResource( 2 ) + +[node name="Sprite4" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 241.864, 335.172 ) +texture = ExtResource( 2 ) + +[node name="Sprite5" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 127.685, 455.491 ) +texture = ExtResource( 2 ) + +[node name="Sprite6" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 289.746, 547.571 ) +texture = ExtResource( 2 ) + +[node name="Sprite7" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 56.4759, 559.848 ) +texture = ExtResource( 2 ) + +[node name="Sprite8" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 487.412, 166.972 ) +texture = ExtResource( 2 ) + +[node name="Sprite9" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 358.499, 77.3474 ) +texture = ExtResource( 2 ) + +[node name="Sprite10" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 647.018, 71.2088 ) +texture = ExtResource( 2 ) + +[node name="Sprite11" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 592.997, 270.102 ) +texture = ExtResource( 2 ) + +[node name="Sprite12" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 868.011, 252.914 ) +texture = ExtResource( 2 ) + +[node name="Sprite13" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 869.238, 93.308 ) +texture = ExtResource( 2 ) + +[node name="Sprite14" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 965.002, 95.7635 ) +texture = ExtResource( 2 ) + +[node name="Sprite15" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 968.685, 559.848 ) +texture = ExtResource( 2 ) + +[node name="Sprite16" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 815.218, 470.224 ) +texture = ExtResource( 2 ) + +[node name="Sprite17" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 475.134, 530.383 ) +texture = ExtResource( 2 ) + +[node name="Sprite18" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 550.026, 421.114 ) +texture = ExtResource( 2 ) + +[node name="Sprite19" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 696.127, 574.581 ) +texture = ExtResource( 2 ) + +[node name="Sprite20" type="Sprite" parent="bg_layer"] + +transform/pos = Vector2( 990.784, 423.569 ) +texture = ExtResource( 2 ) + +[node name="bg_layer2" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 0.5, 1 ) +motion/mirroring = Vector2( 1024, 0 ) + +[node name="Sprite" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 88, 114 ) +texture = ExtResource( 3 ) + +[node name="Sprite1" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 349, 254 ) +texture = ExtResource( 3 ) + +[node name="Sprite2" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 472, 80 ) +texture = ExtResource( 3 ) + +[node name="Sprite3" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 803, 107 ) +texture = ExtResource( 3 ) + +[node name="Sprite4" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 93, 363 ) +texture = ExtResource( 3 ) + +[node name="Sprite5" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 891, 519 ) +texture = ExtResource( 3 ) + +[node name="Sprite6" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 934, 338 ) +texture = ExtResource( 3 ) + +[node name="Sprite7" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 665, 332 ) +texture = ExtResource( 3 ) + +[node name="Sprite8" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 218, 423 ) +texture = ExtResource( 3 ) + +[node name="Sprite9" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 564, 568 ) +texture = ExtResource( 3 ) + +[node name="Sprite10" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 753, 466 ) +texture = ExtResource( 3 ) + +[node name="Sprite11" type="Sprite" parent="bg_layer2"] + +transform/pos = Vector2( 77.9999, 570 ) +texture = ExtResource( 3 ) + + diff --git a/demos/2d/space_shooter/ship.gd b/demos/2d/space_shooter/ship.gd index b6c1200632a..0bc9ca6b13d 100644 --- a/demos/2d/space_shooter/ship.gd +++ b/demos/2d/space_shooter/ship.gd @@ -37,7 +37,7 @@ func _process(delta): if (shooting and not prev_shooting): # Just pressed - var shot = preload("res://shot.scn").instance() + var shot = preload("res://shot.tscn").instance() # Use the Position2D as reference shot.set_pos(get_node("shootfrom").get_global_pos()) # Put it two parents above, so it is not moved by us @@ -78,4 +78,4 @@ func _on_ship_area_enter(area): func _on_back_to_menu_pressed(): - get_tree().change_scene("res://main_menu.scn") + get_tree().change_scene("res://main_menu.tscn") diff --git a/demos/2d/space_shooter/ship.scn b/demos/2d/space_shooter/ship.scn deleted file mode 100644 index c60e2e3e3b41019a1d91e96afa00c38a3befe1aa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4965 zcmYjV3wRsVl|C~gS&AQ#9oupIim&{39#*goDG9Of%*b}0#MlXe2C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=fj4&w{9{{u{x<&gjY diff --git a/demos/2d/space_shooter/ship.tscn b/demos/2d/space_shooter/ship.tscn new file mode 100644 index 00000000000..be6bf6b82e2 --- /dev/null +++ b/demos/2d/space_shooter/ship.tscn @@ -0,0 +1,229 @@ +[gd_scene load_steps=12 format=1] + +[ext_resource path="res://rail.gd" type="Script" id=1] +[ext_resource path="res://ship.gd" type="Script" id=2] +[ext_resource path="res://ship.png" type="Texture" id=3] +[ext_resource path="res://fire.png" type="Texture" id=4] +[ext_resource path="res://explosion.tscn" type="PackedScene" id=5] +[ext_resource path="res://sound_shoot.wav" type="Sample" id=6] +[ext_resource path="res://sound_explode.wav" type="Sample" id=7] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( 25.9104, 1.3603, -20.5637, 14.8656, -20.5637, -15.3227 ) + +[sub_resource type="ColorRamp" id=2] + +offsets = FloatArray( 0, 0.474062, 0.653631, 1 ) +colors = ColorArray( 0.154794, 0.413313, 0.991004, 1, 0.555474, 0.971578, 0, 1, 0.82934, 0.989088, 0.616085, 0.383915, 1, 1, 1, 0 ) + +[sub_resource type="Animation" id=3] + +length = 1.0 +loop = false +step = 0.1 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:visibility/visible") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] } +tracks/1/type = "value" +tracks/1/path = NodePath("thruster:config/emitting") +tracks/1/interp = 1 +tracks/1/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] } +tracks/2/type = "value" +tracks/2/path = NodePath("explosion:config/emitting") +tracks/2/interp = 1 +tracks/2/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] } + +[sub_resource type="SampleLibrary" id=4] + +samples/shoot = { "db":0.0, "pitch":1.0, "sample":ExtResource( 6 ) } +samples/sound_explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 7 ) } + +[node name="rail" type="Node2D"] + +script/script = ExtResource( 1 ) + +[node name="ship" type="Area2D" parent="."] + +transform/pos = Vector2( 253.607, 282.275 ) +input/pickable = true +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +script/script = ExtResource( 2 ) + +[node name="sprite" type="Sprite" parent="ship"] + +texture = ExtResource( 3 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ship"] + +build_mode = 0 +polygon = Vector2Array( -20.5637, -15.3227, 25.9104, 1.3603, -20.5637, 14.8656 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="thruster" type="Particles2D" parent="ship"] + +visibility/blend_mode = 1 +transform/pos = Vector2( -26.528, -0.358481 ) +transform/rot = -91.1436 +config/amount = 32 +config/lifetime = 2.0 +config/time_scale = 5.0 +config/emitting = false +config/local_space = false +config/texture = ExtResource( 4 ) +params/direction = 0.0 +params/spread = 10.0 +params/linear_velocity = 20.0 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 1.0 +params/final_size = 1.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +color/color_ramp = SubResource( 2 ) + +[node name="anim" type="AnimationPlayer" parent="ship"] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/explode = SubResource( 3 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[node name="shootfrom" type="Position2D" parent="ship"] + +transform/pos = Vector2( 35.3307, 0.875969 ) + +[node name="explosion" parent="ship" instance=ExtResource( 5 )] + +transform/rot = -91.1436 +config/explosiveness = 0.1 +params/gravity_strength = 9.8 + +[node name="sfx" type="SamplePlayer" parent="ship"] + +config/polyphony = 1 +config/samples = SubResource( 4 ) +default/volume_db = 0.0 +default/pitch_scale = 1.0 +default/pan = 0.0 +default/depth = 0.0 +default/height = 0.0 +default/filter/type = 0 +default/filter/cutoff = 0.0 +default/filter/resonance = 0.0 +default/filter/gain = 0.0 +default/reverb_room = 2 +default/reverb_send = 0.0 +default/chorus_send = 0.0 + +[node name="camera" type="Camera2D" parent="."] + +anchor_mode = 0 +rotating = false +current = true +zoom = Vector2( 1, 1 ) +limit/left = -10000000 +limit/top = -10000000 +limit/right = 10000000 +limit/bottom = 10000000 +drag_margin/h_enabled = true +drag_margin/v_enabled = true +smoothing/enable = 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 + +[node name="hud" type="CanvasLayer" parent="."] + +layer = 1 +offset = Vector2( 0, 0 ) +rotation = 0.0 +scale = Vector2( 1, 1 ) + +[node name="score" type="Label" parent="hud"] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 15.0 +margin/top = 13.0 +margin/right = 66.0 +margin/bottom = 26.0 +text = "SCORE:" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="score_points" type="Label" parent="hud"] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 70.0 +margin/top = 13.0 +margin/right = 121.0 +margin/bottom = 26.0 +text = "0" +align = 1 +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="back_to_menu" type="Button" parent="hud"] + +focus/ignore_mouse = false +focus/stop_mouse = true +size_flags/horizontal = 2 +size_flags/vertical = 2 +margin/left = 911.0 +margin/top = 10.0 +margin/right = 1006.0 +margin/bottom = 31.0 +toggle_mode = false +text = "Back to Menu" +flat = false + +[node name="game_over" type="Label" parent="hud"] + +visibility/visible = false +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 482.0 +margin/top = 286.0 +margin/right = 564.0 +margin/bottom = 299.0 +text = "GAME_OVER" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[connection signal="body_enter" from="ship" to="ship" method="_on_ship_body_enter"] + +[connection signal="area_enter" from="ship" to="ship" method="_on_ship_area_enter"] + +[connection signal="pressed" from="hud/back_to_menu" to="ship" method="_on_back_to_menu_pressed"] + + diff --git a/demos/2d/space_shooter/shot.scn b/demos/2d/space_shooter/shot.scn deleted file mode 100644 index 9daf4ebe82dc9b77490b55313ffe6dfb365588c5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3315 zcmY*cdvp}#6~8mzW_L+KLf&uk?IQ{0k%S}~3`p+mZh$}$8W61%XJ&V2H*?tRtTVGQ zfW?6x6lp=Eww2n}MMbN}S~=L$)~c-FyA-T_+Ir|vMUPT#Yduw4s=Yz`NB8Xg&Ykc1 zn{V&^{qByfi$-DkGYjC&dVtk_fIS`n0l*PJbi4uxoIyEfGuNt#&02C@Ld$C4*6~?x zA3z&l42(0OyIZ+dfHKa?#&uh^av9YchgrO$B4K1xdb&rO&~01Krj>nSH~4sy&&rv) ztw9YhEuGXYJ+5bTdrOZ}$}$>M@cJ@Svy8l%(0a1!gfpimk+*DPLbi;|q-M%-UA4f^ z=XkX#Tg%#(GT^lmrk=BV9Iw*mF;Xc@<85er5=O=_ol;*$%ckvdDB;5_V;DKb&n#QZ zDIpJNCgP)ugQY;ZQCfeBg**og;4Tc6+^XIU@)3~G501GvIF zq1od`5@L&sk7EHpkChaVbLnjxxDOx4N*r>_?#C{=hWoJ{uW`kDuo;))T{s(=sG4b~ zco9N>VINjVZ_l_cujMs4WonvI?UuZZ>uI4OG}1L;n_>yj#H;WLI(H>D;db(BpoO>7 zDR0r{>}=~ETtW*>?8S$btn&;Vb%wT|jn-LVJGLQ6gXh?z*Z{4(5%)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zDTq5B^BkfYX%fS8OG_4j~w@3kR&-ipg21IZGO1Kw1 zBy&VHP|kfcn?#`;e4Js3#M9?X>K5r4A?u|fQm#h77XYSY)3E;!9&t{LQ8i+^o*giY zUs^#BWi9(DM5+s1Pdii=+NTk?p(5Tzg~gEP;$`r~-iwI^j8_5GH^sKH|7F+o1v`_) zHmKzt#7=RY?{kR4E>;ps1N-*DrlmzTjcXWJmzNSQlJx6k`n{7%u{bJSqcoKmrk*DH z@w71UQ#yrBIn;8E?)T76BzgJS@X>Bo;4%GWjsnR$e(hU zP>_(}lTY1C$@d8d^oblmd4rna$Wb^Mn2RLLj!zhfQnMmL4I-|>cctAJMW0YlV+5qK z7$O0ljkUDHlh~s8r9+S<{tMKi&$}ybK4a6F-i;MXYia z)bUoFCv{Sh(7-D(F+IPBmrEbh?4H=`$}QjJ<^Mgk-@& z!gwC~Xs93hX>tn;kbfR7p%&m$?!k>PNd5<~Xu2h8{FQW?QC*$gxd2Ct0E@XFhB%8< zP49d;?YxAuVuSQ$T0P7?;V-#Bv?pC2eZ{NBGa8BUuG_#;6@=oD;*YfX?eY9XJge#% zbsL=FP2OA9Ua@>;X*0HZW{$3ijqz#$AutAh+|HhQX!Dc2y#4TKOj>{Su6KTQr1W@i z?XI(T#(Ym5dg%ead(r3KU;W;PyV|=C*M3LbWLLF3^5tD;Rxa|M8vN7Q3nwl)v+ae0 zBb6W4vG$i5ooC_Ezp%*%&;Ra$`ty7Kc&>lRgWDTlyJP&fTOV_#=C`MRJox7M3*V{e zUh(-yS4s`Jzi!<8kiB>Jyu%- - - - - - - - - - - - - - - - - - - "scroll" - 1 - True - 0.1 - "value" - ".:rect/pos" - 1 - - "cont" - True - "times" - 0, 1 - "transitions" - 1, 1 - "values" - - 0, 0 - -800, 0 - - - - - - - - - - - - - - - - - - - - "intro" - 3 - False - 0.1 - "value" - "logo:transform/pos" - 1 - - "cont" - True - "times" - 1, 1.5 - "transitions" - 2, 1 - "values" - - 412, -212.981 - 412, 171 - - - "value" - "logo:frame" - 1 - - "cont" - False - "times" - 0, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, 2.8, 2.9, 3 - "transitions" - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 - "values" - - 0 - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - - - "value" - "start:visibility/opacity" - 1 - - "cont" - True - "times" - 2.5, 2.8 - "transitions" - 1, 1 - "values" - - 0 - 1 - - - "value" - "start:visibility/visible" - 1 - - "cont" - False - "times" - 0, 2.5 - "transitions" - 1, 1 - "values" - - False - True - - - "value" - "copyright:visibility/visible" - 1 - - "cont" - False - "times" - 0, 2.5 - "transitions" - 1, 1 - "values" - - False - True - - - "value" - "copyright:visibility/opacity" - 1 - - "cont" - True - "times" - 2.5, 2.8 - "transitions" - 1, 1 - "values" - - 0 - 1 - - - - - - "loop" - 0.6 - True - 0.1 - "value" - "logo:frame" - 1 - - "cont" - False - "times" - 0, 0.3 - "transitions" - 1, 1 - "values" - - 8 - 7 - - - - - - - "conn_count" - 0 - "conns" - - "editable_instances" - - - "names" - - "splash" - "anchor/right" - "anchor/bottom" - "focus/ignore_mouse" - "focus/stop_mouse" - "size_flags/horizontal" - "size_flags/vertical" - "__meta__" - "Control" - "bg" - "margin/right" - "margin/bottom" - "1" - "texture" - "TextureFrame" - "2" - "margin/left" - "scroll" - "playback/process_mode" - "playback/default_blend_time" - "root/root" - "anims/scroll" - "playback/active" - "playback/speed" - "blend_times" - "autoplay" - "AnimationPlayer" - "layer2" - "margin/top" - "layer1" - "logo" - "transform/pos" - "frames" - "frame" - "AnimatedSprite" - "start" - "toggle_mode" - "textures/normal" - "textures/pressed" - "TextureButton" - "copyright" - "custom_fonts/font" - "text" - "percent_visible" - "lines_skipped" - "max_lines_visible" - "Label" - "intro" - "anims/intro" - "next/intro" - "anims/loop" - - "node_count" - 17 - "node_paths" - - - "nodes" - -1, -1, 8, 0, -1, 7, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 0, 0, 0, 8, 9, -1, 6, 10, 5, 11, 5, 3, 1, 4, 2, 5, 3, 6, 3, 0, 1, 0, 14, 12, -1, 7, 10, 5, 11, 5, 3, 2, 4, 2, 5, 3, 6, 3, 13, 6, 0, 1, 0, 14, 15, -1, 8, 16, 7, 10, 8, 11, 9, 3, 2, 4, 2, 5, 3, 6, 3, 13, 6, 0, 1, 0, 26, 17, -1, 8, 18, 0, 19, 10, 20, 11, 21, 12, 22, 2, 23, 13, 24, 14, 25, 15, 0, 0, 0, 8, 27, -1, 6, 10, 5, 11, 5, 3, 1, 4, 2, 5, 3, 6, 3, 0, 5, 0, 14, 12, -1, 8, 28, 16, 10, 7, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 18, 0, 5, 0, 14, 15, -1, 9, 16, 7, 28, 16, 10, 8, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 18, 0, 5, 0, 26, 17, -1, 8, 18, 0, 19, 10, 20, 11, 21, 12, 22, 2, 23, 19, 24, 14, 25, 15, 0, 0, 0, 8, 29, -1, 6, 10, 5, 11, 5, 3, 1, 4, 2, 5, 3, 6, 3, 0, 9, 0, 14, 12, -1, 8, 28, 20, 10, 7, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 21, 0, 9, 0, 14, 15, -1, 9, 16, 7, 28, 20, 10, 8, 11, 17, 3, 2, 4, 2, 5, 3, 6, 3, 13, 21, 0, 9, 0, 26, 17, -1, 8, 18, 0, 19, 10, 20, 11, 21, 12, 22, 2, 23, 22, 24, 14, 25, 15, 0, 0, 0, 34, 30, -1, 3, 31, 23, 32, 24, 33, 25, 0, 0, 0, 39, 35, -1, 11, 16, 26, 28, 27, 10, 28, 11, 29, 3, 1, 4, 2, 5, 3, 6, 3, 36, 1, 37, 30, 38, 31, 0, 0, 0, 46, 40, -1, 12, 16, 32, 28, 33, 10, 34, 11, 35, 3, 2, 4, 2, 5, 3, 41, 36, 42, 37, 43, 38, 44, 39, 45, 40, 0, 0, 0, 26, 47, -1, 10, 18, 0, 19, 10, 20, 11, 48, 41, 49, 42, 50, 43, 22, 2, 23, 38, 24, 14, 25, 44, 0 - "variants" - - 1 - False - True - 2 - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -301.424, -450.503 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 0.54036 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 40 - - 800 - 1600 - 450 - 0 - ".." - - 0.04 - - - "scroll" - 194 - 456 - - 0.1 - 212 - - 0.2 - 412, 171 - - 8 - 345 - 369 - 494 - 443 - - - 658 - 417 - 776 - 434 - - "(c) 1994 SOGA" - 1 - 0 - -1 - - "loop" - - "intro" - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/sprite_shaders/engine.cfg b/demos/2d/sprite_shaders/engine.cfg index 17bdada1882..fa17a2e8007 100644 --- a/demos/2d/sprite_shaders/engine.cfg +++ b/demos/2d/sprite_shaders/engine.cfg @@ -1,5 +1,5 @@ [application] name="2D Shaders for Sprites" -main_scene="res://sprite_shaders.scn" +main_scene="res://sprite_shaders.tscn" icon="res://icon.png" diff --git a/demos/2d/sprite_shaders/sprite_shaders.scn b/demos/2d/sprite_shaders/sprite_shaders.scn deleted file mode 100644 index b6060f8eaa9632f0ff34f9207ed5c01bc0373c5b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5477 zcmZWt2~<2k6Jb{7>7IZ{m_nGXh@K1}pvdG@{WbRzE|3}$Oag*}25?p!3hHw# z&RX?3Rk2!a5a*#*t+m=}uVA6I%ImA8j<5Ys@V)nUtv_pJt?YgGJ!hYD_V?}Yq_9Y> z29A#h04=cqm<0e#6#`J>1ONemjQ~8GkN^ZEfeR#E^BLU?wxmeM8d*>m0X?_`0Ni03 zaD$|qnYEaz%sMvC$W*XE2tD~)ovDPS1BDiySzl?5vk7gUf^w#WHRGQI@Pe^63GK<( z8_Tp6C=CR1z<02=k})$Cai%J(L2qQWv-Bm_a?UeEs52Q%X5hz((n+Su%(M;XTmx;X z9MRlX1XZl(AZCjjY82d^k}6Jj1UtFjkgx8Y?iBmReXV=j1D5Doj;I zD{z9@B5iS%vBbcZFb9DcdWgrfHP$LK3p}8+w9IvQT%4||SZ|V78q2_7I2brXl5a5S z7z6a@#}5OoBy@)WNFd1p9|Fu(wm`s<-n;~GkCS-w5IDz$*EcjzG1P}~NRT^{dBAjNWou;PGbWFpP?!-jVImBI zfn)-#w7`Hi9~W(Y_T-GQ+M?_!8EF#RT)^1H{0gRqNryTh=LkAUE7qVAeARz=va0S27wyKOw*%NZJP@pn8KG^?}fY zj1`;!5Vld><22v|Tq%r;vzF^EaN!D1XfhgV;VhGRh6PrdO_i(}x$*SYa_H*IR#X|R z`bvYIErE=ovYdg%2G&>t!(Rio8|b$?_kfyi=S6fd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xu_nj$w-?l= z4JVHu%8yu?PQ98>WGVWh_uk+AQvew;Zj)a?$iod!`gdMilQY9rvEvJ3mvYD?YQA~q zs|&}2w`Y8wF@40J74N^kqfmJG=g(W?Iq9HWxK&F - - - - - "conn_count" - 1 - "conns" - 1, 0, 30, 29, 2, 0 - "editable_instances" - - - "names" - - "Grid" - "margin/right" - "margin/bottom" - "focus/ignore_mouse" - "focus/stop_mouse" - "size_flags/horizontal" - "size_flags/vertical" - "script/script" - "__meta__" - "Control" - "timer" - "process_mode" - "wait_time" - "one_shot" - "autostart" - "Timer" - "gameover" - "anchor/right" - "anchor/bottom" - "custom_colors/font_color" - "custom_colors/font_color_shadow" - "custom_constants/shadow_offset_x" - "custom_constants/shadow_offset_y" - "align" - "valign" - "percent_visible" - "lines_skipped" - "max_lines_visible" - "Label" - "piece_move_down" - "timeout" - - "node_count" - 3 - "node_paths" - - - "nodes" - -1, -1, 9, 0, -1, 8, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 8, 5, 0, 0, 0, 15, 10, -1, 4, 11, 6, 12, 7, 13, 1, 14, 1, 0, 0, 0, 28, 16, -1, 14, 17, 6, 18, 6, 3, 2, 4, 2, 5, 3, 19, 8, 20, 9, 21, 6, 22, 6, 23, 6, 24, 6, 25, 7, 26, 10, 27, 11, 0 - "variants" - - 40 - False - True - 2 - - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -229.129, -80 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - 1 - 1 - 1, 1, 1, 1 - 0, 0, 0, 1 - 0 - -1 - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/tetris/tetris.tscn b/demos/2d/tetris/tetris.tscn new file mode 100644 index 00000000000..de81044c22d --- /dev/null +++ b/demos/2d/tetris/tetris.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=2 format=1] + +[ext_resource path="res://grid.tscn" type="PackedScene" id=1] + +[node name="Tetris" type="Panel"] + +focus/ignore_mouse = false +focus/stop_mouse = true +size_flags/horizontal = 2 +size_flags/vertical = 2 +margin/left = 0.0 +margin/top = 0.0 +margin/right = 400.0 +margin/bottom = 400.0 + +[node name="Grid" parent="." instance=ExtResource( 1 )] + +margin/left = 40.0 +margin/top = 35.0 +margin/right = 80.0 +margin/bottom = 75.0 + +[node name="Label" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 243.0 +margin/top = 36.0 +margin/right = 283.0 +margin/bottom = 49.0 +text = "Score:" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="score" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 252.0 +margin/top = 55.0 +margin/right = 293.0 +margin/bottom = 68.0 +text = "0" +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + +[node name="restart" type="Button" parent="."] + +focus/ignore_mouse = false +focus/stop_mouse = true +size_flags/horizontal = 2 +size_flags/vertical = 2 +margin/left = 243.0 +margin/top = 292.0 +margin/right = 303.0 +margin/bottom = 311.0 +toggle_mode = false +text = "Restart" +flat = false + +[connection signal="pressed" from="restart" to="Grid" method="restart_pressed"] + + diff --git a/demos/2d/tetris/tetris.xml b/demos/2d/tetris/tetris.xml deleted file mode 100644 index a8e47a8ae40..00000000000 --- a/demos/2d/tetris/tetris.xml +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - "conn_count" - 1 - "conns" - 4, 1, 23, 22, 2, 0 - "editable_instances" - - - "names" - - "Tetris" - "margin/right" - "margin/bottom" - "focus/ignore_mouse" - "focus/stop_mouse" - "size_flags/horizontal" - "size_flags/vertical" - "__meta__" - "Panel" - "Grid" - "margin/left" - "margin/top" - "Label" - "text" - "percent_visible" - "lines_skipped" - "max_lines_visible" - "score" - "restart" - "toggle_mode" - "flat" - "Button" - "restart_pressed" - "pressed" - - "node_count" - 5 - "node_paths" - - - "nodes" - -1, -1, 8, 0, -1, 7, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 0, 0, 0, 2147483647, 9, 5, 4, 10, 6, 11, 7, 1, 8, 2, 9, 0, 0, 0, 12, 12, -1, 11, 10, 10, 11, 11, 1, 12, 2, 13, 3, 2, 4, 2, 5, 3, 13, 14, 14, 15, 15, 16, 16, 17, 0, 0, 0, 12, 17, -1, 11, 10, 18, 11, 19, 1, 20, 2, 21, 3, 2, 4, 2, 5, 3, 13, 22, 14, 15, 15, 16, 16, 17, 0, 0, 0, 21, 18, -1, 11, 10, 10, 11, 23, 1, 24, 2, 25, 3, 1, 4, 2, 5, 3, 6, 3, 19, 1, 13, 26, 20, 1, 0 - "variants" - - 400 - False - True - 2 - - "__editor_plugin_screen__" - "2D" - "__editor_plugin_states__" - - "2D" - - "ofs" - -229.129, -54.344 - "snap_grid" - False - "snap_offset" - 0, 0 - "snap_pixel" - False - "snap_relative" - False - "snap_rotation" - False - "snap_rotation_offset" - 0 - "snap_rotation_step" - 0.261799 - "snap_show_grid" - False - "snap_step" - 10, 10 - "zoom" - 1.360374 - - "3D" - - "ambient_light_color" - 0.15, 0.15, 0.15, 1 - "default_light" - True - "default_srgb" - False - "deflight_rot_x" - 0.942478 - "deflight_rot_y" - 0.628319 - "fov" - 45 - "show_grid" - True - "show_origin" - True - "viewport_mode" - 1 - "viewports" - - - "distance" - 4 - "listener" - True - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "distance" - 4 - "listener" - False - "pos" - 0, 0, 0 - "use_environment" - False - "use_orthogonal" - False - "x_rot" - 0 - "y_rot" - 0 - - - "zfar" - 500 - "znear" - 0.1 - - "Anim" - - "visible" - False - - - "__editor_run_settings__" - - "custom_args" - "-l $scene" - "run_mode" - 0 - - - - 40 - 35 - 80 - 75 - 243 - 36 - 283 - 49 - "Score:" - 1 - 0 - -1 - 252 - 55 - 293 - 68 - "0" - 292 - 303 - 311 - "Restart" - - "version" - 2 - - - - \ No newline at end of file diff --git a/demos/2d/texscreen/bubbles.gd b/demos/2d/texscreen/bubbles.gd index 400da1a2057..c0c7d892e6a 100644 --- a/demos/2d/texscreen/bubbles.gd +++ b/demos/2d/texscreen/bubbles.gd @@ -7,5 +7,5 @@ const MAX_BUBBLES = 10 func _ready(): for i in range(MAX_BUBBLES): - var bubble = preload("res://lens.scn").instance() + var bubble = preload("res://lens.tscn").instance() add_child(bubble) diff --git a/demos/2d/texscreen/bubbles.scn b/demos/2d/texscreen/bubbles.scn deleted file mode 100644 index 8509b3811c391420f9584b22e9896e76b0a30f9c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2626 zcmWkw2~-o;8otRSBm@JIRl+h87I6dAYN=55CP6@}f`B`i8ImE1h8dhmSRzk@R#~h| z723u%=qn0t)q-f?6*Y&^iXx$poFL%<*mk){yZC8RD*OHw4LmtZpISO5?#4!C28J43Rxh0&7H z6p=#$S8T9IlVzcFCQ^q7yRcfum}`!G3P@q`*XL2@@8_9|QWau@E>#4`ClffE){ib|Az= zzy(8KEuRG;m@DvbAbc}ffbDW6NlK$5b7&yNeBB62YoM8E#;7-#@g|2%ltr7(bPn*s zLS)&r*1|>`^%TvJnjG4~+78=%5!OuSI=q1|Hd4YGt)wQ~MCjRQY>wDyr71IE0^Uxc zzaWof%tq`MPGcK8__6SeNTbOi&4flngaS3DoM1dRjts6z_NKGzbHn1QVbB6%RVH{Q^V2v~dlpj@#pdTFTs--DP zqopmB8J9!QD92|wdGf~b@VZML!59h3Y|Dl+E<0Z+55q8yLj*lIKQ}N0^M-B^C~tAI z9{6K2H;snW8O=1K$u(INd>0LCCd?$Oh;$;u;3z~%8FO%NI3LRJJA5N+3|Wbj9GxG` zR=$a5a6e>=-G5Re!si5PkEqKY3DX;=s$b#$5yJ3lr+`#bd@Dun z?nbV(v`mBz340pt2+QcRaIW8ApgI)`#1E_Y@-zk71b%G7QoJN#bSD^sFcwM^&PU8f zN`J{uy&NXM%7~VTHlT@sfW^Jwc|oKJ3uBF=VYs><#&>`(Il3X8gI1KL01b}CzaBbG z-N6MdDc&aH`NqQ?P<}R02@<2ZX2!4xFbYG!CkKH4X52mD5FEp;To@XsaAoNQD>=-9 zqA36dz&IGd1xYyopTUJNBHy{cq@BfpM|;W~-gV9Cj%2%`z0m=Ac56}gn9%uJL@QvH0ozR6tu z>KLo(D(VfR&{Jz&e|vws@6o&E$GhSt^ljRmxZ&Kx!1kvuE32g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iBzn&{gw1?tU-Y`{Cj5`HK{&e$5YQhw40mpg5@_Y52F|(oMCo zgaq&vHte4K{W1boV_y%?(3d}mopG5O-84jM^%3Vu6g-^(gv$VbP==pJM{A5k_~w4s z+5E`+LXdLYbMNcjo*N3oMuI(Gk97)NT)WV{7be!6+3#^P?Cu~ib;`{6gDQMwYFer~ ImHR#ZA6nT0*#H0l diff --git a/demos/2d/texscreen/bubbles.tscn b/demos/2d/texscreen/bubbles.tscn new file mode 100644 index 00000000000..72b7874b926 --- /dev/null +++ b/demos/2d/texscreen/bubbles.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://bubbles.gd" type="Script" id=1] +[ext_resource path="res://burano.png" type="Texture" id=2] + +[node name="texscreen_demo" type="Control"] + +anchor/right = 1 +anchor/bottom = 1 +focus/ignore_mouse = false +focus/stop_mouse = true +size_flags/horizontal = 2 +size_flags/vertical = 2 +margin/left = 0.0 +margin/top = 0.0 +margin/right = 0.0 +margin/bottom = 0.0 +script/script = ExtResource( 1 ) + +[node name="burano" type="TextureFrame" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +size_flags/vertical = 2 +margin/left = 0.0 +margin/top = 0.0 +margin/right = 800.0 +margin/bottom = 600.0 +texture = ExtResource( 2 ) + + diff --git a/demos/2d/texscreen/engine.cfg b/demos/2d/texscreen/engine.cfg index 92d0e98d5b7..0a3f0842703 100644 --- a/demos/2d/texscreen/engine.cfg +++ b/demos/2d/texscreen/engine.cfg @@ -1,7 +1,7 @@ [application] name="Glass Bubbles (Texscreen)" -main_scene="res://bubbles.scn" +main_scene="res://bubbles.tscn" icon="res://icon.png" [display] diff --git a/demos/2d/texscreen/lens.scn b/demos/2d/texscreen/lens.scn deleted file mode 100644 index 530a0b1eb036632213586f3d591e56a2e2315a99..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1850 zcmW+%eQZuJh0z0 z?>&cv!s5_EK^;sh>N=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?4^QEW__OA^7|LmOre|Q@6Jlcp{(={fv6Ws=*f=77&0j9Ujj>@H&gJ z0Grv11$NHCE^i3k!57#*%%~mRtWyJD4LWf%bN>cga1fJ>8u1snl(|ai+f4hl1kB_CpU(TrQpMtO)(?pOr5@x94{9Uyr9QhOPy)aO2wQ z&)ysAIJEwqxrBZt|B-lx=-wAoZ;x+od&Rxr>>h57f96ur^-pr1nr(M+9F7&Z js*+!G56^mbpZYK{M7}J8q0rXg`vH0|90^Nd_G|tRGd(@x diff --git a/demos/2d/texscreen/lens.tscn b/demos/2d/texscreen/lens.tscn new file mode 100644 index 00000000000..7f449e46ae8 --- /dev/null +++ b/demos/2d/texscreen/lens.tscn @@ -0,0 +1,29 @@ +[gd_scene load_steps=5 format=1] + +[ext_resource path="res://lens.gd" type="Script" id=1] +[ext_resource path="res://bubble.png" type="Texture" id=2] + +[sub_resource type="CanvasItemShader" id=1] + +_code = { "fragment":"vec4 normal = tex(TEXTURE,UV);\nvec2 offset = normal.xy * 2.0 - vec2(1.0);\nCOLOR.rgb=texscreen(SCREEN_UV+offset*0.03);\nCOLOR.a=normal.a;\nCOLOR.rgb*=vec3(1.0,0.8,0.7);\n", "fragment_ofs":0, "light":"", "light_ofs":0, "vertex":"", "vertex_ofs":0 } + +[sub_resource type="CanvasItemMaterial" id=2] + +shader/shader = SubResource( 1 ) +shader/shading_mode = 0 + +[node name="glass" type="BackBufferCopy"] + +transform/pos = Vector2( 482.908, 346.807 ) +transform/scale = Vector2( 1.31289, 1.34009 ) +copy_mode = 1 +rect = Rect2( -100, -100, 200, 200 ) +script/script = ExtResource( 1 ) + +[node name="lens" type="Sprite" parent="."] + +material/material = SubResource( 2 ) +transform/pos = Vector2( 1.6427, -2.90363 ) +texture = ExtResource( 2 ) + +