Browse Source

Port 2D demos to TSCN/TRES formats

Part of #4196.
Rémi Verschelde 9 years ago
parent
commit
097eedbc73
100 changed files with 4090 additions and 1077 deletions
  1. 1 1
      2d/area_input/engine.cfg
  2. BIN
      2d/area_input/input.scn
  3. 109 0
      2d/area_input/input.tscn
  4. BIN
      2d/dynamic_collision_shapes/ball.scn
  5. 47 0
      2d/dynamic_collision_shapes/ball.tscn
  6. 1 1
      2d/dynamic_collision_shapes/dynamic_colobjs.gd
  7. BIN
      2d/dynamic_collision_shapes/dynamic_colobjs.scn
  8. 178 0
      2d/dynamic_collision_shapes/dynamic_colobjs.tscn
  9. 1 1
      2d/dynamic_collision_shapes/engine.cfg
  10. 1 1
      2d/fog_of_war/engine.cfg
  11. BIN
      2d/fog_of_war/fog.scn
  12. 25 0
      2d/fog_of_war/fog.tscn
  13. 0 29
      2d/fog_of_war/fog.xml
  14. BIN
      2d/fog_of_war/tile_edit.scn
  15. 32 0
      2d/fog_of_war/tileset.tres
  16. 30 0
      2d/fog_of_war/tileset_edit.tscn
  17. BIN
      2d/fog_of_war/troll.scn
  18. 52 0
      2d/fog_of_war/troll.tscn
  19. BIN
      2d/hdr/beach_cave.scn
  20. 88 0
      2d/hdr/beach_cave.tscn
  21. 1 1
      2d/hdr/engine.cfg
  22. 1 1
      2d/hexamap/engine.cfg
  23. BIN
      2d/hexamap/map.scn
  24. 31 0
      2d/hexamap/map.tscn
  25. BIN
      2d/hexamap/tiles.scn
  26. BIN
      2d/hexamap/tileset.res
  27. 240 0
      2d/hexamap/tileset.tres
  28. 214 0
      2d/hexamap/tileset_edit.tscn
  29. BIN
      2d/hexamap/troll.scn
  30. 52 0
      2d/hexamap/troll.tscn
  31. BIN
      2d/isometric/bastiles.res
  32. BIN
      2d/isometric/dungeon.scn
  33. 49 0
      2d/isometric/dungeon.tscn
  34. 1 1
      2d/isometric/engine.cfg
  35. BIN
      2d/isometric/tileset.scn
  36. 67 0
      2d/isometric/tileset.tres
  37. 130 0
      2d/isometric/tileset_edit.tscn
  38. BIN
      2d/isometric/troll.scn
  39. 53 0
      2d/isometric/troll.tscn
  40. 12 0
      2d/isometric_light/character_shader.tres
  41. BIN
      2d/isometric_light/character_shder.res
  42. BIN
      2d/isometric_light/column.scn
  43. 52 0
      2d/isometric_light/column.tscn
  44. 1 1
      2d/isometric_light/cubio.gd
  45. BIN
      2d/isometric_light/cubio.scn
  46. 174 0
      2d/isometric_light/cubio.tscn
  47. 1 1
      2d/isometric_light/engine.cfg
  48. BIN
      2d/isometric_light/floor_shader.res
  49. 14 0
      2d/isometric_light/floor_shader.tres
  50. BIN
      2d/isometric_light/map.scn
  51. 40 0
      2d/isometric_light/map.tscn
  52. BIN
      2d/isometric_light/shoot.scn
  53. 172 0
      2d/isometric_light/shoot.tscn
  54. BIN
      2d/isometric_light/tileset.res
  55. 216 0
      2d/isometric_light/tileset.tres
  56. 446 0
      2d/isometric_light/tileset_edit.tscn
  57. BIN
      2d/isometric_light/tileset_scene.scn
  58. BIN
      2d/isometric_light/torch.scn
  59. 138 0
      2d/isometric_light/torch.tscn
  60. BIN
      2d/isometric_light/torch_shader.res
  61. 14 0
      2d/isometric_light/torch_shader.tres
  62. BIN
      2d/isometric_light/wall_shader.res
  63. 7 0
      2d/isometric_light/wall_shader.tres
  64. BIN
      2d/kinematic_char/colworld.scn
  65. 116 0
      2d/kinematic_char/colworld.tscn
  66. 1 1
      2d/kinematic_char/engine.cfg
  67. BIN
      2d/kinematic_char/player.scn
  68. 33 0
      2d/kinematic_char/player.tscn
  69. BIN
      2d/kinematic_col/colworld.scn
  70. 39 0
      2d/kinematic_col/colworld.tscn
  71. 1 1
      2d/kinematic_col/engine.cfg
  72. BIN
      2d/kinematic_col/player.scn
  73. 32 0
      2d/kinematic_col/player.tscn
  74. 1 1
      2d/light_mask/engine.cfg
  75. BIN
      2d/light_mask/lightmask.scn
  76. 134 0
      2d/light_mask/lightmask.tscn
  77. 1 1
      2d/lights_shadows/engine.cfg
  78. BIN
      2d/lights_shadows/light_shadows.scn
  79. 326 0
      2d/lights_shadows/light_shadows.tscn
  80. 1 1
      2d/lookat/engine.cfg
  81. BIN
      2d/lookat/lookat.scn
  82. 32 0
      2d/lookat/lookat.tscn
  83. 1 1
      2d/motion/engine.cfg
  84. BIN
      2d/motion/motion.scn
  85. 135 0
      2d/motion/motion.tscn
  86. 1 1
      2d/navpoly/engine.cfg
  87. BIN
      2d/navpoly/navigation.scn
  88. 34 0
      2d/navpoly/navigation.tscn
  89. 1 1
      2d/normalmaps/engine.cfg
  90. BIN
      2d/normalmaps/normal_material.res
  91. 14 0
      2d/normalmaps/normal_material.tres
  92. BIN
      2d/normalmaps/normalmap.scn
  93. 63 0
      2d/normalmaps/normalmap.tscn
  94. 1 1
      2d/particles/engine.cfg
  95. 171 0
      2d/particles/particles.tscn
  96. 0 267
      2d/particles/particles.xml
  97. 115 0
      2d/platformer/bullet.tscn
  98. 0 333
      2d/platformer/bullet.xml
  99. 146 0
      2d/platformer/coin.tscn
  100. 0 430
      2d/platformer/coin.xml

+ 1 - 1
2d/area_input/engine.cfg

@@ -1,5 +1,5 @@
 [application]
 [application]
 
 
 name="Area 2D Input Events"
 name="Area 2D Input Events"
-main_scene="res://input.scn"
+main_scene="res://input.tscn"
 icon="res://icon.png"
 icon="res://icon.png"

BIN
2d/area_input/input.scn


+ 109 - 0
2d/area_input/input.tscn

@@ -0,0 +1,109 @@
+[gd_scene load_steps=6 format=1]
+
+[ext_resource path="res://input.gd" type="Script" id=1]
+[ext_resource path="res://box_area.png" type="Texture" id=2]
+[ext_resource path="res://circle_area.png" type="Texture" id=3]
+
+[sub_resource type="RectangleShape2D" id=1]
+
+custom_solver_bias = 0.0
+extents = Vector2( 64, 64 )
+
+[sub_resource type="CircleShape2D" id=2]
+
+custom_solver_bias = 0.0
+radius = 64.0
+
+[node name="base" type="Node2D"]
+
+[node name="box" type="Area2D" parent="."]
+
+transform/pos = Vector2( 212, 281 )
+transform/rot = 35.4081
+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="box"]
+
+texture = ExtResource( 2 )
+
+[node name="label" type="Label" parent="box"]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = -43.0
+margin/top = 71.0
+margin/right = 43.0
+margin/bottom = 84.0
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="shape" type="CollisionShape2D" parent="box"]
+
+shape = SubResource( 1 )
+trigger = false
+_update_shape_index = -1
+
+[node name="circle" type="Area2D" parent="."]
+
+transform/pos = Vector2( 547.877, 286.808 )
+transform/rot = -40.5985
+input/pickable = true
+shapes/0/shape = SubResource( 2 )
+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="circle"]
+
+texture = ExtResource( 3 )
+
+[node name="label" type="Label" parent="circle"]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = -43.0
+margin/top = 71.0
+margin/right = 43.0
+margin/bottom = 84.0
+align = 1
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="shape" type="CollisionShape2D" parent="circle"]
+
+shape = SubResource( 2 )
+trigger = false
+_update_shape_index = -1
+
+[node name="Label" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 0.0
+margin/top = 0.0
+margin/right = 40.0
+margin/bottom = 13.0
+text = "This demo shows how to use a regular Area2D to get input events, and how to convert the input events to local coordinates of the node.\nUnlike controls, Input on Area2D or PhysicsBody2D nodes only works properly (with scrolling) on canvas layer 0."
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+

BIN
2d/dynamic_collision_shapes/ball.scn


+ 47 - 0
2d/dynamic_collision_shapes/ball.tscn

@@ -0,0 +1,47 @@
+[gd_scene load_steps=4 format=1]
+
+[ext_resource path="res://ball.gd" type="Script" id=1]
+[ext_resource path="res://ball.png" type="Texture" id=2]
+
+[sub_resource type="CircleShape2D" id=1]
+
+custom_solver_bias = 0.0
+radius = 7.45713
+
+[node name="bal" 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
+script/script = ExtResource( 1 )
+
+[node name="sprite" type="Sprite" parent="."]
+
+transform/pos = Vector2( 0, 1 )
+texture = ExtResource( 2 )
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+
+shape = SubResource( 1 )
+trigger = false
+_update_shape_index = 0
+
+

+ 1 - 1
2d/dynamic_collision_shapes/dynamic_colobjs.gd

@@ -10,7 +10,7 @@ func _process(delta):
 	timeout -= delta
 	timeout -= delta
 	if (timeout < 0):
 	if (timeout < 0):
 		timeout = EMIT_INTERVAL
 		timeout = EMIT_INTERVAL
-		var ball = preload("res://ball.scn").instance()
+		var ball = preload("res://ball.tscn").instance()
 		ball.set_pos(Vector2(randf()*get_viewport_rect().size.x, 0))
 		ball.set_pos(Vector2(randf()*get_viewport_rect().size.x, 0))
 		add_child(ball)
 		add_child(ball)
 
 

BIN
2d/dynamic_collision_shapes/dynamic_colobjs.scn


+ 178 - 0
2d/dynamic_collision_shapes/dynamic_colobjs.tscn

@@ -0,0 +1,178 @@
+[gd_scene load_steps=13 format=1]
+
+[ext_resource path="res://dynamic_colobjs.gd" type="Script" id=1]
+[ext_resource path="res://circle.png" type="Texture" id=2]
+[ext_resource path="res://box.png" type="Texture" id=3]
+[ext_resource path="res://poly.png" type="Texture" id=4]
+
+[sub_resource type="CircleShape2D" id=1]
+
+custom_solver_bias = 0.0
+radius = 28.8504
+
+[sub_resource type="RectangleShape2D" id=2]
+
+custom_solver_bias = 0.0
+extents = Vector2( 32.1805, 30.0328 )
+
+[sub_resource type="ConvexPolygonShape2D" id=3]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 49.5669, -27.9744, 45.1564, 15.3961, 18.6931, -1.51105 )
+
+[sub_resource type="ConvexPolygonShape2D" id=4]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -40.1345, 21.2602, -53.3067, 15.8716 )
+
+[sub_resource type="ConvexPolygonShape2D" id=5]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -40.1345, 21.2602, -37.1739, 2.89948, -14.386, -14.0076, -6.30005, 0.694214 )
+
+[sub_resource type="ConvexPolygonShape2D" id=6]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -14.386, -14.0076, 18.6931, -1.51105, 45.1564, 15.3961, -6.30005, 0.694214 )
+
+[sub_resource type="Animation" id=7]
+
+resource/name = "movethem"
+length = 4.0
+loop = true
+step = 0.1
+tracks/0/type = "value"
+tracks/0/path = NodePath("base/circle:transform/pos")
+tracks/0/interp = 1
+tracks/0/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 0, 0 ), Vector2( 52.7569, -70.845 ) ] }
+tracks/1/type = "value"
+tracks/1/path = NodePath("base/box:transform/pos")
+tracks/1/interp = 1
+tracks/1/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 193.173, -2.72076 ), Vector2( 195.894, -72.0999 ) ] }
+tracks/2/type = "value"
+tracks/2/path = NodePath("base/box:transform/rot")
+tracks/2/interp = 1
+tracks/2/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 92.8111 ] }
+tracks/3/type = "value"
+tracks/3/path = NodePath("base/polygon:transform/pos")
+tracks/3/interp = 1
+tracks/3/keys = { "cont":true, "times":FloatArray( 0, 2 ), "transitions":FloatArray( 1, 1 ), "values":[ Vector2( 382.265, -2.72076 ), Vector2( 495.176, -10.883 ) ] }
+
+[sub_resource type="Animation" id=8]
+
+resource/name = "toggletrigger"
+length = 6.0
+loop = true
+step = 0.1
+tracks/0/type = "value"
+tracks/0/path = NodePath("base/box:trigger")
+tracks/0/interp = 1
+tracks/0/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ false, true ] }
+tracks/1/type = "value"
+tracks/1/path = NodePath("base/box:visibility/opacity")
+tracks/1/interp = 1
+tracks/1/keys = { "cont":false, "times":FloatArray( 0, 4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.2 ] }
+
+[node name="base" type="Node2D"]
+
+script/script = ExtResource( 1 )
+
+[node name="base" type="KinematicBody2D" parent="."]
+
+transform/pos = Vector2( 137, 470 )
+input/pickable = false
+shapes/0/shape = SubResource( 1 )
+shapes/0/transform = Matrix32( 1, 0, 0, 1, 7.91353, -10.6267 )
+shapes/0/trigger = false
+shapes/1/shape = SubResource( 2 )
+shapes/1/transform = Matrix32( 0.970626, -0.240595, 0.240595, 0.970626, 193.581, -13.1276 )
+shapes/1/trigger = false
+shapes/2/shape = SubResource( 3 )
+shapes/2/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
+shapes/2/trigger = false
+shapes/3/shape = SubResource( 4 )
+shapes/3/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
+shapes/3/trigger = false
+shapes/4/shape = SubResource( 5 )
+shapes/4/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
+shapes/4/trigger = false
+shapes/5/shape = SubResource( 6 )
+shapes/5/transform = Matrix32( 1, 0, 0, 1, 399.202, -3.9451 )
+shapes/5/trigger = false
+collision/layers = 1
+collision/mask = 1
+collision/margin = 0.08
+
+[node name="circle" type="CollisionShape2D" parent="base"]
+
+transform/pos = Vector2( 7.91353, -10.6267 )
+shape = SubResource( 1 )
+trigger = false
+_update_shape_index = 0
+
+[node name="sprite" type="Sprite" parent="base/circle"]
+
+texture = ExtResource( 2 )
+
+[node name="box" type="CollisionShape2D" parent="base"]
+
+transform/pos = Vector2( 193.581, -13.1276 )
+transform/rot = 13.9217
+shape = SubResource( 2 )
+trigger = false
+_update_shape_index = 1
+
+[node name="Sprite" type="Sprite" parent="base/box"]
+
+texture = ExtResource( 3 )
+
+[node name="polygon" type="CollisionPolygon2D" parent="base"]
+
+transform/pos = Vector2( 399.202, -3.9451 )
+build_mode = 0
+polygon = Vector2Array( -55.093, -14.2052, -37.1739, 2.89948, -14.386, -14.0076, 18.6931, -1.51105, 49.5669, -27.9744, 45.1564, 15.3961, -6.30005, 0.694214, -40.1345, 21.2602, -53.3067, 15.8716 )
+shape_range = Vector2( 2, 5 )
+trigger = false
+
+[node name="Sprite" type="Sprite" parent="base/polygon"]
+
+texture = ExtResource( 4 )
+
+[node name="shapemove" type="AnimationPlayer" parent="."]
+
+playback/process_mode = 1
+playback/default_blend_time = 0.0
+root/root = NodePath("..")
+anims/movethem = SubResource( 7 )
+playback/active = true
+playback/speed = 1.0
+blend_times = [  ]
+autoplay = "movethem"
+
+[node name="triggertoggle" type="AnimationPlayer" parent="."]
+
+playback/process_mode = 1
+playback/default_blend_time = 0.0
+root/root = NodePath("..")
+anims/movethem = SubResource( 7 )
+anims/toggletrigger = SubResource( 8 )
+playback/active = true
+playback/speed = 1.0
+blend_times = [  ]
+autoplay = "toggletrigger"
+
+[node name="Label" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 21.0
+margin/top = 21.0
+margin/right = 719.0
+margin/bottom = 73.0
+text = "This demo simply shows that it\'s possible now to move a CollisionShape and CollisionPolygon after it was created\nand also turn it into a trigger at run-time. CollisionShape will remain alive during the running game and you can\ninteract with them, even though they are just meant to be helpers.\nIt is always recommended in a real use-case scenario, to move a body instead of a shape, as that path is better optimized."
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+

+ 1 - 1
2d/dynamic_collision_shapes/engine.cfg

@@ -1,5 +1,5 @@
 [application]
 [application]
 
 
 name="Run-Time CollisionShape"
 name="Run-Time CollisionShape"
-main_scene="res://dynamic_colobjs.scn"
+main_scene="res://dynamic_colobjs.tscn"
 icon="res://icon.png"
 icon="res://icon.png"

+ 1 - 1
2d/fog_of_war/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Fog of War"
 name="Fog of War"
-main_scene="res://fog.scn"
+main_scene="res://fog.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [input]
 [input]

BIN
2d/fog_of_war/fog.scn


File diff suppressed because it is too large
+ 25 - 0
2d/fog_of_war/fog.tscn


+ 0 - 29
2d/fog_of_war/fog.xml

@@ -1,29 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="TileSet" subresource_count="3" version="1.0" version_name="Godot Engine v1.0.stable.custom_build">
-	<ext_resource path="res://floor.png" type="Texture"></ext_resource>
-	<ext_resource path="res://fog.png" type="Texture"></ext_resource>
-	<main_resource>
-		<string name="0/name"> "fog opaque" </string>
-		<resource name="0/texture" resource_type="Texture" path="res://fog.png">  </resource>
-		<vector2 name="0/tex_offset"> -48, -48 </vector2>
-		<vector2 name="0/shape_offset"> 0, 0 </vector2>
-		<rect2 name="0/region"> 0, 0, 144, 144 </rect2>
-		<array name="0/shapes" len="0" shared="false">
-		</array>
-		<string name="1/name"> "fog transparent" </string>
-		<resource name="1/texture" resource_type="Texture" path="res://fog.png">  </resource>
-		<vector2 name="1/tex_offset"> -48, -48 </vector2>
-		<vector2 name="1/shape_offset"> 0, 0 </vector2>
-		<rect2 name="1/region"> 144, 0, 144, 144 </rect2>
-		<array name="1/shapes" len="0" shared="false">
-		</array>
-		<string name="2/name"> "floor" </string>
-		<resource name="2/texture" resource_type="Texture" path="res://floor.png">  </resource>
-		<vector2 name="2/tex_offset"> 0, 0 </vector2>
-		<vector2 name="2/shape_offset"> 0, 0 </vector2>
-		<rect2 name="2/region"> 0, 0, 0, 0 </rect2>
-		<array name="2/shapes" len="0" shared="false">
-		</array>
-
-	</main_resource>
-</resource_file>

BIN
2d/fog_of_war/tile_edit.scn


+ 32 - 0
2d/fog_of_war/tileset.tres

@@ -0,0 +1,32 @@
+[gd_resource type="TileSet" load_steps=3 format=1]
+
+[ext_resource path="res://fog.png" type="Texture" id=1]
+[ext_resource path="res://floor.png" type="Texture" id=2]
+
+[resource]
+
+0/name = "fog opaque"
+0/texture = ExtResource( 1 )
+0/tex_offset = Vector2( -48, -48 )
+0/region = Rect2( 0, 0, 144, 144 )
+0/occluder_offset = Vector2( 0, 0 )
+0/navigation_offset = Vector2( 0, 0 )
+0/shape_offset = Vector2( 0, 0 )
+0/shapes = [  ]
+1/name = "fog transparent"
+1/texture = ExtResource( 1 )
+1/tex_offset = Vector2( -48, -48 )
+1/region = Rect2( 144, 0, 144, 144 )
+1/occluder_offset = Vector2( 0, 0 )
+1/navigation_offset = Vector2( 0, 0 )
+1/shape_offset = Vector2( 0, 0 )
+1/shapes = [  ]
+2/name = "floor"
+2/texture = ExtResource( 2 )
+2/tex_offset = Vector2( 0, 0 )
+2/region = Rect2( 0, 0, 0, 0 )
+2/occluder_offset = Vector2( 24, 24 )
+2/navigation_offset = Vector2( 24, 24 )
+2/shape_offset = Vector2( 0, 0 )
+2/shapes = [  ]
+

+ 30 - 0
2d/fog_of_war/tileset_edit.tscn

@@ -0,0 +1,30 @@
+[gd_scene load_steps=3 format=1]
+
+[ext_resource path="res://fog.png" type="Texture" id=1]
+[ext_resource path="res://floor.png" type="Texture" id=2]
+
+[node name="Node2D" type="Node2D"]
+
+[node name="fog opaque" type="Sprite" parent="."]
+
+texture = ExtResource( 1 )
+centered = false
+offset = Vector2( -48, -48 )
+region = true
+region_rect = Rect2( 0, 0, 144, 144 )
+
+[node name="fog transparent" type="Sprite" parent="."]
+
+transform/pos = Vector2( 144, 0 )
+texture = ExtResource( 1 )
+centered = false
+offset = Vector2( -48, -48 )
+region = true
+region_rect = Rect2( 144, 0, 144, 144 )
+
+[node name="floor" type="Sprite" parent="."]
+
+transform/pos = Vector2( 264, 24 )
+texture = ExtResource( 2 )
+
+

BIN
2d/fog_of_war/troll.scn


+ 52 - 0
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
+
+

BIN
2d/hdr/beach_cave.scn


+ 88 - 0
2d/hdr/beach_cave.tscn

@@ -0,0 +1,88 @@
+[gd_scene load_steps=5 format=1]
+
+[ext_resource path="res://beach_cave.gd" type="Script" id=1]
+[ext_resource path="res://ocean_beach.png" type="Texture" id=2]
+[ext_resource path="res://ocean_cave.png" type="Texture" id=3]
+
+[sub_resource type="Environment" id=1]
+
+ambient_light/enabled = false
+ambient_light/color = Color( 0, 0, 0, 1 )
+ambient_light/energy = 1.0
+fxaa/enabled = false
+background/mode = 5
+background/color = Color( 0, 0, 0, 1 )
+background/energy = 1.0
+background/scale = 1.0
+background/glow = 0.0
+background/canvas_max_layer = null
+glow/enabled = true
+glow/blur_passes = 3
+glow/blur_scale = 1.2
+glow/blur_strength = 1.2
+glow/blur_blend_mode = 0
+glow/bloom = 0.0
+glow/bloom_treshold = 0.5
+dof_blur/enabled = false
+dof_blur/blur_passes = 1
+dof_blur/begin = 100.0
+dof_blur/range = 10.0
+hdr/enabled = true
+hdr/tonemapper = 0.0
+hdr/exposure = 0.5
+hdr/white = 1.0
+hdr/glow_treshold = 0.7
+hdr/glow_scale = 0.5
+hdr/min_luminance = 0.3
+hdr/max_luminance = 8.0
+hdr/exposure_adj_speed = 2.0
+fog/enabled = false
+fog/begin = 100.0
+fog/begin_color = Color( 0, 0, 0, 1 )
+fog/end_color = Color( 0, 0, 0, 1 )
+fog/attenuation = 1.0
+fog/bg = true
+bcs/enabled = false
+bcs/brightness = 1.0
+bcs/contrast = 1.0
+bcs/saturation = 1.0
+srgb/enabled = true
+
+[node name="hdr" type="Node2D"]
+
+script/script = ExtResource( 1 )
+
+[node name="beach" type="Sprite" parent="."]
+
+texture = ExtResource( 2 )
+centered = false
+modulate = Color( 2, 2, 2, 1 )
+
+[node name="cave" type="Sprite" parent="."]
+
+transform/scale = Vector2( 1.2, 1 )
+texture = ExtResource( 3 )
+centered = false
+modulate = Color( 0.233166, 0.221219, 0.23582, 1 )
+
+[node name="environment" type="WorldEnvironment" parent="."]
+
+_import_transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )
+environment = SubResource( 1 )
+
+[node name="Label" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 0.0
+margin/top = 0.0
+margin/right = 40.0
+margin/bottom = 13.0
+custom_colors/font_color = Color( 0.213955, 0.205626, 0.20313, 1 )
+text = "Drag  Left and Right"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+

+ 1 - 1
2d/hdr/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="HDR for 2D"
 name="HDR for 2D"
-main_scene="res://beach_cave.scn"
+main_scene="res://beach_cave.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [display]
 [display]

+ 1 - 1
2d/hexamap/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Hexagonal Game"
 name="Hexagonal Game"
-main_scene="res://map.scn"
+main_scene="res://map.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [input]
 [input]

BIN
2d/hexamap/map.scn


+ 31 - 0
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
+
+

BIN
2d/hexamap/tiles.scn


BIN
2d/hexamap/tileset.res


+ 240 - 0
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 = [  ]
+

+ 214 - 0
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 )
+
+

BIN
2d/hexamap/troll.scn


+ 52 - 0
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
+
+

BIN
2d/isometric/bastiles.res


BIN
2d/isometric/dungeon.scn


+ 49 - 0
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
+
+

+ 1 - 1
2d/isometric/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Isometric Game"
 name="Isometric Game"
-main_scene="res://dungeon.scn"
+main_scene="res://dungeon.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [image_loader]
 [image_loader]

BIN
2d/isometric/tileset.scn


+ 67 - 0
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 ) ]
+

+ 130 - 0
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
+
+

BIN
2d/isometric/troll.scn


+ 53 - 0
2d/isometric/troll.tscn

@@ -0,0 +1,53 @@
+[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, -0.342697, -0.980721 )
+shapes/0/trigger = false
+collision/layers = 1
+collision/mask = 1
+collision/margin = 0.001
+script/script = ExtResource( 1 )
+
+[node name="Sprite" type="Sprite" parent="."]
+
+transform/pos = Vector2( -3.94334, -36.924 )
+texture = ExtResource( 2 )
+
+[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
+
+transform/pos = Vector2( -0.342697, -0.980721 )
+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
+
+

+ 12 - 0
2d/isometric_light/character_shader.tres

@@ -0,0 +1,12 @@
+[gd_resource type="CanvasItemMaterial" load_steps=2 format=1]
+
+[sub_resource type="CanvasItemShader" id=1]
+
+_code = { "fragment":"//there is no albedo (all shading is normal)\nuniform color col;\nCOLOR=col;\n//sample normal texture\nvec4 ntex = tex(TEXTURE,UV);\n//take the alpha from the normal texture\nCOLOR.a=ntex.a;\n//adjust normalmap from [0..1] to [-1..1]\nntex.rgb = ntex.rgb * vec3(-2,-2,1) - vec3(-1,-1,0);\n//half size of the tile \nvec2 tile_vec=vec2(47,22);\n//rotation to convert the normal to pseudo 3d coordinates\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)));\n\n//pass the normal\nNORMAL =  rot_mat * ntex.rgb;\n\n\n\n\n", "fragment_ofs":0, "light":"//apply the normal as simple diffuse (same as default code)\nvec3 light_normal = normalize(vec3(LIGHT_VEC,-LIGHT_HEIGHT));\nLIGHT=LIGHT_COLOR*COLOR*max(dot(-light_normal,NORMAL),0.0);\n//substract light position to be always aligned to the bottom of the sprite\n//this makes lighting on it look like a billboard\nLIGHT_VEC.y-=VAR1.y;\n", "light_ofs":0, "vertex":"// pass the local sprite coordinates through a varying\n// the red cross in the sprite is the 0,0\nVAR1.xy=SRC_VERTEX;", "vertex_ofs":0 }
+
+[resource]
+
+shader/shader = SubResource( 1 )
+shader/shading_mode = 0
+shader_param/col = Color( 1, 0.836638, 0.693806, 1 )
+

BIN
2d/isometric_light/character_shder.res


BIN
2d/isometric_light/column.scn


+ 52 - 0
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
+
+

+ 1 - 1
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):
 	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 pos = get_canvas_transform().affine_inverse()*event.pos
 		var dir = (pos - get_global_pos()).normalized()
 		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.advance_dir = dir
 		bullet.set_pos(get_global_pos() + dir*60)
 		bullet.set_pos(get_global_pos() + dir*60)
 		get_parent().add_child(bullet)
 		get_parent().add_child(bullet)

BIN
2d/isometric_light/cubio.scn


File diff suppressed because it is too large
+ 174 - 0
2d/isometric_light/cubio.tscn


+ 1 - 1
2d/isometric_light/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Isometric 2D + Lighting"
 name="Isometric 2D + Lighting"
-main_scene="res://map.scn"
+main_scene="res://map.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [input]
 [input]

BIN
2d/isometric_light/floor_shader.res


+ 14 - 0
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 )
+

BIN
2d/isometric_light/map.scn


File diff suppressed because it is too large
+ 40 - 0
2d/isometric_light/map.tscn


BIN
2d/isometric_light/shoot.scn


+ 172 - 0
2d/isometric_light/shoot.tscn

@@ -0,0 +1,172 @@
+[gd_scene load_steps=10 format=1]
+
+[ext_resource path="res://shoot.gd" type="Script" id=1]
+[ext_resource path="res://energy.png" type="Texture" id=2]
+[ext_resource path="res://shoot_halo.png" type="Texture" id=3]
+
+[sub_resource type="CircleShape2D" id=1]
+
+custom_solver_bias = 0.0
+radius = 10.0
+
+[sub_resource type="CanvasItemMaterial" id=2]
+
+shader/shading_mode = 0
+
+[sub_resource type="Animation" id=3]
+
+length = 1.0
+loop = false
+step = 0.1
+tracks/0/type = "value"
+tracks/0/path = NodePath("explosion:config/emitting")
+tracks/0/interp = 1
+tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.3 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] }
+tracks/1/type = "value"
+tracks/1/path = NodePath("Sprite:visibility/opacity")
+tracks/1/interp = 1
+tracks/1/keys = { "cont":true, "times":FloatArray( 0, 0.2 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] }
+tracks/2/type = "value"
+tracks/2/path = NodePath("energy1:config/emitting")
+tracks/2/interp = 1
+tracks/2/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] }
+tracks/3/type = "value"
+tracks/3/path = NodePath("light:color")
+tracks/3/interp = 1
+tracks/3/keys = { "cont":true, "times":FloatArray( 0, 0.5 ), "transitions":FloatArray( 1, 1 ), "values":[ Color( 1, 3, 2, 1 ), Color( 0, 0, 0, 0 ) ] }
+tracks/4/type = "method"
+tracks/4/path = NodePath(".")
+tracks/4/interp = 1
+tracks/4/keys = { "times":FloatArray( 0.9 ), "transitions":FloatArray( 1 ), "values":[ { "args":[  ], "method":"queue_free" } ] }
+
+[sub_resource type="Animation" id=4]
+
+length = 1.0
+loop = true
+step = 0.1
+tracks/0/type = "value"
+tracks/0/path = NodePath("Sprite:transform/rot")
+tracks/0/interp = 1
+tracks/0/keys = { "cont":true, "times":FloatArray( 0, 1 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 360.0 ] }
+
+[sub_resource type="ColorRamp" id=5]
+
+offsets = FloatArray( 0, 1 )
+colors = ColorArray( 1, 1, 1, 1, 1, 0.617074, 0.704795, 0.0653235 )
+
+[sub_resource type="ColorRamp" id=6]
+
+offsets = FloatArray( 0, 1 )
+colors = ColorArray( 1, 1, 1, 1, 1, 0.617074, 0.704795, 0.0653235 )
+
+[node name="shoot" 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.08
+script/script = ExtResource( 1 )
+
+[node name="Sprite" type="Sprite" parent="."]
+
+material/material = SubResource( 2 )
+transform/pos = Vector2( -1.46303, -58.521 )
+texture = ExtResource( 2 )
+
+[node name="anim" type="AnimationPlayer" parent="."]
+
+playback/process_mode = 1
+playback/default_blend_time = 0.0
+root/root = NodePath("..")
+anims/explode = SubResource( 3 )
+anims/spin = SubResource( 4 )
+playback/active = true
+playback/speed = 1.0
+blend_times = [  ]
+autoplay = ""
+
+[node name="light" type="Light2D" parent="."]
+
+enabled = true
+texture = ExtResource( 3 )
+offset = Vector2( 0, 0 )
+scale = 1.0
+color = Color( 1, 3, 2, 1 )
+energy = 1.0
+mode = 0
+range/height = 80.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="shape" type="CollisionShape2D" parent="."]
+
+shape = SubResource( 1 )
+trigger = false
+_update_shape_index = -1
+
+[node name="energy1" type="Particles2D" parent="."]
+
+visibility/blend_mode = 1
+transform/pos = Vector2( -1.06581, -61.3015 )
+config/amount = 32
+config/lifetime = 0.6
+config/local_space = false
+config/texture = ExtResource( 2 )
+params/direction = 0.0
+params/spread = 180.0
+params/linear_velocity = 60.0
+params/spin_velocity = 0.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 = 0.8
+params/final_size = 0.1
+params/hue_variation = 0.0
+params/anim_speed_scale = 1.0
+params/anim_initial_pos = 0.0
+color/color_ramp = SubResource( 5 )
+
+[node name="explosion" type="Particles2D" parent="."]
+
+visibility/blend_mode = 1
+transform/pos = Vector2( -1.06581, -61.3015 )
+config/amount = 32
+config/lifetime = 0.6
+config/emitting = false
+config/local_space = false
+config/explosiveness = 0.1
+config/texture = ExtResource( 2 )
+params/direction = 0.0
+params/spread = 180.0
+params/linear_velocity = 200.0
+params/spin_velocity = 0.0
+params/orbit_velocity = 0.0
+params/gravity_direction = 0.0
+params/gravity_strength = 200.0
+params/radial_accel = 0.0
+params/tangential_accel = 0.0
+params/damping = 0.0
+params/initial_angle = 0.0
+params/initial_size = 0.8
+params/final_size = 0.1
+params/hue_variation = 0.0
+params/anim_speed_scale = 1.0
+params/anim_initial_pos = 0.0
+color/color_ramp = SubResource( 6 )
+
+

BIN
2d/isometric_light/tileset.res


+ 216 - 0
2d/isometric_light/tileset.tres

@@ -0,0 +1,216 @@
+[gd_resource type="TileSet" load_steps=22 format=1]
+
+[ext_resource path="res://floor_shader.tres" type="CanvasItemMaterial" id=1]
+[ext_resource path="res://faceColor.png" type="Texture" id=2]
+[ext_resource path="res://wall_shader.tres" type="CanvasItemMaterial" id=3]
+
+[sub_resource type="OccluderPolygon2D" id=1]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, -22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=2]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 48, 0, 0, -22, 0, -44, 48, -22 )
+
+[sub_resource type="OccluderPolygon2D" id=3]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, 22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=4]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -48, 0, 0, -22, 48, 0, 0, 22 )
+
+[sub_resource type="OccluderPolygon2D" id=5]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, -22, 48, 0, 0, 22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=6]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 48, 0, 0, 22, 0, -22 )
+
+[sub_resource type="OccluderPolygon2D" id=7]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, -22, -48, 0, 0, 22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=8]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -48, 0, 0, -22, 0, 22 )
+
+[sub_resource type="OccluderPolygon2D" id=9]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, -22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=10]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 0, -22, 48, 0, -48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=11]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, 22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=12]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 48, 0, 0, 22, -48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=13]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, 22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=14]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 0, 22, 0, 0, 48, -22, 48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=15]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, 22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=16]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -48, -22, 0, 0, 0, 22, -48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=17]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, -22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=18]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 0, -44, 0, -22, -48, 0, -48, -22 )
+
+[resource]
+
+0/name = "floor1"
+0/texture = ExtResource( 2 )
+0/tex_offset = Vector2( 0, 28 )
+0/material = ExtResource( 1 )
+0/region = Rect2( 311, 760, 197, 151 )
+0/occluder_offset = Vector2( 98.5, 75.5 )
+0/navigation_offset = Vector2( 98.5, 75.5 )
+0/shape_offset = Vector2( 0, 0 )
+0/shapes = [  ]
+1/name = "floor2"
+1/texture = ExtResource( 2 )
+1/tex_offset = Vector2( 0, 28 )
+1/material = ExtResource( 1 )
+1/region = Rect2( 591, 772, 197, 151 )
+1/occluder_offset = Vector2( 98.5, 75.5 )
+1/navigation_offset = Vector2( 98.5, 75.5 )
+1/shape_offset = Vector2( 0, 0 )
+1/shapes = [  ]
+2/name = "block"
+2/texture = ExtResource( 2 )
+2/tex_offset = Vector2( 0, -60 )
+2/material = ExtResource( 3 )
+2/region = Rect2( 844, 527, 138, 180 )
+2/occluder_offset = Vector2( 69, 90 )
+2/occluder = SubResource( 3 )
+2/navigation_offset = Vector2( 69, 90 )
+2/shape_offset = Vector2( 69, 90 )
+2/shapes = [ SubResource( 4 ) ]
+3/name = "q_right"
+3/texture = ExtResource( 2 )
+3/tex_offset = Vector2( 0, -60 )
+3/material = ExtResource( 3 )
+3/region = Rect2( 665, 528, 139, 178 )
+3/occluder_offset = Vector2( 69.5, 89 )
+3/occluder = SubResource( 5 )
+3/navigation_offset = Vector2( 69.5, 89 )
+3/shape_offset = Vector2( 69.5, 89 )
+3/shapes = [ SubResource( 6 ) ]
+4/name = "q_left"
+4/texture = ExtResource( 2 )
+4/tex_offset = Vector2( 0, -60 )
+4/material = ExtResource( 3 )
+4/region = Rect2( 292, 528, 139, 178 )
+4/occluder_offset = Vector2( 69.5, 89 )
+4/occluder = SubResource( 7 )
+4/navigation_offset = Vector2( 69.5, 89 )
+4/shape_offset = Vector2( 69.5, 89 )
+4/shapes = [ SubResource( 8 ) ]
+5/name = "q_top"
+5/texture = ExtResource( 2 )
+5/tex_offset = Vector2( 0, -60 )
+5/material = ExtResource( 3 )
+5/region = Rect2( 479, 528, 139, 178 )
+5/occluder_offset = Vector2( 69.5, 89 )
+5/occluder = SubResource( 9 )
+5/navigation_offset = Vector2( 69.5, 89 )
+5/shape_offset = Vector2( 69.5, 89 )
+5/shapes = [ SubResource( 10 ) ]
+6/name = "q_bottom"
+6/texture = ExtResource( 2 )
+6/tex_offset = Vector2( 0, -60 )
+6/material = ExtResource( 3 )
+6/region = Rect2( 103, 528, 139, 178 )
+6/occluder_offset = Vector2( 69.5, 89 )
+6/occluder = SubResource( 11 )
+6/navigation_offset = Vector2( 69.5, 89 )
+6/shape_offset = Vector2( 69.5, 89 )
+6/shapes = [ SubResource( 12 ) ]
+7/name = "s_right_bottom"
+7/texture = ExtResource( 2 )
+7/tex_offset = Vector2( 0, -62 )
+7/material = ExtResource( 3 )
+7/region = Rect2( 480, 350, 139, 178 )
+7/occluder_offset = Vector2( 69.5, 89 )
+7/occluder = SubResource( 13 )
+7/navigation_offset = Vector2( 69.5, 89 )
+7/shape_offset = Vector2( 69.5, 89 )
+7/shapes = [ SubResource( 14 ) ]
+8/name = "s_left_bottom"
+8/texture = ExtResource( 2 )
+8/tex_offset = Vector2( 0, -62 )
+8/material = ExtResource( 3 )
+8/region = Rect2( 665, 350, 139, 178 )
+8/occluder_offset = Vector2( 69.5, 89 )
+8/occluder = SubResource( 15 )
+8/navigation_offset = Vector2( 69.5, 89 )
+8/shape_offset = Vector2( 69.5, 89 )
+8/shapes = [ SubResource( 16 ) ]
+9/name = "s_left_top"
+9/texture = ExtResource( 2 )
+9/tex_offset = Vector2( 0, -62 )
+9/material = ExtResource( 3 )
+9/region = Rect2( 292, 350, 139, 178 )
+9/occluder_offset = Vector2( 69.5, 89 )
+9/occluder = SubResource( 17 )
+9/navigation_offset = Vector2( 69.5, 89 )
+9/shape_offset = Vector2( 69.5, 89 )
+9/shapes = [ SubResource( 18 ) ]
+10/name = "s_right_top"
+10/texture = ExtResource( 2 )
+10/tex_offset = Vector2( -12, -62 )
+10/material = ExtResource( 3 )
+10/region = Rect2( 842, 350, 139, 178 )
+10/occluder_offset = Vector2( 69.5, 89 )
+10/occluder = SubResource( 1 )
+10/navigation_offset = Vector2( 69.5, 89 )
+10/shape_offset = Vector2( 69.5, 89 )
+10/shapes = [ SubResource( 2 ) ]
+

+ 446 - 0
2d/isometric_light/tileset_edit.tscn

@@ -0,0 +1,446 @@
+[gd_scene load_steps=22 format=1]
+
+[ext_resource path="res://floor_shader.tres" type="CanvasItemMaterial" id=1]
+[ext_resource path="res://faceColor.png" type="Texture" id=2]
+[ext_resource path="res://wall_shader.tres" type="CanvasItemMaterial" id=3]
+
+[sub_resource type="ConvexPolygonShape2D" id=1]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -48, 0, 0, -22, 48, 0, 0, 22 )
+
+[sub_resource type="OccluderPolygon2D" id=2]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, 22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=3]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 48, 0, 0, 22, 0, -22 )
+
+[sub_resource type="OccluderPolygon2D" id=4]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, -22, 48, 0, 0, 22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=5]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -48, 0, 0, -22, 0, 22 )
+
+[sub_resource type="OccluderPolygon2D" id=6]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, -22, -48, 0, 0, 22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=7]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 0, -22, 48, 0, -48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=8]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, -22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=9]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 48, 0, 0, 22, -48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=10]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, 22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=11]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 0, 22, 0, 0, 48, -22, 48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=12]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, 22, 48, 0 )
+
+[sub_resource type="ConvexPolygonShape2D" id=13]
+
+custom_solver_bias = 0.0
+points = Vector2Array( -48, -22, 0, 0, 0, 22, -48, 0 )
+
+[sub_resource type="OccluderPolygon2D" id=14]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, 22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=15]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 0, -44, 0, -22, -48, 0, -48, -22 )
+
+[sub_resource type="OccluderPolygon2D" id=16]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( -48, 0, 0, -22 )
+
+[sub_resource type="ConvexPolygonShape2D" id=17]
+
+custom_solver_bias = 0.0
+points = Vector2Array( 48, 0, 0, -22, 0, -44, 48, -22 )
+
+[sub_resource type="OccluderPolygon2D" id=18]
+
+closed = false
+cull_mode = 0
+polygon = Vector2Array( 0, -22, 48, 0 )
+
+[node name="base" type="Node2D"]
+
+[node name="floor1" type="Sprite" parent="."]
+
+material/material = ExtResource( 1 )
+transform/pos = Vector2( 140.869, 111.332 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, 28 )
+region = true
+region_rect = Rect2( 311, 760, 197, 151 )
+
+[node name="floor2" type="Sprite" parent="."]
+
+material/material = ExtResource( 1 )
+transform/pos = Vector2( 372.62, 109.06 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, 28 )
+region = true
+region_rect = Rect2( 591, 772, 197, 151 )
+
+[node name="block" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 528, -132 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -60 )
+region = true
+region_rect = Rect2( 844, 527, 138, 180 )
+
+[node name="collision" type="StaticBody2D" parent="block"]
+
+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="block/collision"]
+
+build_mode = 0
+polygon = Vector2Array( 0, -22, 48, 0, 0, 22, -48, 0 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="block"]
+
+occluder = SubResource( 2 )
+light_mask = 1
+
+[node name="q_right" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 336, -154 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -60 )
+region = true
+region_rect = Rect2( 665, 528, 139, 178 )
+
+[node name="collision1" type="StaticBody2D" parent="q_right"]
+
+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="q_right/collision1"]
+
+build_mode = 0
+polygon = Vector2Array( 0, -22, 48, 0, 0, 22 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="q_right"]
+
+occluder = SubResource( 4 )
+light_mask = 1
+
+[node name="q_left" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 96, -110 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -60 )
+region = true
+region_rect = Rect2( 292, 528, 139, 178 )
+
+[node name="collision1" type="StaticBody2D" parent="q_left"]
+
+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="q_left/collision1"]
+
+build_mode = 0
+polygon = Vector2Array( 0, 22, -48, 0, 0, -22 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="q_left"]
+
+occluder = SubResource( 6 )
+light_mask = 1
+
+[node name="q_top" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 288, 0 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -60 )
+region = true
+region_rect = Rect2( 479, 528, 139, 178 )
+
+[node name="collision2" type="StaticBody2D" parent="q_top"]
+
+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="q_top/collision2"]
+
+build_mode = 0
+polygon = Vector2Array( -48, 0, 0, -22, 48, 0 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="q_top"]
+
+occluder = SubResource( 8 )
+light_mask = 1
+
+[node name="q_bottom" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 192, -242 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -60 )
+region = true
+region_rect = Rect2( 103, 528, 139, 178 )
+
+[node name="collision3" type="StaticBody2D" parent="q_bottom"]
+
+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="q_bottom/collision3"]
+
+build_mode = 0
+polygon = Vector2Array( -48, 0, 48, 0, 0, 22 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D1" type="LightOccluder2D" parent="q_bottom"]
+
+occluder = SubResource( 10 )
+light_mask = 1
+
+[node name="s_right_bottom" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 288, -330 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -62 )
+region = true
+region_rect = Rect2( 480, 350, 139, 178 )
+
+[node name="collision1" type="StaticBody2D" parent="s_right_bottom"]
+
+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="s_right_bottom/collision1"]
+
+build_mode = 0
+polygon = Vector2Array( 0, 22, 48, 0, 48, -22, 0, 0 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="s_right_bottom"]
+
+occluder = SubResource( 12 )
+light_mask = 1
+
+[node name="s_left_bottom" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 432, -330 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -62 )
+region = true
+region_rect = Rect2( 665, 350, 139, 178 )
+
+[node name="collision1" type="StaticBody2D" parent="s_left_bottom"]
+
+input/pickable = false
+shapes/0/shape = SubResource( 13 )
+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="s_left_bottom/collision1"]
+
+build_mode = 0
+polygon = Vector2Array( 0, 22, -48, 0, -48, -22, 0, 0 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="s_left_bottom"]
+
+occluder = SubResource( 14 )
+light_mask = 1
+
+[node name="s_left_top" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 528, -330 )
+texture = ExtResource( 2 )
+offset = Vector2( 0, -62 )
+region = true
+region_rect = Rect2( 292, 350, 139, 178 )
+
+[node name="collision1" type="StaticBody2D" parent="s_left_top"]
+
+input/pickable = false
+shapes/0/shape = SubResource( 15 )
+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="s_left_top/collision1"]
+
+build_mode = 0
+polygon = Vector2Array( 0, -22, -48, 0, -48, -22, 0, -44 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="s_left_top"]
+
+occluder = SubResource( 16 )
+light_mask = 1
+
+[node name="s_right_top" type="Sprite" parent="."]
+
+material/material = ExtResource( 3 )
+transform/pos = Vector2( 576, -330 )
+texture = ExtResource( 2 )
+offset = Vector2( -12, -62 )
+region = true
+region_rect = Rect2( 842, 350, 139, 178 )
+
+[node name="collision1" type="StaticBody2D" parent="s_right_top"]
+
+input/pickable = false
+shapes/0/shape = SubResource( 17 )
+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="s_right_top/collision1"]
+
+build_mode = 0
+polygon = Vector2Array( 0, -22, 0, -44, 48, -22, 48, 0 )
+shape_range = Vector2( -1, -1 )
+trigger = false
+
+[node name="LightOccluder2D" type="LightOccluder2D" parent="s_right_top"]
+
+occluder = SubResource( 18 )
+light_mask = 1
+
+[node name="instructions" type="Label" parent="."]
+
+focus/ignore_mouse = true
+focus/stop_mouse = true
+size_flags/horizontal = 2
+margin/left = 0.0
+margin/top = 0.0
+margin/right = 40.0
+margin/bottom = 13.0
+text = "This scene is used to edit the tileset.\nSave to the tileset with Scene -> Convert to -> TileSet\nThen, overwrite \"tileset.tres\""
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+

BIN
2d/isometric_light/tileset_scene.scn


BIN
2d/isometric_light/torch.scn


+ 138 - 0
2d/isometric_light/torch.tscn

@@ -0,0 +1,138 @@
+[gd_scene load_steps=9 format=1]
+
+[ext_resource path="res://shadow_blob.png" type="Texture" id=1]
+[ext_resource path="res://torch_shader.tres" type="CanvasItemMaterial" id=2]
+[ext_resource path="res://faceColor.png" type="Texture" id=3]
+[ext_resource path="res://torch_light.png" type="Texture" id=4]
+[ext_resource path="res://fire.png" type="Texture" id=5]
+
+[sub_resource type="Animation" id=1]
+
+resource/name = "firecol"
+length = 5.0
+loop = true
+step = 0.1
+tracks/0/type = "value"
+tracks/0/path = NodePath("light:color")
+tracks/0/interp = 1
+tracks/0/keys = { "cont":true, "times":FloatArray( 0, 0.4, 0.6, 1, 1.6, 1.9, 2.3, 2.8, 3, 3.5, 3.9, 4.2, 4.5, 4.8 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ Color( 1, 0.664806, 0.432623, 1 ), Color( 0.648063, 0.341868, 0.308913, 1 ), Color( 0.796534, 0.145722, 0.198635, 1 ), Color( 0.648063, 0.341868, 0.308913, 1 ), Color( 1, 0.664806, 0.432623, 1 ), Color( 0.796534, 0.145722, 0.198635, 1 ), Color( 0.648063, 0.341868, 0.308913, 1 ), Color( 0.796534, 0.145722, 0.198635, 1 ), Color( 1, 0.664806, 0.432623, 1 ), Color( 0.796534, 0.145722, 0.198635, 1 ), Color( 1, 0.664806, 0.432623, 1 ), Color( 0.796534, 0.145722, 0.198635, 1 ), Color( 0.648063, 0.341868, 0.308913, 1 ), Color( 1, 0.664806, 0.432623, 1 ) ] }
+
+[sub_resource type="ColorRamp" id=2]
+
+offsets = FloatArray( 0, 0.2, 0.6, 1 )
+colors = ColorArray( 1, 0.658047, 0, 0.175658, 0.741369, 0.262782, 0, 1, 0.210534, 0, 0, 0.608392, 0, 0, 0, 0 )
+
+[sub_resource type="CircleShape2D" id=3]
+
+custom_solver_bias = 0.0
+radius = 10.0
+
+[node name="Node2D" type="Node2D"]
+
+[node name="Sprite" type="Sprite" parent="."]
+
+transform/pos = Vector2( 0.880249, 3.08089 )
+texture = ExtResource( 1 )
+
+[node name="sprite" type="Sprite" parent="."]
+
+material/material = ExtResource( 2 )
+transform/pos = Vector2( 1.95071, 0.487679 )
+texture = ExtResource( 3 )
+offset = Vector2( 0.0395508, -22.1477 )
+region = true
+region_rect = Rect2( 817, 271, 42, 54 )
+
+[node name="light" type="Light2D" parent="sprite"]
+
+transform/pos = Vector2( -0.975342, 0.975357 )
+enabled = true
+texture = ExtResource( 4 )
+offset = Vector2( 0, 0 )
+scale = 8.0
+color = Color( 1, 0.664806, 0.432623, 1 )
+energy = 1.0
+mode = 0
+range/height = 50.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="anim" type="AnimationPlayer" parent="sprite"]
+
+playback/process_mode = 1
+playback/default_blend_time = 0.0
+root/root = NodePath("..")
+anims/firecol = SubResource( 1 )
+playback/active = true
+playback/speed = 1.0
+blend_times = [  ]
+autoplay = "firecol"
+
+[node name="fire" type="Particles2D" parent="."]
+
+visibility/blend_mode = 1
+transform/pos = Vector2( 1.08072, -42.4183 )
+transform/scale = Vector2( 0.59473, 0.5694 )
+config/amount = 12
+config/lifetime = 1.0
+config/texture = ExtResource( 5 )
+params/direction = 180.0
+params/spread = 20.0
+params/linear_velocity = 100.0
+params/spin_velocity = 1.0
+params/orbit_velocity = 0.0
+params/gravity_direction = 180.0
+params/gravity_strength = 9.8
+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 = 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/initial_angle = 1.0
+color/color_ramp = SubResource( 2 )
+
+[node name="VisibilityEnabler2D" type="VisibilityEnabler2D" parent="."]
+
+transform/pos = Vector2( 1.08071, -50.2535 )
+transform/scale = Vector2( 4.29619, 6.51167 )
+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="col" type="StaticBody2D" parent="."]
+
+input/pickable = false
+shapes/0/shape = SubResource( 3 )
+shapes/0/transform = Matrix32( 1, 0, 0, 1, 0.880249, 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="shape" type="CollisionShape2D" parent="col"]
+
+transform/pos = Vector2( 0.880249, 0 )
+shape = SubResource( 3 )
+trigger = false
+_update_shape_index = -1
+
+

BIN
2d/isometric_light/torch_shader.res


+ 14 - 0
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 )
+

BIN
2d/isometric_light/wall_shader.res


File diff suppressed because it is too large
+ 7 - 0
2d/isometric_light/wall_shader.tres


BIN
2d/kinematic_char/colworld.scn


File diff suppressed because it is too large
+ 116 - 0
2d/kinematic_char/colworld.tscn


+ 1 - 1
2d/kinematic_char/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Kinematic Character"
 name="Kinematic Character"
-main_scene="res://colworld.scn"
+main_scene="res://colworld.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [display]
 [display]

BIN
2d/kinematic_char/player.scn


+ 33 - 0
2d/kinematic_char/player.tscn

@@ -0,0 +1,33 @@
+[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( 7, 7 )
+
+[node name="player" type="KinematicBody2D"]
+
+input/pickable = false
+shapes/0/shape = SubResource( 1 )
+shapes/0/transform = Matrix32( 1, 0, 0, 1, -0.315559, 0.157784 )
+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="."]
+
+transform/pos = Vector2( -0.315559, 0.157784 )
+shape = SubResource( 1 )
+trigger = false
+_update_shape_index = -1
+
+

BIN
2d/kinematic_col/colworld.scn


File diff suppressed because it is too large
+ 39 - 0
2d/kinematic_col/colworld.tscn


+ 1 - 1
2d/kinematic_col/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Kinematic Collision"
 name="Kinematic Collision"
-main_scene="res://colworld.scn"
+main_scene="res://colworld.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [input]
 [input]

BIN
2d/kinematic_col/player.scn


+ 32 - 0
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
+
+

+ 1 - 1
2d/light_mask/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Using Lights As Mask"
 name="Using Lights As Mask"
-main_scene="res://lightmask.scn"
+main_scene="res://lightmask.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [rasterizer]
 [rasterizer]

BIN
2d/light_mask/lightmask.scn


+ 134 - 0
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"
+
+

+ 1 - 1
2d/lights_shadows/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="2D Lighting"
 name="2D Lighting"
-main_scene="res://light_shadows.scn"
+main_scene="res://light_shadows.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [display]
 [display]

BIN
2d/lights_shadows/light_shadows.scn


+ 326 - 0
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"
+
+

+ 1 - 1
2d/lookat/engine.cfg

@@ -1,5 +1,5 @@
 [application]
 [application]
 
 
 name="Look At Pointer"
 name="Look At Pointer"
-main_scene="res://lookat.scn"
+main_scene="res://lookat.tscn"
 icon="res://icon.png"
 icon="res://icon.png"

BIN
2d/lookat/lookat.scn


+ 32 - 0
2d/lookat/lookat.tscn

@@ -0,0 +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
+
+

+ 1 - 1
2d/motion/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Motion Test"
 name="Motion Test"
-main_scene="res://motion.scn"
+main_scene="res://motion.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [display]
 [display]

BIN
2d/motion/motion.scn


+ 135 - 0
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
+
+

+ 1 - 1
2d/navpoly/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="Navigation Polygon (2D)"
 name="Navigation Polygon (2D)"
-main_scene="res://navigation.scn"
+main_scene="res://navigation.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [display]
 [display]

BIN
2d/navpoly/navigation.scn


+ 34 - 0
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 )
+
+

+ 1 - 1
2d/normalmaps/engine.cfg

@@ -1,7 +1,7 @@
 [application]
 [application]
 
 
 name="2D Normal Mapping"
 name="2D Normal Mapping"
-main_scene="res://normalmap.scn"
+main_scene="res://normalmap.tscn"
 icon="res://icon.png"
 icon="res://icon.png"
 
 
 [display]
 [display]

BIN
2d/normalmaps/normal_material.res


+ 14 - 0
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 )
+

BIN
2d/normalmaps/normalmap.scn


+ 63 - 0
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"
+
+

+ 1 - 1
2d/particles/engine.cfg

@@ -1,5 +1,5 @@
 [application]
 [application]
 
 
 name="Particle Systems"
 name="Particle Systems"
-main_scene="res://particles.xml"
+main_scene="res://particles.tscn"
 icon="res://icon.png"
 icon="res://icon.png"

File diff suppressed because it is too large
+ 171 - 0
2d/particles/particles.tscn


File diff suppressed because it is too large
+ 0 - 267
2d/particles/particles.xml


+ 115 - 0
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"]
+
+

+ 0 - 333
2d/platformer/bullet.xml

@@ -1,333 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="6" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
-	<ext_resource path="res://bullet.png" type="Texture" index="1"></ext_resource>
-	<ext_resource path="res://bullet.gd" type="Script" index="0"></ext_resource>
-	<resource type="CircleShape2D" path="local://1">
-		<real name="custom_solver_bias"> 0 </real>
-		<real name="radius"> 10 </real>
-
-	</resource>
-	<resource type="ColorRamp" path="local://3">
-		<real_array name="offsets" len="2"> 			0, 1 </real_array>
-		<color_array name="colors" len="2"> 			1, 1, 1, 1, 1, 0, 0, 0 </color_array>
-
-	</resource>
-	<resource type="Animation" path="local://2">
-		<string name="resource/name"> "shutdown" </string>
-		<real name="length"> 1.5 </real>
-		<bool name="loop"> False </bool>
-		<real name="step"> 0 </real>
-		<string name="tracks/0/type"> "value" </string>
-		<node_path name="tracks/0/path"> "particles:config/emitting" </node_path>
-		<int name="tracks/0/interp"> 1 </int>
-		<dictionary name="tracks/0/keys" shared="false">
-			<string> "cont" </string>
-			<bool> False </bool>
-			<string> "times" </string>
-			<real_array  len="1"> 				0 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="1"> 				1 </real_array>
-			<string> "values" </string>
-			<array  len="1" shared="false">
-				<bool> False </bool>
-			</array>
-		</dictionary>
-		<string name="tracks/1/type"> "value" </string>
-		<node_path name="tracks/1/path"> "sprite:visibility/self_opacity" </node_path>
-		<int name="tracks/1/interp"> 1 </int>
-		<dictionary name="tracks/1/keys" shared="false">
-			<string> "cont" </string>
-			<bool> True </bool>
-			<string> "times" </string>
-			<real_array  len="2"> 				0, 1.00394 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="2"> 				1, 1 </real_array>
-			<string> "values" </string>
-			<array  len="2" shared="false">
-				<real> 1 </real>
-				<real> 0 </real>
-			</array>
-		</dictionary>
-		<string name="tracks/2/type"> "method" </string>
-		<node_path name="tracks/2/path"> "." </node_path>
-		<int name="tracks/2/interp"> 1 </int>
-		<dictionary name="tracks/2/keys" shared="false">
-			<string> "times" </string>
-			<real_array  len="1"> 				1.31 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="1"> 				1 </real_array>
-			<string> "values" </string>
-			<array  len="1" shared="false">
-				<dictionary  shared="false">
-					<string> "args" </string>
-					<array  len="0" shared="false">
-					</array>
-					<string> "method" </string>
-					<string> "queue_free" </string>
-				</dictionary>
-			</array>
-		</dictionary>
-
-	</resource>
-	<main_resource>
-		<dictionary name="_bundled" shared="false">
-			<string> "conn_count" </string>
-			<int> 1 </int>
-			<string> "conns" </string>
-			<int_array  len="6"> 				4, 0, 73, 72, 2, 0 </int_array>
-			<string> "editable_instances" </string>
-			<array  len="0" shared="false">
-			</array>
-			<string> "names" </string>
-			<string_array  len="74">
-				<string> "bullet" </string>
-				<string> "input/pickable" </string>
-				<string> "shapes/0/shape" </string>
-				<string> "shapes/0/transform" </string>
-				<string> "shapes/0/trigger" </string>
-				<string> "collision/layers" </string>
-				<string> "collision/mask" </string>
-				<string> "mode" </string>
-				<string> "mass" </string>
-				<string> "friction" </string>
-				<string> "bounce" </string>
-				<string> "gravity_scale" </string>
-				<string> "custom_integrator" </string>
-				<string> "continuous_cd" </string>
-				<string> "contacts_reported" </string>
-				<string> "contact_monitor" </string>
-				<string> "sleeping" </string>
-				<string> "can_sleep" </string>
-				<string> "velocity/linear" </string>
-				<string> "velocity/angular" </string>
-				<string> "damp_override/linear" </string>
-				<string> "damp_override/angular" </string>
-				<string> "script/script" </string>
-				<string> "__meta__" </string>
-				<string> "RigidBody2D" </string>
-				<string> "particles" </string>
-				<string> "visibility/opacity" </string>
-				<string> "visibility/blend_mode" </string>
-				<string> "config/amount" </string>
-				<string> "config/lifetime" </string>
-				<string> "config/local_space" </string>
-				<string> "config/texture" </string>
-				<string> "params/direction" </string>
-				<string> "params/spread" </string>
-				<string> "params/linear_velocity" </string>
-				<string> "params/spin_velocity" </string>
-				<string> "params/orbit_velocity" </string>
-				<string> "params/gravity_direction" </string>
-				<string> "params/gravity_strength" </string>
-				<string> "params/radial_accel" </string>
-				<string> "params/tangential_accel" </string>
-				<string> "params/damping" </string>
-				<string> "params/initial_angle" </string>
-				<string> "params/initial_size" </string>
-				<string> "params/final_size" </string>
-				<string> "params/hue_variation" </string>
-				<string> "params/anim_speed_scale" </string>
-				<string> "params/anim_initial_pos" </string>
-				<string> "color/color_ramp" </string>
-				<string> "Particles2D" </string>
-				<string> "sprite" </string>
-				<string> "texture" </string>
-				<string> "Sprite" </string>
-				<string> "CollisionShape2D" </string>
-				<string> "shape" </string>
-				<string> "trigger" </string>
-				<string> "_update_shape_index" </string>
-				<string> "Timer" </string>
-				<string> "process_mode" </string>
-				<string> "wait_time" </string>
-				<string> "one_shot" </string>
-				<string> "autostart" </string>
-				<string> "anim" </string>
-				<string> "playback/process_mode" </string>
-				<string> "playback/default_blend_time" </string>
-				<string> "root/root" </string>
-				<string> "anims/shutdown" </string>
-				<string> "playback/active" </string>
-				<string> "playback/speed" </string>
-				<string> "blend_times" </string>
-				<string> "autoplay" </string>
-				<string> "AnimationPlayer" </string>
-				<string> "disable" </string>
-				<string> "timeout" </string>
-			</string_array>
-			<string> "node_count" </string>
-			<int> 6 </int>
-			<string> "node_paths" </string>
-			<array  len="0" shared="false">
-			</array>
-			<string> "nodes" </string>
-			<int_array  len="166"> 				-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 </int_array>
-			<string> "variants" </string>
-			<array  len="24" shared="false">
-				<bool> False </bool>
-				<resource  resource_type="Shape2D" path="local://1">  </resource>
-				<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
-				<int> 1 </int>
-				<int> 0 </int>
-				<real> 1 </real>
-				<real> 0 </real>
-				<int> 2 </int>
-				<bool> True </bool>
-				<vector2> 0, 0 </vector2>
-				<real> -1 </real>
-				<resource  external="0">  </resource>
-				<dictionary  shared="false">
-					<string> "__editor_plugin_screen__" </string>
-					<string> "2D" </string>
-					<string> "__editor_plugin_states__" </string>
-					<dictionary  shared="false">
-						<string> "2D" </string>
-						<dictionary  shared="false">
-							<string> "ofs" </string>
-							<vector2> -74.7573, -35.9676 </vector2>
-							<string> "snap_grid" </string>
-							<bool> False </bool>
-							<string> "snap_offset" </string>
-							<vector2> 0, 0 </vector2>
-							<string> "snap_pixel" </string>
-							<bool> False </bool>
-							<string> "snap_relative" </string>
-							<bool> False </bool>
-							<string> "snap_rotation" </string>
-							<bool> False </bool>
-							<string> "snap_rotation_offset" </string>
-							<real> 0 </real>
-							<string> "snap_rotation_step" </string>
-							<real> 0.261799 </real>
-							<string> "snap_show_grid" </string>
-							<bool> False </bool>
-							<string> "snap_step" </string>
-							<vector2> 10, 10 </vector2>
-							<string> "zoom" </string>
-							<real> 3.424785 </real>
-						</dictionary>
-						<string> "3D" </string>
-						<dictionary  shared="false">
-							<string> "ambient_light_color" </string>
-							<color> 0.15, 0.15, 0.15, 1 </color>
-							<string> "default_light" </string>
-							<bool> True </bool>
-							<string> "default_srgb" </string>
-							<bool> False </bool>
-							<string> "deflight_rot_x" </string>
-							<real> 0.942478 </real>
-							<string> "deflight_rot_y" </string>
-							<real> 0.628319 </real>
-							<string> "fov" </string>
-							<real> 45 </real>
-							<string> "show_grid" </string>
-							<bool> True </bool>
-							<string> "show_origin" </string>
-							<bool> True </bool>
-							<string> "viewport_mode" </string>
-							<int> 1 </int>
-							<string> "viewports" </string>
-							<array  len="4" shared="false">
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> True </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> False </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> False </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> False </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-							</array>
-							<string> "zfar" </string>
-							<real> 500 </real>
-							<string> "znear" </string>
-							<real> 0.1 </real>
-						</dictionary>
-						<string> "Anim" </string>
-						<dictionary  shared="false">
-							<string> "visible" </string>
-							<bool> False </bool>
-						</dictionary>
-					</dictionary>
-					<string> "__editor_run_settings__" </string>
-					<dictionary  shared="false">
-						<string> "custom_args" </string>
-						<string> "-l $scene" </string>
-						<string> "run_mode" </string>
-						<int> 0 </int>
-					</dictionary>
-				</dictionary>
-				<real> 0.559322 </real>
-				<int> 24 </int>
-				<real> 0.1 </real>
-				<resource  external="1">  </resource>
-				<real> 10 </real>
-				<resource  resource_type="ColorRamp" path="local://3">  </resource>
-				<int> -1 </int>
-				<node_path> ".." </node_path>
-				<resource  resource_type="Animation" path="local://2">  </resource>
-				<array  len="0" shared="false">
-				</array>
-				<string> "" </string>
-			</array>
-			<string> "version" </string>
-			<int> 2 </int>
-		</dictionary>
-
-	</main_resource>
-</resource_file>

+ 146 - 0
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"]
+
+

+ 0 - 430
2d/platformer/coin.xml

@@ -1,430 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="10" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
-	<ext_resource path="res://bullet.png" type="Texture" index="3"></ext_resource>
-	<ext_resource path="res://coin.png" type="Texture" index="1"></ext_resource>
-	<ext_resource path="res://sound_coin.wav" type="Sample" index="2"></ext_resource>
-	<ext_resource path="res://coin.gd" type="Script" index="0"></ext_resource>
-	<resource type="CircleShape2D" path="local://1">
-		<real name="custom_solver_bias"> 0 </real>
-		<real name="radius"> 10 </real>
-
-	</resource>
-	<resource type="Animation" path="local://2">
-		<string name="resource/name"> "taken" </string>
-		<real name="length"> 8 </real>
-		<bool name="loop"> False </bool>
-		<real name="step"> 0 </real>
-		<string name="tracks/0/type"> "value" </string>
-		<node_path name="tracks/0/path"> "sprite:frame" </node_path>
-		<int name="tracks/0/interp"> 1 </int>
-		<dictionary name="tracks/0/keys" shared="false">
-			<string> "cont" </string>
-			<bool> True </bool>
-			<string> "times" </string>
-			<real_array  len="1"> 				0 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="1"> 				1 </real_array>
-			<string> "values" </string>
-			<array  len="1" shared="false">
-				<int> 0 </int>
-			</array>
-		</dictionary>
-		<string name="tracks/1/type"> "value" </string>
-		<node_path name="tracks/1/path"> "sound:play/play" </node_path>
-		<int name="tracks/1/interp"> 1 </int>
-		<dictionary name="tracks/1/keys" shared="false">
-			<string> "cont" </string>
-			<bool> False </bool>
-			<string> "times" </string>
-			<real_array  len="1"> 				0 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="1"> 				1 </real_array>
-			<string> "values" </string>
-			<array  len="1" shared="false">
-				<string> "coin" </string>
-			</array>
-		</dictionary>
-		<string name="tracks/2/type"> "value" </string>
-		<node_path name="tracks/2/path"> "particles:visibility/self_opacity" </node_path>
-		<int name="tracks/2/interp"> 1 </int>
-		<dictionary name="tracks/2/keys" shared="false">
-			<string> "cont" </string>
-			<bool> True </bool>
-			<string> "times" </string>
-			<real_array  len="2"> 				0, 1.66 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="2"> 				1, 1 </real_array>
-			<string> "values" </string>
-			<array  len="2" shared="false">
-				<real> 1 </real>
-				<real> 0 </real>
-			</array>
-		</dictionary>
-		<string name="tracks/3/type"> "value" </string>
-		<node_path name="tracks/3/path"> "sprite:visibility/self_opacity" </node_path>
-		<int name="tracks/3/interp"> 1 </int>
-		<dictionary name="tracks/3/keys" shared="false">
-			<string> "cont" </string>
-			<bool> True </bool>
-			<string> "times" </string>
-			<real_array  len="2"> 				0, 0.4 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="2"> 				1, 1 </real_array>
-			<string> "values" </string>
-			<array  len="2" shared="false">
-				<real> 1 </real>
-				<real> 0 </real>
-			</array>
-		</dictionary>
-		<string name="tracks/4/type"> "value" </string>
-		<node_path name="tracks/4/path"> "particles:config/emitting" </node_path>
-		<int name="tracks/4/interp"> 1 </int>
-		<dictionary name="tracks/4/keys" shared="false">
-			<string> "cont" </string>
-			<bool> False </bool>
-			<string> "times" </string>
-			<real_array  len="1"> 				0 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="1"> 				1 </real_array>
-			<string> "values" </string>
-			<array  len="1" shared="false">
-				<bool> True </bool>
-			</array>
-		</dictionary>
-		<string name="tracks/5/type"> "method" </string>
-		<node_path name="tracks/5/path"> "." </node_path>
-		<int name="tracks/5/interp"> 1 </int>
-		<dictionary name="tracks/5/keys" shared="false">
-			<string> "times" </string>
-			<real_array  len="1"> 				2.7 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="1"> 				1 </real_array>
-			<string> "values" </string>
-			<array  len="1" shared="false">
-				<dictionary  shared="false">
-					<string> "args" </string>
-					<array  len="0" shared="false">
-					</array>
-					<string> "method" </string>
-					<string> "queue_free" </string>
-				</dictionary>
-			</array>
-		</dictionary>
-
-	</resource>
-	<resource type="Animation" path="local://3">
-		<string name="resource/name"> "spin" </string>
-		<real name="length"> 1.5 </real>
-		<bool name="loop"> True </bool>
-		<real name="step"> 0.25 </real>
-		<string name="tracks/0/type"> "value" </string>
-		<node_path name="tracks/0/path"> "sprite:frame" </node_path>
-		<int name="tracks/0/interp"> 1 </int>
-		<dictionary name="tracks/0/keys" shared="false">
-			<string> "cont" </string>
-			<bool> False </bool>
-			<string> "times" </string>
-			<real_array  len="7"> 				0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 </real_array>
-			<string> "transitions" </string>
-			<real_array  len="7"> 				1, 1, 1, 1, 1, 1, 1 </real_array>
-			<string> "values" </string>
-			<array  len="7" shared="false">
-				<int> 0 </int>
-				<int> 1 </int>
-				<int> 2 </int>
-				<int> 3 </int>
-				<int> 2 </int>
-				<int> 1 </int>
-				<int> 0 </int>
-			</array>
-		</dictionary>
-
-	</resource>
-	<resource type="SampleLibrary" path="local://4">
-		<dictionary name="samples/coin" shared="false">
-			<string> "db" </string>
-			<real> 0 </real>
-			<string> "pitch" </string>
-			<real> 1 </real>
-			<string> "sample" </string>
-			<resource  external="2">  </resource>
-		</dictionary>
-
-	</resource>
-	<resource type="ColorRamp" path="local://5">
-		<real_array name="offsets" len="2"> 			0, 1 </real_array>
-		<color_array name="colors" len="2"> 			1, 1, 1, 1, 0, 0, 0, 1 </color_array>
-
-	</resource>
-	<main_resource>
-		<dictionary name="_bundled" shared="false">
-			<string> "conn_count" </string>
-			<int> 1 </int>
-			<string> "conns" </string>
-			<int_array  len="6"> 				0, 0, 76, 75, 2, 0 </int_array>
-			<string> "editable_instances" </string>
-			<array  len="0" shared="false">
-			</array>
-			<string> "names" </string>
-			<string_array  len="77">
-				<string> "coin" </string>
-				<string> "input/pickable" </string>
-				<string> "shapes/0/shape" </string>
-				<string> "shapes/0/transform" </string>
-				<string> "shapes/0/trigger" </string>
-				<string> "gravity_vec" </string>
-				<string> "gravity" </string>
-				<string> "linear_damp" </string>
-				<string> "angular_damp" </string>
-				<string> "script/script" </string>
-				<string> "__meta__" </string>
-				<string> "Area2D" </string>
-				<string> "sprite" </string>
-				<string> "texture" </string>
-				<string> "hframes" </string>
-				<string> "Sprite" </string>
-				<string> "anim" </string>
-				<string> "playback/process_mode" </string>
-				<string> "playback/default_blend_time" </string>
-				<string> "root/root" </string>
-				<string> "anims/taken" </string>
-				<string> "anims/spin" </string>
-				<string> "playback/active" </string>
-				<string> "playback/speed" </string>
-				<string> "blend_times" </string>
-				<string> "autoplay" </string>
-				<string> "AnimationPlayer" </string>
-				<string> "collision" </string>
-				<string> "shape" </string>
-				<string> "trigger" </string>
-				<string> "_update_shape_index" </string>
-				<string> "CollisionShape2D" </string>
-				<string> "sound" </string>
-				<string> "params/volume_db" </string>
-				<string> "params/pitch_scale" </string>
-				<string> "params/attenuation/min_distance" </string>
-				<string> "params/attenuation/max_distance" </string>
-				<string> "params/attenuation/distance_exp" </string>
-				<string> "config/polyphony" </string>
-				<string> "config/samples" </string>
-				<string> "config/pitch_random" </string>
-				<string> "SamplePlayer2D" </string>
-				<string> "particles" </string>
-				<string> "visibility/blend_mode" </string>
-				<string> "config/amount" </string>
-				<string> "config/lifetime" </string>
-				<string> "config/emitting" </string>
-				<string> "config/half_extents" </string>
-				<string> "config/texture" </string>
-				<string> "params/direction" </string>
-				<string> "params/spread" </string>
-				<string> "params/linear_velocity" </string>
-				<string> "params/spin_velocity" </string>
-				<string> "params/orbit_velocity" </string>
-				<string> "params/gravity_direction" </string>
-				<string> "params/gravity_strength" </string>
-				<string> "params/radial_accel" </string>
-				<string> "params/tangential_accel" </string>
-				<string> "params/damping" </string>
-				<string> "params/initial_angle" </string>
-				<string> "params/initial_size" </string>
-				<string> "params/final_size" </string>
-				<string> "params/hue_variation" </string>
-				<string> "params/anim_speed_scale" </string>
-				<string> "params/anim_initial_pos" </string>
-				<string> "color/color_ramp" </string>
-				<string> "Particles2D" </string>
-				<string> "enabler" </string>
-				<string> "rect" </string>
-				<string> "enabler/pause_animations" </string>
-				<string> "enabler/freeze_bodies" </string>
-				<string> "enabler/pause_particles" </string>
-				<string> "enabler/process_parent" </string>
-				<string> "enabler/fixed_process_parent" </string>
-				<string> "VisibilityEnabler2D" </string>
-				<string> "_on_body_enter" </string>
-				<string> "body_enter" </string>
-			</string_array>
-			<string> "node_count" </string>
-			<int> 7 </int>
-			<string> "node_paths" </string>
-			<array  len="0" shared="false">
-			</array>
-			<string> "nodes" </string>
-			<int_array  len="171"> 				-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 </int_array>
-			<string> "variants" </string>
-			<array  len="31" shared="false">
-				<bool> True </bool>
-				<resource  resource_type="Shape2D" path="local://1">  </resource>
-				<matrix32> 1, 0, 0, 1, 0, 0 </matrix32>
-				<bool> False </bool>
-				<vector2> 0, 1 </vector2>
-				<real> 98 </real>
-				<real> 0.1 </real>
-				<real> 1 </real>
-				<resource  external="0">  </resource>
-				<dictionary  shared="false">
-					<string> "__editor_plugin_screen__" </string>
-					<string> "2D" </string>
-					<string> "__editor_plugin_states__" </string>
-					<dictionary  shared="false">
-						<string> "2D" </string>
-						<dictionary  shared="false">
-							<string> "ofs" </string>
-							<vector2> -34.3697, -21.6562 </vector2>
-							<string> "snap_grid" </string>
-							<bool> False </bool>
-							<string> "snap_offset" </string>
-							<vector2> 0, 0 </vector2>
-							<string> "snap_pixel" </string>
-							<bool> False </bool>
-							<string> "snap_relative" </string>
-							<bool> False </bool>
-							<string> "snap_rotation" </string>
-							<bool> False </bool>
-							<string> "snap_rotation_offset" </string>
-							<real> 0 </real>
-							<string> "snap_rotation_step" </string>
-							<real> 0.261799 </real>
-							<string> "snap_show_grid" </string>
-							<bool> False </bool>
-							<string> "snap_step" </string>
-							<vector2> 10, 10 </vector2>
-							<string> "zoom" </string>
-							<real> 3.794776 </real>
-						</dictionary>
-						<string> "3D" </string>
-						<dictionary  shared="false">
-							<string> "ambient_light_color" </string>
-							<color> 0.15, 0.15, 0.15, 1 </color>
-							<string> "default_light" </string>
-							<bool> True </bool>
-							<string> "default_srgb" </string>
-							<bool> False </bool>
-							<string> "deflight_rot_x" </string>
-							<real> 0.942478 </real>
-							<string> "deflight_rot_y" </string>
-							<real> 0.628319 </real>
-							<string> "fov" </string>
-							<real> 45 </real>
-							<string> "show_grid" </string>
-							<bool> True </bool>
-							<string> "show_origin" </string>
-							<bool> True </bool>
-							<string> "viewport_mode" </string>
-							<int> 1 </int>
-							<string> "viewports" </string>
-							<array  len="4" shared="false">
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> True </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> False </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> False </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-								<dictionary  shared="false">
-									<string> "distance" </string>
-									<real> 4 </real>
-									<string> "listener" </string>
-									<bool> False </bool>
-									<string> "pos" </string>
-									<vector3> 0, 0, 0 </vector3>
-									<string> "use_environment" </string>
-									<bool> False </bool>
-									<string> "use_orthogonal" </string>
-									<bool> False </bool>
-									<string> "x_rot" </string>
-									<real> 0 </real>
-									<string> "y_rot" </string>
-									<real> 0 </real>
-								</dictionary>
-							</array>
-							<string> "zfar" </string>
-							<real> 500 </real>
-							<string> "znear" </string>
-							<real> 0.1 </real>
-						</dictionary>
-						<string> "Anim" </string>
-						<dictionary  shared="false">
-							<string> "visible" </string>
-							<bool> False </bool>
-						</dictionary>
-					</dictionary>
-					<string> "__editor_run_settings__" </string>
-					<dictionary  shared="false">
-						<string> "custom_args" </string>
-						<string> "-l $scene" </string>
-						<string> "run_mode" </string>
-						<int> 0 </int>
-					</dictionary>
-				</dictionary>
-				<resource  external="1">  </resource>
-				<int> 4 </int>
-				<int> 1 </int>
-				<real> 0 </real>
-				<node_path> ".." </node_path>
-				<resource  resource_type="Animation" path="local://2">  </resource>
-				<resource  resource_type="Animation" path="local://3">  </resource>
-				<real> 3 </real>
-				<array  len="0" shared="false">
-				</array>
-				<string> "spin" </string>
-				<int> -1 </int>
-				<real> 2048 </real>
-				<resource  resource_type="SampleLibrary" path="local://4">  </resource>
-				<int> 8 </int>
-				<real> 0.4 </real>
-				<vector2> 5, 5 </vector2>
-				<resource  external="3">  </resource>
-				<real> 10 </real>
-				<real> 0.2 </real>
-				<resource  resource_type="ColorRamp" path="local://5">  </resource>
-				<rect2> -10, -10, 20, 20 </rect2>
-			</array>
-			<string> "version" </string>
-			<int> 2 </int>
-		</dictionary>
-
-	</main_resource>
-</resource_file>

Some files were not shown because too many files changed in this diff