From 5eb6b0194e3e1acdcae4c60858229b6e3d2eadc1 Mon Sep 17 00:00:00 2001 From: Sagi Dayan Date: Tue, 10 Nov 2020 08:51:34 -0500 Subject: [PATCH] [WIP] A Stomp hazard --- assets/Tiles/SolidsTileMap.tscn | 106 +++++++++++++++--------------- assets/Tiles/stomp.png | Bin 0 -> 251 bytes assets/Tiles/stomp.png.import | 34 ++++++++++ project.godot | 6 ++ src/Actors/Player.gd | 8 +++ src/Actors/Player.tscn | 4 +- src/GameWorld/Levels/Level.gd | 2 +- src/GameWorld/Levels/PreGame.gd | 3 + src/GameWorld/Levels/PreGame.tscn | 26 +++++--- src/Hazards/SpikeTrap.gd | 1 + src/Hazards/SpikeTrap.tscn | 7 +- src/Hazards/Stomp.gd | 48 ++++++++++++++ src/Hazards/Stomp.tscn | 57 ++++++++++++++++ 13 files changed, 235 insertions(+), 67 deletions(-) create mode 100644 assets/Tiles/stomp.png create mode 100644 assets/Tiles/stomp.png.import create mode 100644 src/Hazards/Stomp.gd create mode 100644 src/Hazards/Stomp.tscn diff --git a/assets/Tiles/SolidsTileMap.tscn b/assets/Tiles/SolidsTileMap.tscn index 998126b..be6a5a0 100644 --- a/assets/Tiles/SolidsTileMap.tscn +++ b/assets/Tiles/SolidsTileMap.tscn @@ -2,106 +2,106 @@ [ext_resource path="res://assets/Tiles/tileset.png" type="Texture" id=1] -[sub_resource type="OccluderPolygon2D" id=53] +[sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( 16, 16, 4.51224, 16, 4.51224, 5.0704, 16, 5.0704 ) -[sub_resource type="OccluderPolygon2D" id=54] +[sub_resource type="OccluderPolygon2D" id=2] polygon = PoolVector2Array( 16, 16, 4.4869, 16, 4.4869, 0, 16, 0 ) -[sub_resource type="OccluderPolygon2D" id=57] +[sub_resource type="OccluderPolygon2D" id=3] polygon = PoolVector2Array( 16, 0, 4.4869, 0, 4.4869, 10.994, 16, 10.994 ) -[sub_resource type="OccluderPolygon2D" id=55] +[sub_resource type="OccluderPolygon2D" id=4] polygon = PoolVector2Array( 16, 16, 0, 16, 0, 5.14114, 16, 5.2346 ) -[sub_resource type="OccluderPolygon2D" id=58] +[sub_resource type="OccluderPolygon2D" id=5] polygon = PoolVector2Array( 0, 16, 16, 16, 16, 0, 0, 0 ) -[sub_resource type="OccluderPolygon2D" id=59] +[sub_resource type="OccluderPolygon2D" id=6] polygon = PoolVector2Array( 16, 0, 0, 0, 0, 11.0875, 16, 11.0875 ) -[sub_resource type="OccluderPolygon2D" id=56] +[sub_resource type="OccluderPolygon2D" id=7] polygon = PoolVector2Array( 11.9286, 15.9829, 0, 16, 0, 5.32807, 11.8352, 5.32807 ) -[sub_resource type="OccluderPolygon2D" id=60] +[sub_resource type="OccluderPolygon2D" id=8] polygon = PoolVector2Array( 0, 0, 11.8352, 0, 11.7417, 16, 0, 16 ) -[sub_resource type="OccluderPolygon2D" id=61] +[sub_resource type="OccluderPolygon2D" id=9] polygon = PoolVector2Array( 11.5548, 0, 0, 0, 0, 11.0875, 11.5548, 11.0875 ) -[sub_resource type="OccluderPolygon2D" id=62] +[sub_resource type="OccluderPolygon2D" id=10] polygon = PoolVector2Array( 0, 0, 16, 0, 16, 11.4032, 12.8456, 11.4032, 11.6306, 11.4032, 11.724, 16, 0, 16, 0, 0 ) -[sub_resource type="OccluderPolygon2D" id=63] +[sub_resource type="OccluderPolygon2D" id=11] polygon = PoolVector2Array( 11.6306, 16, 0, 16, 0, 0, 11.6306, 0 ) -[sub_resource type="OccluderPolygon2D" id=64] +[sub_resource type="OccluderPolygon2D" id=12] polygon = PoolVector2Array( 11.4436, 0, 11.5371, 4.45152, 16, 4.54499, 16, 16, 0, 16, 0, 0 ) -[sub_resource type="OccluderPolygon2D" id=65] +[sub_resource type="OccluderPolygon2D" id=13] polygon = PoolVector2Array( 16, 0, 0, 0, 0, 11.2163, 16, 11.2163 ) -[sub_resource type="OccluderPolygon2D" id=66] +[sub_resource type="OccluderPolygon2D" id=14] polygon = PoolVector2Array( 16, 16, 0, 16, 0, 4.63845, 16, 4.63845 ) -[sub_resource type="OccluderPolygon2D" id=67] +[sub_resource type="OccluderPolygon2D" id=15] polygon = PoolVector2Array( 0, 11.4032, 0, 0, 16, 0, 16, 16, 3.18344, 16, 3.08997, 11.3097 ) -[sub_resource type="OccluderPolygon2D" id=68] +[sub_resource type="OccluderPolygon2D" id=16] polygon = PoolVector2Array( 16, 16, 3.08997, 16, 3.08997, 0, 16, 0 ) -[sub_resource type="OccluderPolygon2D" id=69] +[sub_resource type="OccluderPolygon2D" id=17] polygon = PoolVector2Array( 0, 4.73192, 0, 4.73192, 3.18344, 4.73192, 3.18344, 0, 16, 0, 15.8945, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=36] +[sub_resource type="ConvexPolygonShape2D" id=18] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=37] +[sub_resource type="ConvexPolygonShape2D" id=19] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=38] +[sub_resource type="ConvexPolygonShape2D" id=20] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=39] +[sub_resource type="ConvexPolygonShape2D" id=21] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=40] +[sub_resource type="ConvexPolygonShape2D" id=22] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=41] +[sub_resource type="ConvexPolygonShape2D" id=23] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=42] +[sub_resource type="ConvexPolygonShape2D" id=24] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=43] +[sub_resource type="ConvexPolygonShape2D" id=25] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=44] +[sub_resource type="ConvexPolygonShape2D" id=26] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=45] +[sub_resource type="ConvexPolygonShape2D" id=27] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=46] +[sub_resource type="ConvexPolygonShape2D" id=28] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=47] +[sub_resource type="ConvexPolygonShape2D" id=29] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=48] +[sub_resource type="ConvexPolygonShape2D" id=30] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=49] +[sub_resource type="ConvexPolygonShape2D" id=31] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=50] +[sub_resource type="ConvexPolygonShape2D" id=32] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=51] +[sub_resource type="ConvexPolygonShape2D" id=33] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) -[sub_resource type="ConvexPolygonShape2D" id=52] +[sub_resource type="ConvexPolygonShape2D" id=34] points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) [sub_resource type="TileSet" id=35] @@ -116,7 +116,7 @@ points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) 0/autotile/icon_coordinate = Vector2( 1, 0 ) 0/autotile/tile_size = Vector2( 16, 16 ) 0/autotile/spacing = 0 -0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 53 ), Vector2( 0, 1 ), SubResource( 54 ), Vector2( 0, 2 ), SubResource( 57 ), Vector2( 1, 0 ), SubResource( 55 ), Vector2( 1, 1 ), SubResource( 58 ), Vector2( 1, 2 ), SubResource( 59 ), Vector2( 2, 0 ), SubResource( 56 ), Vector2( 2, 1 ), SubResource( 60 ), Vector2( 2, 2 ), SubResource( 61 ), Vector2( 3, 0 ), SubResource( 62 ), Vector2( 3, 1 ), SubResource( 63 ), Vector2( 3, 2 ), SubResource( 64 ), Vector2( 4, 0 ), SubResource( 65 ), Vector2( 4, 2 ), SubResource( 66 ), Vector2( 5, 0 ), SubResource( 67 ), Vector2( 5, 1 ), SubResource( 68 ), Vector2( 5, 2 ), SubResource( 69 ) ] +0/autotile/occluder_map = [ Vector2( 0, 0 ), SubResource( 1 ), Vector2( 0, 1 ), SubResource( 2 ), Vector2( 0, 2 ), SubResource( 3 ), Vector2( 1, 0 ), SubResource( 4 ), Vector2( 1, 1 ), SubResource( 5 ), Vector2( 1, 2 ), SubResource( 6 ), Vector2( 2, 0 ), SubResource( 7 ), Vector2( 2, 1 ), SubResource( 8 ), Vector2( 2, 2 ), SubResource( 9 ), Vector2( 3, 0 ), SubResource( 10 ), Vector2( 3, 1 ), SubResource( 11 ), Vector2( 3, 2 ), SubResource( 12 ), Vector2( 4, 0 ), SubResource( 13 ), Vector2( 4, 2 ), SubResource( 14 ), Vector2( 5, 0 ), SubResource( 15 ), Vector2( 5, 1 ), SubResource( 16 ), Vector2( 5, 2 ), SubResource( 17 ) ] 0/autotile/navpoly_map = [ ] 0/autotile/priority_map = [ ] 0/autotile/z_index_map = [ ] @@ -124,110 +124,110 @@ points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 ) 0/navigation_offset = Vector2( 0, 0 ) 0/shape_offset = Vector2( 0, 0 ) 0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape = SubResource( 36 ) +0/shape = SubResource( 18 ) 0/shape_one_way = false 0/shape_one_way_margin = 1.0 0/shapes = [ { "autotile_coord": Vector2( 0, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 36 ), +"shape": SubResource( 18 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 1, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 37 ), +"shape": SubResource( 19 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 2, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 38 ), +"shape": SubResource( 20 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 0, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 39 ), +"shape": SubResource( 21 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 1, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 40 ), +"shape": SubResource( 22 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 2, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 41 ), +"shape": SubResource( 23 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 0, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 42 ), +"shape": SubResource( 24 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 1, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 43 ), +"shape": SubResource( 25 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 2, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 44 ), +"shape": SubResource( 26 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 3, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 45 ), +"shape": SubResource( 27 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 3, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 46 ), +"shape": SubResource( 28 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 3, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 47 ), +"shape": SubResource( 29 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 4, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 48 ), +"shape": SubResource( 30 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 4, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 49 ), +"shape": SubResource( 31 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 0 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 50 ), +"shape": SubResource( 32 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 1 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 51 ), +"shape": SubResource( 33 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) }, { "autotile_coord": Vector2( 5, 2 ), "one_way": false, "one_way_margin": 1.0, -"shape": SubResource( 52 ), +"shape": SubResource( 34 ), "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) } ] 0/z_index = 0 diff --git a/assets/Tiles/stomp.png b/assets/Tiles/stomp.png new file mode 100644 index 0000000000000000000000000000000000000000..168852277084472afdc8a218e2fe6d7c1054f6f3 GIT binary patch literal 251 zcmVt^O7aY}?%%-40i=i>D5{01do>TT{nLEr!Y002ovPDHLkV1n22 BXxsn* literal 0 HcmV?d00001 diff --git a/assets/Tiles/stomp.png.import b/assets/Tiles/stomp.png.import new file mode 100644 index 0000000..b2d5727 --- /dev/null +++ b/assets/Tiles/stomp.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/stomp.png-b303eb12135d71e5296780eea6884706.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Tiles/stomp.png" +dest_files=[ "res://.import/stomp.png-b303eb12135d71e5296780eea6884706.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/project.godot b/project.godot index 202171d..af1778a 100644 --- a/project.godot +++ b/project.godot @@ -59,6 +59,11 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://src/Hazards/Spike.gd" }, { +"base": "Node2D", +"class": "Stomp", +"language": "GDScript", +"path": "res://src/Hazards/Stomp.gd" +}, { "base": "TileMap", "class": "TrapTiles", "language": "GDScript", @@ -80,6 +85,7 @@ _global_script_class_icons={ "Level": "", "Player": "", "Spike": "", +"Stomp": "", "TrapTiles": "", "WarpZone": "" } diff --git a/src/Actors/Player.gd b/src/Actors/Player.gd index eb67a34..e4fe510 100644 --- a/src/Actors/Player.gd +++ b/src/Actors/Player.gd @@ -73,6 +73,9 @@ func _physics_process(delta: float) -> void: _boost_velocity = Vector2.ZERO _check_collisions() update_sprite(_direction) + elif _boost_velocity != Vector2.ZERO: + _velocity = move_and_slide_with_snap(_velocity, _snap_vector if _direction.y != -1 else Vector2.ZERO, FLOOR_NORMAL) + _boost_velocity = Vector2.ZERO func _input_check() -> void: @@ -92,6 +95,7 @@ func _check_collisions(): for i in get_slide_count(): var collision = get_slide_collision(i) if collision.collider.name == 'TrapTiles': + _boost_velocity = -_velocity die() return @@ -328,5 +332,9 @@ func face_player(right:bool = true): 1 ) +func set_position(pos:Vector2): + position = pos + _falling_start_position = pos.y + func boost(velocity:Vector2): _boost_velocity = velocity diff --git a/src/Actors/Player.tscn b/src/Actors/Player.tscn index e7058aa..885fc55 100644 --- a/src/Actors/Player.tscn +++ b/src/Actors/Player.tscn @@ -673,7 +673,7 @@ __meta__ = { } [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -position = Vector2( 0, -7 ) +position = Vector2( 0, -8 ) shape = SubResource( 1 ) [node name="Light2D" type="Light2D" parent="."] @@ -693,7 +693,7 @@ position = Vector2( 0, -8 ) texture = ExtResource( 8 ) vframes = 13 hframes = 8 -frame = 73 +frame = 32 [node name="SordRange" type="Area2D" parent="Sprite"] position = Vector2( -8, 8 ) diff --git a/src/GameWorld/Levels/Level.gd b/src/GameWorld/Levels/Level.gd index 7eabc0d..251cc95 100644 --- a/src/GameWorld/Levels/Level.gd +++ b/src/GameWorld/Levels/Level.gd @@ -83,7 +83,7 @@ func _set_player_position(is_entering:bool): _player.face_player(is_entering) _player.respawn_position = position - _player.position = position + _player.set_position(position) func _set_wrap_zones(): _first_time_init = false diff --git a/src/GameWorld/Levels/PreGame.gd b/src/GameWorld/Levels/PreGame.gd index 31ed03c..4069c9a 100644 --- a/src/GameWorld/Levels/PreGame.gd +++ b/src/GameWorld/Levels/PreGame.gd @@ -10,6 +10,9 @@ func _ready() -> void: _player.set_ability("wall_jump", true) _player.set_ability("attack", true) +func _enter_tree(): + AudioManager.play_music(AudioManager.Music.PreGame) + func _on_OldDudeIntroArea_body_entered(body: Node) -> void: if _played_old_man_cutscene: return if body.name == 'Player': diff --git a/src/GameWorld/Levels/PreGame.tscn b/src/GameWorld/Levels/PreGame.tscn index 5f286e1..b172495 100644 --- a/src/GameWorld/Levels/PreGame.tscn +++ b/src/GameWorld/Levels/PreGame.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=26 format=2] +[gd_scene load_steps=27 format=2] [ext_resource path="res://src/GameWorld/Levels/PreGame.gd" type="Script" id=1] [ext_resource path="res://assets/Tiles/background_0.png" type="Texture" id=2] @@ -17,6 +17,7 @@ [ext_resource path="res://src/Scripts/WarpZone.tscn" type="PackedScene" id=15] [ext_resource path="res://src/Hazards/SpikeTrap.tscn" type="PackedScene" id=16] [ext_resource path="res://src/Items/Spring.tscn" type="PackedScene" id=17] +[ext_resource path="res://src/Hazards/Stomp.tscn" type="PackedScene" id=18] [sub_resource type="TileSet" id=1] 0/name = "tileset.png 0" @@ -117,7 +118,7 @@ tracks/0/keys = { [node name="PreGame" type="Node2D"] script = ExtResource( 1 ) game_state = 6 -level_entry_point = Vector2( 80, 50 ) +level_entry_point = Vector2( 25, 240 ) level_exit_point = Vector2( 700, 224 ) camer_limits = { "bottom": 260, @@ -209,10 +210,10 @@ tile_data = PoolIntArray( -65513, 0, 0, -65512, 0, 1, -65511, 0, 131076, -65510, [node name="SolidsTileMap" parent="SolidPlatforms" instance=ExtResource( 12 )] collision_layer = 8 -tile_data = PoolIntArray( -196613, 0, 0, -196612, 0, 1, -196611, 0, 1, -196610, 0, 131076, -196609, 0, 1, -262144, 0, 1, -262143, 0, 131076, -262142, 0, 1, -262141, 0, 1, -262140, 0, 131076, -262139, 0, 131076, -262138, 0, 1, -262137, 0, 131076, -262136, 0, 131076, -262135, 0, 131076, -262134, 0, 1, -262133, 0, 131076, -262132, 0, 131076, -262131, 0, 131076, -262130, 0, 1, -262129, 0, 1, -262128, 0, 1, -262127, 0, 1, -262126, 0, 1, -262125, 0, 1, -262124, 0, 131076, -262123, 0, 131076, -262122, 0, 131076, -262121, 0, 131076, -262120, 0, 1, -262119, 0, 1, -262118, 0, 131076, -262117, 0, 131076, -262116, 0, 1, -262115, 0, 131076, -262114, 0, 1, -262113, 0, 1, -262112, 0, 1, -262111, 0, 1, -262110, 0, 1, -262109, 0, 131076, -262108, 0, 1, -262107, 0, 1, -262106, 0, 1, -262105, 0, 131076, -262104, 0, 1, -262103, 0, 131076, -262102, 0, 1, -262101, 0, 131076, -262100, 0, 2, -131077, 0, 65541, -131076, 0, 65537, -131075, 0, 65537, -131074, 0, 65537, -131073, 0, 3, -196608, 0, 131073, -196607, 0, 4, -196606, 0, 4, -196605, 0, 131073, -196604, 0, 4, -196603, 0, 131073, -196602, 0, 4, -196601, 0, 4, -196600, 0, 4, -196599, 0, 4, -196598, 0, 131073, -196597, 0, 4, -196596, 0, 4, -196595, 0, 131073, -196594, 0, 131073, -196593, 0, 131073, -196592, 0, 131073, -196591, 0, 4, -196590, 0, 5, -196589, 0, 65537, -196588, 0, 65537, -196587, 0, 65537, -196586, 0, 65537, -196585, 0, 65537, -196584, 0, 65537, -196583, 0, 65537, -196582, 0, 65537, -196581, 0, 65537, -196580, 0, 65537, -196579, 0, 65537, -196578, 0, 65537, -196577, 0, 65537, -196576, 0, 65537, -196575, 0, 65537, -196574, 0, 65537, -196573, 0, 65537, -196572, 0, 65537, -196571, 0, 65537, -196570, 0, 65537, -196569, 0, 65537, -196568, 0, 65537, -196567, 0, 65537, -196566, 0, 65537, -196565, 0, 65537, -196564, 0, 65538, -65541, 0, 65536, -65540, 0, 65537, -65539, 0, 65537, -65538, 0, 65537, -65537, 0, 65538, -131054, 0, 65536, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 65537, -131050, 0, 65537, -131049, 0, 65537, -131048, 0, 65537, -131047, 0, 65537, -131046, 0, 65537, -131045, 0, 65537, -131044, 0, 65537, -131043, 0, 65537, -131042, 0, 65537, -131041, 0, 65537, -131040, 0, 65537, -131039, 0, 65537, -131038, 0, 65537, -131037, 0, 65537, -131036, 0, 65537, -131035, 0, 65537, -131034, 0, 65537, -131033, 0, 65537, -131032, 0, 65537, -131031, 0, 65537, -131030, 0, 65537, -131029, 0, 65537, -131028, 0, 65538, -5, 0, 65536, -4, 0, 65537, -3, 0, 65537, -2, 0, 65537, -1, 0, 65539, -65518, 0, 65536, -65517, 0, 65537, -65516, 0, 65537, -65515, 0, 65537, -65514, 0, 65537, -65513, 0, 65537, -65512, 0, 65537, -65511, 0, 65537, -65510, 0, 65537, -65509, 0, 65537, -65508, 0, 65537, -65507, 0, 65537, -65506, 0, 65537, -65505, 0, 65537, -65504, 0, 65537, -65503, 0, 65537, -65502, 0, 65537, -65501, 0, 65537, -65500, 0, 65537, -65499, 0, 65537, -65498, 0, 65537, -65497, 0, 65537, -65496, 0, 65537, -65495, 0, 65537, -65494, 0, 65537, -65493, 0, 65537, -65492, 0, 65538, 65531, 0, 65536, 65532, 0, 65537, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 131075, 0, 0, 1, 1, 0, 131076, 2, 0, 2, 18, 0, 65541, 19, 0, 65537, 20, 0, 65537, 21, 0, 65537, 22, 0, 65537, 23, 0, 65537, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65537, 38, 0, 65537, 39, 0, 65537, 40, 0, 65537, 41, 0, 65537, 42, 0, 65537, 43, 0, 65537, 44, 0, 65538, 131067, 0, 65536, 131068, 0, 65537, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65538, 65554, 0, 131072, 65555, 0, 4, 65556, 0, 131073, 65557, 0, 131073, 65558, 0, 131073, 65559, 0, 5, 65560, 0, 65537, 65561, 0, 3, 65562, 0, 4, 65563, 0, 4, 65564, 0, 131073, 65565, 0, 4, 65566, 0, 4, 65567, 0, 5, 65568, 0, 3, 65569, 0, 4, 65570, 0, 131073, 65571, 0, 4, 65572, 0, 4, 65573, 0, 4, 65574, 0, 4, 65575, 0, 4, 65576, 0, 131073, 65577, 0, 131073, 65578, 0, 5, 65579, 0, 65537, 65580, 0, 65538, 196603, 0, 65536, 196604, 0, 65537, 196605, 0, 65537, 196606, 0, 65537, 196607, 0, 65537, 131072, 0, 65537, 131073, 0, 65537, 131074, 0, 65538, 131095, 0, 131072, 131096, 0, 4, 131097, 0, 131074, 131103, 0, 65541, 131104, 0, 65539, 131114, 0, 65541, 131115, 0, 65537, 131116, 0, 65538, 262139, 0, 65536, 262140, 0, 65537, 262141, 0, 65537, 262142, 0, 65537, 262143, 0, 65537, 196608, 0, 65537, 196609, 0, 65537, 196610, 0, 65538, 196639, 0, 65541, 196640, 0, 65538, 196650, 0, 65536, 196651, 0, 65537, 196652, 0, 65538, 327675, 0, 65536, 327676, 0, 65537, 327677, 0, 65537, 327678, 0, 65537, 327679, 0, 65537, 262144, 0, 65537, 262145, 0, 65537, 262146, 0, 65538, 262175, 0, 65536, 262176, 0, 65539, 262186, 0, 65541, 262187, 0, 65537, 262188, 0, 65539, 393211, 0, 65536, 393212, 0, 65537, 393213, 0, 65537, 393214, 0, 65537, 393215, 0, 3, 327680, 0, 131073, 327681, 0, 4, 327682, 0, 131074, 327688, 0, 0, 327689, 0, 2, 327711, 0, 131072, 327712, 0, 131074, 327722, 0, 65541, 327723, 0, 65537, 327724, 0, 65538, 458747, 0, 65541, 458748, 0, 65537, 458749, 0, 65537, 458750, 0, 65537, 458751, 0, 65539, 393224, 0, 65536, 393225, 0, 65538, 393258, 0, 65536, 393259, 0, 65537, 393260, 0, 65538, 524283, 0, 65536, 524284, 0, 65537, 524285, 0, 65537, 524286, 0, 65537, 524287, 0, 65539, 458760, 0, 65536, 458761, 0, 131075, 458762, 0, 131076, 458763, 0, 2, 458794, 0, 65541, 458795, 0, 65537, 458796, 0, 65538, 589819, 0, 65541, 589820, 0, 65537, 589821, 0, 65537, 589822, 0, 65537, 589823, 0, 65538, 524296, 0, 65536, 524297, 0, 65537, 524298, 0, 65537, 524299, 0, 131075, 524300, 0, 1, 524301, 0, 1, 524302, 0, 2, 524330, 0, 65541, 524331, 0, 65537, 524332, 0, 65539, 655355, 0, 65536, 655356, 0, 65537, 655357, 0, 65537, 655358, 0, 65537, 655359, 0, 65538, 589832, 0, 131072, 589833, 0, 131073, 589834, 0, 131073, 589835, 0, 4, 589836, 0, 4, 589837, 0, 131073, 589838, 0, 131074, 589866, 0, 65536, 589867, 0, 65537, 589868, 0, 65539, 720891, 0, 65536, 720892, 0, 65537, 720893, 0, 65537, 720894, 0, 65537, 720895, 0, 65538, 655399, 0, 0, 655400, 0, 1, 655401, 0, 1, 655402, 0, 131077, 655403, 0, 65537, 655404, 0, 65538, 786427, 0, 65536, 786428, 0, 65537, 786429, 0, 65537, 786430, 0, 65537, 786431, 0, 65539, 720935, 0, 131072, 720936, 0, 131073, 720937, 0, 4, 720938, 0, 4, 720939, 0, 4, 720940, 0, 131074, 851963, 0, 65541, 851964, 0, 65537, 851965, 0, 65537, 851966, 0, 65537, 851967, 0, 65539, 786451, 0, 0, 786452, 0, 2, 786466, 0, 0, 786467, 0, 2, 917499, 0, 65536, 917500, 0, 65537, 917501, 0, 65537, 917502, 0, 65537, 917503, 0, 65539, 851987, 0, 65541, 851988, 0, 131075, 851989, 0, 2, 852002, 0, 65541, 852003, 0, 65538, 983035, 0, 65541, 983036, 0, 65537, 983037, 0, 65537, 983038, 0, 65537, 983039, 0, 65538, 917523, 0, 65536, 917524, 0, 65537, 917525, 0, 131075, 917526, 0, 2, 917538, 0, 65541, 917539, 0, 131075, 917540, 0, 1, 917541, 0, 131076, 917542, 0, 1, 917543, 0, 1, 917544, 0, 1, 917545, 0, 131076, 917546, 0, 131076, 917547, 0, 1, 917548, 0, 131076, 917549, 0, 131076, 917550, 0, 1, 917551, 0, 131076, 917552, 0, 131076, 917553, 0, 131076, 917554, 0, 131076, 917555, 0, 2, 1048571, 0, 65541, 1048572, 0, 65537, 1048573, 0, 65537, 1048574, 0, 65537, 1048575, 0, 131075, 983040, 0, 1, 983041, 0, 1, 983042, 0, 1, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 131076, 983048, 0, 1, 983049, 0, 131076, 983050, 0, 1, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 1, 983057, 0, 131076, 983058, 0, 1, 983059, 0, 131077, 983060, 0, 65537, 983061, 0, 65537, 983062, 0, 131075, 983063, 0, 131076, 983064, 0, 131076, 983065, 0, 1, 983066, 0, 1, 983067, 0, 1, 983068, 0, 131076, 983069, 0, 1, 983070, 0, 131076, 983071, 0, 131076, 983072, 0, 1, 983073, 0, 1, 983074, 0, 131077, 983075, 0, 65537, 983076, 0, 65537, 983077, 0, 65537, 983078, 0, 65537, 983079, 0, 65537, 983080, 0, 65537, 983081, 0, 65537, 983082, 0, 65537, 983083, 0, 65537, 983084, 0, 65537, 983085, 0, 65537, 983086, 0, 65537, 983087, 0, 65537, 983088, 0, 65537, 983089, 0, 65537, 983090, 0, 65537, 983091, 0, 65538, 1114107, 0, 65536, 1114108, 0, 65537, 1114109, 0, 65537, 1114110, 0, 65537, 1114111, 0, 65537, 1048576, 0, 65537, 1048577, 0, 65537, 1048578, 0, 65537, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1048584, 0, 65537, 1048585, 0, 65537, 1048586, 0, 65537, 1048587, 0, 65537, 1048588, 0, 65537, 1048589, 0, 65537, 1048590, 0, 65537, 1048591, 0, 65537, 1048592, 0, 65537, 1048593, 0, 65537, 1048594, 0, 65537, 1048595, 0, 65537, 1048596, 0, 65537, 1048597, 0, 65537, 1048598, 0, 65537, 1048599, 0, 65537, 1048600, 0, 65537, 1048601, 0, 65537, 1048602, 0, 65537, 1048603, 0, 65537, 1048604, 0, 65537, 1048605, 0, 65537, 1048606, 0, 65537, 1048607, 0, 65537, 1048608, 0, 65537, 1048609, 0, 65537, 1048610, 0, 65537, 1048611, 0, 65537, 1048612, 0, 65537, 1048613, 0, 65537, 1048614, 0, 65537, 1048615, 0, 65537, 1048616, 0, 65537, 1048617, 0, 65537, 1048618, 0, 65537, 1048619, 0, 65537, 1048620, 0, 65537, 1048621, 0, 65537, 1048622, 0, 65537, 1048623, 0, 65537, 1048624, 0, 65537, 1048625, 0, 65537, 1048626, 0, 65537, 1048627, 0, 65538, 1179643, 0, 131072, 1179644, 0, 131073, 1179645, 0, 4, 1179646, 0, 4, 1179647, 0, 4, 1114112, 0, 4, 1114113, 0, 4, 1114114, 0, 4, 1114115, 0, 131073, 1114116, 0, 4, 1114117, 0, 131073, 1114118, 0, 4, 1114119, 0, 131073, 1114120, 0, 131073, 1114121, 0, 4, 1114122, 0, 131073, 1114123, 0, 4, 1114124, 0, 131073, 1114125, 0, 131073, 1114126, 0, 4, 1114127, 0, 4, 1114128, 0, 4, 1114129, 0, 4, 1114130, 0, 131073, 1114131, 0, 4, 1114132, 0, 4, 1114133, 0, 4, 1114134, 0, 4, 1114135, 0, 131073, 1114136, 0, 4, 1114137, 0, 131073, 1114138, 0, 4, 1114139, 0, 131073, 1114140, 0, 4, 1114141, 0, 131073, 1114142, 0, 4, 1114143, 0, 131073, 1114144, 0, 131073, 1114145, 0, 4, 1114146, 0, 131073, 1114147, 0, 131073, 1114148, 0, 131073, 1114149, 0, 131073, 1114150, 0, 131073, 1114151, 0, 131073, 1114152, 0, 4, 1114153, 0, 4, 1114154, 0, 131073, 1114155, 0, 4, 1114156, 0, 4, 1114157, 0, 131073, 1114158, 0, 4, 1114159, 0, 4, 1114160, 0, 4, 1114161, 0, 4, 1114162, 0, 131073, 1114163, 0, 131074 ) +tile_data = PoolIntArray( -196613, 0, 0, -196612, 0, 1, -196611, 0, 1, -196610, 0, 131076, -196609, 0, 1, -262144, 0, 1, -262143, 0, 131076, -262142, 0, 1, -262141, 0, 1, -262140, 0, 131076, -262139, 0, 131076, -262138, 0, 1, -262137, 0, 131076, -262136, 0, 131076, -262135, 0, 131076, -262134, 0, 1, -262133, 0, 131076, -262132, 0, 131076, -262131, 0, 131076, -262130, 0, 1, -262129, 0, 1, -262128, 0, 1, -262127, 0, 1, -262126, 0, 1, -262125, 0, 1, -262124, 0, 131076, -262123, 0, 131076, -262122, 0, 131076, -262121, 0, 131076, -262120, 0, 1, -262119, 0, 1, -262118, 0, 131076, -262117, 0, 131076, -262116, 0, 1, -262115, 0, 131076, -262114, 0, 1, -262113, 0, 1, -262112, 0, 1, -262111, 0, 1, -262110, 0, 1, -262109, 0, 131076, -262108, 0, 1, -262107, 0, 1, -262106, 0, 1, -262105, 0, 131076, -262104, 0, 1, -262103, 0, 131076, -262102, 0, 1, -262101, 0, 131076, -262100, 0, 2, -131077, 0, 65541, -131076, 0, 65537, -131075, 0, 65537, -131074, 0, 65537, -131073, 0, 3, -196608, 0, 131073, -196607, 0, 4, -196606, 0, 4, -196605, 0, 131073, -196604, 0, 4, -196603, 0, 131073, -196602, 0, 4, -196601, 0, 4, -196600, 0, 4, -196599, 0, 4, -196598, 0, 131073, -196597, 0, 4, -196596, 0, 4, -196595, 0, 131073, -196594, 0, 131073, -196593, 0, 131073, -196592, 0, 131073, -196591, 0, 4, -196590, 0, 5, -196589, 0, 65537, -196588, 0, 65537, -196587, 0, 65537, -196586, 0, 65537, -196585, 0, 65537, -196584, 0, 65537, -196583, 0, 65537, -196582, 0, 65537, -196581, 0, 65537, -196580, 0, 65537, -196579, 0, 65537, -196578, 0, 65537, -196577, 0, 65537, -196576, 0, 65537, -196575, 0, 65537, -196574, 0, 65537, -196573, 0, 65537, -196572, 0, 65537, -196571, 0, 65537, -196570, 0, 65537, -196569, 0, 65537, -196568, 0, 65537, -196567, 0, 65537, -196566, 0, 65537, -196565, 0, 65537, -196564, 0, 65538, -65541, 0, 65536, -65540, 0, 65537, -65539, 0, 65537, -65538, 0, 65537, -65537, 0, 65538, -131054, 0, 65536, -131053, 0, 65537, -131052, 0, 65537, -131051, 0, 65537, -131050, 0, 65537, -131049, 0, 65537, -131048, 0, 65537, -131047, 0, 65537, -131046, 0, 65537, -131045, 0, 65537, -131044, 0, 65537, -131043, 0, 65537, -131042, 0, 65537, -131041, 0, 65537, -131040, 0, 65537, -131039, 0, 65537, -131038, 0, 65537, -131037, 0, 65537, -131036, 0, 65537, -131035, 0, 65537, -131034, 0, 65537, -131033, 0, 65537, -131032, 0, 65537, -131031, 0, 65537, -131030, 0, 65537, -131029, 0, 65537, -131028, 0, 65538, -5, 0, 65536, -4, 0, 65537, -3, 0, 65537, -2, 0, 65537, -1, 0, 65539, -65518, 0, 65536, -65517, 0, 65537, -65516, 0, 65537, -65515, 0, 65537, -65514, 0, 65537, -65513, 0, 65537, -65512, 0, 65537, -65511, 0, 65537, -65510, 0, 65537, -65509, 0, 65537, -65508, 0, 65537, -65507, 0, 65537, -65506, 0, 65537, -65505, 0, 65537, -65504, 0, 65537, -65503, 0, 65537, -65502, 0, 65537, -65501, 0, 65537, -65500, 0, 65537, -65499, 0, 65537, -65498, 0, 65537, -65497, 0, 65537, -65496, 0, 65537, -65495, 0, 65537, -65494, 0, 65537, -65493, 0, 65537, -65492, 0, 65538, 65531, 0, 65536, 65532, 0, 65537, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 131075, 0, 0, 1, 1, 0, 131076, 2, 0, 2, 18, 0, 65541, 19, 0, 65537, 20, 0, 65537, 21, 0, 65537, 22, 0, 65537, 23, 0, 65537, 24, 0, 65537, 25, 0, 65537, 26, 0, 65537, 27, 0, 65537, 28, 0, 65537, 29, 0, 65537, 30, 0, 65537, 31, 0, 65537, 32, 0, 65537, 33, 0, 65537, 34, 0, 65537, 35, 0, 65537, 36, 0, 65537, 37, 0, 65537, 38, 0, 65537, 39, 0, 65537, 40, 0, 65537, 41, 0, 65537, 42, 0, 65537, 43, 0, 65537, 44, 0, 65538, 131067, 0, 65536, 131068, 0, 65537, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65538, 65554, 0, 131072, 65555, 0, 4, 65556, 0, 131073, 65557, 0, 131073, 65558, 0, 131073, 65559, 0, 5, 65560, 0, 65537, 65561, 0, 3, 65562, 0, 4, 65563, 0, 4, 65564, 0, 131073, 65565, 0, 4, 65566, 0, 4, 65567, 0, 5, 65568, 0, 3, 65569, 0, 4, 65570, 0, 131073, 65571, 0, 4, 65572, 0, 4, 65573, 0, 4, 65574, 0, 4, 65575, 0, 4, 65576, 0, 131073, 65577, 0, 131073, 65578, 0, 5, 65579, 0, 65537, 65580, 0, 65538, 196603, 0, 65536, 196604, 0, 65537, 196605, 0, 65537, 196606, 0, 65537, 196607, 0, 65537, 131072, 0, 65537, 131073, 0, 65537, 131074, 0, 65538, 131095, 0, 131072, 131096, 0, 4, 131097, 0, 131074, 131103, 0, 65541, 131104, 0, 65539, 131114, 0, 65541, 131115, 0, 65537, 131116, 0, 65538, 262139, 0, 65536, 262140, 0, 65537, 262141, 0, 65537, 262142, 0, 65537, 262143, 0, 65537, 196608, 0, 65537, 196609, 0, 65537, 196610, 0, 65538, 196639, 0, 65541, 196640, 0, 65538, 196650, 0, 65536, 196651, 0, 65537, 196652, 0, 65538, 327675, 0, 65536, 327676, 0, 65537, 327677, 0, 65537, 327678, 0, 65537, 327679, 0, 65537, 262144, 0, 65537, 262145, 0, 65537, 262146, 0, 131075, 262147, 0, 1, 262148, 0, 131076, 262149, 0, 1, 262150, 0, 131076, 262151, 0, 131076, 262152, 0, 131076, 262153, 0, 2, 262175, 0, 65536, 262176, 0, 65539, 262186, 0, 65541, 262187, 0, 65537, 262188, 0, 65539, 393211, 0, 65536, 393212, 0, 65537, 393213, 0, 65537, 393214, 0, 65537, 393215, 0, 3, 327680, 0, 131073, 327681, 0, 4, 327682, 0, 131073, 327683, 0, 131073, 327684, 0, 4, 327685, 0, 4, 327686, 0, 4, 327687, 0, 4, 327688, 0, 5, 327689, 0, 65539, 327711, 0, 131072, 327712, 0, 131074, 327722, 0, 65541, 327723, 0, 65537, 327724, 0, 65538, 458747, 0, 65541, 458748, 0, 65537, 458749, 0, 65537, 458750, 0, 65537, 458751, 0, 65539, 393224, 0, 65536, 393225, 0, 65538, 393258, 0, 65536, 393259, 0, 65537, 393260, 0, 65538, 524283, 0, 65536, 524284, 0, 65537, 524285, 0, 65537, 524286, 0, 65537, 524287, 0, 65539, 458760, 0, 65536, 458761, 0, 131075, 458762, 0, 131076, 458763, 0, 2, 458794, 0, 65541, 458795, 0, 65537, 458796, 0, 65538, 589819, 0, 65541, 589820, 0, 65537, 589821, 0, 65537, 589822, 0, 65537, 589823, 0, 65538, 524296, 0, 65536, 524297, 0, 65537, 524298, 0, 65537, 524299, 0, 131075, 524300, 0, 1, 524301, 0, 1, 524302, 0, 2, 524330, 0, 65541, 524331, 0, 65537, 524332, 0, 65539, 655355, 0, 65536, 655356, 0, 65537, 655357, 0, 65537, 655358, 0, 65537, 655359, 0, 65538, 589832, 0, 131072, 589833, 0, 131073, 589834, 0, 131073, 589835, 0, 4, 589836, 0, 4, 589837, 0, 131073, 589838, 0, 131074, 589866, 0, 65536, 589867, 0, 65537, 589868, 0, 65539, 720891, 0, 65536, 720892, 0, 65537, 720893, 0, 65537, 720894, 0, 65537, 720895, 0, 65538, 655399, 0, 0, 655400, 0, 1, 655401, 0, 1, 655402, 0, 131077, 655403, 0, 65537, 655404, 0, 65538, 786427, 0, 65536, 786428, 0, 65537, 786429, 0, 65537, 786430, 0, 65537, 786431, 0, 65538, 720935, 0, 131072, 720936, 0, 131073, 720937, 0, 4, 720938, 0, 4, 720939, 0, 4, 720940, 0, 131074, 851963, 0, 65541, 851964, 0, 65537, 851965, 0, 65537, 851966, 0, 65537, 851967, 0, 131075, 786432, 0, 2, 786451, 0, 0, 786452, 0, 2, 786466, 0, 0, 786467, 0, 2, 917499, 0, 65536, 917500, 0, 65537, 917501, 0, 65537, 917502, 0, 65537, 917503, 0, 65537, 851968, 0, 65538, 851987, 0, 65541, 851988, 0, 131075, 851989, 0, 2, 852002, 0, 65541, 852003, 0, 65538, 983035, 0, 65541, 983036, 0, 65537, 983037, 0, 65537, 983038, 0, 65537, 983039, 0, 65537, 917504, 0, 65539, 917523, 0, 65536, 917524, 0, 65537, 917525, 0, 131075, 917526, 0, 2, 917538, 0, 65541, 917539, 0, 131075, 917540, 0, 1, 917541, 0, 131076, 917542, 0, 1, 917543, 0, 1, 917544, 0, 1, 917545, 0, 131076, 917546, 0, 131076, 917547, 0, 1, 917548, 0, 131076, 917549, 0, 131076, 917550, 0, 1, 917551, 0, 131076, 917552, 0, 131076, 917553, 0, 131076, 917554, 0, 131076, 917555, 0, 2, 1048571, 0, 65541, 1048572, 0, 65537, 1048573, 0, 65537, 1048574, 0, 65537, 1048575, 0, 65537, 983040, 0, 131075, 983041, 0, 1, 983042, 0, 1, 983043, 0, 131076, 983044, 0, 1, 983045, 0, 131076, 983046, 0, 131076, 983047, 0, 131076, 983048, 0, 1, 983049, 0, 131076, 983050, 0, 1, 983051, 0, 1, 983052, 0, 131076, 983053, 0, 1, 983054, 0, 1, 983055, 0, 131076, 983056, 0, 1, 983057, 0, 131076, 983058, 0, 1, 983059, 0, 131077, 983060, 0, 65537, 983061, 0, 65537, 983062, 0, 131075, 983063, 0, 131076, 983064, 0, 131076, 983065, 0, 1, 983066, 0, 1, 983067, 0, 1, 983068, 0, 131076, 983069, 0, 1, 983070, 0, 131076, 983071, 0, 131076, 983072, 0, 1, 983073, 0, 1, 983074, 0, 131077, 983075, 0, 65537, 983076, 0, 65537, 983077, 0, 65537, 983078, 0, 65537, 983079, 0, 65537, 983080, 0, 65537, 983081, 0, 65537, 983082, 0, 65537, 983083, 0, 65537, 983084, 0, 65537, 983085, 0, 65537, 983086, 0, 65537, 983087, 0, 65537, 983088, 0, 65537, 983089, 0, 65537, 983090, 0, 65537, 983091, 0, 65538, 1114107, 0, 65536, 1114108, 0, 65537, 1114109, 0, 65537, 1114110, 0, 65537, 1114111, 0, 65537, 1048576, 0, 65537, 1048577, 0, 65537, 1048578, 0, 65537, 1048579, 0, 65537, 1048580, 0, 65537, 1048581, 0, 65537, 1048582, 0, 65537, 1048583, 0, 65537, 1048584, 0, 65537, 1048585, 0, 65537, 1048586, 0, 65537, 1048587, 0, 65537, 1048588, 0, 65537, 1048589, 0, 65537, 1048590, 0, 65537, 1048591, 0, 65537, 1048592, 0, 65537, 1048593, 0, 65537, 1048594, 0, 65537, 1048595, 0, 65537, 1048596, 0, 65537, 1048597, 0, 65537, 1048598, 0, 65537, 1048599, 0, 65537, 1048600, 0, 65537, 1048601, 0, 65537, 1048602, 0, 65537, 1048603, 0, 65537, 1048604, 0, 65537, 1048605, 0, 65537, 1048606, 0, 65537, 1048607, 0, 65537, 1048608, 0, 65537, 1048609, 0, 65537, 1048610, 0, 65537, 1048611, 0, 65537, 1048612, 0, 65537, 1048613, 0, 65537, 1048614, 0, 65537, 1048615, 0, 65537, 1048616, 0, 65537, 1048617, 0, 65537, 1048618, 0, 65537, 1048619, 0, 65537, 1048620, 0, 65537, 1048621, 0, 65537, 1048622, 0, 65537, 1048623, 0, 65537, 1048624, 0, 65537, 1048625, 0, 65537, 1048626, 0, 65537, 1048627, 0, 65538, 1179643, 0, 131072, 1179644, 0, 131073, 1179645, 0, 4, 1179646, 0, 4, 1179647, 0, 4, 1114112, 0, 4, 1114113, 0, 4, 1114114, 0, 4, 1114115, 0, 131073, 1114116, 0, 4, 1114117, 0, 131073, 1114118, 0, 4, 1114119, 0, 131073, 1114120, 0, 131073, 1114121, 0, 4, 1114122, 0, 131073, 1114123, 0, 4, 1114124, 0, 131073, 1114125, 0, 131073, 1114126, 0, 4, 1114127, 0, 4, 1114128, 0, 4, 1114129, 0, 4, 1114130, 0, 131073, 1114131, 0, 4, 1114132, 0, 4, 1114133, 0, 4, 1114134, 0, 4, 1114135, 0, 131073, 1114136, 0, 4, 1114137, 0, 131073, 1114138, 0, 4, 1114139, 0, 131073, 1114140, 0, 4, 1114141, 0, 131073, 1114142, 0, 4, 1114143, 0, 131073, 1114144, 0, 131073, 1114145, 0, 4, 1114146, 0, 131073, 1114147, 0, 131073, 1114148, 0, 131073, 1114149, 0, 131073, 1114150, 0, 131073, 1114151, 0, 131073, 1114152, 0, 4, 1114153, 0, 4, 1114154, 0, 131073, 1114155, 0, 4, 1114156, 0, 4, 1114157, 0, 131073, 1114158, 0, 4, 1114159, 0, 4, 1114160, 0, 4, 1114161, 0, 4, 1114162, 0, 131073, 1114163, 0, 131074 ) [node name="TrapTiles" parent="SolidPlatforms" instance=ExtResource( 10 )] -tile_data = PoolIntArray( 917517, 0, 0, 917518, 0, 0, 917519, 0, 0, 917530, 0, 0, 917531, 0, 0 ) +tile_data = PoolIntArray( 589824, 2, 0, 655360, 2, 0, 655368, 1, 0, 655373, 1, 0, 917517, 0, 0, 917530, 0, 0, 917531, 0, 0 ) [node name="WiseOldDude" parent="." instance=ExtResource( 13 )] position = Vector2( 643, 161 ) @@ -247,11 +248,11 @@ playback_speed = 0.2 anims/default = SubResource( 8 ) [node name="GoblinSpawn" parent="." instance=ExtResource( 7 )] -position = Vector2( 526, 238 ) +position = Vector2( 526, 240 ) node = ExtResource( 6 ) [node name="GoblinSpawn2" parent="." instance=ExtResource( 7 )] -position = Vector2( 208, 126 ) +position = Vector2( 208, 128 ) node = ExtResource( 6 ) [node name="Coins" type="Node" parent="."] @@ -259,6 +260,9 @@ node = ExtResource( 6 ) [node name="Coin" parent="Coins" instance=ExtResource( 9 )] position = Vector2( 15, -12 ) +[node name="Coin3" parent="Coins" instance=ExtResource( 9 )] +position = Vector2( 9, 109 ) + [node name="Coin2" parent="Coins" instance=ExtResource( 9 )] position = Vector2( 535, 42 ) @@ -270,8 +274,14 @@ to_level_coord = Vector2( 0, 1 ) [node name="SpikeTrap" parent="." instance=ExtResource( 16 )] position = Vector2( 352, 208 ) -direction = 1 +rotation = 0.0174533 [node name="Spring" parent="." instance=ExtResource( 17 )] -position = Vector2( 98, 240 ) +position = Vector2( 134, 240 ) + +[node name="Stomp" parent="." instance=ExtResource( 18 )] +position = Vector2( 217, 167 ) +to_point = Vector2( 0, 65 ) +duration = 0.5 +delay = 0.2 [connection signal="body_entered" from="CutsceneAreas/OldDudeIntroArea" to="." method="_on_OldDudeIntroArea_body_entered"] diff --git a/src/Hazards/SpikeTrap.gd b/src/Hazards/SpikeTrap.gd index 279632b..e0d88aa 100644 --- a/src/Hazards/SpikeTrap.gd +++ b/src/Hazards/SpikeTrap.gd @@ -9,6 +9,7 @@ export(int, -360, 360) var direction = 1 setget set_direction func _on_DamageArea_body_entered(body: Node) -> void: if body.name == "Player": body.die() + body.boost(Vector2(150, 0)) func _on_TriggerArea_body_entered(body: Node) -> void: if body.name == "Player" and not triggerd: diff --git a/src/Hazards/SpikeTrap.tscn b/src/Hazards/SpikeTrap.tscn index ddfc661..61637fd 100644 --- a/src/Hazards/SpikeTrap.tscn +++ b/src/Hazards/SpikeTrap.tscn @@ -19,10 +19,10 @@ tracks/0/loop_wrap = true tracks/0/imported = false tracks/0/enabled = true tracks/0/keys = { -"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4 ), -"transitions": PoolRealArray( 1, 1, 1, 1, 1 ), +"times": PoolRealArray( 0, 0.1, 0.2, 0.3, 0.4, 0.5 ), +"transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ), "update": 1, -"values": [ 0, 1, 2, 3, 4 ] +"values": [ 0, 1, 2, 3, 4, 5 ] } tracks/1/type = "value" tracks/1/path = NodePath("DamageArea/CollisionShape2D:position") @@ -66,6 +66,7 @@ tracks/1/keys = { [node name="SpikeTrap" type="Node2D"] script = ExtResource( 2 ) +direction = 1 [node name="Sprite" type="Sprite" parent="."] position = Vector2( 0, -8 ) diff --git a/src/Hazards/Stomp.gd b/src/Hazards/Stomp.gd new file mode 100644 index 0000000..4b49a62 --- /dev/null +++ b/src/Hazards/Stomp.gd @@ -0,0 +1,48 @@ +tool +extends Node2D +class_name Stomp + +export var to_point := Vector2(0, 0) setget set_to_position +export var duration := 2.0 setget set_duration +export var delay := .5 setget set_delay +export(String, "UP_DOWN", "LEFT_RIGHT") var g = "UP_DOWN" + +onready var tween = $Tween +onready var sprite = $Sprite + +var _is_ready = false + +func _ready() -> void: + _is_ready = true; + start_motion() + +func _on_DeathZone_body_entered(body:Node) -> void: + if body.name == "Player": + body.die() + +func set_to_position(val): + print("set_to_position") + + to_point = val + start_motion() + +func set_duration(val): + print("set_duration") + duration = val + start_motion() + +func set_delay(val): + print("set_delay") + delay = val + start_motion() + +func start_motion(): + if not _is_ready: return + + print("Stomp Start Motion") + sprite.position = Vector2.ZERO + tween.stop_all() + tween.repeat = true + tween.interpolate_property(sprite, "position", Vector2.ZERO, to_point, duration, Tween.TRANS_LINEAR, Tween.EASE_IN, delay) + tween.interpolate_property(sprite, "position", to_point, Vector2.ZERO, duration, Tween.TRANS_LINEAR, Tween.EASE_IN, duration+(delay*2)) + tween.start() \ No newline at end of file diff --git a/src/Hazards/Stomp.tscn b/src/Hazards/Stomp.tscn new file mode 100644 index 0000000..d2421cb --- /dev/null +++ b/src/Hazards/Stomp.tscn @@ -0,0 +1,57 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://src/Hazards/Stomp.gd" type="Script" id=1] +[ext_resource path="res://assets/Tiles/stomp.png" type="Texture" id=2] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 7, 7 ) + +[sub_resource type="Gradient" id=3] +colors = PoolColorArray( 1, 1, 1, 0.168627, 1, 1, 1, 0 ) + +[sub_resource type="GradientTexture" id=4] +gradient = SubResource( 3 ) + +[sub_resource type="Curve" id=5] +_data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.30388 ), 0.0, 0.0, 0, 0 ] + +[sub_resource type="CurveTexture" id=6] +curve = SubResource( 5 ) + +[sub_resource type="ParticlesMaterial" id=2] +flag_disable_z = true +gravity = Vector3( 0, 0, 0 ) +orbit_velocity = 0.0 +orbit_velocity_random = 0.0 +scale_curve = SubResource( 6 ) +color_ramp = SubResource( 4 ) + +[node name="Stomp" type="Node2D"] +light_mask = 8 +script = ExtResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] +texture = ExtResource( 2 ) + +[node name="DeathZone" type="Area2D" parent="Sprite"] +position = Vector2( 0, 2 ) +collision_layer = 4 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Sprite/DeathZone"] +position = Vector2( 0, -2 ) +shape = SubResource( 1 ) + +[node name="Particles2D" type="Particles2D" parent="Sprite"] +show_behind_parent = true +light_mask = 0 +amount = 12 +lifetime = 0.2 +local_coords = false +process_material = SubResource( 2 ) +texture = ExtResource( 2 ) + +[node name="Tween" type="Tween" parent="."] +repeat = true +playback_process_mode = 0 +playback/repeat = true +[connection signal="body_entered" from="Sprite/DeathZone" to="." method="_on_DeathZone_body_entered"]