diff --git a/2d/platformer/bullet.gd b/2d/platformer/bullet.gd index 3aee6971..5bfa2505 100644 --- a/2d/platformer/bullet.gd +++ b/2d/platformer/bullet.gd @@ -1,16 +1,9 @@ extends RigidBody2D -# Member variables -var disabled = false - - -func disable(): - if (disabled): - return +func _on_bullet_body_enter( body ): + if (body.has_method("hit_by_bullet")): + body.call("hit_by_bullet") + +func _on_Timer_timeout(): get_node("anim").play("shutdown") - disabled = true - - -func _ready(): - get_node("Timer").start() diff --git a/2d/platformer/bullet.tscn b/2d/platformer/bullet.tscn index 78f566c3..7ec59447 100644 --- a/2d/platformer/bullet.tscn +++ b/2d/platformer/bullet.tscn @@ -21,14 +21,17 @@ 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/0/imported = false +tracks/0/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":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/1/imported = false +tracks/1/keys = { "times":FloatArray( 0, 1.00394 ), "transitions":FloatArray( 1, 1 ), "update":0, "values":[ 1.0, 0.0 ] } tracks/2/type = "method" tracks/2/path = NodePath(".") tracks/2/interp = 1 +tracks/2/imported = false tracks/2/keys = { "times":FloatArray( 1.31 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } [node name="bullet" type="RigidBody2D"] @@ -46,8 +49,8 @@ bounce = 0.0 gravity_scale = 1.0 custom_integrator = false continuous_cd = 2 -contacts_reported = 0 -contact_monitor = false +contacts_reported = 3 +contact_monitor = true sleeping = false can_sleep = true velocity/linear = Vector2( 0, 0 ) @@ -97,7 +100,7 @@ _update_shape_index = -1 process_mode = 1 wait_time = 1.0 one_shot = true -autostart = false +autostart = true [node name="anim" type="AnimationPlayer" parent="."] @@ -110,6 +113,8 @@ playback/speed = 1.0 blend_times = [ ] autoplay = "" -[connection signal="timeout" from="Timer" to="." method="disable"] +[connection signal="body_enter" from="." to="." method="_on_bullet_body_enter"] + +[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] diff --git a/2d/platformer/coin.gd b/2d/platformer/coin.gd index 11187327..f7c0e44b 100644 --- a/2d/platformer/coin.gd +++ b/2d/platformer/coin.gd @@ -1,19 +1,11 @@ extends Area2D + +var taken=false -# Member variables -var taken = false - - -func _on_body_enter( body ): +func _on_coin_body_enter( body ): + if (not taken and body extends preload("res://player.gd")): get_node("anim").play("taken") - taken = true - - -func _on_coin_area_enter(area): - pass # replace with function body - - -func _on_coin_area_enter_shape(area_id, area, area_shape, area_shape): - pass # replace with function body + taken=true + diff --git a/2d/platformer/coin.tscn b/2d/platformer/coin.tscn index 76730c83..6363de2c 100644 --- a/2d/platformer/coin.tscn +++ b/2d/platformer/coin.tscn @@ -19,7 +19,8 @@ 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 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1 ), "update":1, "values":[ 0, 1, 2, 3, 2, 1, 0 ] } [sub_resource type="Animation" id=3] @@ -29,26 +30,32 @@ 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/0/imported = false +tracks/0/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":0, "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/1/imported = false +tracks/1/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":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/2/imported = false +tracks/2/keys = { "times":FloatArray( 0, 1.66 ), "transitions":FloatArray( 1, 1 ), "update":0, "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/3/imported = false +tracks/3/keys = { "times":FloatArray( 0, 0.4 ), "transitions":FloatArray( 1, 1 ), "update":0, "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/4/imported = false +tracks/4/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":1, "values":[ true ] } tracks/5/type = "method" tracks/5/path = NodePath(".") tracks/5/interp = 1 +tracks/5/imported = false tracks/5/keys = { "times":FloatArray( 2.7 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } [sub_resource type="SampleLibrary" id=4] @@ -138,9 +145,10 @@ rect = Rect2( -10, -10, 20, 20 ) enabler/pause_animations = true enabler/freeze_bodies = true enabler/pause_particles = true +enabler/pause_animated_sprites = true enabler/process_parent = false enabler/fixed_process_parent = false -[connection signal="body_enter" from="." to="." method="_on_body_enter"] +[connection signal="body_enter" from="." to="." method="_on_coin_body_enter"] diff --git a/2d/platformer/enemy.gd b/2d/platformer/enemy.gd index 5a4d8af5..b92f368c 100644 --- a/2d/platformer/enemy.gd +++ b/2d/platformer/enemy.gd @@ -1,83 +1,58 @@ -extends RigidBody2D +extends KinematicBody2D -# Member variables + +const GRAVITY_VEC = Vector2(0,900) +const FLOOR_NORMAL = Vector2(0,-1) + +const WALK_SPEED = 70 const STATE_WALKING = 0 -const STATE_DYING = 1 +const STATE_KILLED = 1 + +var linear_velocity = Vector2() +var direction = -1 +var anim="" var state = STATE_WALKING -var direction = -1 -var anim = "" +onready var detect_floor_left = get_node("detect_floor_left") +onready var detect_wall_left = get_node("detect_wall_left") +onready var detect_floor_right = get_node("detect_floor_right") +onready var detect_wall_right = get_node("detect_wall_right") +onready var sprite = get_node("sprite") -var rc_left = null -var rc_right = null -var WALK_SPEED = 50 - -var bullet_class = preload("res://bullet.gd") - - -func _die(): - queue_free() - - -func _pre_explode(): - # Stay there - clear_shapes() - set_mode(MODE_STATIC) - get_node("sound").play("explode") - - -func _integrate_forces(s): - var lv = s.get_linear_velocity() - var new_anim = anim - - if (state == STATE_DYING): - new_anim = "explode" - elif (state == STATE_WALKING): - new_anim = "walk" - - var wall_side = 0.0 - - for i in range(s.get_contact_count()): - var cc = s.get_contact_collider_object(i) - var dp = s.get_contact_local_normal(i) - - if (cc): - if (cc extends bullet_class and not cc.disabled): - set_mode(MODE_RIGID) - state = STATE_DYING - #lv = s.get_contact_local_normal(i)*400 - s.set_angular_velocity(sign(dp.x)*33.0) - set_friction(1) - cc.disable() - get_node("sound").play("hit") - break - - if (dp.x > 0.9): - wall_side = 1.0 - elif (dp.x < -0.9): - wall_side = -1.0 - - if (wall_side != 0 and wall_side != direction): - direction = -direction - get_node("sprite").set_scale(Vector2(-direction, 1)) - if (direction < 0 and not rc_left.is_colliding() and rc_right.is_colliding()): - direction = -direction - get_node("sprite").set_scale(Vector2(-direction, 1)) - elif (direction > 0 and not rc_right.is_colliding() and rc_left.is_colliding()): - direction = -direction - get_node("sprite").set_scale(Vector2(-direction, 1)) - - lv.x = direction*WALK_SPEED +func _fixed_process(delta): - if(anim != new_anim): - anim = new_anim + var new_anim="idle" + + if (state==STATE_WALKING): + + linear_velocity+= GRAVITY_VEC*delta + linear_velocity.x = direction * WALK_SPEED + linear_velocity = move_and_slide( linear_velocity, FLOOR_NORMAL ) + + if (not detect_floor_left.is_colliding() or detect_wall_left.is_colliding()): + direction=1.0 + + if (not detect_floor_right.is_colliding() or detect_wall_right.is_colliding()): + direction=-1.0 + + sprite.set_scale( Vector2(direction,1.0) ) + + new_anim="walk" + else: + new_anim="explode" + + if (anim!=new_anim): + anim=new_anim get_node("anim").play(anim) - - s.set_linear_velocity(lv) - + + + +func hit_by_bullet(): + state=STATE_KILLED func _ready(): - rc_left = get_node("raycast_left") - rc_right = get_node("raycast_right") + set_fixed_process(true) + + diff --git a/2d/platformer/enemy.tscn b/2d/platformer/enemy.tscn index b01bd9fc..43b9cb65 100644 --- a/2d/platformer/enemy.tscn +++ b/2d/platformer/enemy.tscn @@ -6,33 +6,48 @@ [ext_resource path="res://sound_explode.wav" type="Sample" id=4] [ext_resource path="res://sound_hit.wav" type="Sample" id=5] -[sub_resource type="CircleShape2D" id=1] +[sub_resource type="CapsuleShape2D" id=1] custom_solver_bias = 0.0 -radius = 14.0 +radius = 13.4556 +height = 14.2002 [sub_resource type="Animation" id=2] resource/name = "explode" -length = 6.0 +length = 2.0 loop = false step = 0.0 tracks/0/type = "value" tracks/0/path = NodePath("sprite:visibility/self_opacity") tracks/0/interp = 1 -tracks/0/keys = { "cont":true, "times":FloatArray( 3.58422, 4.33851 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0.99422, 1.12851 ), "transitions":FloatArray( 1, 1 ), "update":0, "values":[ 1.0, 0.0 ] } tracks/1/type = "value" tracks/1/path = NodePath("sprite:frame") tracks/1/interp = 1 -tracks/1/keys = { "cont":true, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 4 ] } +tracks/1/imported = false +tracks/1/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":0, "values":[ 4 ] } tracks/2/type = "value" tracks/2/path = NodePath("Particles2D:config/emitting") tracks/2/interp = 1 -tracks/2/keys = { "cont":false, "times":FloatArray( 3.47394 ), "transitions":FloatArray( 1 ), "values":[ true ] } +tracks/2/imported = false +tracks/2/keys = { "times":FloatArray( 1.19394 ), "transitions":FloatArray( 1 ), "update":1, "values":[ true ] } tracks/3/type = "method" tracks/3/path = NodePath(".") tracks/3/interp = 1 -tracks/3/keys = { "times":FloatArray( 3.20357, 5.07305 ), "transitions":FloatArray( 1, 1 ), "values":[ { "args":[ ], "method":"_pre_explode" }, { "args":[ ], "method":"_die" } ] } +tracks/3/imported = false +tracks/3/keys = { "times":FloatArray( 2.01305 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } +tracks/4/type = "value" +tracks/4/path = NodePath("sprite:transform/rot") +tracks/4/interp = 1 +tracks/4/imported = false +tracks/4/keys = { "times":FloatArray( 0, 0.99 ), "transitions":FloatArray( 1, 1 ), "update":0, "values":[ 0.0, 360.0 ] } +tracks/5/type = "value" +tracks/5/path = NodePath("sound:play/play") +tracks/5/interp = 1 +tracks/5/imported = false +tracks/5/keys = { "times":FloatArray( 1.2 ), "transitions":FloatArray( 1 ), "update":2, "values":[ "explode" ] } [sub_resource type="Animation" id=3] @@ -42,7 +57,8 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "update":1, "values":[ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ] } [sub_resource type="Animation" id=4] @@ -53,7 +69,8 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 0 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "update":1, "values":[ 0, 1, 2, 3, 4, 0 ] } [sub_resource type="ColorRamp" id=5] @@ -65,35 +82,15 @@ colors = ColorArray( 1, 0.884956, 0.823009, 1, 0.768627, 0.389381, 0, 0 ) samples/explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } samples/hit = { "db":0.0, "pitch":1.0, "sample":ExtResource( 5 ) } -[node name="enemy" type="RigidBody2D"] +[node name="enemy" type="KinematicBody2D"] input/pickable = false shapes/0/shape = SubResource( 1 ) -shapes/0/transform = Matrix32( 1, 0, 0, 1, -1.08072, -2.16144 ) +shapes/0/transform = Matrix32( -4.37114e-08, -1, 1, -4.37114e-08, -0.00525069, -0.727495 ) shapes/0/trigger = false -shapes/1/shape = SubResource( 1 ) -shapes/1/transform = Matrix32( 1, 0, 0, 1, 6.48431, 3.24216 ) -shapes/1/trigger = false -shapes/2/shape = SubResource( 1 ) -shapes/2/transform = Matrix32( 1, 0, 0, 1, -12.495, 3.53415 ) -shapes/2/trigger = false collision/layers = 1 collision/mask = 1 -mode = 2 -mass = 1.0 -friction = 0.0 -bounce = 0.0 -gravity_scale = 1.0 -custom_integrator = false -continuous_cd = 0 -contacts_reported = 4 -contact_monitor = false -sleeping = false -can_sleep = true -velocity/linear = Vector2( 0, 0 ) -velocity/angular = 0.0 -damp_override/linear = -1.0 -damp_override/angular = -1.0 +collision/margin = 0.08 script/script = ExtResource( 1 ) [node name="enabler" type="VisibilityEnabler2D" parent="."] @@ -104,6 +101,7 @@ rect = Rect2( -10, -10, 20, 20 ) enabler/pause_animations = true enabler/freeze_bodies = true enabler/pause_particles = true +enabler/pause_animated_sprites = true enabler/process_parent = false enabler/fixed_process_parent = false @@ -123,42 +121,52 @@ autoplay = "" [node name="sprite" type="Sprite" parent="."] texture = ExtResource( 2 ) +flip_h = true hframes = 8 frame = 4 [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -transform/pos = Vector2( -1.08072, -2.16144 ) +transform/pos = Vector2( -0.00525069, -0.727495 ) +transform/rot = 90.0 shape = SubResource( 1 ) trigger = false -_update_shape_index = -1 +_update_shape_index = 0 -[node name="CollisionShape2D 2" type="CollisionShape2D" parent="."] - -transform/pos = Vector2( 6.48431, 3.24216 ) -shape = SubResource( 1 ) -trigger = false -_update_shape_index = -1 - -[node name="CollisionShape2D 3" type="CollisionShape2D" parent="."] - -transform/pos = Vector2( -12.495, 3.53415 ) -shape = SubResource( 1 ) -trigger = false -_update_shape_index = -1 - -[node name="raycast_left" type="RayCast2D" parent="."] +[node name="detect_floor_left" type="RayCast2D" parent="."] transform/pos = Vector2( -33.2868, -9.34363 ) enabled = true +exclude_parent = true cast_to = Vector2( 0, 45 ) layer_mask = 1 type_mask = 15 -[node name="raycast_right" type="RayCast2D" parent="."] +[node name="detect_wall_left" type="RayCast2D" parent="."] + +transform/pos = Vector2( -12.1361, -0.739977 ) +transform/rot = -90.0 +enabled = true +exclude_parent = true +cast_to = Vector2( 0, 20 ) +layer_mask = 1 +type_mask = 15 + +[node name="detect_wall_right" type="RayCast2D" parent="."] + +transform/pos = Vector2( 3.2788, -0.381488 ) +transform/rot = 90.0 +enabled = true +exclude_parent = true +cast_to = Vector2( 0, 20 ) +layer_mask = 1 +type_mask = 15 + +[node name="detect_floor_right" type="RayCast2D" parent="."] transform/pos = Vector2( 29.1987, -9.34363 ) enabled = true +exclude_parent = true cast_to = Vector2( 0, 45 ) layer_mask = 1 type_mask = 15 diff --git a/2d/platformer/moving_platform.png b/2d/platformer/moving_platform.png index f01c6ea3..4cc0b488 100644 Binary files a/2d/platformer/moving_platform.png and b/2d/platformer/moving_platform.png differ diff --git a/2d/platformer/one_way_platform.png b/2d/platformer/one_way_platform.png index b5eca877..35ca60db 100644 Binary files a/2d/platformer/one_way_platform.png and b/2d/platformer/one_way_platform.png differ diff --git a/2d/platformer/player.gd b/2d/platformer/player.gd index 8cafd8b9..7a6e0dce 100644 --- a/2d/platformer/player.gd +++ b/2d/platformer/player.gd @@ -1,232 +1,104 @@ -extends RigidBody2D +extends KinematicBody2D -# Character Demo, written by Juan Linietsky. -# -# Implementation of a 2D Character controller. -# This implementation uses the physics engine for -# controlling a character, in a very similar way -# than a 3D character controller would be implemented. -# -# Using the physics engine for this has the main -# advantages: -# -Easy to write. -# -Interaction with other physics-based objects is free -# -Only have to deal with the object linear velocity, not position -# -All collision/area framework available -# -# But also has the following disadvantages: -# -# -Objects may bounce a little bit sometimes -# -Going up ramps sends the chracter flying up, small hack is needed. -# -A ray collider is needed to avoid sliding down on ramps and -# undesiderd bumps, small steps and rare numerical precision errors. -# (another alternative may be to turn on friction when the character is not moving). -# -Friction cant be used, so floor velocity must be considered -# for moving platforms. +const GRAVITY_VEC = Vector2(0,900) +const FLOOR_NORMAL = Vector2(0,-1) +const SLOPE_SLIDE_STOP = 25.0 +const MIN_ONAIR_TIME = 0.1 +const WALK_SPEED = 250 # pixels/sec +const JUMP_SPEED = 480 +const SIDING_CHANGE_SPEED = 10 +const BULLET_VELOCITY = 1000 +const SHOOT_TIME_SHOW_WEAPON = 0.2 -# Member variables -var anim = "" -var siding_left = false -var jumping = false -var stopping_jump = false -var shooting = false +var linear_vel = Vector2() +var onair_time = 0 # +var on_floor = false +var shoot_time=99999 #time since last shot -var WALK_ACCEL = 800.0 -var WALK_DEACCEL = 800.0 -var WALK_MAX_VELOCITY = 200.0 -var AIR_ACCEL = 200.0 -var AIR_DEACCEL = 200.0 -var JUMP_VELOCITY = 460 -var STOP_JUMP_FORCE = 900.0 +var anim="" -var MAX_FLOOR_AIRBORNE_TIME = 0.15 +#cache the sprite here for fast access (we will set scale to flip it often) +onready var sprite = get_node("sprite") -var airborne_time = 1e20 -var shoot_time = 1e20 - -var MAX_SHOOT_POSE_TIME = 0.3 - -var bullet = preload("res://bullet.tscn") - -var floor_h_velocity = 0.0 -var enemy - - -func _integrate_forces(s): - var lv = s.get_linear_velocity() - var step = s.get_step() +func _fixed_process(delta): - var new_anim = anim - var new_siding_left = siding_left + #increment counters - # Get the controls - var move_left = Input.is_action_pressed("move_left") - var move_right = Input.is_action_pressed("move_right") - var jump = Input.is_action_pressed("jump") - var shoot = Input.is_action_pressed("shoot") - var spawn = Input.is_action_pressed("spawn") + onair_time+=delta + shoot_time+=delta - if spawn: - var e = enemy.instance() - var p = get_pos() - p.y = p.y - 100 - e.set_pos(p) - get_parent().add_child(e) - # Deapply prev floor velocity - lv.x -= floor_h_velocity - floor_h_velocity = 0.0 + ### MOVEMENT ### - # Find the floor (a contact with upwards facing collision normal) - var found_floor = false - var floor_index = -1 - - for x in range(s.get_contact_count()): - var ci = s.get_contact_local_normal(x) - if (ci.dot(Vector2(0, -1)) > 0.6): - found_floor = true - floor_index = x - - # A good idea when impementing characters of all kinds, - # compensates for physics imprecission, as well as human reaction delay. - if (shoot and not shooting): - shoot_time = 0 - var bi = bullet.instance() - var ss - if (siding_left): - ss = -1.0 - else: - ss = 1.0 - var pos = get_pos() + get_node("bullet_shoot").get_pos()*Vector2(ss, 1.0) + # Apply Gravity + linear_vel += delta * GRAVITY_VEC + # Move and Slide + linear_vel = move_and_slide( linear_vel, FLOOR_NORMAL, SLOPE_SLIDE_STOP ) + # Detect Floor + if (is_move_and_slide_on_floor()): + onair_time=0 - bi.set_pos(pos) - get_parent().add_child(bi) + on_floor = onair_time < MIN_ONAIR_TIME + + ### CONTROL ### + + # Horizontal Movement + var target_speed = 0 + if (Input.is_action_pressed("move_left")): + target_speed += -1 + if (Input.is_action_pressed("move_right")): + target_speed += 1 - bi.set_linear_velocity(Vector2(800.0*ss, -80)) - get_node("sprite/smoke").set_emitting(true) + target_speed *= WALK_SPEED + linear_vel.x = lerp( linear_vel.x, target_speed, 0.1 ) + + # Jumping + if (Input.is_action_just_pressed("jump")): + linear_vel.y=-JUMP_SPEED + get_node("sound").play("jump") + + # Shooting + + if (Input.is_action_just_pressed("shoot")): + + var bullet = preload("res://bullet.tscn").instance() + bullet.set_pos( get_node("sprite/bullet_shoot").get_global_pos() ) #use node for shoot position + bullet.set_linear_velocity( Vector2( sprite.get_scale().x * BULLET_VELOCITY,0 ) ) + bullet.add_collision_exception_with(self) # don't want player to collide with bullet + get_parent().add_child( bullet ) #don't want bullet to move with me, so add it as child of parent get_node("sound").play("shoot") - PS2D.body_add_collision_exception(bi.get_rid(), get_rid()) # Make bullet and this not collide - else: - shoot_time += step - - if (found_floor): - airborne_time = 0.0 - else: - airborne_time += step # Time it spent in the air - - var on_floor = airborne_time < MAX_FLOOR_AIRBORNE_TIME - - # Process jump - if (jumping): - if (lv.y > 0): - # Set off the jumping flag if going down - jumping = false - elif (not jump): - stopping_jump = true + shoot_time=0 - if (stopping_jump): - lv.y += STOP_JUMP_FORCE*step + + ### ANIMATION ### + + var new_anim="idle" if (on_floor): - # Process logic when character is on floor - if (move_left and not move_right): - if (lv.x > -WALK_MAX_VELOCITY): - lv.x -= WALK_ACCEL*step - elif (move_right and not move_left): - if (lv.x < WALK_MAX_VELOCITY): - lv.x += WALK_ACCEL*step - else: - var xv = abs(lv.x) - xv -= WALK_DEACCEL*step - if (xv < 0): - xv = 0 - lv.x = sign(lv.x)*xv - - # Check jump - if (not jumping and jump): - lv.y = -JUMP_VELOCITY - jumping = true - stopping_jump = false - get_node("sound").play("jump") - - # Check siding - if (lv.x < 0 and move_left): - new_siding_left = true - elif (lv.x > 0 and move_right): - new_siding_left = false - if (jumping): - new_anim = "jumping" - elif (abs(lv.x) < 0.1): - if (shoot_time < MAX_SHOOT_POSE_TIME): - new_anim = "idle_weapon" - else: - new_anim = "idle" - else: - if (shoot_time < MAX_SHOOT_POSE_TIME): - new_anim = "run_weapon" - else: - new_anim = "run" + if (linear_vel.x < -SIDING_CHANGE_SPEED): + sprite.set_scale( Vector2( -1, 1 ) ) + new_anim="run" + + if (linear_vel.x > SIDING_CHANGE_SPEED): + sprite.set_scale( Vector2( 1, 1 ) ) + new_anim="run" + else: - # Process logic when the character is in the air - if (move_left and not move_right): - if (lv.x > -WALK_MAX_VELOCITY): - lv.x -= AIR_ACCEL*step - elif (move_right and not move_left): - if (lv.x < WALK_MAX_VELOCITY): - lv.x += AIR_ACCEL*step - else: - var xv = abs(lv.x) - xv -= AIR_DEACCEL*step - if (xv < 0): - xv = 0 - lv.x = sign(lv.x)*xv - if (lv.y < 0): - if (shoot_time < MAX_SHOOT_POSE_TIME): - new_anim = "jumping_weapon" - else: - new_anim = "jumping" + if (linear_vel.y < 0 ): + new_anim="jumping" else: - if (shoot_time < MAX_SHOOT_POSE_TIME): - new_anim = "falling_weapon" - else: - new_anim = "falling" - - # Update siding - if (new_siding_left != siding_left): - if (new_siding_left): - get_node("sprite").set_scale(Vector2(-1, 1)) - else: - get_node("sprite").set_scale(Vector2(1, 1)) + new_anim="falling" - siding_left = new_siding_left + if (shoot_time < SHOOT_TIME_SHOW_WEAPON): + new_anim+="_weapon" - # Change animation - if (new_anim != anim): - anim = new_anim + if (new_anim!=anim): + anim=new_anim get_node("anim").play(anim) - shooting = shoot - # Apply floor velocity - if (found_floor): - floor_h_velocity = s.get_contact_collider_velocity_at_pos(floor_index).x - lv.x += floor_h_velocity - - # Finally, apply gravity and set back the linear velocity - lv += s.get_total_gravity()*step - s.set_linear_velocity(lv) - - func _ready(): - enemy = ResourceLoader.load("res://enemy.tscn") - -# if !Globals.has_singleton("Facebook"): -# return -# var Facebook = Globals.get_singleton("Facebook") -# var link = Globals.get("facebook/link") -# var icon = Globals.get("facebook/icon") -# var msg = "I just sneezed on your wall! Beat my score and Stop the Running nose!" -# var title = "I just sneezed on your wall!" -# Facebook.post("feed", msg, title, link, icon) + set_fixed_process(true) + diff --git a/2d/platformer/player.tscn b/2d/platformer/player.tscn index 77a2e272..02feef8f 100644 --- a/2d/platformer/player.tscn +++ b/2d/platformer/player.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=25 format=1] +[gd_scene load_steps=24 format=1] [ext_resource path="res://player.gd" type="Script" id=1] [ext_resource path="res://robot_demo.png" type="Texture" id=2] @@ -11,22 +11,18 @@ [ext_resource path="res://osb_jump.png" type="Texture" id=9] [ext_resource path="res://osb_fire.png" type="Texture" id=10] -[sub_resource type="RayShape2D" id=1] - -custom_solver_bias = 0.5 -length = 20.0 - -[sub_resource type="ConvexPolygonShape2D" id=2] +[sub_resource type="CapsuleShape2D" id=1] custom_solver_bias = 0.0 -points = Vector2Array( -19.902, -24.8691, 19.3625, -24.6056, -0.138023, 16.5036 ) +radius = 10.0 +height = 44.4787 -[sub_resource type="ColorRamp" id=3] +[sub_resource type="ColorRamp" id=2] offsets = FloatArray( 0, 1 ) colors = ColorArray( 1, 1, 1, 1, 0, 0, 0, 0.0442478 ) -[sub_resource type="Animation" id=4] +[sub_resource type="Animation" id=3] resource/name = "crouch" length = 0.01 @@ -35,9 +31,10 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 22 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":1, "values":[ 22 ] } -[sub_resource type="Animation" id=5] +[sub_resource type="Animation" id=4] resource/name = "falling" length = 0.01 @@ -46,9 +43,10 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 21 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":1, "values":[ 21 ] } -[sub_resource type="Animation" id=6] +[sub_resource type="Animation" id=5] resource/name = "falling_weapon" length = 0.5 @@ -57,9 +55,10 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 26 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":1, "values":[ 26 ] } -[sub_resource type="Animation" id=7] +[sub_resource type="Animation" id=6] length = 7.0 loop = true @@ -67,7 +66,19 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 16, 17, 18, 16, 19, 20, 19, 16 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1 ), "update":1, "values":[ 16, 17, 18, 16, 19, 20, 19, 16 ] } + +[sub_resource type="Animation" id=7] + +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":1, "values":[ 25 ] } [sub_resource type="Animation" id=8] @@ -77,7 +88,8 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 25 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 0.25, 0.5 ), "transitions":FloatArray( 1, 1, 1 ), "update":1, "values":[ 23, 24, 23 ] } [sub_resource type="Animation" id=9] @@ -87,17 +99,19 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5 ), "transitions":FloatArray( 1, 1, 1 ), "values":[ 23, 24, 23 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "update":1, "values":[ 26 ] } [sub_resource type="Animation" id=10] -length = 0.5 +length = 1.25 loop = true step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 26 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "update":1, "values":[ 0, 1, 2, 3, 4, 0 ] } [sub_resource type="Animation" id=11] @@ -107,7 +121,8 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 0 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "update":1, "values":[ 5, 6, 7, 8, 9, 5 ] } [sub_resource type="Animation" id=12] @@ -117,50 +132,24 @@ step = 0.25 tracks/0/type = "value" tracks/0/path = NodePath("sprite:frame") tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 5, 6, 7, 8, 9, 5 ] } +tracks/0/imported = false +tracks/0/keys = { "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "update":1, "values":[ 10, 11, 12, 13, 14, 5 ] } -[sub_resource type="Animation" id=13] - -length = 1.25 -loop = true -step = 0.25 -tracks/0/type = "value" -tracks/0/path = NodePath("sprite:frame") -tracks/0/interp = 1 -tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 10, 11, 12, 13, 14, 5 ] } - -[sub_resource type="SampleLibrary" id=14] +[sub_resource type="SampleLibrary" id=13] +samples/coin = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } samples/jump = { "db":0.0, "pitch":1.0, "sample":ExtResource( 5 ) } samples/shoot = { "db":0.0, "pitch":1.0, "sample":ExtResource( 6 ) } -samples/coin = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } -[node name="player" type="RigidBody2D"] +[node name="player" type="KinematicBody2D"] input/pickable = false shapes/0/shape = SubResource( 1 ) -shapes/0/transform = Matrix32( 1, 0, 0, 1.76469, 0.291992, -12.1587 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0.291992, -0.835023 ) shapes/0/trigger = false -shapes/1/shape = SubResource( 2 ) -shapes/1/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) -shapes/1/trigger = false collision/layers = 1 collision/mask = 1 -mode = 2 -mass = 3.0 -friction = 0.0 -bounce = 0.0 -gravity_scale = 1.0 -custom_integrator = true -continuous_cd = 0 -contacts_reported = 3 -contact_monitor = false -sleeping = false -can_sleep = true -velocity/linear = Vector2( 0, 0 ) -velocity/angular = 0.0 -damp_override/linear = -1.0 -damp_override/angular = -1.0 +collision/margin = 0.08 script/script = ExtResource( 1 ) [node name="sprite" type="Sprite" parent="."] @@ -168,6 +157,7 @@ script/script = ExtResource( 1 ) texture = ExtResource( 2 ) vframes = 2 hframes = 16 +frame = 22 [node name="smoke" type="Particles2D" parent="sprite"] @@ -199,23 +189,27 @@ params/hue_variation = 0.0 params/anim_speed_scale = 1.0 params/anim_initial_pos = 0.0 randomness/spin_velocity = 2.0 -color/color_ramp = SubResource( 3 ) +color/color_ramp = SubResource( 2 ) + +[node name="bullet_shoot" type="Position2D" parent="sprite"] + +transform/pos = Vector2( 30.6589, 6.13176 ) [node name="anim" type="AnimationPlayer" parent="."] playback/process_mode = 1 playback/default_blend_time = 0.0 root/root = NodePath("..") -anims/crouch = SubResource( 4 ) -anims/falling = SubResource( 5 ) -anims/falling_weapon = SubResource( 6 ) -anims/idle = SubResource( 7 ) -anims/idle_weapon = SubResource( 8 ) -anims/jumping = SubResource( 9 ) -anims/jumping_weapon = SubResource( 10 ) -anims/run = SubResource( 11 ) -anims/run_weapon = SubResource( 12 ) -anims/standing_weapon_ready = SubResource( 13 ) +anims/crouch = SubResource( 3 ) +anims/falling = SubResource( 4 ) +anims/falling_weapon = SubResource( 5 ) +anims/idle = SubResource( 6 ) +anims/idle_weapon = SubResource( 7 ) +anims/jumping = SubResource( 8 ) +anims/jumping_weapon = SubResource( 9 ) +anims/run = SubResource( 10 ) +anims/run_weapon = SubResource( 11 ) +anims/standing_weapon_ready = SubResource( 12 ) playback/active = true playback/speed = 2.0 blend_times = [ ] @@ -231,6 +225,7 @@ limit/left = 0 limit/top = 0 limit/right = 10000000 limit/bottom = 10000000 +limit/smoothed = false drag_margin/h_enabled = true drag_margin/v_enabled = true smoothing/enable = false @@ -240,22 +235,17 @@ drag_margin/top = 0.2 drag_margin/right = 0.2 drag_margin/bottom = 0.2 -[node name="bullet_shoot" type="Position2D" parent="."] - -transform/pos = Vector2( 31.2428, 4.08784 ) - [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -transform/pos = Vector2( 0.291992, -12.1587 ) -transform/scale = Vector2( 1, 1.76469 ) +transform/pos = Vector2( 0.291992, -0.835023 ) shape = SubResource( 1 ) trigger = false -_update_shape_index = -1 +_update_shape_index = 0 [node name="sound" type="SamplePlayer" parent="."] config/polyphony = 1 -config/samples = SubResource( 14 ) +config/samples = SubResource( 13 ) default/volume_db = 0.0 default/pitch_scale = 1.0 default/pan = 0.0 @@ -269,13 +259,6 @@ default/reverb_room = 2 default/reverb_send = 0.0 default/chorus_send = 0.0 -[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] - -build_mode = 0 -polygon = Vector2Array( -0.138023, 16.5036, -19.902, -24.8691, 19.3625, -24.6056 ) -shape_range = Vector2( -1, -1 ) -trigger = false - [node name="ui" type="CanvasLayer" parent="."] layer = 0 diff --git a/2d/platformer/scroll_bg_fg_1.png b/2d/platformer/scroll_bg_fg_1.png index e64c446f..942c5622 100644 Binary files a/2d/platformer/scroll_bg_fg_1.png and b/2d/platformer/scroll_bg_fg_1.png differ diff --git a/2d/platformer/scroll_bg_fg_2.png b/2d/platformer/scroll_bg_fg_2.png index ef960118..938e9b7c 100644 Binary files a/2d/platformer/scroll_bg_fg_2.png and b/2d/platformer/scroll_bg_fg_2.png differ diff --git a/2d/platformer/scroll_bg_sky.png b/2d/platformer/scroll_bg_sky.png index 04c19651..4c22d8f5 100644 Binary files a/2d/platformer/scroll_bg_sky.png and b/2d/platformer/scroll_bg_sky.png differ diff --git a/2d/platformer/stage.tscn b/2d/platformer/stage.tscn index 9709efef..7391420d 100644 --- a/2d/platformer/stage.tscn +++ b/2d/platformer/stage.tscn @@ -1,14 +1,13 @@ -[gd_scene load_steps=10 format=1] +[gd_scene load_steps=9 format=1] [ext_resource path="res://tileset.tres" type="TileSet" id=1] [ext_resource path="res://coin.tscn" type="PackedScene" id=2] [ext_resource path="res://moving_platform.tscn" type="PackedScene" id=3] -[ext_resource path="res://seesaw.tscn" type="PackedScene" id=4] -[ext_resource path="res://one_way_platform.tscn" type="PackedScene" id=5] -[ext_resource path="res://player.tscn" type="PackedScene" id=6] -[ext_resource path="res://music.ogg" type="AudioStream" id=7] -[ext_resource path="res://enemy.tscn" type="PackedScene" id=8] -[ext_resource path="res://parallax_bg.tscn" type="PackedScene" id=9] +[ext_resource path="res://one_way_platform.tscn" type="PackedScene" id=4] +[ext_resource path="res://player.tscn" type="PackedScene" id=5] +[ext_resource path="res://music.ogg" type="AudioStream" id=6] +[ext_resource path="res://enemy.tscn" type="PackedScene" id=7] +[ext_resource path="res://parallax_bg.tscn" type="PackedScene" id=8] [node name="stage" type="Node"] @@ -28,256 +27,278 @@ collision/bounce = 0.0 collision/layers = 1 collision/mask = 1 occluder/light_mask = 1 -tile_data = IntArray( 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 0, 983052, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870914, 1048587, 536870922, 1048588, 2, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114122, 536870925, 1114123, 11, 1114124, 13, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179664, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 0, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 ) +tile_data = IntArray( 0, 2, 65536, 2, 131072, 2, 196608, 2, 196626, 9, 262144, 2, 262162, 8, 327680, 2, 327697, 536870921, 327698, 7, 393216, 2, 393276, 536870914, 393277, 536870922, 393278, 536870922, 393279, 536870922, 393280, 536870922, 393281, 536870922, 393282, 536870922, 393283, 536870922, 393284, 536870922, 393285, 536870922, 458752, 2, 458812, 536870914, 458813, 536870922, 458814, 536870922, 458815, 536870922, 458816, 536870922, 458817, 536870922, 458818, 536870922, 458819, 536870922, 458820, 536870922, 458821, 536870922, 524288, 4, 524289, 1, 524348, 536870914, 524349, 536870922, 524350, 536870922, 524351, 536870922, 524352, 536870922, 524353, 536870922, 524354, 536870922, 524355, 536870922, 524356, 536870922, 524357, 536870922, 589824, 10, 589825, 13, 589860, 536870914, 589861, 10, 589862, 10, 589863, 10, 589864, 10, 589865, 10, 589866, 10, 589867, 10, 589868, 10, 589869, 2, 589884, 536870914, 589885, 536870922, 589886, 536870922, 589887, 536870922, 589888, 536870922, 589889, 536870922, 589890, 536870922, 589891, 536870922, 589892, 536870922, 589893, 536870922, 655360, 2, 655396, 536870914, 655397, 10, 655398, 10, 655399, 10, 655400, 10, 655401, 10, 655402, 10, 655403, 10, 655404, 10, 655405, 2, 655420, 536870914, 655421, 536870922, 655422, 536870922, 655423, 536870922, 655424, 536870922, 655425, 536870922, 655426, 536870922, 655427, 536870922, 655428, 536870922, 655429, 536870922, 720896, 2, 720932, 536870914, 720933, 10, 720934, 10, 720935, 10, 720936, 10, 720937, 10, 720938, 10, 720939, 10, 720940, 10, 720941, 2, 720956, 536870914, 720957, 536870922, 720958, 536870922, 720959, 536870922, 720960, 536870922, 720961, 536870922, 720962, 536870922, 720963, 536870922, 720964, 536870922, 720965, 536870922, 786432, 2, 786437, 9, 786468, 536870914, 786469, 10, 786470, 10, 786471, 10, 786472, 10, 786473, 10, 786474, 10, 786475, 10, 786476, 10, 786477, 2, 786492, 536870914, 786493, 536870922, 786494, 536870922, 786495, 536870922, 786496, 536870922, 786497, 536870922, 786498, 536870922, 786499, 536870922, 786500, 536870922, 786501, 536870922, 851968, 2, 851973, 7, 852004, 536870914, 852005, 10, 852006, 10, 852007, 10, 852008, 10, 852009, 10, 852010, 10, 852011, 10, 852012, 10, 852013, 2, 852028, 536870914, 852029, 536870922, 852030, 536870922, 852031, 536870922, 852032, 536870922, 852033, 536870922, 852034, 536870922, 852035, 536870922, 852036, 536870922, 852037, 536870922, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917540, 536870914, 917541, 10, 917542, 10, 917543, 10, 917544, 10, 917545, 10, 917546, 10, 917547, 10, 917548, 10, 917549, 2, 917564, 536870914, 917565, 536870922, 917566, 536870922, 917567, 536870922, 917568, 536870922, 917569, 536870922, 917570, 536870922, 917571, 536870922, 917572, 536870922, 917573, 536870922, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983076, 536870914, 983077, 10, 983078, 10, 983079, 10, 983080, 10, 983081, 10, 983082, 10, 983083, 10, 983084, 10, 983085, 2, 983100, 536870914, 983101, 536870922, 983102, 536870922, 983103, 536870922, 983104, 536870922, 983105, 536870922, 983106, 536870922, 983107, 536870922, 983108, 536870922, 983109, 536870922, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048612, 536870914, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 10, 1048621, 2, 1048636, 536870914, 1048637, 536870922, 1048638, 536870922, 1048639, 536870922, 1048640, 536870922, 1048641, 536870922, 1048642, 536870922, 1048643, 536870922, 1048644, 536870922, 1048645, 536870922, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114127, 536870913, 1114128, 0, 1114129, 15, 1114139, 536870927, 1114140, 0, 1114141, 536870912, 1114142, 536870912, 1114143, 536870912, 1114144, 15, 1114148, 536870925, 1114149, 536870923, 1114150, 536870923, 1114151, 536870923, 1114152, 536870923, 1114153, 536870923, 1114154, 536870923, 1114155, 536870923, 1114156, 536870923, 1114157, 13, 1114172, 536870914, 1114173, 536870922, 1114174, 536870922, 1114175, 536870922, 1114176, 536870922, 1114177, 536870922, 1114178, 536870922, 1114179, 536870922, 1114180, 536870922, 1114181, 536870922, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179663, 536870914, 1179664, 2, 1179676, 536870914, 1179677, 536870922, 1179678, 536870922, 1179679, 2, 1179700, 536870913, 1179701, 536870912, 1179702, 536870912, 1179703, 536870912, 1179704, 536870912, 1179705, 536870912, 1179706, 536870912, 1179707, 536870912, 1179708, 536870916, 1179709, 536870922, 1179710, 536870922, 1179711, 536870922, 1179712, 536870922, 1179713, 536870922, 1179714, 536870922, 1179715, 536870922, 1179716, 536870922, 1179717, 536870922, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 4, 1245191, 1, 1245192, 536870919, 1245199, 536870914, 1245200, 2, 1245212, 536870914, 1245213, 536870922, 1245214, 536870922, 1245215, 2, 1245236, 536870914, 1245237, 536870922, 1245238, 536870922, 1245239, 536870922, 1245240, 536870922, 1245241, 536870922, 1245242, 536870922, 1245243, 536870922, 1245244, 536870922, 1245245, 536870922, 1245246, 536870922, 1245247, 536870922, 1245248, 536870922, 1245249, 536870922, 1245250, 536870922, 1245251, 536870922, 1245252, 536870922, 1245253, 536870922, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 10, 1310727, 4, 1310728, 1, 1310735, 536870914, 1310736, 2, 1310748, 536870914, 1310749, 536870922, 1310750, 536870922, 1310751, 2, 1310772, 536870914, 1310773, 536870922, 1310774, 536870922, 1310775, 536870922, 1310776, 536870922, 1310777, 536870922, 1310778, 536870922, 1310779, 536870922, 1310780, 536870922, 1310781, 536870922, 1310782, 536870922, 1310783, 536870922, 1310784, 536870922, 1310785, 536870922, 1310786, 536870922, 1310787, 536870922, 1310788, 536870922, 1310789, 536870922, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 10, 1376263, 10, 1376264, 4, 1376265, 0, 1376266, 0, 1376267, 0, 1376268, 0, 1376269, 0, 1376270, 0, 1376271, 536870916, 1376272, 2, 1376284, 536870914, 1376285, 536870922, 1376286, 536870922, 1376287, 2, 1376308, 536870914, 1376309, 536870922, 1376310, 536870922, 1376311, 536870922, 1376312, 536870922, 1376313, 536870922, 1376314, 536870922, 1376315, 536870922, 1376316, 536870922, 1376317, 536870922, 1376318, 536870922, 1376319, 536870922, 1376320, 536870922, 1376321, 536870922, 1376322, 536870922, 1376323, 536870922, 1376324, 536870922, 1376325, 536870922, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 2, 1441820, 536870914, 1441821, 536870922, 1441822, 536870922, 1441823, 2, 1441844, 536870914, 1441845, 536870922, 1441846, 536870922, 1441847, 536870922, 1441848, 536870922, 1441849, 536870922, 1441850, 536870922, 1441851, 536870922, 1441852, 536870922, 1441853, 536870922, 1441854, 536870922, 1441855, 536870922, 1441856, 536870922, 1441857, 536870922, 1441858, 536870922, 1441859, 536870922, 1441860, 536870922, 1441861, 536870922, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 2, 1507356, 536870914, 1507357, 536870922, 1507358, 536870922, 1507359, 4, 1507360, 0, 1507361, 0, 1507362, 0, 1507363, 0, 1507364, 0, 1507365, 0, 1507366, 12, 1507380, 536870914, 1507381, 536870922, 1507382, 536870922, 1507383, 536870922, 1507384, 536870922, 1507385, 536870922, 1507386, 536870922, 1507387, 536870922, 1507388, 536870922, 1507389, 536870922, 1507390, 536870922, 1507391, 536870922, 1507392, 536870922, 1507393, 536870922, 1507394, 536870922, 1507395, 536870922, 1507396, 536870922, 1507397, 536870922, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 2, 1572892, 536870922, 1572893, 536870922, 1572894, 536870922, 1572895, 536870922, 1572896, 536870922, 1572897, 536870922, 1572898, 536870922, 1572899, 536870922, 1572900, 536870922, 1572901, 536870922, 1572902, 4, 1572903, 12, 1572916, 536870914, 1572917, 536870922, 1572918, 536870922, 1572919, 536870922, 1572920, 536870922, 1572921, 536870922, 1572922, 536870922, 1572923, 536870922, 1572924, 536870922, 1572925, 536870922, 1572926, 536870922, 1572927, 536870922, 1572928, 536870922, 1572929, 536870922, 1572930, 536870922, 1572931, 536870922, 1572932, 536870922, 1572933, 536870922, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 2, 1638428, 536870922, 1638429, 536870922, 1638430, 536870922, 1638431, 536870922, 1638432, 536870922, 1638433, 536870922, 1638434, 536870922, 1638435, 536870922, 1638436, 536870922, 1638437, 536870922, 1638438, 536870922, 1638439, 4, 1638440, 12, 1638452, 536870914, 1638453, 536870922, 1638454, 536870922, 1638455, 536870922, 1638456, 536870922, 1638457, 536870922, 1638458, 536870922, 1638459, 536870922, 1638460, 536870922, 1638461, 536870922, 1638462, 536870922, 1638463, 536870922, 1638464, 536870922, 1638465, 536870922, 1638466, 536870922, 1638467, 536870922, 1638468, 536870922, 1638469, 536870922, 1703964, 536870922, 1703965, 536870922, 1703966, 536870922, 1703967, 536870922, 1703968, 536870922, 1703969, 536870922, 1703970, 536870922, 1703971, 536870922, 1703972, 536870922, 1703973, 536870922, 1703974, 536870922, 1703975, 536870922, 1703976, 4, 1703977, 12, 1703988, 536870914, 1703989, 536870922, 1703990, 536870922, 1703991, 536870922, 1703992, 536870922, 1703993, 536870922, 1703994, 536870922, 1703995, 536870922, 1703996, 536870922, 1703997, 536870922, 1703998, 536870922, 1703999, 536870922, 1704000, 536870922, 1704001, 536870922, 1704002, 536870922, 1704003, 536870922, 1704004, 536870922, 1704005, 536870922, 1769499, 536870922, 1769500, 536870922, 1769501, 536870922, 1769502, 536870922, 1769503, 536870922, 1769504, 536870922, 1769505, 536870922, 1769506, 536870922, 1769507, 536870922, 1769508, 536870922, 1769509, 536870922, 1769510, 536870922, 1769511, 536870922, 1769512, 536870922, 1769513, 4, 1769514, 12, 1769524, 536870914, 1769525, 536870922, 1769526, 536870922, 1769527, 536870922, 1769528, 536870922, 1769529, 536870922, 1769530, 536870922, 1769531, 536870922, 1769532, 536870922, 1769533, 536870922, 1769534, 536870922, 1769535, 536870922, 1769536, 536870922, 1769537, 536870922, 1769538, 536870922, 1769539, 536870922, 1769540, 536870922, 1769541, 536870922, 1835035, 536870922, 1835036, 536870922, 1835037, 536870922, 1835038, 536870922, 1835039, 536870922, 1835040, 536870922, 1835041, 536870922, 1835042, 536870922, 1835043, 536870922, 1835044, 536870922, 1835045, 536870922, 1835046, 536870922, 1835047, 536870922, 1835048, 536870922, 1835049, 536870922, 1835050, 4, 1835051, 12, 1835060, 536870914, 1835061, 536870922, 1835062, 536870922, 1835063, 536870922, 1835064, 536870922, 1835065, 536870922, 1835066, 536870922, 1835067, 536870922, 1835068, 536870922, 1835069, 536870922, 1835070, 536870922, 1835071, 536870922, 1835072, 536870922, 1835073, 536870922, 1835074, 536870922, 1835075, 536870922, 1835076, 536870922, 1835077, 536870922, 1900571, 536870922, 1900572, 536870922, 1900573, 536870922, 1900574, 536870922, 1900575, 536870922, 1900576, 536870922, 1900577, 536870922, 1900578, 536870922, 1900579, 536870922, 1900580, 536870922, 1900581, 536870922, 1900582, 536870922, 1900583, 536870922, 1900584, 536870922, 1900585, 536870922, 1900586, 536870922, 1900587, 4, 1900588, 14, 1900589, 14, 1900590, 14, 1900591, 14, 1900592, 14, 1900593, 14, 1900594, 14, 1900595, 14, 1900596, 536870916, 1900597, 536870922, 1900598, 536870922, 1900599, 536870922, 1900600, 536870922, 1900601, 536870922, 1900602, 536870922, 1900603, 536870922, 1900604, 536870922, 1900605, 536870922, 1900606, 536870922, 1900607, 536870922, 1900608, 536870922, 1900609, 536870922, 1900610, 536870922, 1900611, 536870922, 1900612, 536870922, 1900613, 536870922, 1966107, 536870922, 1966108, 536870922, 1966109, 536870922, 1966110, 536870922, 1966111, 536870922, 1966112, 536870922, 1966113, 536870922, 1966114, 536870922, 1966115, 536870922, 1966116, 536870922, 1966117, 536870922, 1966118, 536870922, 1966119, 536870922, 1966120, 536870922, 1966121, 536870922, 1966122, 536870922, 1966123, 536870922, 1966124, 536870922, 1966125, 536870922, 1966126, 536870922, 1966127, 536870922, 1966128, 536870922, 1966129, 536870922, 1966130, 536870922, 1966131, 536870922, 1966132, 536870922, 1966133, 536870922, 1966134, 536870922, 1966135, 536870922, 1966136, 536870922, 1966137, 536870922, 1966138, 536870922, 1966139, 536870922, 1966140, 536870922, 1966141, 536870922, 1966142, 536870922, 1966143, 536870922, 1966144, 536870922, 1966145, 536870922, 1966146, 536870922, 1966147, 536870922, 1966148, 536870922, 1966149, 536870922, 2031643, 536870922, 2031644, 536870922, 2031645, 536870922, 2031646, 536870922, 2031647, 536870922, 2031648, 536870922, 2031649, 536870922, 2031650, 536870922, 2031651, 536870922, 2031652, 536870922, 2031653, 536870922, 2031654, 536870922, 2031655, 536870922, 2031656, 536870922, 2031657, 536870922, 2031658, 536870922, 2031659, 536870922, 2031660, 536870922, 2031661, 536870922, 2031662, 536870922, 2031663, 536870922, 2031664, 536870922, 2031665, 536870922, 2031666, 536870922, 2031667, 536870922, 2031668, 536870922, 2031669, 536870922, 2031670, 536870922, 2031671, 536870922, 2031672, 536870922, 2031673, 536870922, 2031674, 536870922, 2031675, 536870922, 2031676, 536870922, 2031677, 536870922, 2031678, 536870922, 2031679, 536870922, 2031680, 536870922, 2031681, 536870922, 2031682, 536870922, 2031683, 536870922, 2031684, 536870922, 2031685, 536870922, 2097179, 536870922, 2097180, 536870922, 2097181, 536870922, 2097182, 536870922, 2097183, 536870922, 2097184, 536870922, 2097185, 536870922, 2097186, 536870922, 2097187, 536870922, 2097188, 536870922, 2097189, 536870922, 2097190, 536870922, 2097191, 536870922, 2097192, 536870922, 2097193, 536870922, 2097194, 536870922, 2097195, 536870922, 2097196, 536870922, 2097197, 536870922, 2097198, 536870922, 2097199, 536870922, 2097200, 536870922, 2097201, 536870922, 2097202, 536870922, 2097203, 536870922, 2097204, 536870922, 2097205, 536870922, 2097206, 536870922, 2097207, 536870922, 2097208, 536870922, 2097209, 536870922, 2097210, 536870922, 2097211, 536870922, 2097212, 536870922, 2097213, 536870922, 2097214, 536870922, 2097215, 536870922, 2097216, 536870922, 2097217, 536870922, 2097218, 536870922, 2097219, 536870922, 2097220, 536870922, 2097221, 536870922, 2162716, 536870922, 2162717, 536870922, 2162718, 536870922, 2162719, 536870922, 2162720, 536870922, 2162721, 536870922, 2162722, 536870922, 2162723, 536870922, 2162724, 536870922, 2162725, 536870922, 2162726, 536870922, 2162727, 536870922, 2162728, 536870922, 2162729, 536870922, 2162730, 536870922, 2162731, 536870922, 2162732, 536870922, 2162733, 536870922, 2162734, 536870922, 2162735, 536870922, 2162736, 536870922, 2162737, 536870922, 2162738, 536870922, 2162739, 536870922, 2162740, 536870922, 2162741, 536870922, 2162742, 536870922, 2162743, 536870922, 2162744, 536870922, 2162745, 536870922, 2162746, 536870922, 2162747, 536870922, 2162748, 536870922, 2162749, 536870922, 2162750, 536870922, 2162751, 536870922, 2162752, 536870922, 2162753, 536870922, 2162754, 536870922, 2162755, 536870922, 2162756, 536870922, 2162757, 536870922, 2228252, 536870922, 2228253, 536870922, 2228254, 536870922, 2228255, 536870922, 2228256, 536870922, 2228257, 536870922, 2228258, 536870922, 2228259, 536870922, 2228260, 536870922, 2228261, 536870922, 2228262, 536870922, 2228263, 536870922, 2228264, 536870922, 2228265, 536870922, 2228266, 536870922, 2228267, 536870922, 2228268, 536870922, 2228269, 536870922, 2228270, 536870922, 2228271, 536870922, 2228272, 536870922, 2228273, 536870922, 2228274, 536870922, 2228275, 536870922, 2228276, 536870922, 2228277, 536870922, 2228278, 536870922, 2228279, 536870922, 2228280, 536870922, 2228281, 536870922, 2228282, 536870922, 2228283, 536870922, 2228284, 536870922, 2228285, 536870922, 2228286, 536870922, 2228287, 536870922, 2228288, 536870922, 2228289, 536870922, 2228290, 536870922, 2228291, 536870922, 2228292, 536870922, 2228293, 536870922, 2293788, 536870922, 2293789, 536870922, 2293790, 536870922, 2293791, 536870922, 2293792, 536870922, 2293793, 536870922, 2293794, 536870922, 2293795, 536870922, 2293796, 536870922, 2293797, 536870922, 2293798, 536870922, 2293799, 536870922, 2293800, 536870922, 2293801, 536870922, 2293802, 536870922, 2293803, 536870922, 2293804, 536870922, 2293805, 536870922, 2293806, 536870922, 2293807, 536870922, 2293808, 536870922, 2293809, 536870922, 2293810, 536870922, 2293811, 536870922, 2293812, 536870922, 2293813, 536870922, 2293814, 536870922, 2293815, 536870922, 2293816, 536870922, 2293817, 536870922, 2293818, 536870922, 2293819, 536870922, 2293820, 536870922, 2293821, 536870922, 2293822, 536870922, 2293823, 536870922, 2293824, 536870922, 2293825, 536870922, 2293826, 536870922, 2293827, 536870922, 2293828, 536870922, 2293829, 536870922, 2293830, 536870922, 2359324, 536870922, 2359325, 536870922, 2359326, 536870922, 2359327, 536870922, 2359328, 536870922, 2359329, 536870922, 2359330, 536870922, 2359331, 536870922, 2359332, 536870922, 2359333, 536870922, 2359334, 536870922, 2359335, 536870922, 2359336, 536870922, 2359337, 536870922, 2359338, 536870922, 2359339, 536870922, 2359340, 536870922, 2359341, 536870922, 2359342, 536870922, 2359343, 536870922, 2359344, 536870922, 2359345, 536870922, 2359346, 536870922, 2359347, 536870922, 2359348, 536870922, 2359349, 536870922, 2359350, 536870922, 2359351, 536870922, 2359352, 536870922, 2359353, 536870922, 2359354, 536870922, 2359355, 536870922, 2359356, 536870922, 2359357, 536870922, 2359358, 536870922, 2359359, 536870922, 2359360, 536870922, 2359361, 536870922, 2359362, 536870922, 2359363, 536870922, 2359364, 536870922, 2359365, 536870922, 2359366, 536870922, 2424860, 536870922, 2424861, 536870922, 2424862, 536870922, 2424863, 536870922, 2424864, 536870922, 2424865, 536870922, 2424866, 536870922, 2424867, 536870922, 2424868, 536870922, 2424869, 536870922, 2424870, 536870922, 2424871, 536870922, 2424872, 536870922, 2424873, 536870922, 2424874, 536870922, 2424875, 536870922, 2424876, 536870922, 2424877, 536870922, 2424878, 536870922, 2424879, 536870922, 2424880, 536870922, 2424881, 536870922, 2424882, 536870922, 2424883, 536870922, 2424884, 536870922, 2424885, 536870922, 2424886, 536870922, 2424887, 536870922, 2424888, 536870922, 2424889, 536870922, 2424890, 536870922, 2424891, 536870922, 2424892, 536870922, 2424893, 536870922, 2424894, 536870922, 2424895, 536870922, 2424896, 536870922, 2424897, 536870922, 2424898, 536870922, 2424899, 536870922, 2424900, 536870922, 2424901, 536870922, 2424902, 536870922, 2490397, 536870922, 2490398, 536870922, 2490399, 536870922, 2490400, 536870922, 2490401, 536870922, 2490402, 536870922, 2490403, 536870922, 2490404, 536870922, 2490405, 536870922, 2490406, 536870922, 2490407, 536870922, 2490408, 536870922, 2490409, 536870922, 2490410, 536870922, 2490411, 536870922, 2490412, 536870922, 2490413, 536870922, 2490414, 536870922, 2490415, 536870922, 2490416, 536870922, 2490417, 536870922, 2490418, 536870922, 2490419, 536870922, 2490420, 536870922, 2490421, 536870922, 2490422, 536870922, 2490423, 536870922, 2490424, 536870922, 2490425, 536870922, 2490426, 536870922, 2490427, 536870922, 2490428, 536870922, 2490429, 536870922, 2490430, 536870922, 2490431, 536870922, 2490432, 536870922, 2490433, 536870922, 2490434, 536870922, 2490435, 536870922, 2490436, 536870922, 2490437, 536870922, 2555933, 536870922, 2555934, 536870922, 2555935, 536870922, 2555936, 536870922, 2555937, 536870922, 2555938, 536870922, 2555939, 536870922, 2555940, 536870922, 2555941, 536870922, 2555942, 536870922, 2555943, 536870922, 2555944, 536870922, 2555945, 536870922, 2555946, 536870922, 2555947, 536870922, 2555948, 536870922, 2555949, 536870922, 2555950, 536870922, 2555951, 536870922, 2555952, 536870922, 2555953, 536870922, 2555954, 536870922, 2555955, 536870922, 2555956, 536870922, 2555957, 536870922, 2555958, 536870922, 2555959, 536870922, 2555960, 536870922, 2555961, 536870922, 2555962, 536870922, 2555963, 536870922, 2555964, 536870922, 2555965, 536870922, 2555966, 536870922, 2555967, 536870922, 2555968, 536870922, 2555969, 536870922, 2555970, 536870922, 2555971, 536870922, 2555972, 536870922, 2555973, 536870922, 2621469, 536870922, 2621470, 536870922, 2621471, 536870922, 2621472, 536870922, 2621473, 536870922, 2621474, 536870922, 2621475, 536870922, 2621476, 536870922, 2621477, 536870922, 2621478, 536870922, 2621479, 536870922, 2621480, 536870922, 2621481, 536870922, 2621482, 536870922, 2621483, 536870922, 2621484, 536870922, 2621485, 536870922, 2621486, 536870922, 2621487, 536870922, 2621488, 536870922, 2621489, 536870922, 2621490, 536870922, 2621491, 536870922, 2621492, 536870922, 2621493, 536870922, 2621494, 536870922, 2621495, 536870922, 2621496, 536870922, 2621497, 536870922, 2621498, 536870922, 2621499, 536870922, 2621500, 536870922, 2621501, 536870922, 2621502, 536870922, 2621503, 536870922, 2621504, 536870922, 2621505, 536870922, 2621506, 536870922, 2621507, 536870922, 2621508, 536870922, 2687006, 536870922, 2687007, 536870922, 2687008, 536870922, 2687009, 536870922, 2687010, 536870922, 2687011, 536870922, 2687012, 536870922, 2687013, 536870922, 2687014, 536870922, 2687015, 536870922, 2687016, 536870922, 2687017, 536870922, 2687018, 536870922, 2687019, 536870922, 2687020, 536870922, 2687021, 536870922, 2687022, 536870922, 2687023, 536870922, 2687024, 536870922, 2687025, 536870922, 2687026, 536870922, 2687027, 536870922, 2687028, 536870922, 2687029, 536870922, 2687030, 536870922, 2687031, 536870922, 2687032, 536870922, 2687033, 536870922, 2687034, 536870922, 2687035, 536870922, 2687036, 536870922, 2687037, 536870922, 2687038, 536870922, 2687039, 536870922, 2687040, 536870922, 2687041, 536870922, 2687042, 536870922, 2687043, 536870922, 2687044, 536870922, 2752543, 536870922, 2752544, 536870922, 2752545, 536870922, 2752546, 536870922, 2752547, 536870922, 2752548, 536870922, 2752549, 536870922, 2752550, 536870922, 2752551, 536870922, 2752552, 536870922, 2752553, 536870922, 2752554, 536870922, 2752555, 536870922, 2752556, 536870922, 2752557, 536870922, 2752558, 536870922, 2752559, 536870922, 2752560, 536870922, 2752561, 536870922, 2752562, 536870922, 2752563, 536870922, 2752564, 536870922, 2752565, 536870922, 2752566, 536870922, 2752567, 536870922, 2752568, 536870922, 2752569, 536870922, 2752570, 536870922, 2752571, 536870922, 2752572, 536870922, 2752573, 536870922, 2752574, 536870922, 2752575, 536870922, 2752576, 536870922, 2752577, 536870922, 2752578, 536870922, 2752579, 536870922, 2818083, 536870922, 2818084, 536870922, 2818085, 536870922, 2818086, 536870922, 2818087, 536870922, 2818088, 536870922, 2818089, 536870922, 2818090, 536870922, 2818091, 536870922, 2818092, 536870922, 2818093, 536870922, 2818094, 536870922, 2818095, 536870922, 2818096, 536870922, 2818097, 536870922, 2818098, 536870922, 2818099, 536870922, 2818100, 536870922, 2818101, 536870922, 2818102, 536870922, 2818103, 536870922, 2818104, 536870922, 2818105, 536870922, 2818106, 536870922, 2818107, 536870922, 2818108, 536870922, 2818109, 536870922, 2818110, 536870922, 2818111, 536870922, 2818112, 536870922, 2818113, 536870922 ) __meta__ = { "_edit_lock_":true } [node name="coins" type="Node" parent="."] +editor/display_folded = true + [node name="coin" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 672, 1179 ) -linear_damp = 0.1 [node name="coin 2" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 704, 1179 ) -linear_damp = 0.1 [node name="coin 3" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 736, 1179 ) -linear_damp = 0.1 [node name="coin 4" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 1120, 992 ) -linear_damp = 0.1 [node name="coin 5" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 1152, 992 ) -linear_damp = 0.1 [node name="coin 6" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 1184, 992 ) -linear_damp = 0.1 [node name="coin 7" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 1216, 992 ) -linear_damp = 0.1 [node name="coin 8" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 1248, 992 ) -linear_damp = 0.1 [node name="coin 9" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 1568, 864 ) -linear_damp = 0.1 [node name="coin 10" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 1632, 864 ) -linear_damp = 0.1 [node name="coin 11" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1824, 768 ) -linear_damp = 0.1 +transform/pos = Vector2( 1169.44, 677.369 ) [node name="coin 12" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1888, 768 ) -linear_damp = 0.1 +transform/pos = Vector2( 1233.44, 677.369 ) [node name="coin 13" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 2080, 672 ) -linear_damp = 0.1 +transform/pos = Vector2( 924.453, 566.264 ) [node name="coin 14" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 2144, 672 ) -linear_damp = 0.1 +transform/pos = Vector2( 988.453, 566.264 ) [node name="coin 15" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1792, 1248 ) -linear_damp = 0.1 +transform/pos = Vector2( 983.872, 336.653 ) [node name="coin 16" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1856, 1248 ) -linear_damp = 0.1 +transform/pos = Vector2( 1047.87, 336.653 ) [node name="coin 17" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1920, 1248 ) -linear_damp = 0.1 +transform/pos = Vector2( 1111.87, 336.653 ) [node name="coin 18" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1920, 1184 ) -linear_damp = 0.1 +transform/pos = Vector2( 1111.87, 272.653 ) [node name="coin 19" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1856, 1184 ) -linear_damp = 0.1 +transform/pos = Vector2( 1047.87, 272.653 ) [node name="coin 20" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 1792, 1184 ) -linear_damp = 0.1 +transform/pos = Vector2( 983.872, 272.653 ) [node name="coin 21" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 98.8868, 488.515 ) -linear_damp = 0.1 +transform/pos = Vector2( 3726.65, 1102.79 ) [node name="coin 22" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 89.5989, 481.217 ) -linear_damp = 0.1 [node name="coin 23" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 108.175, 481.217 ) -linear_damp = 0.1 +transform/pos = Vector2( 3735.94, 1095.49 ) [node name="coin 24" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 116.136, 469.939 ) -linear_damp = 0.1 +transform/pos = Vector2( 3743.9, 1084.22 ) [node name="coin 25" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 117.463, 457.997 ) -linear_damp = 0.1 +transform/pos = Vector2( 3745.23, 1072.28 ) [node name="coin 26" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 106.184, 449.373 ) -linear_damp = 0.1 +transform/pos = Vector2( 3733.95, 1063.65 ) [node name="coin 27" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 98.2234, 458.661 ) -linear_damp = 0.1 +transform/pos = Vector2( 3725.99, 1072.94 ) [node name="coin 28" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 88.272, 448.71 ) -linear_damp = 0.1 [node name="coin 29" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 79.6476, 457.334 ) -linear_damp = 0.1 [node name="coin 30" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 82.9647, 468.612 ) -linear_damp = 0.1 [node name="coin 31" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 3357.42, 465.288 ) -linear_damp = 0.1 +transform/pos = Vector2( 2159.07, 1356.49 ) [node name="coin 31 2" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 3421.42, 465.288 ) -linear_damp = 0.1 +transform/pos = Vector2( 2223.07, 1356.49 ) [node name="coin 31 3" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 3485.42, 465.288 ) -linear_damp = 0.1 +transform/pos = Vector2( 2287.07, 1356.49 ) [node name="coin 31 4" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 3485.42, 401.288 ) -linear_damp = 0.1 +transform/pos = Vector2( 2287.07, 1292.49 ) [node name="coin 31 5" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 3421.42, 401.288 ) -linear_damp = 0.1 +transform/pos = Vector2( 2223.07, 1292.49 ) [node name="coin 31 6" parent="coins" instance=ExtResource( 2 )] -transform/pos = Vector2( 3357.42, 401.288 ) -linear_damp = 0.1 +transform/pos = Vector2( 2159.07, 1292.49 ) [node name="coin 32" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 4172.75, 605.058 ) -linear_damp = 0.1 [node name="coin 31 7" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 4236.75, 605.058 ) -linear_damp = 0.1 [node name="coin 31 7 2" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 4300.75, 605.058 ) -linear_damp = 0.1 [node name="coin 31 7 3" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 4300.75, 541.058 ) -linear_damp = 0.1 [node name="coin 31 7 4" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 4236.75, 541.058 ) -linear_damp = 0.1 [node name="coin 31 7 5" parent="coins" instance=ExtResource( 2 )] transform/pos = Vector2( 4172.75, 541.058 ) -linear_damp = 0.1 [node name="props" type="Node" parent="."] [node name="moving_platform" parent="props" instance=ExtResource( 3 )] transform/pos = Vector2( 1451.86, 742.969 ) -motion = Vector2( 0, 140 ) -cycle = 5.0 +motion = Vector2( 0, 0 ) +cycle = 1.0 [node name="moving_platform 2" parent="props" instance=ExtResource( 3 )] -transform/pos = Vector2( 624.824, 545.544 ) -motion = Vector2( 300, 0 ) -cycle = 10.0 +transform/pos = Vector2( 719.199, 1123.81 ) +motion = Vector2( 100, 0 ) +cycle = 4.0 -[node name="moving_platform 3" parent="props" instance=ExtResource( 3 )] +[node name="still" parent="props" instance=ExtResource( 3 )] -transform/pos = Vector2( 3419.86, 739.662 ) -motion = Vector2( 450, 0 ) -cycle = 10.0 +transform/pos = Vector2( 1231.37, 1105.18 ) +transform/rot = 9.3572 +motion = Vector2( 0, 0 ) +cycle = 1.0 -[node name="seesaw" parent="props" instance=ExtResource( 4 )] +[node name="still1" parent="props" instance=ExtResource( 3 )] -transform/pos = Vector2( 2402.79, 849.52 ) +transform/pos = Vector2( 1384.28, 1066.4 ) +transform/rot = 18.4436 +motion = Vector2( 0, 0 ) +cycle = 1.0 -[node name="one_way_platform" parent="props" instance=ExtResource( 5 )] +[node name="still2" parent="props" instance=ExtResource( 3 )] -transform/pos = Vector2( 927.698, 1120.81 ) +transform/pos = Vector2( 1552.7, 1032.05 ) +transform/rot = 4.73782 +motion = Vector2( 0, 0 ) +cycle = 1.0 -[node name="player" parent="." instance=ExtResource( 6 )] +[node name="still3" parent="props" instance=ExtResource( 3 )] + +transform/pos = Vector2( 1700.06, 1066.92 ) +transform/rot = -31.3979 +motion = Vector2( 0, 0 ) +cycle = 1.0 + +[node name="one_way_platform" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1099.56, 940.804 ) + +[node name="one_way_platform1" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 967.609, 836.547 ) + +[node name="one_way_platform2" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1190.78, 754.282 ) + +[node name="one_way_platform3" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 953.762, 638.622 ) + +[node name="one_way_platform6" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1192.93, 520.298 ) + +[node name="one_way_platform4" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1256.76, 638.622 ) + +[node name="one_way_platform7" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 2784.9, 1655.71 ) + +[node name="one_way_platform8" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 2976.23, 1555 ) + +[node name="one_way_platform9" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 3122.25, 1469.41 ) + +[node name="one_way_platform10" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 3200.29, 1353.6 ) + +[node name="one_way_platform11" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 3200.29, 1237.8 ) + +[node name="one_way_platform5" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 1039.29, 409.746 ) + +[node name="player" parent="." instance=ExtResource( 5 )] transform/pos = Vector2( 251.684, 1045.6 ) [node name="music" type="StreamPlayer" parent="."] -stream/stream = ExtResource( 7 ) +stream/stream = ExtResource( 6 ) stream/play = false stream/loop = true stream/volume_db = 2.0 @@ -288,57 +309,58 @@ stream/buffering_ms = 500 [node name="enemies" type="Node" parent="."] -[node name="enemy 5" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 5" parent="enemies" instance=ExtResource( 7 )] -transform/pos = Vector2( 834.664, 1309.6 ) +transform/pos = Vector2( 734.693, 1064.22 ) -[node name="enemy 6" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 6" parent="enemies" instance=ExtResource( 7 )] transform/pos = Vector2( 707.665, 1225.05 ) -[node name="enemy 7" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 7" parent="enemies" instance=ExtResource( 7 )] transform/pos = Vector2( 1125.21, 1053.06 ) -[node name="enemy 8" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 8" parent="enemies" instance=ExtResource( 7 )] transform/pos = Vector2( 1292.11, 1059.24 ) -[node name="enemy 9" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 9" parent="enemies" instance=ExtResource( 7 )] -transform/pos = Vector2( 1607.38, 923.239 ) +transform/pos = Vector2( 968.927, 766.466 ) -[node name="enemy 10" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 10" parent="enemies" instance=ExtResource( 7 )] -transform/pos = Vector2( 2586.9, 939.059 ) +transform/pos = Vector2( 3080.34, 1807.61 ) -[node name="enemy 11" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 11" parent="enemies" instance=ExtResource( 7 )] transform/pos = Vector2( 1457.6, 688.741 ) -[node name="enemy 12" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 12" parent="enemies" instance=ExtResource( 7 )] -transform/pos = Vector2( 1193.63, 460.381 ) +transform/pos = Vector2( 1264.06, 571.713 ) -[node name="enemy 13" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 13" parent="enemies" instance=ExtResource( 7 )] -transform/pos = Vector2( 3429.73, 540.865 ) +transform/pos = Vector2( 3590.85, 1114.86 ) -[node name="enemy 14" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 14" parent="enemies" instance=ExtResource( 7 )] transform/pos = Vector2( 3546.2, 1356.19 ) -[node name="enemy 15" parent="enemies" instance=ExtResource( 8 )] +[node name="enemy 15" parent="enemies" instance=ExtResource( 7 )] -transform/pos = Vector2( 2406.63, 815.115 ) +transform/pos = Vector2( 2215.3, 1429.39 ) -[node name="parallax_bg" parent="." instance=ExtResource( 9 )] +[node name="parallax_bg" parent="." instance=ExtResource( 8 )] [node name="Label" type="Label" parent="."] focus/ignore_mouse = true focus/stop_mouse = true size_flags/horizontal = 2 +size_flags/vertical = 0 margin/left = 12.0 margin/top = -202.0 margin/right = 358.0 diff --git a/2d/platformer/tiles_demo.png b/2d/platformer/tiles_demo.png index bc738e6d..bae2187d 100644 Binary files a/2d/platformer/tiles_demo.png and b/2d/platformer/tiles_demo.png differ diff --git a/2d/platformer_dcc/bullet.gd b/2d/platformer_dcc/bullet.gd new file mode 100644 index 00000000..3aee6971 --- /dev/null +++ b/2d/platformer_dcc/bullet.gd @@ -0,0 +1,16 @@ + +extends RigidBody2D + +# Member variables +var disabled = false + + +func disable(): + if (disabled): + return + get_node("anim").play("shutdown") + disabled = true + + +func _ready(): + get_node("Timer").start() diff --git a/2d/platformer_dcc/bullet.png b/2d/platformer_dcc/bullet.png new file mode 100644 index 00000000..5c722219 Binary files /dev/null and b/2d/platformer_dcc/bullet.png differ diff --git a/2d/platformer_dcc/bullet.tscn b/2d/platformer_dcc/bullet.tscn new file mode 100644 index 00000000..78f566c3 --- /dev/null +++ b/2d/platformer_dcc/bullet.tscn @@ -0,0 +1,115 @@ +[gd_scene load_steps=6 format=1] + +[ext_resource path="res://bullet.gd" type="Script" id=1] +[ext_resource path="res://bullet.png" type="Texture" id=2] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 10.0 + +[sub_resource type="ColorRamp" id=2] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 1, 1, 1, 1, 0, 0, 0 ) + +[sub_resource type="Animation" id=3] + +length = 1.5 +loop = false +step = 0.0 +tracks/0/type = "value" +tracks/0/path = NodePath("particles:config/emitting") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] } +tracks/1/type = "value" +tracks/1/path = NodePath("sprite:visibility/self_opacity") +tracks/1/interp = 1 +tracks/1/keys = { "cont":true, "times":FloatArray( 0, 1.00394 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/2/type = "method" +tracks/2/path = NodePath(".") +tracks/2/interp = 1 +tracks/2/keys = { "times":FloatArray( 1.31 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } + +[node name="bullet" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 0 +mass = 1.0 +friction = 1.0 +bounce = 0.0 +gravity_scale = 1.0 +custom_integrator = false +continuous_cd = 2 +contacts_reported = 0 +contact_monitor = false +sleeping = false +can_sleep = true +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +script/script = ExtResource( 1 ) + +[node name="particles" type="Particles2D" parent="."] + +visibility/opacity = 0.559322 +visibility/blend_mode = 1 +config/amount = 24 +config/lifetime = 0.1 +config/local_space = false +config/texture = ExtResource( 2 ) +params/direction = 0.0 +params/spread = 10.0 +params/linear_velocity = 0.0 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 1.0 +params/final_size = 0.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +color/color_ramp = SubResource( 2 ) + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="Timer" type="Timer" parent="."] + +process_mode = 1 +wait_time = 1.0 +one_shot = true +autostart = false + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/shutdown = SubResource( 3 ) +playback/active = true +playback/speed = 1.0 +blend_times = [ ] +autoplay = "" + +[connection signal="timeout" from="Timer" to="." method="disable"] + + diff --git a/2d/platformer_dcc/coin.gd b/2d/platformer_dcc/coin.gd new file mode 100644 index 00000000..11187327 --- /dev/null +++ b/2d/platformer_dcc/coin.gd @@ -0,0 +1,19 @@ + +extends Area2D + +# Member variables +var taken = false + + +func _on_body_enter( body ): + if (not taken and body extends preload("res://player.gd")): + get_node("anim").play("taken") + taken = true + + +func _on_coin_area_enter(area): + pass # replace with function body + + +func _on_coin_area_enter_shape(area_id, area, area_shape, area_shape): + pass # replace with function body diff --git a/2d/platformer_dcc/coin.png b/2d/platformer_dcc/coin.png new file mode 100644 index 00000000..c35c5ebf Binary files /dev/null and b/2d/platformer_dcc/coin.png differ diff --git a/2d/platformer_dcc/coin.tscn b/2d/platformer_dcc/coin.tscn new file mode 100644 index 00000000..76730c83 --- /dev/null +++ b/2d/platformer_dcc/coin.tscn @@ -0,0 +1,146 @@ +[gd_scene load_steps=10 format=1] + +[ext_resource path="res://coin.gd" type="Script" id=1] +[ext_resource path="res://coin.png" type="Texture" id=2] +[ext_resource path="res://sound_coin.wav" type="Sample" id=3] +[ext_resource path="res://bullet.png" type="Texture" id=4] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 10.0 + +[sub_resource type="Animation" id=2] + +resource/name = "spin" +length = 1.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 2, 1, 0 ] } + +[sub_resource type="Animation" id=3] + +length = 8.0 +loop = false +step = 0.0 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 0 ] } +tracks/1/type = "value" +tracks/1/path = NodePath("sound:play/play") +tracks/1/interp = 1 +tracks/1/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ "coin" ] } +tracks/2/type = "value" +tracks/2/path = NodePath("particles:visibility/self_opacity") +tracks/2/interp = 1 +tracks/2/keys = { "cont":true, "times":FloatArray( 0, 1.66 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/3/type = "value" +tracks/3/path = NodePath("sprite:visibility/self_opacity") +tracks/3/interp = 1 +tracks/3/keys = { "cont":true, "times":FloatArray( 0, 0.4 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/4/type = "value" +tracks/4/path = NodePath("particles:config/emitting") +tracks/4/interp = 1 +tracks/4/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ true ] } +tracks/5/type = "method" +tracks/5/path = NodePath(".") +tracks/5/interp = 1 +tracks/5/keys = { "times":FloatArray( 2.7 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] } + +[sub_resource type="SampleLibrary" id=4] + +samples/coin = { "db":0.0, "pitch":1.0, "sample":ExtResource( 3 ) } + +[sub_resource type="ColorRamp" id=5] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 1, 1, 1, 0, 0, 0, 1 ) + +[node name="coin" type="Area2D"] + +input/pickable = true +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +gravity_vec = Vector2( 0, 1 ) +gravity = 98.0 +linear_damp = 0.1 +angular_damp = 1.0 +script/script = ExtResource( 1 ) + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) +hframes = 4 + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/spin = SubResource( 2 ) +anims/taken = SubResource( 3 ) +playback/active = true +playback/speed = 3.0 +blend_times = [ ] +autoplay = "spin" + +[node name="collision" type="CollisionShape2D" parent="."] + +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="sound" type="SamplePlayer2D" parent="."] + +params/volume_db = 0.0 +params/pitch_scale = 1.0 +params/attenuation/min_distance = 1.0 +params/attenuation/max_distance = 2048.0 +params/attenuation/distance_exp = 1.0 +config/polyphony = 1 +config/samples = SubResource( 4 ) +config/pitch_random = 0.0 + +[node name="particles" type="Particles2D" parent="."] + +visibility/blend_mode = 1 +config/amount = 8 +config/lifetime = 0.4 +config/emitting = false +config/half_extents = Vector2( 5, 5 ) +config/texture = ExtResource( 4 ) +params/direction = 0.0 +params/spread = 10.0 +params/linear_velocity = 0.0 +params/spin_velocity = 0.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 0.0 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 0.2 +params/final_size = 0.2 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +color/color_ramp = SubResource( 5 ) + +[node name="enabler" type="VisibilityEnabler2D" parent="."] + +rect = Rect2( -10, -10, 20, 20 ) +enabler/pause_animations = true +enabler/freeze_bodies = true +enabler/pause_particles = true +enabler/process_parent = false +enabler/fixed_process_parent = false + +[connection signal="body_enter" from="." to="." method="_on_body_enter"] + + diff --git a/2d/platformer_dcc/enemy.gd b/2d/platformer_dcc/enemy.gd new file mode 100644 index 00000000..5a4d8af5 --- /dev/null +++ b/2d/platformer_dcc/enemy.gd @@ -0,0 +1,83 @@ + +extends RigidBody2D + +# Member variables +const STATE_WALKING = 0 +const STATE_DYING = 1 + +var state = STATE_WALKING + +var direction = -1 +var anim = "" + +var rc_left = null +var rc_right = null +var WALK_SPEED = 50 + +var bullet_class = preload("res://bullet.gd") + + +func _die(): + queue_free() + + +func _pre_explode(): + # Stay there + clear_shapes() + set_mode(MODE_STATIC) + get_node("sound").play("explode") + + +func _integrate_forces(s): + var lv = s.get_linear_velocity() + var new_anim = anim + + if (state == STATE_DYING): + new_anim = "explode" + elif (state == STATE_WALKING): + new_anim = "walk" + + var wall_side = 0.0 + + for i in range(s.get_contact_count()): + var cc = s.get_contact_collider_object(i) + var dp = s.get_contact_local_normal(i) + + if (cc): + if (cc extends bullet_class and not cc.disabled): + set_mode(MODE_RIGID) + state = STATE_DYING + #lv = s.get_contact_local_normal(i)*400 + s.set_angular_velocity(sign(dp.x)*33.0) + set_friction(1) + cc.disable() + get_node("sound").play("hit") + break + + if (dp.x > 0.9): + wall_side = 1.0 + elif (dp.x < -0.9): + wall_side = -1.0 + + if (wall_side != 0 and wall_side != direction): + direction = -direction + get_node("sprite").set_scale(Vector2(-direction, 1)) + if (direction < 0 and not rc_left.is_colliding() and rc_right.is_colliding()): + direction = -direction + get_node("sprite").set_scale(Vector2(-direction, 1)) + elif (direction > 0 and not rc_right.is_colliding() and rc_left.is_colliding()): + direction = -direction + get_node("sprite").set_scale(Vector2(-direction, 1)) + + lv.x = direction*WALK_SPEED + + if(anim != new_anim): + anim = new_anim + get_node("anim").play(anim) + + s.set_linear_velocity(lv) + + +func _ready(): + rc_left = get_node("raycast_left") + rc_right = get_node("raycast_right") diff --git a/2d/platformer_dcc/enemy.png b/2d/platformer_dcc/enemy.png new file mode 100644 index 00000000..37fe468b Binary files /dev/null and b/2d/platformer_dcc/enemy.png differ diff --git a/2d/platformer_dcc/enemy.tscn b/2d/platformer_dcc/enemy.tscn new file mode 100644 index 00000000..b01bd9fc --- /dev/null +++ b/2d/platformer_dcc/enemy.tscn @@ -0,0 +1,206 @@ +[gd_scene load_steps=12 format=1] + +[ext_resource path="res://enemy.gd" type="Script" id=1] +[ext_resource path="res://enemy.png" type="Texture" id=2] +[ext_resource path="res://bullet.png" type="Texture" id=3] +[ext_resource path="res://sound_explode.wav" type="Sample" id=4] +[ext_resource path="res://sound_hit.wav" type="Sample" id=5] + +[sub_resource type="CircleShape2D" id=1] + +custom_solver_bias = 0.0 +radius = 14.0 + +[sub_resource type="Animation" id=2] + +resource/name = "explode" +length = 6.0 +loop = false +step = 0.0 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:visibility/self_opacity") +tracks/0/interp = 1 +tracks/0/keys = { "cont":true, "times":FloatArray( 3.58422, 4.33851 ), "transitions":FloatArray( 1, 1 ), "values":[ 1.0, 0.0 ] } +tracks/1/type = "value" +tracks/1/path = NodePath("sprite:frame") +tracks/1/interp = 1 +tracks/1/keys = { "cont":true, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 4 ] } +tracks/2/type = "value" +tracks/2/path = NodePath("Particles2D:config/emitting") +tracks/2/interp = 1 +tracks/2/keys = { "cont":false, "times":FloatArray( 3.47394 ), "transitions":FloatArray( 1 ), "values":[ true ] } +tracks/3/type = "method" +tracks/3/path = NodePath(".") +tracks/3/interp = 1 +tracks/3/keys = { "times":FloatArray( 3.20357, 5.07305 ), "transitions":FloatArray( 1, 1 ), "values":[ { "args":[ ], "method":"_pre_explode" }, { "args":[ ], "method":"_die" } ] } + +[sub_resource type="Animation" id=3] + +length = 6.75 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.75, 1.5, 2.25, 3, 3.75, 4.5, 5.25, 6, 6.75 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 5, 6, 5, 6, 5, 6, 7, 6, 7, 5 ] } + +[sub_resource type="Animation" id=4] + +resource/name = "walk" +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 0 ] } + +[sub_resource type="ColorRamp" id=5] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 0.884956, 0.823009, 1, 0.768627, 0.389381, 0, 0 ) + +[sub_resource type="SampleLibrary" id=6] + +samples/explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } +samples/hit = { "db":0.0, "pitch":1.0, "sample":ExtResource( 5 ) } + +[node name="enemy" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, -1.08072, -2.16144 ) +shapes/0/trigger = false +shapes/1/shape = SubResource( 1 ) +shapes/1/transform = Matrix32( 1, 0, 0, 1, 6.48431, 3.24216 ) +shapes/1/trigger = false +shapes/2/shape = SubResource( 1 ) +shapes/2/transform = Matrix32( 1, 0, 0, 1, -12.495, 3.53415 ) +shapes/2/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 2 +mass = 1.0 +friction = 0.0 +bounce = 0.0 +gravity_scale = 1.0 +custom_integrator = false +continuous_cd = 0 +contacts_reported = 4 +contact_monitor = false +sleeping = false +can_sleep = true +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +script/script = ExtResource( 1 ) + +[node name="enabler" type="VisibilityEnabler2D" parent="."] + +transform/pos = Vector2( 16.2569, 11.0034 ) +transform/scale = Vector2( 23.5056, 10.8629 ) +rect = Rect2( -10, -10, 20, 20 ) +enabler/pause_animations = true +enabler/freeze_bodies = true +enabler/pause_particles = true +enabler/process_parent = false +enabler/fixed_process_parent = false + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/explode = SubResource( 2 ) +anims/idle = SubResource( 3 ) +anims/walk = SubResource( 4 ) +playback/active = true +playback/speed = 3.0 +blend_times = [ ] +autoplay = "" + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) +hframes = 8 +frame = 4 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( -1.08072, -2.16144 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="CollisionShape2D 2" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 6.48431, 3.24216 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="CollisionShape2D 3" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( -12.495, 3.53415 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="raycast_left" type="RayCast2D" parent="."] + +transform/pos = Vector2( -33.2868, -9.34363 ) +enabled = true +cast_to = Vector2( 0, 45 ) +layer_mask = 1 +type_mask = 15 + +[node name="raycast_right" type="RayCast2D" parent="."] + +transform/pos = Vector2( 29.1987, -9.34363 ) +enabled = true +cast_to = Vector2( 0, 45 ) +layer_mask = 1 +type_mask = 15 + +[node name="Particles2D" type="Particles2D" parent="."] + +visibility/self_opacity = 0.121212 +visibility/blend_mode = 1 +config/amount = 32 +config/lifetime = 0.5 +config/emit_timeout = 0.5 +config/emitting = false +config/explosiveness = 0.1 +config/texture = ExtResource( 3 ) +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 90.0 +params/spin_velocity = 2.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 9.8 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 2.0 +params/final_size = 3.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/spin_velocity = 1.0 +color/color_ramp = SubResource( 5 ) + +[node name="sound" type="SamplePlayer2D" parent="."] + +params/volume_db = 0.0 +params/pitch_scale = 1.0 +params/attenuation/min_distance = 1.0 +params/attenuation/max_distance = 2048.0 +params/attenuation/distance_exp = 1.0 +config/polyphony = 3 +config/samples = SubResource( 6 ) +config/pitch_random = 0.0 + + diff --git a/2d/platformer_dcc/engine.cfg b/2d/platformer_dcc/engine.cfg new file mode 100644 index 00000000..07ce583c --- /dev/null +++ b/2d/platformer_dcc/engine.cfg @@ -0,0 +1,42 @@ +[application] + +name="Dynamic Character Control-Based Platformer" +main_scene="res://stage.tscn" +icon="res://icon.png" +name_es="Plataformero" +target_fps="60" + +[display] + +width=800 +height=480 +stretch_mode="2d" +stretch_aspect="keep_height" + +[image_loader] + +repeat=false + +[input] + +move_left=[key(Left), jbutton(0, 14)] +move_right=[key(Right), jbutton(0, 15)] +jump=[key(Up), jbutton(0, 0)] +shoot=[key(Space), jbutton(0, 2)] +spawn=[key(F1), jbutton(0, 11)] + +[physics_2d] + +default_gravity=700 + +[rasterizer] + +use_pixel_snap=true + +[render] + +mipmap_policy=1 + +[texture_import] + +filter=false diff --git a/2d/platformer_dcc/engine.cfg~ b/2d/platformer_dcc/engine.cfg~ new file mode 100644 index 00000000..dddef264 --- /dev/null +++ b/2d/platformer_dcc/engine.cfg~ @@ -0,0 +1,42 @@ +[application] + +name="Platformer" +main_scene="res://stage.tscn" +icon="res://icon.png" +name_es="Plataformero" +target_fps="60" + +[display] + +width=800 +height=480 +stretch_mode="2d" +stretch_aspect="keep_height" + +[image_loader] + +repeat=false + +[input] + +move_left=[key(Left), jbutton(0, 14)] +move_right=[key(Right), jbutton(0, 15)] +jump=[key(Up), jbutton(0, 0)] +shoot=[key(Space), jbutton(0, 2)] +spawn=[key(F1), jbutton(0, 11)] + +[physics_2d] + +default_gravity=700 + +[rasterizer] + +use_pixel_snap=true + +[render] + +mipmap_policy=1 + +[texture_import] + +filter=false diff --git a/2d/platformer_dcc/icon.png b/2d/platformer_dcc/icon.png new file mode 100644 index 00000000..da2c08eb Binary files /dev/null and b/2d/platformer_dcc/icon.png differ diff --git a/2d/platformer_dcc/moving_platform.gd b/2d/platformer_dcc/moving_platform.gd new file mode 100644 index 00000000..21c312d5 --- /dev/null +++ b/2d/platformer_dcc/moving_platform.gd @@ -0,0 +1,20 @@ + +extends Node2D + +# Member variables +export var motion = Vector2() +export var cycle = 1.0 +var accum = 0.0 + + +func _fixed_process(delta): + accum += delta*(1.0/cycle)*PI*2.0 + accum = fmod(accum, PI*2.0) + var d = sin(accum) + var xf = Matrix32() + xf[2]= motion*d + get_node("platform").set_transform(xf) + + +func _ready(): + set_fixed_process(true) diff --git a/2d/platformer_dcc/moving_platform.png b/2d/platformer_dcc/moving_platform.png new file mode 100644 index 00000000..f01c6ea3 Binary files /dev/null and b/2d/platformer_dcc/moving_platform.png differ diff --git a/2d/platformer_dcc/moving_platform.tscn b/2d/platformer_dcc/moving_platform.tscn new file mode 100644 index 00000000..c6269d6e --- /dev/null +++ b/2d/platformer_dcc/moving_platform.tscn @@ -0,0 +1,52 @@ +[gd_scene load_steps=4 format=1] + +[ext_resource path="res://moving_platform.gd" type="Script" id=1] +[ext_resource path="res://moving_platform.png" type="Texture" id=2] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -88, 24, -88, -24, 88, -24, 88, 24 ) + +[node name="moving_platform" type="Node2D"] + +script/script = ExtResource( 1 ) +motion = Vector2( 0, 0 ) +cycle = 1.0 + +[node name="platform" type="RigidBody2D" parent="."] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 3 +mass = 1.0 +friction = 1.0 +bounce = 0.0 +gravity_scale = 1.0 +custom_integrator = false +continuous_cd = 0 +contacts_reported = 0 +contact_monitor = false +sleeping = false +can_sleep = true +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 + +[node name="Sprite" type="Sprite" parent="platform"] + +texture = ExtResource( 2 ) + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform"] + +build_mode = 0 +polygon = Vector2Array( -88, -24, 88, -24, 88, 24, -88, 24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + + diff --git a/2d/platformer_dcc/music.ogg b/2d/platformer_dcc/music.ogg new file mode 100644 index 00000000..ed3e9f0a Binary files /dev/null and b/2d/platformer_dcc/music.ogg differ diff --git a/2d/platformer_dcc/one_way_platform.png b/2d/platformer_dcc/one_way_platform.png new file mode 100644 index 00000000..b5eca877 Binary files /dev/null and b/2d/platformer_dcc/one_way_platform.png differ diff --git a/2d/platformer_dcc/one_way_platform.tscn b/2d/platformer_dcc/one_way_platform.tscn new file mode 100644 index 00000000..88c4b0d6 --- /dev/null +++ b/2d/platformer_dcc/one_way_platform.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=3 format=1] + +[ext_resource path="res://one_way_platform.png" type="Texture" id=1] + +[sub_resource type="RectangleShape2D" id=1] + +custom_solver_bias = 0.0 +extents = Vector2( 100, 10 ) + +[node name="one_way_platform" type="StaticBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 1.46304, -13.1672 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +one_way_collision/direction = Vector2( 0, 1 ) +one_way_collision/max_depth = 20.0 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 1.46304, -13.1672 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + + diff --git a/2d/platformer_dcc/osb_fire.png b/2d/platformer_dcc/osb_fire.png new file mode 100644 index 00000000..6f914cfe Binary files /dev/null and b/2d/platformer_dcc/osb_fire.png differ diff --git a/2d/platformer_dcc/osb_jump.png b/2d/platformer_dcc/osb_jump.png new file mode 100644 index 00000000..72ba032d Binary files /dev/null and b/2d/platformer_dcc/osb_jump.png differ diff --git a/2d/platformer_dcc/osb_left.png b/2d/platformer_dcc/osb_left.png new file mode 100644 index 00000000..b8e08c2c Binary files /dev/null and b/2d/platformer_dcc/osb_left.png differ diff --git a/2d/platformer_dcc/osb_right.png b/2d/platformer_dcc/osb_right.png new file mode 100644 index 00000000..0e5cbb0d Binary files /dev/null and b/2d/platformer_dcc/osb_right.png differ diff --git a/2d/platformer_dcc/parallax_bg.tscn b/2d/platformer_dcc/parallax_bg.tscn new file mode 100644 index 00000000..cf5815e2 --- /dev/null +++ b/2d/platformer_dcc/parallax_bg.tscn @@ -0,0 +1,101 @@ +[gd_scene load_steps=7 format=1] + +[ext_resource path="res://scroll_bg_sky.png" type="Texture" id=1] +[ext_resource path="res://scroll_bg_cloud_1.png" type="Texture" id=2] +[ext_resource path="res://scroll_bg_cloud_2.png" type="Texture" id=3] +[ext_resource path="res://scroll_bg_cloud_3.png" type="Texture" id=4] +[ext_resource path="res://scroll_bg_fg_2.png" type="Texture" id=5] +[ext_resource path="res://scroll_bg_fg_1.png" type="Texture" id=6] + +[node name="parallax_bg" type="ParallaxBackground"] + +layer = -1 +offset = Vector2( 0, 0 ) +rotation = 0.0 +scale = Vector2( 1, 1 ) +scroll/offset = Vector2( 0, 0 ) +scroll/base_offset = Vector2( 0, 0 ) +scroll/base_scale = Vector2( 0.7, 0 ) +scroll/limit_begin = Vector2( 0, 0 ) +scroll/limit_end = Vector2( 0, 0 ) +scroll/ignore_camera_zoom = false + +[node name="sky" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 1, 1 ) +motion/mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="sky"] + +transform/scale = Vector2( 32, 0.94 ) +texture = ExtResource( 1 ) +centered = false + +[node name="clouds" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 0.1, 1 ) +motion/mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 28, 127 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite 2" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 404, 24 ) +texture = ExtResource( 2 ) +centered = false + +[node name="Sprite 3" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 154, 46 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite 4" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 525, 130 ) +texture = ExtResource( 3 ) +centered = false + +[node name="Sprite 5" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 255, 158 ) +texture = ExtResource( 4 ) +centered = false + +[node name="Sprite 6" type="Sprite" parent="clouds"] + +transform/pos = Vector2( 674, 70 ) +texture = ExtResource( 4 ) +centered = false + +[node name="mount_ 2" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 0.2, 1 ) +motion/mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="mount_ 2"] + +transform/pos = Vector2( 0, 225 ) +texture = ExtResource( 5 ) +centered = false +region = true +region_rect = Rect2( 0, 0, 800, 256 ) + +[node name="mount_1" type="ParallaxLayer" parent="."] + +motion/scale = Vector2( 0.4, 1 ) +motion/mirroring = Vector2( 800, 0 ) + +[node name="Sprite" type="Sprite" parent="mount_1"] + +transform/pos = Vector2( 0, 225 ) +texture = ExtResource( 6 ) +centered = false +region = true +region_rect = Rect2( 0, 0, 800, 256 ) + + diff --git a/2d/platformer/plank.png b/2d/platformer_dcc/plank.png similarity index 100% rename from 2d/platformer/plank.png rename to 2d/platformer_dcc/plank.png diff --git a/2d/platformer/plankpin.png b/2d/platformer_dcc/plankpin.png similarity index 100% rename from 2d/platformer/plankpin.png rename to 2d/platformer_dcc/plankpin.png diff --git a/2d/platformer_dcc/player.gd b/2d/platformer_dcc/player.gd new file mode 100644 index 00000000..8cafd8b9 --- /dev/null +++ b/2d/platformer_dcc/player.gd @@ -0,0 +1,232 @@ + +extends RigidBody2D + +# Character Demo, written by Juan Linietsky. +# +# Implementation of a 2D Character controller. +# This implementation uses the physics engine for +# controlling a character, in a very similar way +# than a 3D character controller would be implemented. +# +# Using the physics engine for this has the main +# advantages: +# -Easy to write. +# -Interaction with other physics-based objects is free +# -Only have to deal with the object linear velocity, not position +# -All collision/area framework available +# +# But also has the following disadvantages: +# +# -Objects may bounce a little bit sometimes +# -Going up ramps sends the chracter flying up, small hack is needed. +# -A ray collider is needed to avoid sliding down on ramps and +# undesiderd bumps, small steps and rare numerical precision errors. +# (another alternative may be to turn on friction when the character is not moving). +# -Friction cant be used, so floor velocity must be considered +# for moving platforms. + +# Member variables +var anim = "" +var siding_left = false +var jumping = false +var stopping_jump = false +var shooting = false + +var WALK_ACCEL = 800.0 +var WALK_DEACCEL = 800.0 +var WALK_MAX_VELOCITY = 200.0 +var AIR_ACCEL = 200.0 +var AIR_DEACCEL = 200.0 +var JUMP_VELOCITY = 460 +var STOP_JUMP_FORCE = 900.0 + +var MAX_FLOOR_AIRBORNE_TIME = 0.15 + +var airborne_time = 1e20 +var shoot_time = 1e20 + +var MAX_SHOOT_POSE_TIME = 0.3 + +var bullet = preload("res://bullet.tscn") + +var floor_h_velocity = 0.0 +var enemy + + +func _integrate_forces(s): + var lv = s.get_linear_velocity() + var step = s.get_step() + + var new_anim = anim + var new_siding_left = siding_left + + # Get the controls + var move_left = Input.is_action_pressed("move_left") + var move_right = Input.is_action_pressed("move_right") + var jump = Input.is_action_pressed("jump") + var shoot = Input.is_action_pressed("shoot") + var spawn = Input.is_action_pressed("spawn") + + if spawn: + var e = enemy.instance() + var p = get_pos() + p.y = p.y - 100 + e.set_pos(p) + get_parent().add_child(e) + + # Deapply prev floor velocity + lv.x -= floor_h_velocity + floor_h_velocity = 0.0 + + # Find the floor (a contact with upwards facing collision normal) + var found_floor = false + var floor_index = -1 + + for x in range(s.get_contact_count()): + var ci = s.get_contact_local_normal(x) + if (ci.dot(Vector2(0, -1)) > 0.6): + found_floor = true + floor_index = x + + # A good idea when impementing characters of all kinds, + # compensates for physics imprecission, as well as human reaction delay. + if (shoot and not shooting): + shoot_time = 0 + var bi = bullet.instance() + var ss + if (siding_left): + ss = -1.0 + else: + ss = 1.0 + var pos = get_pos() + get_node("bullet_shoot").get_pos()*Vector2(ss, 1.0) + + bi.set_pos(pos) + get_parent().add_child(bi) + + bi.set_linear_velocity(Vector2(800.0*ss, -80)) + get_node("sprite/smoke").set_emitting(true) + get_node("sound").play("shoot") + PS2D.body_add_collision_exception(bi.get_rid(), get_rid()) # Make bullet and this not collide + else: + shoot_time += step + + if (found_floor): + airborne_time = 0.0 + else: + airborne_time += step # Time it spent in the air + + var on_floor = airborne_time < MAX_FLOOR_AIRBORNE_TIME + + # Process jump + if (jumping): + if (lv.y > 0): + # Set off the jumping flag if going down + jumping = false + elif (not jump): + stopping_jump = true + + if (stopping_jump): + lv.y += STOP_JUMP_FORCE*step + + if (on_floor): + # Process logic when character is on floor + if (move_left and not move_right): + if (lv.x > -WALK_MAX_VELOCITY): + lv.x -= WALK_ACCEL*step + elif (move_right and not move_left): + if (lv.x < WALK_MAX_VELOCITY): + lv.x += WALK_ACCEL*step + else: + var xv = abs(lv.x) + xv -= WALK_DEACCEL*step + if (xv < 0): + xv = 0 + lv.x = sign(lv.x)*xv + + # Check jump + if (not jumping and jump): + lv.y = -JUMP_VELOCITY + jumping = true + stopping_jump = false + get_node("sound").play("jump") + + # Check siding + if (lv.x < 0 and move_left): + new_siding_left = true + elif (lv.x > 0 and move_right): + new_siding_left = false + if (jumping): + new_anim = "jumping" + elif (abs(lv.x) < 0.1): + if (shoot_time < MAX_SHOOT_POSE_TIME): + new_anim = "idle_weapon" + else: + new_anim = "idle" + else: + if (shoot_time < MAX_SHOOT_POSE_TIME): + new_anim = "run_weapon" + else: + new_anim = "run" + else: + # Process logic when the character is in the air + if (move_left and not move_right): + if (lv.x > -WALK_MAX_VELOCITY): + lv.x -= AIR_ACCEL*step + elif (move_right and not move_left): + if (lv.x < WALK_MAX_VELOCITY): + lv.x += AIR_ACCEL*step + else: + var xv = abs(lv.x) + xv -= AIR_DEACCEL*step + if (xv < 0): + xv = 0 + lv.x = sign(lv.x)*xv + + if (lv.y < 0): + if (shoot_time < MAX_SHOOT_POSE_TIME): + new_anim = "jumping_weapon" + else: + new_anim = "jumping" + else: + if (shoot_time < MAX_SHOOT_POSE_TIME): + new_anim = "falling_weapon" + else: + new_anim = "falling" + + # Update siding + if (new_siding_left != siding_left): + if (new_siding_left): + get_node("sprite").set_scale(Vector2(-1, 1)) + else: + get_node("sprite").set_scale(Vector2(1, 1)) + + siding_left = new_siding_left + + # Change animation + if (new_anim != anim): + anim = new_anim + get_node("anim").play(anim) + + shooting = shoot + + # Apply floor velocity + if (found_floor): + floor_h_velocity = s.get_contact_collider_velocity_at_pos(floor_index).x + lv.x += floor_h_velocity + + # Finally, apply gravity and set back the linear velocity + lv += s.get_total_gravity()*step + s.set_linear_velocity(lv) + + +func _ready(): + enemy = ResourceLoader.load("res://enemy.tscn") + +# if !Globals.has_singleton("Facebook"): +# return +# var Facebook = Globals.get_singleton("Facebook") +# var link = Globals.get("facebook/link") +# var icon = Globals.get("facebook/icon") +# var msg = "I just sneezed on your wall! Beat my score and Stop the Running nose!" +# var title = "I just sneezed on your wall!" +# Facebook.post("feed", msg, title, link, icon) diff --git a/2d/platformer_dcc/player.tscn b/2d/platformer_dcc/player.tscn new file mode 100644 index 00000000..77a2e272 --- /dev/null +++ b/2d/platformer_dcc/player.tscn @@ -0,0 +1,330 @@ +[gd_scene load_steps=25 format=1] + +[ext_resource path="res://player.gd" type="Script" id=1] +[ext_resource path="res://robot_demo.png" type="Texture" id=2] +[ext_resource path="res://bullet.png" type="Texture" id=3] +[ext_resource path="res://sound_coin.wav" type="Sample" id=4] +[ext_resource path="res://sound_jump.wav" type="Sample" id=5] +[ext_resource path="res://sound_shoot.wav" type="Sample" id=6] +[ext_resource path="res://osb_left.png" type="Texture" id=7] +[ext_resource path="res://osb_right.png" type="Texture" id=8] +[ext_resource path="res://osb_jump.png" type="Texture" id=9] +[ext_resource path="res://osb_fire.png" type="Texture" id=10] + +[sub_resource type="RayShape2D" id=1] + +custom_solver_bias = 0.5 +length = 20.0 + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -19.902, -24.8691, 19.3625, -24.6056, -0.138023, 16.5036 ) + +[sub_resource type="ColorRamp" id=3] + +offsets = FloatArray( 0, 1 ) +colors = ColorArray( 1, 1, 1, 1, 0, 0, 0, 0.0442478 ) + +[sub_resource type="Animation" id=4] + +resource/name = "crouch" +length = 0.01 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 22 ] } + +[sub_resource type="Animation" id=5] + +resource/name = "falling" +length = 0.01 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 21 ] } + +[sub_resource type="Animation" id=6] + +resource/name = "falling_weapon" +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 26 ] } + +[sub_resource type="Animation" id=7] + +length = 7.0 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 1.25, 1.5, 2, 4.5, 4.75, 5, 5.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1, 1, 1 ), "values":[ 16, 17, 18, 16, 19, 20, 19, 16 ] } + +[sub_resource type="Animation" id=8] + +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 25 ] } + +[sub_resource type="Animation" id=9] + +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5 ), "transitions":FloatArray( 1, 1, 1 ), "values":[ 23, 24, 23 ] } + +[sub_resource type="Animation" id=10] + +length = 0.5 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ 26 ] } + +[sub_resource type="Animation" id=11] + +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 0, 1, 2, 3, 4, 0 ] } + +[sub_resource type="Animation" id=12] + +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 5, 6, 7, 8, 9, 5 ] } + +[sub_resource type="Animation" id=13] + +length = 1.25 +loop = true +step = 0.25 +tracks/0/type = "value" +tracks/0/path = NodePath("sprite:frame") +tracks/0/interp = 1 +tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.25, 0.5, 0.75, 1, 1.25 ), "transitions":FloatArray( 1, 1, 1, 1, 1, 1 ), "values":[ 10, 11, 12, 13, 14, 5 ] } + +[sub_resource type="SampleLibrary" id=14] + +samples/jump = { "db":0.0, "pitch":1.0, "sample":ExtResource( 5 ) } +samples/shoot = { "db":0.0, "pitch":1.0, "sample":ExtResource( 6 ) } +samples/coin = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) } + +[node name="player" type="RigidBody2D"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1.76469, 0.291992, -12.1587 ) +shapes/0/trigger = false +shapes/1/shape = SubResource( 2 ) +shapes/1/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/1/trigger = false +collision/layers = 1 +collision/mask = 1 +mode = 2 +mass = 3.0 +friction = 0.0 +bounce = 0.0 +gravity_scale = 1.0 +custom_integrator = true +continuous_cd = 0 +contacts_reported = 3 +contact_monitor = false +sleeping = false +can_sleep = true +velocity/linear = Vector2( 0, 0 ) +velocity/angular = 0.0 +damp_override/linear = -1.0 +damp_override/angular = -1.0 +script/script = ExtResource( 1 ) + +[node name="sprite" type="Sprite" parent="."] + +texture = ExtResource( 2 ) +vframes = 2 +hframes = 16 + +[node name="smoke" type="Particles2D" parent="sprite"] + +visibility/self_opacity = 0.363636 +visibility/blend_mode = 1 +transform/pos = Vector2( 20.7312, 3.21187 ) +transform/rot = 83.4504 +config/amount = 4 +config/lifetime = 0.3 +config/emit_timeout = 0.3 +config/emitting = false +config/local_space = false +config/explosiveness = 0.1 +config/texture = ExtResource( 3 ) +params/direction = 0.0 +params/spread = 180.0 +params/linear_velocity = 20.0 +params/spin_velocity = 1.0 +params/orbit_velocity = 0.0 +params/gravity_direction = 0.0 +params/gravity_strength = 9.8 +params/radial_accel = 0.0 +params/tangential_accel = 0.0 +params/damping = 0.0 +params/initial_angle = 0.0 +params/initial_size = 2.0 +params/final_size = 2.0 +params/hue_variation = 0.0 +params/anim_speed_scale = 1.0 +params/anim_initial_pos = 0.0 +randomness/spin_velocity = 2.0 +color/color_ramp = SubResource( 3 ) + +[node name="anim" type="AnimationPlayer" parent="."] + +playback/process_mode = 1 +playback/default_blend_time = 0.0 +root/root = NodePath("..") +anims/crouch = SubResource( 4 ) +anims/falling = SubResource( 5 ) +anims/falling_weapon = SubResource( 6 ) +anims/idle = SubResource( 7 ) +anims/idle_weapon = SubResource( 8 ) +anims/jumping = SubResource( 9 ) +anims/jumping_weapon = SubResource( 10 ) +anims/run = SubResource( 11 ) +anims/run_weapon = SubResource( 12 ) +anims/standing_weapon_ready = SubResource( 13 ) +playback/active = true +playback/speed = 2.0 +blend_times = [ ] +autoplay = "" + +[node name="camera" type="Camera2D" parent="."] + +anchor_mode = 1 +rotating = false +current = true +zoom = Vector2( 1, 1 ) +limit/left = 0 +limit/top = 0 +limit/right = 10000000 +limit/bottom = 10000000 +drag_margin/h_enabled = true +drag_margin/v_enabled = true +smoothing/enable = false +smoothing/speed = 5.0 +drag_margin/left = 0.2 +drag_margin/top = 0.2 +drag_margin/right = 0.2 +drag_margin/bottom = 0.2 + +[node name="bullet_shoot" type="Position2D" parent="."] + +transform/pos = Vector2( 31.2428, 4.08784 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] + +transform/pos = Vector2( 0.291992, -12.1587 ) +transform/scale = Vector2( 1, 1.76469 ) +shape = SubResource( 1 ) +trigger = false +_update_shape_index = -1 + +[node name="sound" type="SamplePlayer" parent="."] + +config/polyphony = 1 +config/samples = SubResource( 14 ) +default/volume_db = 0.0 +default/pitch_scale = 1.0 +default/pan = 0.0 +default/depth = 0.0 +default/height = 0.0 +default/filter/type = 0 +default/filter/cutoff = 0.0 +default/filter/resonance = 0.0 +default/filter/gain = 0.0 +default/reverb_room = 2 +default/reverb_send = 0.0 +default/chorus_send = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] + +build_mode = 0 +polygon = Vector2Array( -0.138023, 16.5036, -19.902, -24.8691, 19.3625, -24.6056 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="ui" type="CanvasLayer" parent="."] + +layer = 0 +offset = Vector2( 0, 0 ) +rotation = 0.0 +scale = Vector2( 1, 1 ) + +[node name="left" type="TouchScreenButton" parent="ui"] + +transform/pos = Vector2( 27.7593, 360.87 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 7 ) +pressed = null +bitmask = null +passby_press = true +action = "move_left" +visibility_mode = 1 + +[node name="right" type="TouchScreenButton" parent="ui"] + +transform/pos = Vector2( 121.542, 361.415 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 8 ) +pressed = null +bitmask = null +passby_press = true +action = "move_right" +visibility_mode = 1 + +[node name="jump" type="TouchScreenButton" parent="ui"] + +transform/pos = Vector2( 666.224, 359.02 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 9 ) +pressed = null +bitmask = null +passby_press = false +action = "jump" +visibility_mode = 1 + +[node name="fire" type="TouchScreenButton" parent="ui"] + +transform/pos = Vector2( 668.073, 262.788 ) +transform/scale = Vector2( 1.49157, 1.46265 ) +normal = ExtResource( 10 ) +pressed = null +bitmask = null +passby_press = false +action = "shoot" +visibility_mode = 1 + + diff --git a/2d/platformer_dcc/robot_demo.png b/2d/platformer_dcc/robot_demo.png new file mode 100644 index 00000000..bba8c638 Binary files /dev/null and b/2d/platformer_dcc/robot_demo.png differ diff --git a/2d/platformer_dcc/scroll_bg_cloud_1.png b/2d/platformer_dcc/scroll_bg_cloud_1.png new file mode 100644 index 00000000..728d454b Binary files /dev/null and b/2d/platformer_dcc/scroll_bg_cloud_1.png differ diff --git a/2d/platformer_dcc/scroll_bg_cloud_2.png b/2d/platformer_dcc/scroll_bg_cloud_2.png new file mode 100644 index 00000000..66e0cf2f Binary files /dev/null and b/2d/platformer_dcc/scroll_bg_cloud_2.png differ diff --git a/2d/platformer_dcc/scroll_bg_cloud_3.png b/2d/platformer_dcc/scroll_bg_cloud_3.png new file mode 100644 index 00000000..3586bb40 Binary files /dev/null and b/2d/platformer_dcc/scroll_bg_cloud_3.png differ diff --git a/2d/platformer_dcc/scroll_bg_fg_1.png b/2d/platformer_dcc/scroll_bg_fg_1.png new file mode 100644 index 00000000..e64c446f Binary files /dev/null and b/2d/platformer_dcc/scroll_bg_fg_1.png differ diff --git a/2d/platformer_dcc/scroll_bg_fg_2.png b/2d/platformer_dcc/scroll_bg_fg_2.png new file mode 100644 index 00000000..ef960118 Binary files /dev/null and b/2d/platformer_dcc/scroll_bg_fg_2.png differ diff --git a/2d/platformer_dcc/scroll_bg_sky.png b/2d/platformer_dcc/scroll_bg_sky.png new file mode 100644 index 00000000..04c19651 Binary files /dev/null and b/2d/platformer_dcc/scroll_bg_sky.png differ diff --git a/2d/platformer/seesaw.tscn b/2d/platformer_dcc/seesaw.tscn similarity index 100% rename from 2d/platformer/seesaw.tscn rename to 2d/platformer_dcc/seesaw.tscn diff --git a/2d/platformer_dcc/sound_coin.wav b/2d/platformer_dcc/sound_coin.wav new file mode 100644 index 00000000..e78579f4 Binary files /dev/null and b/2d/platformer_dcc/sound_coin.wav differ diff --git a/2d/platformer_dcc/sound_explode.wav b/2d/platformer_dcc/sound_explode.wav new file mode 100644 index 00000000..229c8539 Binary files /dev/null and b/2d/platformer_dcc/sound_explode.wav differ diff --git a/2d/platformer_dcc/sound_hit.wav b/2d/platformer_dcc/sound_hit.wav new file mode 100644 index 00000000..4fb3b138 Binary files /dev/null and b/2d/platformer_dcc/sound_hit.wav differ diff --git a/2d/platformer_dcc/sound_jump.wav b/2d/platformer_dcc/sound_jump.wav new file mode 100644 index 00000000..e9942e65 Binary files /dev/null and b/2d/platformer_dcc/sound_jump.wav differ diff --git a/2d/platformer_dcc/sound_shoot.wav b/2d/platformer_dcc/sound_shoot.wav new file mode 100644 index 00000000..ad74f328 Binary files /dev/null and b/2d/platformer_dcc/sound_shoot.wav differ diff --git a/2d/platformer_dcc/stage.tscn b/2d/platformer_dcc/stage.tscn new file mode 100644 index 00000000..9709efef --- /dev/null +++ b/2d/platformer_dcc/stage.tscn @@ -0,0 +1,352 @@ +[gd_scene load_steps=10 format=1] + +[ext_resource path="res://tileset.tres" type="TileSet" id=1] +[ext_resource path="res://coin.tscn" type="PackedScene" id=2] +[ext_resource path="res://moving_platform.tscn" type="PackedScene" id=3] +[ext_resource path="res://seesaw.tscn" type="PackedScene" id=4] +[ext_resource path="res://one_way_platform.tscn" type="PackedScene" id=5] +[ext_resource path="res://player.tscn" type="PackedScene" id=6] +[ext_resource path="res://music.ogg" type="AudioStream" id=7] +[ext_resource path="res://enemy.tscn" type="PackedScene" id=8] +[ext_resource path="res://parallax_bg.tscn" type="PackedScene" id=9] + +[node name="stage" type="Node"] + +[node name="tile_map" type="TileMap" parent="."] + +mode = 0 +tile_set = ExtResource( 1 ) +cell/size = Vector2( 64, 64 ) +cell/quadrant_size = 8 +cell/custom_transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +cell/half_offset = 2 +cell/tile_origin = 0 +cell/y_sort = false +collision/use_kinematic = false +collision/friction = 1.0 +collision/bounce = 0.0 +collision/layers = 1 +collision/mask = 1 +occluder/light_mask = 1 +tile_data = IntArray( 0, 2, 70, 536870914, 71, 10, 72, 10, 73, 10, 74, 10, 75, 10, 76, 10, 77, 10, 78, 10, 65536, 2, 65606, 536870914, 65607, 10, 65608, 10, 65609, 10, 65610, 10, 65611, 10, 65612, 10, 65613, 10, 65614, 10, 131072, 2, 131142, 536870914, 131143, 10, 131144, 10, 131145, 10, 131146, 10, 131147, 10, 131148, 10, 131149, 10, 131150, 10, 196608, 2, 196626, 9, 196678, 536870914, 196679, 10, 196680, 10, 196681, 10, 196682, 10, 196683, 10, 196684, 10, 196685, 10, 196686, 10, 262144, 2, 262162, 8, 262214, 536870914, 262215, 10, 262216, 10, 262217, 10, 262218, 10, 262219, 10, 262220, 10, 262221, 10, 262222, 10, 327680, 2, 327697, 536870921, 327698, 7, 327733, 9, 327750, 536870914, 327751, 10, 327752, 10, 327753, 10, 327754, 10, 327755, 10, 327756, 10, 327757, 10, 327758, 10, 393216, 2, 393233, 536870920, 393234, 7, 393257, 9, 393269, 7, 393286, 536870914, 393287, 10, 393288, 10, 393289, 10, 393290, 10, 393291, 10, 393292, 10, 393293, 10, 393294, 10, 458752, 2, 458769, 7, 458770, 8, 458790, 9, 458793, 8, 458805, 8, 458822, 536870914, 458823, 10, 458824, 10, 458825, 10, 458826, 10, 458827, 10, 458828, 10, 458829, 10, 458830, 10, 524288, 4, 524289, 1, 524304, 536870913, 524305, 536870918, 524306, 6, 524307, 5, 524308, 1, 524326, 8, 524329, 7, 524341, 7, 524358, 536870914, 524359, 10, 524360, 10, 524361, 10, 524362, 10, 524363, 10, 524364, 10, 524365, 10, 524366, 10, 589824, 10, 589825, 13, 589840, 536870914, 589841, 10, 589842, 10, 589843, 10, 589844, 2, 589862, 7, 589865, 7, 589876, 536870913, 589877, 6, 589878, 1, 589894, 536870914, 589895, 10, 589896, 10, 589897, 10, 589898, 10, 589899, 10, 589900, 10, 589901, 10, 589902, 10, 655360, 2, 655376, 536870914, 655377, 10, 655378, 10, 655379, 10, 655380, 2, 655398, 7, 655401, 8, 655412, 536870925, 655413, 11, 655414, 13, 655430, 536870914, 655431, 10, 655432, 10, 655433, 10, 655434, 10, 655435, 10, 655436, 10, 655437, 10, 655438, 10, 720896, 2, 720912, 536870914, 720913, 10, 720914, 10, 720915, 10, 720916, 2, 720934, 8, 720937, 7, 720958, 536870913, 720959, 5, 720960, 536870917, 720961, 5, 720962, 5, 720963, 536870917, 720964, 5, 720965, 0, 720966, 536870916, 720967, 10, 720968, 10, 720969, 10, 720970, 10, 720971, 10, 720972, 10, 720973, 10, 720974, 10, 786432, 2, 786437, 9, 786448, 536870914, 786449, 10, 786450, 10, 786451, 10, 786452, 2, 786464, 536870913, 786465, 1, 786470, 7, 786473, 7, 786474, 536870924, 786475, 1, 786494, 536870914, 786495, 10, 786496, 10, 786497, 10, 786498, 10, 786499, 10, 786500, 10, 786501, 10, 786502, 10, 786503, 10, 786504, 10, 786505, 10, 786506, 10, 786507, 10, 786508, 10, 786509, 10, 851968, 2, 851973, 7, 851984, 536870914, 851985, 10, 851986, 10, 851987, 10, 851988, 2, 851996, 536870913, 851997, 1, 852000, 536870914, 852001, 3, 852006, 7, 852009, 536870913, 852011, 2, 852030, 536870914, 852031, 10, 852032, 10, 852033, 10, 852034, 10, 852035, 10, 852036, 10, 852037, 10, 852038, 10, 852039, 10, 852040, 10, 852041, 10, 852042, 10, 852043, 10, 852044, 10, 852045, 10, 917504, 2, 917506, 9, 917509, 7, 917512, 536870921, 917520, 536870925, 917521, 11, 917522, 11, 917523, 11, 917524, 13, 917532, 536870925, 917533, 13, 917536, 536870914, 917537, 4, 917538, 1, 917540, 536870913, 917541, 0, 917542, 1, 917545, 536870914, 917546, 10, 917547, 4, 917548, 1, 917566, 536870914, 917567, 10, 917568, 10, 917569, 10, 917570, 10, 917571, 10, 917572, 10, 917573, 10, 917574, 10, 917575, 10, 917576, 10, 917577, 10, 917578, 10, 917579, 10, 917580, 10, 917581, 10, 983040, 2, 983042, 7, 983045, 7, 983048, 536870920, 983050, 536870913, 983051, 0, 983052, 1, 983064, 536870913, 983065, 1, 983072, 536870914, 983073, 10, 983074, 4, 983075, 0, 983076, 536870916, 983077, 10, 983078, 4, 983079, 536870912, 983080, 536870912, 983081, 536870916, 983082, 10, 983083, 10, 983084, 2, 983095, 9, 983102, 536870914, 983103, 10, 983104, 10, 983105, 10, 983106, 10, 983107, 10, 983108, 10, 983109, 10, 983110, 10, 983111, 10, 983112, 10, 983113, 10, 983114, 10, 983115, 10, 983116, 10, 983117, 10, 1048576, 2, 1048578, 8, 1048581, 8, 1048584, 536870919, 1048586, 536870914, 1048587, 536870922, 1048588, 2, 1048600, 536870925, 1048601, 13, 1048604, 9, 1048608, 536870925, 1048609, 536870923, 1048610, 536870923, 1048611, 536870923, 1048612, 10, 1048613, 10, 1048614, 10, 1048615, 10, 1048616, 10, 1048617, 10, 1048618, 10, 1048619, 10, 1048620, 4, 1048621, 1, 1048630, 536870921, 1048631, 8, 1048638, 536870914, 1048639, 10, 1048640, 10, 1048641, 10, 1048642, 10, 1048643, 10, 1048644, 10, 1048645, 10, 1048646, 10, 1048647, 10, 1048648, 10, 1048649, 10, 1048650, 10, 1048651, 10, 1048652, 10, 1048653, 10, 1114112, 4, 1114113, 0, 1114114, 6, 1114115, 0, 1114116, 0, 1114117, 6, 1114118, 1, 1114120, 536870920, 1114122, 536870925, 1114123, 11, 1114124, 13, 1114128, 536870913, 1114129, 5, 1114130, 536870917, 1114131, 5, 1114132, 0, 1114133, 1, 1114140, 7, 1114141, 536870921, 1114148, 536870914, 1114149, 10, 1114150, 10, 1114151, 10, 1114152, 10, 1114153, 10, 1114154, 10, 1114155, 10, 1114156, 10, 1114157, 2, 1114166, 536870920, 1114167, 8, 1114174, 536870914, 1114175, 10, 1114176, 10, 1114177, 10, 1114178, 10, 1114179, 10, 1114180, 10, 1114181, 10, 1114182, 10, 1114183, 10, 1114184, 10, 1114185, 10, 1114186, 10, 1114187, 10, 1114188, 10, 1179648, 10, 1179649, 10, 1179650, 10, 1179651, 10, 1179652, 10, 1179653, 10, 1179654, 2, 1179656, 536870919, 1179664, 536870915, 1179665, 10, 1179666, 10, 1179667, 10, 1179668, 10, 1179669, 4, 1179670, 12, 1179675, 9, 1179676, 8, 1179677, 8, 1179684, 536870914, 1179685, 10, 1179686, 10, 1179687, 10, 1179688, 10, 1179689, 10, 1179690, 10, 1179691, 10, 1179692, 10, 1179693, 4, 1179694, 1, 1179701, 9, 1179702, 536870919, 1179703, 7, 1179710, 536870914, 1179711, 10, 1179712, 10, 1179713, 10, 1179714, 10, 1179715, 10, 1179716, 10, 1179717, 10, 1179718, 10, 1179719, 10, 1179720, 10, 1179721, 10, 1179722, 10, 1245184, 10, 1245185, 10, 1245186, 10, 1245187, 10, 1245188, 10, 1245189, 10, 1245190, 2, 1245192, 536870919, 1245199, 536870913, 1245200, 536870916, 1245201, 10, 1245202, 10, 1245203, 10, 1245204, 10, 1245205, 10, 1245207, 1, 1245211, 7, 1245212, 7, 1245213, 536870920, 1245220, 536870914, 1245221, 10, 1245222, 10, 1245223, 10, 1245224, 10, 1245225, 10, 1245226, 10, 1245227, 10, 1245228, 10, 1245229, 10, 1245230, 2, 1245237, 8, 1245238, 536870919, 1245239, 8, 1245240, 536870921, 1245246, 536870914, 1245247, 10, 1245248, 10, 1245249, 10, 1245250, 10, 1245251, 10, 1245252, 10, 1245253, 10, 1245254, 10, 1245255, 10, 1245256, 10, 1245257, 10, 1245258, 10, 1310720, 10, 1310721, 10, 1310722, 10, 1310723, 10, 1310724, 10, 1310725, 10, 1310726, 2, 1310728, 536870920, 1310730, 536870913, 1310731, 1, 1310734, 536870913, 1310735, 536870916, 1310736, 10, 1310737, 10, 1310738, 10, 1310739, 10, 1310740, 10, 1310741, 10, 1310742, 10, 1310743, 4, 1310744, 1, 1310747, 8, 1310748, 7, 1310749, 536870919, 1310756, 536870914, 1310757, 10, 1310758, 10, 1310759, 10, 1310760, 10, 1310761, 10, 1310762, 10, 1310763, 10, 1310764, 10, 1310765, 10, 1310766, 4, 1310767, 5, 1310768, 12, 1310773, 7, 1310774, 536870919, 1310775, 7, 1310776, 536870919, 1310782, 536870914, 1310783, 10, 1310784, 10, 1310785, 10, 1310786, 10, 1310787, 10, 1310788, 10, 1310789, 10, 1310790, 10, 1310791, 10, 1310792, 10, 1310793, 10, 1376256, 10, 1376257, 10, 1376258, 10, 1376259, 10, 1376260, 10, 1376261, 10, 1376262, 4, 1376263, 0, 1376264, 0, 1376265, 0, 1376266, 536870916, 1376267, 4, 1376268, 0, 1376269, 0, 1376270, 536870916, 1376271, 10, 1376272, 10, 1376273, 10, 1376274, 10, 1376275, 10, 1376276, 10, 1376277, 10, 1376278, 10, 1376279, 10, 1376280, 4, 1376281, 12, 1376283, 8, 1376284, 8, 1376285, 536870920, 1376287, 536870924, 1376288, 0, 1376289, 5, 1376290, 536870917, 1376291, 0, 1376292, 536870916, 1376293, 10, 1376294, 10, 1376295, 10, 1376296, 10, 1376297, 10, 1376298, 10, 1376299, 10, 1376300, 10, 1376301, 10, 1376302, 10, 1376303, 10, 1376305, 12, 1376309, 7, 1376310, 536870920, 1376311, 7, 1376312, 536870920, 1376318, 536870914, 1376319, 10, 1376320, 10, 1376321, 10, 1376322, 10, 1376323, 10, 1376324, 10, 1376325, 10, 1376326, 10, 1376327, 10, 1376328, 10, 1441792, 10, 1441793, 10, 1441794, 10, 1441795, 10, 1441796, 10, 1441797, 10, 1441798, 10, 1441799, 10, 1441800, 10, 1441801, 10, 1441802, 10, 1441803, 10, 1441804, 10, 1441805, 10, 1441806, 10, 1441807, 10, 1441808, 10, 1441809, 10, 1441810, 10, 1441811, 10, 1441812, 10, 1441813, 10, 1441814, 10, 1441815, 10, 1441816, 10, 1441818, 0, 1441819, 6, 1441820, 6, 1441821, 536870918, 1441822, 5, 1441824, 10, 1441825, 10, 1441826, 10, 1441827, 10, 1441828, 10, 1441829, 10, 1441830, 10, 1441831, 10, 1441832, 10, 1441833, 10, 1441834, 10, 1441835, 10, 1441836, 10, 1441837, 10, 1441838, 10, 1441839, 10, 1441840, 10, 1441842, 0, 1441843, 0, 1441844, 0, 1441845, 6, 1441846, 536870918, 1441847, 6, 1441848, 536870918, 1441849, 0, 1441850, 5, 1441851, 536870917, 1441852, 5, 1441853, 0, 1441854, 536870916, 1441855, 10, 1441856, 10, 1441857, 10, 1441858, 10, 1441859, 10, 1441860, 10, 1441861, 10, 1441862, 10, 1441863, 10, 1507328, 10, 1507329, 10, 1507330, 10, 1507331, 10, 1507332, 10, 1507333, 10, 1507334, 10, 1507335, 10, 1507336, 10, 1507337, 10, 1507338, 10, 1507339, 10, 1507340, 10, 1507341, 10, 1507342, 10, 1507343, 10, 1507344, 10, 1507345, 10, 1507346, 10, 1507347, 10, 1507348, 10, 1507349, 10, 1507350, 10, 1507351, 10, 1507352, 10, 1507353, 10, 1507354, 10, 1507355, 10, 1507356, 10, 1507357, 10, 1507358, 10, 1507359, 10, 1507360, 10, 1507361, 10, 1507362, 10, 1507363, 10, 1507364, 10, 1507365, 10, 1507366, 10, 1507367, 10, 1507368, 10, 1507369, 10, 1507370, 10, 1507371, 10, 1507372, 10, 1507373, 10, 1507374, 10, 1507375, 10, 1507376, 10, 1507377, 10, 1507378, 10, 1507379, 10, 1507380, 10, 1507381, 10, 1507382, 10, 1507383, 10, 1507384, 10, 1507385, 10, 1507386, 10, 1507387, 10, 1507388, 10, 1507389, 10, 1507390, 10, 1507391, 10, 1507392, 10, 1507393, 10, 1507394, 10, 1507395, 10, 1507396, 10, 1507397, 10, 1507398, 10, 1507399, 10, 1572864, 10, 1572865, 10, 1572866, 10, 1572867, 10, 1572868, 10, 1572869, 10, 1572870, 10, 1572871, 10, 1572872, 10, 1572873, 10, 1572874, 10, 1572875, 10, 1572876, 10, 1572877, 10, 1572878, 10, 1572879, 10, 1572880, 10, 1572881, 10, 1572882, 10, 1572883, 10, 1572884, 10, 1572885, 10, 1572886, 10, 1572887, 10, 1572888, 10, 1572889, 10, 1572890, 10, 1572891, 10, 1572892, 10, 1572893, 10, 1572894, 10, 1572895, 10, 1572896, 10, 1572897, 10, 1572898, 10, 1572899, 10, 1572900, 10, 1572901, 10, 1572902, 10, 1572903, 10, 1572904, 10, 1572905, 10, 1572906, 10, 1572907, 10, 1572908, 10, 1572909, 10, 1572910, 10, 1572911, 10, 1572912, 10, 1572913, 10, 1572914, 10, 1572915, 10, 1572916, 10, 1572917, 10, 1572918, 10, 1572919, 10, 1572920, 10, 1572921, 10, 1572922, 10, 1572923, 10, 1572924, 10, 1572925, 10, 1572926, 10, 1572927, 10, 1572928, 10, 1572929, 10, 1572930, 10, 1572931, 10, 1572932, 10, 1572933, 10, 1572934, 10, 1572935, 10, 1638400, 10, 1638401, 10, 1638402, 10, 1638403, 10, 1638404, 10, 1638405, 10, 1638406, 10, 1638407, 10, 1638408, 10, 1638409, 10, 1638410, 10, 1638411, 10, 1638412, 10, 1638413, 10, 1638414, 10, 1638415, 10, 1638416, 10, 1638417, 10, 1638418, 10, 1638419, 10, 1638420, 10, 1638421, 10, 1638422, 10, 1638423, 10, 1638424, 10, 1638425, 10, 1638426, 10, 1638427, 10, 1638428, 10, 1638429, 10, 1638430, 10, 1638431, 10, 1638432, 10, 1638433, 10, 1638434, 10, 1638435, 10, 1638436, 10, 1638437, 10, 1638438, 10, 1638439, 10, 1638440, 10, 1638441, 10, 1638442, 10, 1638443, 10, 1638444, 10, 1638445, 10, 1638446, 10, 1638447, 10, 1638448, 10, 1638449, 10, 1638450, 10, 1638451, 10, 1638452, 10, 1638453, 10, 1638454, 10, 1638455, 10, 1638456, 10, 1638457, 10, 1638458, 10, 1638459, 10, 1638460, 10, 1638461, 10, 1638462, 10, 1638463, 10, 1638464, 10, 1638465, 10, 1638466, 10, 1638467, 10, 1638468, 10, 1638469, 10, 1638470, 10, 1638471, 10, 1703952, 10, 1703953, 10, 1703954, 10, 1703955, 10, 1703956, 10, 1703957, 10, 1703958, 10, 1703959, 10, 1703960, 10, 1703961, 10, 1703962, 10, 1703963, 10, 1703964, 10, 1703965, 10, 1703966, 10, 1703967, 10, 1703968, 10, 1703969, 10, 1703970, 10, 1703971, 10, 1703972, 10, 1703973, 10, 1703974, 10, 1703975, 10, 1703976, 10, 1703977, 10, 1703978, 10, 1703979, 10, 1703980, 10, 1703981, 10, 1703982, 10, 1703983, 10, 1703984, 10, 1703985, 10, 1703986, 10, 1703987, 10, 1703988, 10, 1703989, 10, 1703990, 10, 1703991, 10, 1703992, 10, 1703993, 10, 1703994, 10, 1703995, 10, 1703996, 10, 1703997, 10, 1703998, 10, 1703999, 10, 1704000, 10, 1704001, 10, 1704002, 10, 1704003, 10, 1704004, 10, 1704005, 10, 1704006, 10, 1704007, 10, 1769488, 10, 1769489, 10, 1769490, 10, 1769491, 10, 1769492, 10, 1769493, 10, 1769494, 10, 1769495, 10, 1769496, 10, 1769497, 10, 1769498, 10, 1769499, 10, 1769500, 10, 1769501, 10, 1769502, 10, 1769503, 10, 1769504, 10, 1769505, 10, 1769506, 10, 1769507, 10, 1769508, 10, 1769509, 10, 1769510, 10, 1769511, 10, 1769512, 10, 1769513, 10, 1769514, 10, 1769515, 10, 1769516, 10, 1769517, 10, 1769518, 10, 1769519, 10, 1769520, 10, 1769521, 10, 1769522, 10, 1769523, 10, 1769524, 10, 1769525, 10, 1769526, 10, 1769527, 10, 1769528, 10, 1769529, 10, 1769530, 10, 1769531, 10, 1769532, 10, 1769533, 10, 1769534, 10, 1769535, 10, 1769536, 10, 1769537, 10, 1769538, 10, 1769539, 10, 1769540, 10, 1769541, 10 ) +__meta__ = { "_edit_lock_":true } + +[node name="coins" type="Node" parent="."] + +[node name="coin" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 672, 1179 ) +linear_damp = 0.1 + +[node name="coin 2" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 704, 1179 ) +linear_damp = 0.1 + +[node name="coin 3" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 736, 1179 ) +linear_damp = 0.1 + +[node name="coin 4" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1120, 992 ) +linear_damp = 0.1 + +[node name="coin 5" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1152, 992 ) +linear_damp = 0.1 + +[node name="coin 6" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1184, 992 ) +linear_damp = 0.1 + +[node name="coin 7" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1216, 992 ) +linear_damp = 0.1 + +[node name="coin 8" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1248, 992 ) +linear_damp = 0.1 + +[node name="coin 9" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1568, 864 ) +linear_damp = 0.1 + +[node name="coin 10" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1632, 864 ) +linear_damp = 0.1 + +[node name="coin 11" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1824, 768 ) +linear_damp = 0.1 + +[node name="coin 12" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1888, 768 ) +linear_damp = 0.1 + +[node name="coin 13" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 2080, 672 ) +linear_damp = 0.1 + +[node name="coin 14" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 2144, 672 ) +linear_damp = 0.1 + +[node name="coin 15" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1792, 1248 ) +linear_damp = 0.1 + +[node name="coin 16" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1856, 1248 ) +linear_damp = 0.1 + +[node name="coin 17" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1920, 1248 ) +linear_damp = 0.1 + +[node name="coin 18" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1920, 1184 ) +linear_damp = 0.1 + +[node name="coin 19" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1856, 1184 ) +linear_damp = 0.1 + +[node name="coin 20" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 1792, 1184 ) +linear_damp = 0.1 + +[node name="coin 21" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 98.8868, 488.515 ) +linear_damp = 0.1 + +[node name="coin 22" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 89.5989, 481.217 ) +linear_damp = 0.1 + +[node name="coin 23" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 108.175, 481.217 ) +linear_damp = 0.1 + +[node name="coin 24" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 116.136, 469.939 ) +linear_damp = 0.1 + +[node name="coin 25" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 117.463, 457.997 ) +linear_damp = 0.1 + +[node name="coin 26" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 106.184, 449.373 ) +linear_damp = 0.1 + +[node name="coin 27" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 98.2234, 458.661 ) +linear_damp = 0.1 + +[node name="coin 28" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 88.272, 448.71 ) +linear_damp = 0.1 + +[node name="coin 29" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 79.6476, 457.334 ) +linear_damp = 0.1 + +[node name="coin 30" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 82.9647, 468.612 ) +linear_damp = 0.1 + +[node name="coin 31" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3357.42, 465.288 ) +linear_damp = 0.1 + +[node name="coin 31 2" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3421.42, 465.288 ) +linear_damp = 0.1 + +[node name="coin 31 3" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3485.42, 465.288 ) +linear_damp = 0.1 + +[node name="coin 31 4" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3485.42, 401.288 ) +linear_damp = 0.1 + +[node name="coin 31 5" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3421.42, 401.288 ) +linear_damp = 0.1 + +[node name="coin 31 6" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 3357.42, 401.288 ) +linear_damp = 0.1 + +[node name="coin 32" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4172.75, 605.058 ) +linear_damp = 0.1 + +[node name="coin 31 7" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4236.75, 605.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 2" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4300.75, 605.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 3" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4300.75, 541.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 4" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4236.75, 541.058 ) +linear_damp = 0.1 + +[node name="coin 31 7 5" parent="coins" instance=ExtResource( 2 )] + +transform/pos = Vector2( 4172.75, 541.058 ) +linear_damp = 0.1 + +[node name="props" type="Node" parent="."] + +[node name="moving_platform" parent="props" instance=ExtResource( 3 )] + +transform/pos = Vector2( 1451.86, 742.969 ) +motion = Vector2( 0, 140 ) +cycle = 5.0 + +[node name="moving_platform 2" parent="props" instance=ExtResource( 3 )] + +transform/pos = Vector2( 624.824, 545.544 ) +motion = Vector2( 300, 0 ) +cycle = 10.0 + +[node name="moving_platform 3" parent="props" instance=ExtResource( 3 )] + +transform/pos = Vector2( 3419.86, 739.662 ) +motion = Vector2( 450, 0 ) +cycle = 10.0 + +[node name="seesaw" parent="props" instance=ExtResource( 4 )] + +transform/pos = Vector2( 2402.79, 849.52 ) + +[node name="one_way_platform" parent="props" instance=ExtResource( 5 )] + +transform/pos = Vector2( 927.698, 1120.81 ) + +[node name="player" parent="." instance=ExtResource( 6 )] + +transform/pos = Vector2( 251.684, 1045.6 ) + +[node name="music" type="StreamPlayer" parent="."] + +stream/stream = ExtResource( 7 ) +stream/play = false +stream/loop = true +stream/volume_db = 2.0 +stream/autoplay = true +stream/paused = false +stream/loop_restart_time = 0.0 +stream/buffering_ms = 500 + +[node name="enemies" type="Node" parent="."] + +[node name="enemy 5" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 834.664, 1309.6 ) + +[node name="enemy 6" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 707.665, 1225.05 ) + +[node name="enemy 7" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1125.21, 1053.06 ) + +[node name="enemy 8" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1292.11, 1059.24 ) + +[node name="enemy 9" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1607.38, 923.239 ) + +[node name="enemy 10" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 2586.9, 939.059 ) + +[node name="enemy 11" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1457.6, 688.741 ) + +[node name="enemy 12" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 1193.63, 460.381 ) + +[node name="enemy 13" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 3429.73, 540.865 ) + +[node name="enemy 14" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 3546.2, 1356.19 ) + +[node name="enemy 15" parent="enemies" instance=ExtResource( 8 )] + +transform/pos = Vector2( 2406.63, 815.115 ) + +[node name="parallax_bg" parent="." instance=ExtResource( 9 )] + +[node name="Label" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 12.0 +margin/top = -202.0 +margin/right = 358.0 +margin/bottom = -10.0 +text = "This is a simple demo on how to make a platformer game with Godot.\"This version uses physics and the 2D physics engine for motion and collision.\"\"The demo also shows the benefits of using the scene system, where coins,\"enemies and the player are edited separatedly and instanced in the stage.\"\"To edit the base tiles for the tileset, open the tileset_edit.tscn file and follow \"instructions.\"" +autowrap = true +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + + diff --git a/2d/platformer_dcc/tiles_demo.png b/2d/platformer_dcc/tiles_demo.png new file mode 100644 index 00000000..bc738e6d Binary files /dev/null and b/2d/platformer_dcc/tiles_demo.png differ diff --git a/2d/platformer_dcc/tiles_demo.png.flags b/2d/platformer_dcc/tiles_demo.png.flags new file mode 100644 index 00000000..efb2b8ce --- /dev/null +++ b/2d/platformer_dcc/tiles_demo.png.flags @@ -0,0 +1 @@ +filter=false diff --git a/2d/platformer_dcc/tileset.tres b/2d/platformer_dcc/tileset.tres new file mode 100644 index 00000000..17b7dd3b --- /dev/null +++ b/2d/platformer_dcc/tileset.tres @@ -0,0 +1,195 @@ +[gd_resource type="TileSet" load_steps=14 format=1] + +[ext_resource path="res://tiles_demo.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 24, -24, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -32, 32, -32, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=5] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=6] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 24, -32, 24 ) + +[sub_resource type="ConvexPolygonShape2D" id=7] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 24, -24, 24, 24, -32, 24 ) + +[sub_resource type="ConvexPolygonShape2D" id=8] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=9] + +custom_solver_bias = 0.0 +points = Vector2Array( -64, 32, -64, -32, -8, -32, -8, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=10] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=11] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=12] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[resource] + +0/name = "floor" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/region = Rect2( 0, 0, 64, 64 ) +0/occluder_offset = Vector2( 32, 32 ) +0/navigation_offset = Vector2( 32, 32 ) +0/shape_offset = Vector2( 32, 32 ) +0/shapes = [ SubResource( 1 ) ] +1/name = "edge" +1/texture = ExtResource( 1 ) +1/tex_offset = Vector2( 0, 0 ) +1/region = Rect2( 64, 0, 64, 64 ) +1/occluder_offset = Vector2( 32, 32 ) +1/navigation_offset = Vector2( 32, 32 ) +1/shape_offset = Vector2( 32, 32 ) +1/shapes = [ SubResource( 2 ) ] +2/name = "wall" +2/texture = ExtResource( 1 ) +2/tex_offset = Vector2( 0, 0 ) +2/region = Rect2( 64, 64, 64, 64 ) +2/occluder_offset = Vector2( 32, 32 ) +2/navigation_offset = Vector2( 32, 32 ) +2/shape_offset = Vector2( 32, 32 ) +2/shapes = [ SubResource( 8 ) ] +3/name = "wall_deco" +3/texture = ExtResource( 1 ) +3/tex_offset = Vector2( 0, 0 ) +3/region = Rect2( 320, 128, 128, 64 ) +3/occluder_offset = Vector2( 64, 32 ) +3/navigation_offset = Vector2( 64, 32 ) +3/shape_offset = Vector2( 64, 32 ) +3/shapes = [ SubResource( 9 ) ] +4/name = "corner" +4/texture = ExtResource( 1 ) +4/tex_offset = Vector2( 0, 0 ) +4/region = Rect2( 64, 128, 64, 64 ) +4/occluder_offset = Vector2( 32, 32 ) +4/navigation_offset = Vector2( 32, 32 ) +4/shape_offset = Vector2( 32, 32 ) +4/shapes = [ SubResource( 10 ) ] +5/name = "flowers" +5/texture = ExtResource( 1 ) +5/tex_offset = Vector2( 0, 0 ) +5/region = Rect2( 192, 192, 64, 64 ) +5/occluder_offset = Vector2( 32, 32 ) +5/navigation_offset = Vector2( 32, 32 ) +5/shape_offset = Vector2( 32, 32 ) +5/shapes = [ SubResource( 11 ) ] +6/name = "tree_base" +6/texture = ExtResource( 1 ) +6/tex_offset = Vector2( 0, 0 ) +6/region = Rect2( 256, 192, 64, 64 ) +6/occluder_offset = Vector2( 32, 32 ) +6/navigation_offset = Vector2( 32, 32 ) +6/shape_offset = Vector2( 32, 32 ) +6/shapes = [ SubResource( 12 ) ] +7/name = "tree_mid" +7/texture = ExtResource( 1 ) +7/tex_offset = Vector2( 0, 0 ) +7/region = Rect2( 256, 128, 64, 64 ) +7/occluder_offset = Vector2( 32, 32 ) +7/navigation_offset = Vector2( 32, 32 ) +7/shape_offset = Vector2( 0, 0 ) +7/shapes = [ ] +8/name = "tree_mid 2" +8/texture = ExtResource( 1 ) +8/tex_offset = Vector2( 0, 0 ) +8/region = Rect2( 256, 64, 64, 64 ) +8/occluder_offset = Vector2( 32, 32 ) +8/navigation_offset = Vector2( 32, 32 ) +8/shape_offset = Vector2( 0, 0 ) +8/shapes = [ ] +9/name = "tree_top" +9/texture = ExtResource( 1 ) +9/tex_offset = Vector2( 0, 0 ) +9/region = Rect2( 256, 0, 64, 64 ) +9/occluder_offset = Vector2( 32, 32 ) +9/navigation_offset = Vector2( 32, 32 ) +9/shape_offset = Vector2( 0, 0 ) +9/shapes = [ ] +10/name = "solid" +10/texture = ExtResource( 1 ) +10/tex_offset = Vector2( 0, 0 ) +10/region = Rect2( 0, 64, 64, 64 ) +10/occluder_offset = Vector2( 32, 32 ) +10/navigation_offset = Vector2( 32, 32 ) +10/shape_offset = Vector2( 0, 0 ) +10/shapes = [ ] +11/name = "ceiling" +11/texture = ExtResource( 1 ) +11/tex_offset = Vector2( 0, 0 ) +11/region = Rect2( 384, 64, 64, 64 ) +11/occluder_offset = Vector2( 32, 32 ) +11/navigation_offset = Vector2( 32, 32 ) +11/shape_offset = Vector2( 32, 32 ) +11/shapes = [ SubResource( 3 ) ] +12/name = "ramp" +12/texture = ExtResource( 1 ) +12/tex_offset = Vector2( 0, 0 ) +12/region = Rect2( 128, 128, 64, 128 ) +12/occluder_offset = Vector2( 32, 64 ) +12/navigation_offset = Vector2( 32, 64 ) +12/shape_offset = Vector2( 32, 64 ) +12/shapes = [ SubResource( 4 ) ] +13/name = "ceiling2wall" +13/texture = ExtResource( 1 ) +13/tex_offset = Vector2( 0, 0 ) +13/region = Rect2( 448, 64, 64, 64 ) +13/occluder_offset = Vector2( 32, 32 ) +13/navigation_offset = Vector2( 32, 32 ) +13/shape_offset = Vector2( 32, 32 ) +13/shapes = [ SubResource( 5 ) ] +14/name = "platform_floor" +14/texture = ExtResource( 1 ) +14/tex_offset = Vector2( 0, 0 ) +14/region = Rect2( 128, 0, 64, 64 ) +14/occluder_offset = Vector2( 32, 32 ) +14/navigation_offset = Vector2( 32, 32 ) +14/shape_offset = Vector2( 32, 32 ) +14/shapes = [ SubResource( 6 ) ] +15/name = "platform_edge" +15/texture = ExtResource( 1 ) +15/tex_offset = Vector2( 0, 0 ) +15/region = Rect2( 192, 0, 64, 64 ) +15/occluder_offset = Vector2( 32, 32 ) +15/navigation_offset = Vector2( 32, 32 ) +15/shape_offset = Vector2( 32, 32 ) +15/shapes = [ SubResource( 7 ) ] + diff --git a/2d/platformer_dcc/tileset_edit.tscn b/2d/platformer_dcc/tileset_edit.tscn new file mode 100644 index 00000000..733fada5 --- /dev/null +++ b/2d/platformer_dcc/tileset_edit.tscn @@ -0,0 +1,432 @@ +[gd_scene load_steps=14 format=1] + +[ext_resource path="res://tiles_demo.png" type="Texture" id=1] + +[sub_resource type="ConvexPolygonShape2D" id=1] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=2] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 24, -24, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=3] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=4] + +custom_solver_bias = 0.0 +points = Vector2Array( -64, 32, -64, -32, -8, -32, -8, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=5] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=6] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=7] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -24, 32, -24, 32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=8] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -32, 32, -32, 32, 32, -32, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=9] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) + +[sub_resource type="ConvexPolygonShape2D" id=10] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, 32, -32, -32, 24, -32, 24, 32 ) + +[sub_resource type="ConvexPolygonShape2D" id=11] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 32, -24, 32, 24, -32, 24 ) + +[sub_resource type="ConvexPolygonShape2D" id=12] + +custom_solver_bias = 0.0 +points = Vector2Array( -32, -24, 24, -24, 24, 24, -32, 24 ) + +[node name="Node" type="Node"] + +[node name="floor" type="Sprite" parent="."] + +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 0, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="floor"] + +input/pickable = false +shapes/0/shape = SubResource( 1 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="floor/collision"] + +build_mode = 0 +polygon = Vector2Array( 32, -24, 32, 32, -32, 32, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="edge" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 0 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 64, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="edge"] + +input/pickable = false +shapes/0/shape = SubResource( 2 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="edge/collision"] + +build_mode = 0 +polygon = Vector2Array( -32, -24, 24, -24, 24, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="wall" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 64 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 64, 64, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="wall"] + +input/pickable = false +shapes/0/shape = SubResource( 3 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="wall/collision"] + +build_mode = 0 +polygon = Vector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="wall_deco" type="Sprite" parent="."] + +transform/pos = Vector2( 96, 128 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 320, 128, 128, 64 ) + +[node name="collision" type="StaticBody2D" parent="wall_deco"] + +input/pickable = false +shapes/0/shape = SubResource( 4 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="wall_deco/collision"] + +build_mode = 0 +polygon = Vector2Array( -64, -32, -8, -32, -8, 32, -64, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="corner" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 64, 128, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="corner"] + +input/pickable = false +shapes/0/shape = SubResource( 5 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="corner/collision"] + +build_mode = 0 +polygon = Vector2Array( -32, -32, 24, -32, 32, -24, 32, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="flowers" type="Sprite" parent="."] + +transform/pos = Vector2( 128, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 192, 192, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="flowers"] + +input/pickable = false +shapes/0/shape = SubResource( 6 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="flowers/collision"] + +build_mode = 0 +polygon = Vector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="tree_base" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 192, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="tree_base"] + +input/pickable = false +shapes/0/shape = SubResource( 7 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="tree_base/collision"] + +build_mode = 0 +polygon = Vector2Array( -32, 32, 32, 32, 32, -24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="tree_mid" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 128 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 128, 64, 64 ) + +[node name="tree_mid 2" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 64 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 64, 64, 64 ) + +[node name="tree_top" type="Sprite" parent="."] + +transform/pos = Vector2( 192, 0 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 256, 0, 64, 64 ) + +[node name="solid" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 64 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 0, 64, 64, 64 ) + +[node name="ceiling" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 128 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 384, 64, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="ceiling"] + +input/pickable = false +shapes/0/shape = SubResource( 8 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ceiling/collision"] + +build_mode = 0 +polygon = Vector2Array( 32, -32, 32, 32, -32, 32, -32, -32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="ramp" type="Sprite" parent="."] + +transform/pos = Vector2( 256, 224 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 128, 128, 64, 128 ) + +[node name="collision" type="StaticBody2D" parent="ramp"] + +input/pickable = false +shapes/0/shape = SubResource( 9 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ramp/collision"] + +build_mode = 0 +polygon = Vector2Array( -32, -56, 32, 8, 32, 64, -32, 64 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="ceiling2wall" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 192 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 448, 64, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="ceiling2wall"] + +input/pickable = false +shapes/0/shape = SubResource( 10 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="ceiling2wall/collision"] + +build_mode = 0 +polygon = Vector2Array( -32, -32, 24, -32, 24, 32, -32, 32 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="platform_floor" type="Sprite" parent="."] + +transform/pos = Vector2( 0, 256 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 128, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="platform_floor"] + +input/pickable = false +shapes/0/shape = SubResource( 11 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform_floor/collision"] + +build_mode = 0 +polygon = Vector2Array( 32, -24, 32, 24, -32, 24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="platform_edge" type="Sprite" parent="."] + +transform/pos = Vector2( 64, 256 ) +texture = ExtResource( 1 ) +region = true +region_rect = Rect2( 192, 0, 64, 64 ) + +[node name="collision" type="StaticBody2D" parent="platform_edge"] + +input/pickable = false +shapes/0/shape = SubResource( 12 ) +shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 ) +shapes/0/trigger = false +collision/layers = 1 +collision/mask = 1 +constant_linear_velocity = Vector2( 0, 0 ) +constant_angular_velocity = 0.0 +friction = 1.0 +bounce = 0.0 + +[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="platform_edge/collision"] + +build_mode = 0 +polygon = Vector2Array( 24, -24, 24, 24, -32, 24, -32, -24 ) +shape_range = Vector2( -1, -1 ) +trigger = false + +[node name="help" type="Label" parent="."] + +focus/ignore_mouse = true +focus/stop_mouse = true +size_flags/horizontal = 2 +margin/left = 1.0 +margin/top = 331.0 +margin/right = 727.0 +margin/bottom = 422.0 +text = "This scene serves as a tool for editing the tileset.\nNodes (sprites) and their respective collisionsare edited here.\n\nTo create a tileset from this, a \"TileSet\" resoucre must be created. Use the helper in: Scene -> Convert To -> TileSet.\nThis will save a tileset. Saving over it will merge your changes.\n\nFinally, the saved tileset resource (tileset.tres in this case), can be opened to be used into a TileMap node for editing a tile map." +percent_visible = 1.0 +lines_skipped = 0 +max_lines_visible = -1 + + diff --git a/visual_script/platformer/moving_platform.vs b/visual_script/platformer/moving_platform.vs index b5b84c0d..3d7a4c1f 100644 Binary files a/visual_script/platformer/moving_platform.vs and b/visual_script/platformer/moving_platform.vs differ diff --git a/visual_script/platformer/player.vs b/visual_script/platformer/player.vs index efb3e386..a3b24fd9 100644 Binary files a/visual_script/platformer/player.vs and b/visual_script/platformer/player.vs differ diff --git a/visual_script/platformer/stage.tscn b/visual_script/platformer/stage.tscn index 96052691..7391420d 100644 --- a/visual_script/platformer/stage.tscn +++ b/visual_script/platformer/stage.tscn @@ -207,38 +207,42 @@ transform/pos = Vector2( 4172.75, 541.058 ) [node name="moving_platform" parent="props" instance=ExtResource( 3 )] transform/pos = Vector2( 1451.86, 742.969 ) -script_variables/motion = Vector2( 0, 1 ) -script_variables/cycle = 5.0 +motion = Vector2( 0, 0 ) +cycle = 1.0 [node name="moving_platform 2" parent="props" instance=ExtResource( 3 )] transform/pos = Vector2( 719.199, 1123.81 ) -script_variables/motion = Vector2( 200, 0 ) -script_variables/cycle = 5.0 +motion = Vector2( 100, 0 ) +cycle = 4.0 [node name="still" parent="props" instance=ExtResource( 3 )] transform/pos = Vector2( 1231.37, 1105.18 ) transform/rot = 9.3572 -script_variables/cycle = 1.0 +motion = Vector2( 0, 0 ) +cycle = 1.0 [node name="still1" parent="props" instance=ExtResource( 3 )] transform/pos = Vector2( 1384.28, 1066.4 ) transform/rot = 18.4436 -script_variables/cycle = 1.0 +motion = Vector2( 0, 0 ) +cycle = 1.0 [node name="still2" parent="props" instance=ExtResource( 3 )] transform/pos = Vector2( 1552.7, 1032.05 ) transform/rot = 4.73782 -script_variables/cycle = 1.0 +motion = Vector2( 0, 0 ) +cycle = 1.0 [node name="still3" parent="props" instance=ExtResource( 3 )] transform/pos = Vector2( 1700.06, 1066.92 ) transform/rot = -31.3979 -script_variables/cycle = 1.0 +motion = Vector2( 0, 0 ) +cycle = 1.0 [node name="one_way_platform" parent="props" instance=ExtResource( 4 )]