diff --git a/.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.md5 b/.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.md5 new file mode 100644 index 0000000..2477438 --- /dev/null +++ b/.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.md5 @@ -0,0 +1,3 @@ +source_md5="0837cb6ec551daab4fa5f117ec3033f4" +dest_md5="42ebf02c3d91547961debd02d9710063" + diff --git a/.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.oggstr b/.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.oggstr new file mode 100644 index 0000000..94fdc0e Binary files /dev/null and b/.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.oggstr differ diff --git a/.import/exit.png-5434234d068c5cc7b377eff51dc629c9.md5 b/.import/exit.png-5434234d068c5cc7b377eff51dc629c9.md5 new file mode 100644 index 0000000..6d7599f --- /dev/null +++ b/.import/exit.png-5434234d068c5cc7b377eff51dc629c9.md5 @@ -0,0 +1,3 @@ +source_md5="53eae53c845ca81da656334b40f6ed43" +dest_md5="0a529cf5ba7482e509a961ed81c55abd" + diff --git a/.import/exit.png-5434234d068c5cc7b377eff51dc629c9.stex b/.import/exit.png-5434234d068c5cc7b377eff51dc629c9.stex new file mode 100644 index 0000000..a1a033f Binary files /dev/null and b/.import/exit.png-5434234d068c5cc7b377eff51dc629c9.stex differ diff --git a/.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.md5 b/.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.md5 new file mode 100644 index 0000000..3e2aa44 --- /dev/null +++ b/.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.md5 @@ -0,0 +1,3 @@ +source_md5="0057c515a9b9d7768894647b74c442d5" +dest_md5="be2b65eec0ac8ff7e78507d4877e826c" + diff --git a/.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.mp3str b/.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.mp3str new file mode 100644 index 0000000..a1777e7 Binary files /dev/null and b/.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.mp3str differ diff --git a/.import/spike.png-a608aa67f6e0f5dc30513729727656ff.md5 b/.import/spike.png-a608aa67f6e0f5dc30513729727656ff.md5 new file mode 100644 index 0000000..6c82197 --- /dev/null +++ b/.import/spike.png-a608aa67f6e0f5dc30513729727656ff.md5 @@ -0,0 +1,3 @@ +source_md5="a600e425906c5df72955d9359438f454" +dest_md5="38480d5a86d4c34138941ec5c6cb2261" + diff --git a/.import/spike.png-a608aa67f6e0f5dc30513729727656ff.stex b/.import/spike.png-a608aa67f6e0f5dc30513729727656ff.stex new file mode 100644 index 0000000..bf9507b Binary files /dev/null and b/.import/spike.png-a608aa67f6e0f5dc30513729727656ff.stex differ diff --git a/.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.md5 b/.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.md5 new file mode 100644 index 0000000..4a44807 --- /dev/null +++ b/.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.md5 @@ -0,0 +1,3 @@ +source_md5="9411656496cf29e49efeb3416b7f0766" +dest_md5="c373833324a7add86a57455f2d1f93b0" + diff --git a/.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.stex b/.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.stex new file mode 100644 index 0000000..d6595ae Binary files /dev/null and b/.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.stex differ diff --git a/audio/music/rumble_loop.mp3 b/audio/music/rumble_loop.mp3 new file mode 100644 index 0000000..1523b2a Binary files /dev/null and b/audio/music/rumble_loop.mp3 differ diff --git a/audio/music/rumble_loop.mp3.import b/audio/music/rumble_loop.mp3.import new file mode 100644 index 0000000..1597ad0 --- /dev/null +++ b/audio/music/rumble_loop.mp3.import @@ -0,0 +1,15 @@ +[remap] + +importer="mp3" +type="AudioStreamMP3" +path="res://.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.mp3str" + +[deps] + +source_file="res://audio/music/rumble_loop.mp3" +dest_files=[ "res://.import/rumble_loop.mp3-8296079a496312740d286c71cb69f818.mp3str" ] + +[params] + +loop=true +loop_offset=0 diff --git a/audio/sounds/a_hurt.ogg b/audio/sounds/a_hurt.ogg new file mode 100644 index 0000000..fc50d2d Binary files /dev/null and b/audio/sounds/a_hurt.ogg differ diff --git a/audio/sounds/a_hurt.ogg.import b/audio/sounds/a_hurt.ogg.import new file mode 100644 index 0000000..b009f5c --- /dev/null +++ b/audio/sounds/a_hurt.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.oggstr" + +[deps] + +source_file="res://audio/sounds/a_hurt.ogg" +dest_files=[ "res://.import/a_hurt.ogg-a562e9409cf963b74445d6ea13ce9354.oggstr" ] + +[params] + +loop=false +loop_offset=0 diff --git a/export_presets.cfg b/export_presets.cfg index a196649..787ede5 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -7,7 +7,7 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="../output/test_build.exe" +export_path="../demos/Hero Mark 2 2022 Demo/hero mark 2_win.exe" script_export_mode=1 script_encryption_key="" @@ -40,3 +40,28 @@ application/product_name="" application/file_description="" application/copyright="" application/trademarks="" + +[preset.1] + +name="Linux/X11" +platform="Linux/X11" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="../demos/Hero Mark 2 2022 Demo/lin/hero mark 2_lin.x86_64" +script_export_mode=1 +script_encryption_key="" + +[preset.1.options] + +custom_template/debug="" +custom_template/release="" +binary_format/64_bits=true +binary_format/embed_pck=false +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true diff --git a/game.gd b/game.gd index b038488..4845922 100644 --- a/game.gd +++ b/game.gd @@ -1,7 +1,9 @@ extends Node var resolution = Vector2(256,192) +onready var viewport = get_parent().get_node("Main/Control/ViewportContainer/Viewport") var current_sector = Vector2(0,0) +var fullscreen = false #Onreadys onready var viewport_container = get_parent().get_node("Main/Control/ViewportContainer") #Collectibles @@ -10,10 +12,14 @@ var stars = [false,false,false,false,false] var shards = 0 var arrows = 0 var score = 0 +var high_score = 0 +var lives = 2 #Audio Channels onready var ac_jump = $JumpSound onready var ac_collectible = $CollecitbleSound onready var ac_climb = $ClimbSound +onready var ac_die = $DieSound +onready var ac_music = $Music #Sounds onready var a_gold = preload("res://audio/sounds/snd_coin.ogg") onready var a_arrow = preload("res://audio/sounds/a_egg_collect.ogg") @@ -25,8 +31,11 @@ onready var a_climb_down = preload("res://audio/sounds/a_bmilc.ogg") onready var a_sword = preload("res://audio/sounds/sword.ogg") onready var a_doublejump = preload("res://audio/sounds/a_bree.wav") onready var a_shoot = preload("res://audio/sounds/a_egg_shoot.ogg") +onready var a_die = preload("res://audio/sounds/a_hurt.ogg") #Objects onready var block_text = preload("res://objects/hud/blocktext.tscn") +#Respawn point +var respawn_point = Vector2(32,166) #Instances a node func instance_node(node:PackedScene,x:float,y:float,parent): @@ -43,10 +52,35 @@ func play_sound(snd,player): func get_sector(pos): return (pos / resolution).floor() +#Return the current Map +func get_map(): + return viewport.get_children()[0] + +#Go to new map +func change_map(map): + get_map().queue_free() + instance_node(map,0,0,viewport) + func _process(delta): - #Restart scene - if Input.is_action_just_pressed("debug_restart"): - get_tree().reload_current_scene() #CRT FILTER if Input.is_action_just_pressed("crt"): viewport_container.material.set_shader_param("enabled",!viewport_container.material.get_shader_param("enabled")) + #Restart scene + if Input.is_action_just_pressed("debug_restart"): + if Game.score > Game.high_score: Game.high_score = Game.score + Game.score = 0 + Game.golds = 0 + Game.stars = [false,false,false,false,false] + Game.shards = 0 + Game.arrows = 0 + Game.lives = 2 + Game.ac_climb.stop() + get_tree().reload_current_scene() + #Fullscreen + if Input.is_action_just_pressed("fullscreen"): + print(fullscreen) + fullscreen = !fullscreen + if fullscreen: + OS.set_window_fullscreen(true) + else: + OS.set_window_fullscreen(false) diff --git a/game.tscn b/game.tscn index a55505b..5e75711 100644 --- a/game.tscn +++ b/game.tscn @@ -13,3 +13,9 @@ volume_db = -12.0 [node name="ClimbSound" type="AudioStreamPlayer" parent="."] volume_db = -12.0 + +[node name="Music" type="AudioStreamPlayer" parent="."] +volume_db = -13.5 + +[node name="DieSound" type="AudioStreamPlayer" parent="."] +volume_db = -12.0 diff --git a/graphics/exit/exit.png b/graphics/exit/exit.png new file mode 100644 index 0000000..5974678 Binary files /dev/null and b/graphics/exit/exit.png differ diff --git a/graphics/exit/exit.png.import b/graphics/exit/exit.png.import new file mode 100644 index 0000000..f40b72f --- /dev/null +++ b/graphics/exit/exit.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/exit.png-5434234d068c5cc7b377eff51dc629c9.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/exit/exit.png" +dest_files=[ "res://.import/exit.png-5434234d068c5cc7b377eff51dc629c9.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/graphics/tiles/spike.png b/graphics/tiles/spike.png new file mode 100644 index 0000000..64898e7 Binary files /dev/null and b/graphics/tiles/spike.png differ diff --git a/graphics/tiles/spike.png.import b/graphics/tiles/spike.png.import new file mode 100644 index 0000000..48c4397 --- /dev/null +++ b/graphics/tiles/spike.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/spike.png-a608aa67f6e0f5dc30513729727656ff.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/tiles/spike.png" +dest_files=[ "res://.import/spike.png-a608aa67f6e0f5dc30513729727656ff.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/graphics/tiles/water_bottom.png b/graphics/tiles/water_bottom.png new file mode 100644 index 0000000..b460aa7 Binary files /dev/null and b/graphics/tiles/water_bottom.png differ diff --git a/graphics/tiles/water_bottom.png.import b/graphics/tiles/water_bottom.png.import new file mode 100644 index 0000000..0d190ca --- /dev/null +++ b/graphics/tiles/water_bottom.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/tiles/water_bottom.png" +dest_files=[ "res://.import/water_bottom.png-e393cffcc7d5d462a9452f73af8184eb.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 +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/maps/demo_end.gd b/maps/demo_end.gd new file mode 100644 index 0000000..ebc694e --- /dev/null +++ b/maps/demo_end.gd @@ -0,0 +1,4 @@ +extends Node2D + +func _ready(): + $Score.text = str(Game.high_score) diff --git a/maps/demo_end.tscn b/maps/demo_end.tscn new file mode 100644 index 0000000..51e4a54 --- /dev/null +++ b/maps/demo_end.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://maps/demo_end.gd" type="Script" id=1] + +[node name="DemoEnd" type="Node2D"] +script = ExtResource( 1 ) + +[node name="ColorRect" type="ColorRect" parent="."] +margin_right = 259.0 +margin_bottom = 196.0 +color = Color( 0, 0, 0, 1 ) + +[node name="Label" type="Label" parent="."] +margin_left = 13.0 +margin_top = 24.0 +margin_right = 112.0 +margin_bottom = 38.0 +text = "Congratulations! you beat the demo! +Your high score is: + + + +Press \"R\" to play again!" + +[node name="Score" type="Label" parent="."] +margin_left = 136.0 +margin_top = 41.0 +margin_right = 235.0 +margin_bottom = 55.0 +text = "000000" diff --git a/maps/map01.gd b/maps/map01.gd new file mode 100644 index 0000000..cefcf06 --- /dev/null +++ b/maps/map01.gd @@ -0,0 +1,4 @@ +extends Node2D + +func _ready(): + Game.play_sound(load("res://audio/music/rumble_loop.mp3"),Game.ac_music) diff --git a/maps/map01.tscn b/maps/map01.tscn index 2e041b5..c3b3a78 100644 --- a/maps/map01.tscn +++ b/maps/map01.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=20 format=2] +[gd_scene load_steps=22 format=2] [ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1] [ext_resource path="res://objects/ladder/ladder.tscn" type="PackedScene" id=2] @@ -9,7 +9,7 @@ [ext_resource path="res://tilesets/t_grass.tres" type="TileSet" id=7] [ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=8] [ext_resource path="res://scripts/delete_on_game_running.gd" type="Script" id=9] -[ext_resource path="res://tilesets/t_water.tres" type="TileSet" id=10] +[ext_resource path="res://tilesets/t_death.tres" type="TileSet" id=10] [ext_resource path="res://objects/enemy/slime.tscn" type="PackedScene" id=11] [ext_resource path="res://objects/collectibles/shard.tscn" type="PackedScene" id=12] [ext_resource path="res://objects/enemy/bat.tscn" type="PackedScene" id=13] @@ -17,12 +17,15 @@ [ext_resource path="res://objects/barrier/barrier.tscn" type="PackedScene" id=15] [ext_resource path="res://objects/turniwood/turniwood.tscn" type="PackedScene" id=16] [ext_resource path="res://objects/collectibles/arrow.tscn" type="PackedScene" id=17] -[ext_resource path="res://objects/rock/rock.tscn" type="PackedScene" id=18] +[ext_resource path="res://maps/map01.gd" type="Script" id=18] +[ext_resource path="res://objects/death tile/death_tile.tscn" type="PackedScene" id=19] +[ext_resource path="res://objects/exit/exit.tscn" type="PackedScene" id=20] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 8, 128 ) [node name="Map" type="Node2D"] +script = ExtResource( 18 ) [node name="Camera2D" parent="." instance=ExtResource( 8 )] smoothing_enabled = false @@ -39,28 +42,28 @@ __meta__ = { tile_set = ExtResource( 7 ) cell_size = Vector2( 8, 8 ) format = 1 -tile_data = PoolIntArray( 1114164, 0, 3, 1114165, 0, 0, 1179692, 0, 3 ) +tile_data = PoolIntArray( 720943, 0, 0, 720944, 0, 0, 720945, 0, 0, 720946, 0, 0, 720947, 0, 0, 720948, 0, 0, 720949, 0, 0, 720950, 0, 0, 720951, 0, 0, 720952, 0, 0, 720953, 0, 0, 720954, 0, 0, 720955, 0, 0, 720956, 0, 0, 720957, 0, 0, 720958, 0, 0, 720959, 0, 0, 720960, 0, 0, 720961, 0, 0, 720962, 0, 0, 720963, 0, 0, 720964, 0, 0, 720965, 0, 0, 720966, 0, 0, 720967, 0, 0, 720968, 0, 0, 786503, 0, 3, 786504, 0, 3, 852039, 0, 3, 852040, 0, 3, 917572, 0, 3, 917573, 0, 3, 917574, 0, 3, 917575, 0, 3, 917576, 0, 3, 983108, 0, 3, 983111, 0, 3, 983112, 0, 3, 1048641, 0, 3, 1048642, 0, 3, 1048643, 0, 3, 1048647, 0, 3, 1048648, 0, 3, 1114164, 0, 3, 1114165, 0, 0, 1179692, 0, 3 ) [node name="Ground" type="TileMap" parent="."] tile_set = ExtResource( 7 ) cell_size = Vector2( 8, 8 ) format = 1 -tile_data = PoolIntArray( 262192, 0, 65536, 262193, 0, 65537, 262194, 0, 65537, 262195, 0, 65537, 262196, 0, 65537, 262197, 0, 65537, 262198, 0, 65537, 262199, 0, 65538, 262204, 0, 65536, 262205, 0, 65537, 262206, 0, 65537, 262207, 0, 65537, 327683, 0, 65536, 327684, 0, 65537, 327685, 0, 65537, 327686, 0, 65537, 327687, 0, 65537, 327688, 0, 65537, 327689, 0, 65537, 327690, 0, 65537, 327691, 0, 65538, 327696, 2, 2, 327702, 2, 3, 327703, 2, 3, 393231, 0, 65536, 393232, 0, 65537, 393233, 0, 65538, 393236, 0, 65536, 393237, 0, 65537, 393238, 0, 65537, 393239, 0, 65537, 393240, 0, 65537, 393241, 0, 65538, 393244, 0, 65537, 393245, 0, 65537, 393246, 0, 65537, 393247, 0, 65537, 393248, 0, 65537, 393249, 0, 65537, 393250, 0, 65537, 393251, 0, 65538, 393253, 0, 65536, 393254, 0, 65537, 393255, 0, 65537, 393256, 0, 65537, 393257, 0, 65537, 393258, 0, 65537, 393259, 0, 65538, 524321, 0, 65536, 524322, 0, 65537, 524323, 0, 65538, 589844, 0, 65536, 589845, 0, 65537, 589846, 0, 65537, 589847, 0, 65537, 589848, 0, 65537, 589849, 0, 65538, 655368, 0, 65536, 655369, 0, 65537, 655370, 0, 65537, 655371, 0, 65537, 655372, 0, 65537, 655373, 0, 65538, 720906, 0, 196611, 720942, 0, 131072, 720943, 0, 0, 720944, 0, 0, 720945, 0, 0, 720946, 0, 0, 720947, 0, 0, 720948, 0, 0, 720949, 0, 0, 720950, 0, 0, 720951, 0, 0, 720952, 0, 0, 720953, 0, 0, 720954, 0, 0, 720955, 0, 0, 720956, 0, 0, 720957, 0, 0, 720958, 0, 0, 720959, 0, 0, 786442, 0, 196610, 786477, 0, 131072, 786478, 0, 131075, 786479, 0, 3, 786480, 0, 3, 786481, 0, 3, 786482, 0, 3, 786483, 0, 3, 786484, 0, 3, 786485, 0, 3, 786486, 0, 3, 786487, 0, 3, 786488, 0, 3, 786489, 0, 3, 786490, 0, 3, 786491, 0, 3, 786492, 0, 3, 786493, 0, 3, 786494, 0, 3, 786495, 0, 3, 851968, 0, 65537, 851969, 0, 65537, 851970, 0, 65537, 851971, 0, 65537, 851972, 0, 65537, 851973, 0, 65538, 851978, 0, 65539, 851989, 2, 2, 852012, 0, 131072, 852013, 0, 131075, 852014, 0, 3, 852015, 0, 3, 852016, 0, 3, 852017, 0, 3, 852018, 0, 3, 852019, 0, 3, 852020, 0, 3, 852021, 0, 3, 852022, 0, 3, 852023, 0, 3, 852024, 0, 3, 852025, 0, 3, 852026, 0, 3, 852027, 0, 3, 852028, 0, 3, 852029, 0, 3, 852030, 0, 3, 852031, 0, 3, 917514, 0, 65537, 917515, 0, 65537, 917516, 0, 65537, 917517, 0, 65537, 917518, 0, 65537, 917519, 0, 65537, 917520, 0, 65537, 917521, 0, 65538, 917525, 0, 65536, 917526, 0, 65537, 917527, 0, 65537, 917528, 0, 65537, 917529, 0, 65537, 917530, 0, 65537, 917531, 0, 65537, 917532, 0, 65537, 917533, 0, 65537, 917534, 0, 65537, 917535, 0, 65537, 917536, 0, 65537, 917537, 0, 65537, 917538, 0, 65538, 917541, 0, 65536, 917542, 0, 65537, 917543, 0, 65537, 917544, 0, 65537, 917545, 0, 65537, 917546, 0, 65537, 917547, 0, 65537, 917548, 0, 131075, 917549, 0, 3, 917550, 0, 3, 917551, 0, 3, 917552, 0, 3, 917553, 0, 3, 917554, 0, 3, 917555, 0, 3, 917556, 0, 3, 917557, 0, 3, 917558, 0, 3, 917559, 0, 3, 917560, 0, 3, 917561, 0, 3, 917562, 0, 3, 917563, 0, 3, 917564, 0, 3, 917565, 0, 3, 917566, 0, 3, 917567, 0, 3, 983084, 0, 3, 983085, 0, 3, 983086, 0, 3, 983087, 0, 3, 983088, 0, 3, 983089, 0, 3, 983090, 0, 3, 983091, 0, 3, 983092, 0, 3, 983093, 0, 3, 983094, 0, 3, 983095, 0, 3, 983096, 0, 3, 983097, 0, 3, 983098, 0, 3, 983099, 0, 3, 983100, 0, 3, 983101, 0, 3, 983102, 0, 3, 983103, 0, 3, 1048620, 0, 3, 1048621, 0, 3, 1048622, 0, 3, 1048623, 0, 3, 1048624, 0, 3, 1048625, 0, 3, 1048626, 0, 3, 1048627, 0, 3, 1048628, 0, 3, 1048629, 0, 3, 1048630, 0, 3, 1048631, 0, 3, 1048632, 0, 3, 1048633, 0, 3, 1048634, 0, 3, 1048635, 0, 3, 1048636, 0, 3, 1048637, 0, 3, 1048638, 0, 3, 1048639, 0, 3, 1114156, 0, 3, 1114157, 0, 3, 1114158, 0, 3, 1114159, 0, 3, 1114160, 0, 3, 1114161, 0, 3, 1114162, 0, 3, 1114163, 0, 3, 1114164, 0, 0, 1114165, 0, 65536, 1114166, 0, 0, 1114167, 0, 0, 1114168, 0, 0, 1114169, 0, 0, 1114170, 0, 0, 1114171, 0, 0, 1114172, 0, 0, 1114173, 0, 0, 1114174, 0, 0, 1114175, 0, 0, 1179649, 0, 65536, 1179650, 0, 65537, 1179651, 0, 65538, 1179654, 0, 65536, 1179655, 0, 65537, 1179656, 0, 65537, 1179657, 0, 65537, 1179658, 0, 65537, 1179659, 0, 65537, 1179660, 0, 65537, 1179661, 0, 65537, 1179662, 0, 65538, 1179688, 0, 131072, 1179689, 0, 0, 1179690, 0, 0, 1179691, 0, 0, 1179692, 0, 131073, 1179693, 0, 3, 1179694, 0, 3, 1179695, 0, 3, 1179696, 0, 3, 1179697, 0, 3, 1179698, 0, 3, 1179699, 0, 3, 1179700, 0, 3, 1179701, 0, 3, 1179702, 0, 3, 1179703, 0, 3, 1179704, 0, 3, 1179705, 0, 3, 1179706, 0, 3, 1179707, 0, 3, 1179708, 0, 3, 1179709, 0, 3, 1179710, 0, 3, 1179711, 0, 3, 1245202, 2, 2, 1245207, 0, 196611, 1245224, 0, 2, 1245225, 0, 1, 1245226, 0, 1, 1245227, 0, 1, 1245228, 536870912, 2, 1245229, 0, 3, 1245230, 0, 3, 1245231, 0, 3, 1245232, 0, 3, 1245233, 0, 3, 1245234, 0, 3, 1245235, 0, 3, 1245236, 0, 3, 1245237, 0, 3, 1245238, 0, 3, 1245239, 0, 3, 1245240, 0, 3, 1245241, 0, 3, 1245242, 0, 3, 1245243, 0, 3, 1245244, 0, 3, 1245245, 0, 3, 1245246, 0, 3, 1245247, 0, 3, 1310736, 0, 131072, 1310737, 536870912, 0, 1310738, 536870912, 0, 1310739, 536870912, 0, 1310740, 0, 131073, 1310743, 1073741824, 196611, 1310760, 0, 2, 1310761, 0, 1, 1310762, 0, 1, 1310763, 0, 1, 1310764, 536870912, 2, 1310765, 0, 3, 1310766, 0, 3, 1310767, 0, 3, 1310768, 0, 3, 1310769, 0, 3, 1310770, 0, 3, 1310771, 0, 3, 1310772, 0, 3, 1310773, 0, 3, 1310774, 0, 3, 1310775, 0, 3, 1310776, 0, 3, 1310777, 0, 3, 1310778, 0, 3, 1310779, 0, 3, 1310780, 0, 3, 1310781, 0, 3, 1310782, 0, 3, 1310783, 0, 3, 1376257, 2, 0, 1376261, 2, 1, 1376263, 2, 2, 1376266, 2, 2, 1376269, 2, 3, 1376271, 0, 131072, 1376272, 0, 131075, 1376273, 536870912, 1, 1376274, 536870912, 1, 1376275, 536870912, 1, 1376276, 0, 131074, 1376277, 0, 131073, 1376279, 0, 65539, 1376281, 2, 1, 1376296, 0, 2, 1376297, 0, 1, 1376298, 0, 1, 1376299, 0, 1, 1376300, 536870912, 2, 1376301, 0, 3, 1376302, 0, 3, 1376303, 0, 3, 1376304, 0, 3, 1376305, 0, 3, 1376306, 0, 3, 1376307, 0, 3, 1376308, 0, 3, 1376309, 0, 3, 1376310, 0, 3, 1376311, 0, 3, 1376312, 0, 3, 1376313, 0, 3, 1376314, 0, 3, 1376315, 0, 3, 1376316, 0, 3, 1376317, 0, 3, 1376318, 0, 3, 1376319, 0, 3, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 131075, 1441808, 0, 1, 1441809, 0, 1, 1441810, 0, 1, 1441811, 0, 1, 1441812, 0, 1, 1441813, 0, 131074, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1441824, 0, 0, 1441825, 0, 0, 1441826, 0, 0, 1441827, 0, 0, 1441828, 0, 0, 1441829, 0, 0, 1441830, 0, 0, 1441831, 0, 0, 1441832, 0, 131075, 1441833, 0, 1, 1441834, 0, 1, 1441835, 0, 1, 1441836, 0, 131074, 1441837, 0, 3, 1441838, 0, 3, 1441839, 0, 3, 1441840, 0, 3, 1441841, 0, 3, 1441842, 0, 3, 1441843, 0, 3, 1441844, 0, 3, 1441845, 0, 0, 1441846, 0, 0, 1441847, 0, 0, 1441848, 0, 0, 1441849, 0, 0, 1441850, 0, 0, 1441851, 0, 0, 1441852, 0, 0, 1441853, 0, 0, 1441854, 0, 0, 1441855, 0, 0, 1441856, 0, 0, 1441857, 0, 0, 1441858, 0, 0, 1441859, 0, 0, 1441860, 0, 0, 1441861, 0, 0, 1441862, 0, 0, 1441863, 0, 0, 1441864, 0, 0, 1441865, 0, 0, 1441866, 0, 0, 1441867, 0, 0, 1441868, 0, 0, 1441869, 0, 0, 1441870, 0, 0, 1441871, 0, 0, 1441872, 0, 0, 1441873, 0, 0, 1441874, 0, 0, 1441875, 0, 0, 1441876, 0, 0, 1441877, 0, 0, 1441878, 0, 0, 1441879, 0, 0, 1441880, 0, 0, 1441881, 0, 0, 1441882, 0, 0, 1441883, 0, 0, 1441884, 0, 0, 1441885, 0, 0, 1441886, 0, 0, 1441887, 0, 0, 1507328, 0, 1, 1507329, 0, 1, 1507330, 0, 1, 1507331, 0, 1, 1507332, 0, 1, 1507333, 0, 1, 1507334, 0, 1, 1507335, 0, 1, 1507336, 0, 1, 1507337, 0, 1, 1507338, 0, 1, 1507339, 0, 1, 1507340, 0, 1, 1507341, 0, 1, 1507342, 0, 1, 1507343, 0, 1, 1507344, 0, 1, 1507345, 0, 1, 1507346, 0, 1, 1507347, 0, 1, 1507348, 0, 1, 1507349, 0, 1, 1507350, 0, 1, 1507351, 0, 1, 1507352, 0, 1, 1507353, 0, 1, 1507354, 0, 1, 1507355, 0, 1, 1507356, 0, 1, 1507357, 0, 1, 1507358, 0, 1, 1507359, 0, 1, 1507360, 0, 1, 1507361, 0, 1, 1507362, 0, 1, 1507363, 0, 1, 1507364, 0, 1, 1507365, 0, 1, 1507366, 0, 1, 1507367, 0, 1, 1507368, 0, 1, 1507369, 0, 1, 1507370, 0, 1, 1507371, 0, 1, 1507372, 0, 1, 1507373, 0, 1, 1507374, 0, 1, 1507375, 0, 1, 1507376, 0, 1, 1507377, 0, 1, 1507378, 0, 1, 1507379, 0, 1, 1507380, 0, 1, 1507381, 0, 1, 1507382, 0, 1, 1507383, 0, 1, 1507384, 0, 1, 1507385, 0, 1, 1507386, 0, 1, 1507387, 0, 1, 1507388, 0, 1, 1507389, 0, 1, 1507390, 0, 1, 1507391, 0, 1, 1507392, 0, 1, 1507393, 0, 1, 1507394, 0, 1, 1507395, 0, 1, 1507396, 0, 1, 1507397, 0, 1, 1507398, 0, 1, 1507399, 0, 1, 1507400, 0, 1, 1507401, 0, 1, 1507402, 0, 1, 1507403, 0, 1, 1507404, 0, 1, 1507405, 0, 1, 1507406, 0, 1, 1507407, 0, 1, 1507408, 0, 1, 1507409, 0, 1, 1507410, 0, 1, 1507411, 0, 1, 1507412, 0, 1, 1507413, 0, 1, 1507414, 0, 1, 1507415, 0, 1, 1507416, 0, 1, 1507417, 0, 1, 1507418, 0, 1, 1507419, 0, 1, 1507420, 0, 1, 1507421, 0, 1, 1507422, 0, 1, 1507423, 0, 1 ) +tile_data = PoolIntArray( 196668, 0, 0, 196669, 0, 0, 196670, 0, 0, 196671, 0, 0, 196672, 0, 0, 196673, 0, 131073, 262194, 0, 65536, 262195, 0, 65537, 262196, 0, 65537, 262197, 0, 65537, 262198, 0, 65537, 262199, 0, 65538, 262204, 0, 3, 262205, 0, 3, 262206, 0, 3, 262207, 0, 3, 262208, 0, 1, 262209, 0, 131074, 262210, 0, 0, 262211, 0, 0, 262212, 0, 131073, 327683, 0, 65536, 327684, 0, 65537, 327685, 0, 65537, 327686, 0, 65537, 327687, 0, 65537, 327688, 0, 65537, 327689, 0, 65537, 327690, 0, 65537, 327691, 0, 65538, 327696, 2, 2, 327702, 2, 3, 327703, 2, 3, 327740, 0, 3, 327741, 0, 3, 327742, 0, 3, 327743, 0, 3, 327744, 0, 3, 327745, 0, 3, 327746, 0, 3, 327747, 0, 3, 327748, 0, 131074, 327749, 0, 131073, 393231, 0, 65536, 393232, 0, 65537, 393233, 0, 65538, 393236, 0, 65536, 393237, 0, 65537, 393238, 0, 65537, 393239, 0, 65537, 393240, 0, 65537, 393241, 0, 65538, 393244, 0, 65537, 393245, 0, 65537, 393246, 0, 65537, 393247, 0, 65537, 393248, 0, 65537, 393249, 0, 65537, 393250, 0, 65537, 393251, 0, 65537, 393252, 0, 65537, 393253, 0, 65537, 393254, 0, 65537, 393255, 0, 65537, 393256, 0, 65537, 393257, 0, 65537, 393258, 0, 65537, 393259, 0, 65538, 393276, 0, 3, 393277, 0, 3, 393278, 0, 3, 393279, 0, 3, 393280, 0, 3, 393281, 0, 3, 393282, 0, 3, 393283, 0, 3, 393284, 0, 3, 393285, 0, 3, 393290, 0, 65536, 393291, 0, 65537, 393292, 0, 65538, 393298, 0, 65537, 393299, 0, 65537, 393300, 0, 65537, 393301, 0, 65537, 393302, 0, 65537, 393303, 0, 65537, 393304, 0, 65537, 393305, 0, 65537, 393306, 0, 65537, 393307, 0, 65537, 393308, 0, 65537, 393309, 0, 65537, 393310, 0, 65537, 393311, 0, 65537, 458812, 0, 3, 458813, 0, 3, 458814, 0, 3, 458815, 0, 3, 458816, 0, 3, 458817, 0, 3, 458818, 0, 3, 458819, 0, 3, 458820, 0, 3, 458821, 0, 3, 524348, 0, 3, 524349, 0, 3, 524350, 0, 3, 524351, 0, 3, 524352, 0, 3, 524353, 0, 3, 524354, 0, 3, 524355, 0, 3, 524356, 0, 3, 524357, 0, 3, 589844, 0, 65536, 589845, 0, 65537, 589846, 0, 65537, 589847, 0, 65537, 589848, 0, 65537, 589849, 0, 65538, 589854, 0, 65536, 589855, 0, 65537, 589856, 0, 65537, 589857, 0, 65537, 589858, 0, 65537, 589884, 0, 3, 589885, 0, 3, 589886, 0, 3, 589887, 0, 3, 589888, 0, 3, 589889, 0, 3, 589890, 0, 3, 589891, 0, 3, 589892, 0, 3, 589893, 0, 3, 655368, 0, 65536, 655369, 0, 65537, 655370, 0, 65537, 655371, 0, 65537, 655372, 0, 65537, 655373, 0, 65538, 655420, 0, 3, 655421, 0, 3, 655422, 0, 3, 655423, 0, 3, 655424, 0, 3, 655425, 0, 3, 655426, 0, 3, 655427, 0, 3, 655428, 0, 3, 655429, 0, 3, 720906, 0, 196611, 720942, 0, 131072, 720943, 0, 0, 720944, 0, 0, 720945, 0, 0, 720946, 0, 0, 720947, 0, 0, 720948, 0, 0, 720949, 0, 0, 720950, 0, 0, 720951, 0, 0, 720952, 0, 0, 720953, 0, 0, 720954, 0, 0, 720955, 0, 0, 720956, 0, 0, 720957, 0, 0, 720958, 0, 0, 720959, 0, 0, 720960, 0, 0, 720961, 0, 0, 720962, 0, 0, 720963, 0, 0, 720964, 0, 0, 720965, 0, 0, 720966, 0, 0, 720967, 0, 0, 720968, 0, 0, 786442, 0, 196610, 786477, 0, 131072, 786478, 0, 131075, 786479, 0, 3, 786480, 0, 3, 786481, 0, 3, 786482, 0, 3, 786483, 0, 3, 786484, 0, 3, 786485, 0, 3, 786486, 0, 3, 786487, 0, 3, 786488, 0, 3, 786489, 0, 3, 786490, 0, 3, 786491, 0, 3, 786492, 0, 3, 786493, 0, 3, 786494, 0, 3, 786495, 0, 3, 786496, 0, 3, 786497, 0, 3, 786498, 0, 3, 786499, 0, 3, 786500, 0, 3, 786501, 0, 3, 786502, 0, 3, 786513, 0, 65537, 786514, 0, 65537, 786515, 0, 65537, 786516, 0, 65537, 786517, 0, 65537, 786518, 0, 65537, 786524, 0, 65537, 786525, 0, 65537, 786526, 0, 65537, 786527, 0, 65537, 851968, 0, 65537, 851969, 0, 65537, 851970, 0, 65537, 851971, 0, 65537, 851972, 0, 65537, 851973, 0, 65538, 851978, 0, 65539, 851989, 2, 2, 852012, 0, 131072, 852013, 0, 131075, 852014, 0, 3, 852015, 0, 3, 852016, 0, 3, 852017, 0, 3, 852018, 0, 3, 852019, 0, 3, 852020, 0, 3, 852021, 0, 3, 852022, 0, 3, 852023, 0, 3, 852024, 0, 3, 852025, 0, 3, 852026, 0, 3, 852027, 0, 3, 852028, 0, 3, 852029, 0, 3, 852030, 0, 3, 852031, 0, 3, 852032, 0, 3, 852033, 0, 3, 852034, 0, 3, 852035, 0, 3, 852036, 0, 3, 852037, 0, 3, 852038, 0, 3, 917514, 0, 65537, 917515, 0, 65537, 917516, 0, 65537, 917517, 0, 65537, 917518, 0, 65537, 917519, 0, 65537, 917520, 0, 65537, 917521, 0, 65538, 917525, 0, 65536, 917526, 0, 65537, 917527, 0, 65537, 917528, 0, 65537, 917529, 0, 65537, 917530, 0, 65537, 917531, 0, 65537, 917532, 0, 65537, 917533, 0, 65537, 917534, 0, 65537, 917535, 0, 65537, 917536, 0, 65537, 917537, 0, 65537, 917538, 0, 65538, 917541, 0, 65536, 917542, 0, 65537, 917543, 0, 65537, 917544, 0, 65537, 917545, 0, 65537, 917546, 0, 65537, 917547, 0, 65537, 917548, 0, 131075, 917549, 0, 3, 917550, 0, 3, 917551, 0, 3, 917552, 0, 3, 917553, 0, 3, 917554, 0, 3, 917555, 0, 3, 917556, 0, 3, 917557, 0, 3, 917558, 0, 3, 917559, 0, 3, 917560, 0, 3, 917561, 0, 3, 917562, 0, 3, 917563, 0, 3, 917564, 0, 3, 917565, 0, 3, 917566, 0, 3, 917567, 0, 3, 917568, 0, 3, 917569, 0, 3, 917570, 0, 3, 917571, 0, 3, 917573, 0, 131072, 917574, 0, 131073, 983084, 0, 3, 983085, 0, 3, 983086, 0, 3, 983087, 0, 3, 983088, 0, 3, 983089, 0, 3, 983090, 0, 3, 983091, 0, 3, 983092, 0, 3, 983093, 0, 3, 983094, 0, 3, 983095, 0, 3, 983096, 0, 3, 983097, 0, 3, 983098, 0, 3, 983099, 0, 3, 983100, 0, 3, 983101, 0, 3, 983102, 0, 3, 983103, 0, 3, 983104, 0, 3, 983105, 0, 3, 983106, 0, 3, 983107, 0, 3, 983108, 0, 131072, 983109, 0, 131075, 983110, 536870912, 2, 1048620, 0, 3, 1048621, 0, 3, 1048622, 0, 3, 1048623, 0, 3, 1048624, 0, 3, 1048625, 0, 3, 1048626, 0, 3, 1048627, 0, 3, 1048628, 0, 3, 1048629, 0, 3, 1048630, 0, 3, 1048631, 0, 3, 1048632, 0, 3, 1048633, 0, 3, 1048634, 0, 3, 1048635, 0, 3, 1048636, 0, 3, 1048637, 0, 3, 1048638, 0, 3, 1048639, 0, 3, 1048640, 0, 3, 1048641, 0, 3, 1048642, 0, 3, 1048643, 0, 131072, 1048644, 0, 131075, 1048645, 0, 1, 1048646, 536870912, 2, 1114133, 0, 65536, 1114134, 0, 65537, 1114135, 0, 65537, 1114136, 0, 65537, 1114137, 0, 65537, 1114138, 0, 65537, 1114139, 0, 65537, 1114140, 0, 65537, 1114141, 0, 65537, 1114142, 0, 65537, 1114143, 0, 65537, 1114144, 0, 65537, 1114145, 0, 65537, 1114146, 0, 65538, 1114156, 0, 3, 1114157, 0, 3, 1114158, 0, 3, 1114159, 0, 3, 1114160, 0, 3, 1114161, 0, 3, 1114162, 0, 3, 1114163, 0, 3, 1114165, 0, 65536, 1114166, 0, 0, 1114167, 0, 0, 1114168, 0, 0, 1114169, 0, 0, 1114170, 0, 0, 1114171, 0, 0, 1114172, 0, 0, 1114173, 0, 0, 1114174, 0, 0, 1114175, 0, 0, 1114176, 536870912, 0, 1114177, 536870912, 0, 1114178, 536870912, 0, 1114179, 0, 131075, 1114180, 0, 1, 1114181, 0, 1, 1114182, 0, 131074, 1114183, 0, 0, 1114184, 536870912, 0, 1114193, 0, 65537, 1114194, 0, 65537, 1114195, 0, 65537, 1114196, 0, 65537, 1114197, 0, 65537, 1114204, 0, 65537, 1114205, 0, 65537, 1114206, 0, 65537, 1114207, 0, 65537, 1179649, 0, 65536, 1179650, 0, 65537, 1179651, 0, 65538, 1179654, 0, 65536, 1179655, 0, 65537, 1179656, 0, 65537, 1179657, 0, 65537, 1179658, 0, 65537, 1179659, 0, 65537, 1179660, 0, 65537, 1179661, 0, 65537, 1179662, 0, 65538, 1179688, 0, 131072, 1179689, 0, 0, 1179690, 0, 0, 1179691, 0, 0, 1179692, 0, 131073, 1179693, 0, 3, 1179694, 0, 3, 1179695, 0, 3, 1179696, 0, 3, 1179697, 0, 3, 1179698, 0, 3, 1179699, 0, 3, 1179700, 0, 3, 1179701, 0, 3, 1179702, 0, 3, 1179703, 0, 3, 1179704, 0, 3, 1179705, 0, 3, 1179706, 0, 3, 1179707, 0, 3, 1179708, 0, 3, 1179709, 0, 3, 1179710, 0, 3, 1179711, 536870912, 1, 1179712, 536870912, 3, 1179713, 536870912, 3, 1179714, 536870912, 3, 1179715, 536870912, 3, 1179716, 536870912, 3, 1179717, 536870912, 3, 1179718, 536870912, 3, 1179719, 536870912, 3, 1179720, 536870912, 3, 1245202, 2, 2, 1245224, 0, 2, 1245225, 0, 1, 1245226, 0, 1, 1245227, 0, 1, 1245228, 536870912, 2, 1245229, 0, 3, 1245230, 0, 3, 1245231, 0, 3, 1245232, 0, 3, 1245233, 0, 3, 1245234, 0, 3, 1245235, 0, 3, 1245236, 0, 3, 1245237, 0, 3, 1245238, 0, 3, 1245239, 0, 3, 1245240, 0, 3, 1245241, 0, 3, 1245242, 0, 3, 1245243, 0, 3, 1245244, 0, 3, 1245245, 0, 3, 1245246, 0, 3, 1245247, 536870912, 1, 1245248, 536870912, 3, 1245249, 536870912, 3, 1245250, 536870912, 3, 1245251, 536870912, 3, 1245252, 536870912, 3, 1245253, 536870912, 3, 1245254, 536870912, 3, 1245255, 536870912, 3, 1245256, 536870912, 3, 1310736, 0, 131072, 1310737, 536870912, 0, 1310738, 536870912, 0, 1310739, 536870912, 0, 1310740, 0, 131073, 1310760, 0, 2, 1310761, 0, 1, 1310762, 0, 1, 1310763, 0, 1, 1310764, 536870912, 2, 1310765, 0, 3, 1310766, 0, 3, 1310767, 0, 3, 1310768, 0, 3, 1310769, 0, 3, 1310770, 0, 3, 1310771, 0, 3, 1310772, 0, 3, 1310773, 0, 3, 1310774, 0, 3, 1310775, 0, 3, 1310776, 0, 3, 1310777, 0, 3, 1310778, 0, 3, 1310779, 0, 3, 1310780, 0, 3, 1310781, 0, 3, 1310782, 0, 3, 1310783, 536870912, 1, 1310784, 536870912, 3, 1310785, 536870912, 3, 1310786, 536870912, 3, 1310787, 536870912, 3, 1310788, 536870912, 3, 1310789, 536870912, 3, 1310790, 536870912, 3, 1310791, 536870912, 3, 1310792, 536870912, 3, 1376257, 2, 0, 1376261, 2, 1, 1376263, 2, 2, 1376266, 2, 2, 1376269, 2, 3, 1376271, 0, 131072, 1376272, 0, 131075, 1376273, 536870912, 1, 1376274, 536870912, 1, 1376275, 536870912, 1, 1376276, 0, 131074, 1376277, 0, 131073, 1376281, 2, 1, 1376296, 0, 2, 1376297, 0, 1, 1376298, 0, 1, 1376299, 0, 1, 1376300, 536870912, 2, 1376301, 0, 3, 1376302, 0, 3, 1376303, 0, 3, 1376304, 0, 3, 1376305, 0, 3, 1376306, 0, 3, 1376307, 0, 3, 1376308, 0, 3, 1376309, 0, 3, 1376310, 0, 3, 1376311, 0, 3, 1376312, 0, 3, 1376313, 0, 3, 1376314, 0, 3, 1376315, 0, 3, 1376316, 0, 3, 1376317, 0, 3, 1376318, 0, 3, 1376319, 536870912, 1, 1376320, 536870912, 3, 1376321, 536870912, 3, 1376322, 536870912, 3, 1376323, 536870912, 3, 1376324, 536870912, 3, 1376325, 536870912, 3, 1376326, 536870912, 3, 1376327, 536870912, 3, 1376328, 536870912, 3, 1441792, 0, 0, 1441793, 0, 0, 1441794, 0, 0, 1441795, 0, 0, 1441796, 0, 0, 1441797, 0, 0, 1441798, 0, 0, 1441799, 0, 0, 1441800, 0, 0, 1441801, 0, 0, 1441802, 0, 0, 1441803, 0, 0, 1441804, 0, 0, 1441805, 0, 0, 1441806, 0, 0, 1441807, 0, 131075, 1441808, 0, 1, 1441809, 0, 1, 1441810, 0, 1, 1441811, 0, 1, 1441812, 0, 1, 1441813, 0, 131074, 1441814, 0, 0, 1441815, 0, 0, 1441816, 0, 0, 1441817, 0, 0, 1441818, 0, 0, 1441819, 0, 0, 1441820, 0, 0, 1441821, 0, 0, 1441822, 0, 0, 1441823, 0, 0, 1441824, 0, 0, 1441825, 0, 0, 1441826, 0, 0, 1441827, 0, 0, 1441828, 0, 0, 1441829, 0, 0, 1441830, 0, 0, 1441831, 0, 0, 1441832, 0, 131075, 1441833, 0, 1, 1441834, 0, 1, 1441835, 0, 1, 1441836, 0, 131074, 1441837, 0, 3, 1441838, 0, 3, 1441839, 0, 3, 1441840, 0, 3, 1441841, 0, 3, 1441842, 0, 3, 1441843, 0, 3, 1441844, 0, 3, 1441845, 0, 0, 1441846, 0, 0, 1441847, 0, 0, 1441848, 0, 0, 1441849, 0, 0, 1441850, 0, 0, 1441851, 0, 0, 1441852, 0, 0, 1441853, 0, 0, 1441854, 0, 0, 1441855, 0, 0, 1441856, 0, 0, 1441857, 0, 0, 1441858, 0, 0, 1441859, 0, 0, 1441860, 0, 0, 1441861, 0, 0, 1441862, 0, 0, 1441863, 0, 0, 1441864, 0, 0, 1441865, 0, 0, 1441866, 0, 0, 1441867, 0, 0, 1441868, 0, 0, 1441869, 0, 0, 1441870, 0, 0, 1441871, 0, 0, 1441872, 0, 0, 1441873, 0, 0, 1441874, 0, 0, 1441875, 0, 0, 1441876, 0, 0, 1441877, 0, 0, 1441878, 0, 0, 1441879, 0, 0, 1441880, 0, 0, 1441881, 0, 0, 1441882, 0, 0, 1441883, 0, 0, 1441884, 0, 0, 1441885, 0, 0, 1441886, 0, 0, 1441887, 0, 0, 1507328, 0, 1, 1507329, 0, 1, 1507330, 0, 1, 1507331, 0, 1, 1507332, 0, 1, 1507333, 0, 1, 1507334, 0, 1, 1507335, 0, 1, 1507336, 0, 1, 1507337, 0, 1, 1507338, 0, 1, 1507339, 0, 1, 1507340, 0, 1, 1507341, 0, 1, 1507342, 0, 1, 1507343, 0, 1, 1507344, 0, 1, 1507345, 0, 1, 1507346, 0, 1, 1507347, 0, 1, 1507348, 0, 1, 1507349, 0, 1, 1507350, 0, 1, 1507351, 0, 1, 1507352, 0, 1, 1507353, 0, 1, 1507354, 0, 1, 1507355, 0, 1, 1507356, 0, 1, 1507357, 0, 1, 1507358, 0, 1, 1507359, 0, 1, 1507360, 0, 1, 1507361, 0, 1, 1507362, 0, 1, 1507363, 0, 1, 1507364, 0, 1, 1507365, 0, 1, 1507366, 0, 1, 1507367, 0, 1, 1507368, 0, 1, 1507369, 0, 1, 1507370, 0, 1, 1507371, 0, 1, 1507372, 0, 1, 1507373, 0, 1, 1507374, 0, 1, 1507375, 0, 1, 1507376, 0, 1, 1507377, 0, 1, 1507378, 0, 1, 1507379, 0, 1, 1507380, 0, 1, 1507381, 0, 1, 1507382, 0, 1, 1507383, 0, 1, 1507384, 0, 1, 1507385, 0, 1, 1507386, 0, 1, 1507387, 0, 1, 1507388, 0, 1, 1507389, 0, 1, 1507390, 0, 1, 1507391, 0, 1, 1507392, 0, 1, 1507393, 0, 1, 1507394, 0, 1, 1507395, 0, 1, 1507396, 0, 1, 1507397, 0, 1, 1507398, 0, 1, 1507399, 0, 1, 1507400, 0, 1, 1507401, 0, 1, 1507402, 0, 1, 1507403, 0, 1, 1507404, 0, 1, 1507405, 0, 1, 1507406, 0, 1, 1507407, 0, 1, 1507408, 0, 1, 1507409, 0, 1, 1507410, 0, 1, 1507411, 0, 1, 1507412, 0, 1, 1507413, 0, 1, 1507414, 0, 1, 1507415, 0, 1, 1507416, 0, 1, 1507417, 0, 1, 1507418, 0, 1, 1507419, 0, 1, 1507420, 0, 1, 1507421, 0, 1, 1507422, 0, 1, 1507423, 0, 1 ) [node name="Player" parent="." instance=ExtResource( 1 )] -position = Vector2( 32, 160 ) +position = Vector2( 32, 166 ) -[node name="Water" type="TileMap" parent="."] +[node name="Death" type="TileMap" parent="."] tile_set = ExtResource( 10 ) cell_size = Vector2( 8, 8 ) format = 1 -tile_data = PoolIntArray( 1441837, 0, 0, 1441838, 0, 0, 1441839, 0, 0, 1441840, 0, 0, 1441841, 0, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0 ) +tile_data = PoolIntArray( 1441837, 0, 0, 1441838, 0, 0, 1441839, 0, 0, 1441840, 0, 0, 1441841, 0, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 1507373, 3, 0, 1507374, 3, 0, 1507375, 3, 0, 1507376, 3, 0, 1507377, 3, 0, 1507378, 3, 0, 1507379, 3, 0, 1507380, 3, 0 ) [node name="Ladder" type="TileMap" parent="."] tile_set = ExtResource( 7 ) cell_size = Vector2( 8, 8 ) format = 1 -tile_data = PoolIntArray( 327707, 1, 0, 393243, 1, 0, 393260, 1, 0, 458779, 1, 0, 458796, 1, 0, 524315, 1, 0, 524332, 1, 0, 589851, 1, 0, 655363, 1, 0, 655387, 1, 0, 720899, 1, 0, 720923, 1, 0, 786435, 1, 0, 786459, 1, 0, 851995, 1, 0, 917511, 1, 0, 983047, 1, 0, 1048583, 1, 0, 1114119, 1, 0 ) +tile_data = PoolIntArray( 196666, 1, 0, 262202, 1, 0, 262215, 1, 0, 327707, 1, 0, 327738, 1, 0, 327751, 1, 0, 393243, 1, 0, 393260, 1, 0, 458779, 1, 0, 458796, 1, 0, 458832, 1, 0, 524315, 1, 0, 524332, 1, 0, 524368, 1, 0, 589851, 1, 0, 589904, 1, 0, 655363, 1, 0, 655387, 1, 0, 720899, 1, 0, 720923, 1, 0, 786435, 1, 0, 786459, 1, 0, 851995, 1, 0, 917511, 1, 0, 917579, 1, 0, 917583, 1, 0, 983047, 1, 0, 983115, 1, 0, 983119, 1, 0, 1048583, 1, 0, 1048651, 1, 0, 1048655, 1, 0, 1114119, 1, 0, 1114187, 1, 0, 1179723, 1, 0 ) [node name="StaticBody2D" type="StaticBody2D" parent="."] @@ -68,6 +71,10 @@ tile_data = PoolIntArray( 327707, 1, 0, 393243, 1, 0, 393260, 1, 0, 458779, 1, 0 position = Vector2( -8, 104 ) shape = SubResource( 1 ) +[node name="CollisionShape2D2" type="CollisionShape2D" parent="StaticBody2D"] +position = Vector2( 776, 112 ) +shape = SubResource( 1 ) + [node name="Platforms" type="Node2D" parent="."] [node name="Ladder" parent="Platforms" instance=ExtResource( 2 )] @@ -90,12 +97,40 @@ scale = Vector2( 1, 3 ) position = Vector2( 464, 24 ) scale = Vector2( 1, 3 ) +[node name="Ladder6" parent="Platforms" instance=ExtResource( 2 )] +position = Vector2( 600, 112 ) +scale = Vector2( 1, 5 ) + +[node name="Ladder7" parent="Platforms" instance=ExtResource( 2 )] +position = Vector2( 632, 112 ) +scale = Vector2( 1, 3 ) + +[node name="Ladder8" parent="Platforms" instance=ExtResource( 2 )] +position = Vector2( 640, 56 ) +scale = Vector2( 1, 3 ) + +[node name="Ladder10" parent="Platforms" instance=ExtResource( 2 )] +position = Vector2( 568, 32 ) +scale = Vector2( 1, 2 ) + [node name="Barrier" parent="Platforms" instance=ExtResource( 15 )] position = Vector2( 107, 86 ) scale = Vector2( 1, 26 ) cost = 20 label_offset = Vector2( 0, 4 ) +[node name="Barrier2" parent="Platforms" instance=ExtResource( 15 )] +position = Vector2( 736, 54 ) +scale = Vector2( 1, 41.92 ) +cost = 30 +label_offset = Vector2( 0, 4 ) + +[node name="Barrier3" parent="Platforms" instance=ExtResource( 15 )] +position = Vector2( 424, 144 ) +scale = Vector2( 1, 32 ) +cost = 40 +label_offset = Vector2( 0, 4 ) + [node name="Turniwood" parent="Platforms" instance=ExtResource( 16 )] position = Vector2( 368, 144 ) @@ -103,17 +138,42 @@ position = Vector2( 368, 144 ) position = Vector2( 304, 160 ) time = 70.0 +[node name="Turniwood4" parent="Platforms" instance=ExtResource( 16 )] +position = Vector2( 408, 160 ) +time = 70.0 + +[node name="Turniwood8" parent="Platforms" instance=ExtResource( 16 )] +position = Vector2( 288, 144 ) +time = 70.0 + [node name="Turniwood3" parent="Platforms" instance=ExtResource( 16 )] position = Vector2( 400, 144 ) -[node name="Rock" parent="Platforms" instance=ExtResource( 18 )] -position = Vector2( 464, 80 ) +[node name="Turniwood5" parent="Platforms" instance=ExtResource( 16 )] +position = Vector2( 704, 120 ) + +[node name="Turniwood6" parent="Platforms" instance=ExtResource( 16 )] +position = Vector2( 720, 104 ) + +[node name="Area2D" parent="Platforms" instance=ExtResource( 19 )] +position = Vector2( 360, 176 ) +scale = Vector2( 8, 2 ) + +[node name="Exit" parent="Platforms" instance=ExtResource( 20 )] +position = Vector2( 744, 36 ) +cost = 2 [node name="Collectibles" type="Node2D" parent="."] [node name="Shard" parent="Collectibles" instance=ExtResource( 12 )] position = Vector2( 32, 32 ) +[node name="Shard3" parent="Collectibles" instance=ExtResource( 12 )] +position = Vector2( 464, 168 ) + +[node name="Shard4" parent="Collectibles" instance=ExtResource( 12 )] +position = Vector2( 488, 16 ) + [node name="Shard2" parent="Collectibles" instance=ExtResource( 12 )] position = Vector2( 88, 104 ) @@ -151,11 +211,20 @@ position = Vector2( 72, 136 ) position = Vector2( 136, 104 ) [node name="Gold13" parent="Collectibles" instance=ExtResource( 5 )] -position = Vector2( 168, 104 ) +position = Vector2( 728, 168 ) [node name="Gold14" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 184, 104 ) +[node name="Gold43" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 208, 128 ) + +[node name="Gold44" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 232, 128 ) + +[node name="Gold45" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 264, 128 ) + [node name="Gold15" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 96, 72 ) @@ -176,11 +245,25 @@ color = 1 position = Vector2( 232, 104 ) color = 2 +[node name="Star4" parent="Collectibles" instance=ExtResource( 4 )] +position = Vector2( 520, 128 ) +color = 3 + +[node name="Star5" parent="Collectibles" instance=ExtResource( 4 )] +position = Vector2( 752, 128 ) +color = 4 + [node name="Gold21" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 120, 104 ) [node name="Arrow" parent="Collectibles" instance=ExtResource( 17 )] -position = Vector2( 272, 56 ) +position = Vector2( 264, 64 ) + +[node name="Arrow3" parent="Collectibles" instance=ExtResource( 17 )] +position = Vector2( 744, 88 ) + +[node name="Arrow2" parent="Collectibles" instance=ExtResource( 17 )] +position = Vector2( 528, 168 ) [node name="Gold18" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 440, 112 ) @@ -207,25 +290,28 @@ position = Vector2( 328, 88 ) position = Vector2( 344, 56 ) [node name="Gold30" parent="Collectibles" instance=ExtResource( 5 )] -position = Vector2( 304, 40 ) +position = Vector2( 296, 40 ) [node name="Gold31" parent="Collectibles" instance=ExtResource( 5 )] -position = Vector2( 336, 40 ) +position = Vector2( 328, 40 ) [node name="Gold35" parent="Collectibles" instance=ExtResource( 5 )] -position = Vector2( 392, 24 ) +position = Vector2( 408, 24 ) [node name="Gold36" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 432, 24 ) [node name="Gold34" parent="Collectibles" instance=ExtResource( 5 )] -position = Vector2( 320, 40 ) +position = Vector2( 680, 168 ) [node name="Gold32" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 264, 40 ) +[node name="Gold46" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 240, 64 ) + [node name="Gold33" parent="Collectibles" instance=ExtResource( 5 )] -position = Vector2( 280, 40 ) +position = Vector2( 624, 168 ) [node name="Gold25" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 312, 88 ) @@ -234,7 +320,40 @@ position = Vector2( 312, 88 ) position = Vector2( 344, 136 ) [node name="Gold16" parent="Collectibles" instance=ExtResource( 5 )] -position = Vector2( 472, 112 ) +position = Vector2( 464, 112 ) + +[node name="Gold40" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 488, 112 ) + +[node name="Gold38" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 600, 80 ) + +[node name="Gold41" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 576, 160 ) + +[node name="Gold42" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 544, 160 ) + +[node name="Gold39" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 632, 80 ) + +[node name="Gold47" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 672, 40 ) + +[node name="Gold48" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 696, 40 ) + +[node name="Gold51" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 664, 128 ) + +[node name="Gold52" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 720, 40 ) + +[node name="Gold49" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 680, 88 ) + +[node name="Gold50" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 656, 88 ) [node name="Enemies" type="Node2D" parent="."] @@ -242,14 +361,17 @@ position = Vector2( 472, 112 ) position = Vector2( 208, 104 ) scale = Vector2( -1, 1 ) +[node name="Slime4" parent="Enemies" instance=ExtResource( 11 )] +position = Vector2( 520, 16 ) + [node name="Bat" parent="Enemies" instance=ExtResource( 13 )] position = Vector2( 152, 48 ) left_up_boundry = 4.0 right_down_boundry = 2.0 [node name="Bat3" parent="Enemies" instance=ExtResource( 13 )] -position = Vector2( 288, 104 ) -right_down_boundry = 3.5 +position = Vector2( 288, 88 ) +right_down_boundry = 5.0 [node name="Bat4" parent="Enemies" instance=ExtResource( 13 )] position = Vector2( 388, 144 ) @@ -257,13 +379,26 @@ right_down_boundry = 3.5 [node name="Bat5" parent="Enemies" instance=ExtResource( 13 )] position = Vector2( 392, 48 ) -right_down_boundry = 3.0 -speed = 25 +right_down_boundry = 4.0 [node name="Bat6" parent="Enemies" instance=ExtResource( 13 )] position = Vector2( 432, 88 ) -left_up_boundry = 3.0 -speed = 25 +left_up_boundry = 4.0 + +[node name="Bat7" parent="Enemies" instance=ExtResource( 13 )] +position = Vector2( 620, 112 ) +left_up_boundry = 2.0 +right_down_boundry = 2.0 + +[node name="Bat8" parent="Enemies" instance=ExtResource( 13 )] +position = Vector2( 632, 48 ) +left_up_boundry = 2.0 +right_down_boundry = 2.0 + +[node name="Bat9" parent="Enemies" instance=ExtResource( 13 )] +position = Vector2( 584, 40 ) +left_up_boundry = 2.0 +right_down_boundry = 2.0 [node name="Bat2" parent="Enemies" instance=ExtResource( 13 )] position = Vector2( 48, 104 ) @@ -280,16 +415,31 @@ right_down_boundry = 2.0 speed = 35 [node name="Snake3" parent="Enemies" instance=ExtResource( 14 )] -position = Vector2( 432, 128 ) -right_down_boundry = 6.0 +position = Vector2( 440, 128 ) +right_down_boundry = 5.0 speed = 70 +[node name="Snake4" parent="Enemies" instance=ExtResource( 14 )] +position = Vector2( 440, 168 ) +right_down_boundry = 6.0 +speed = 80 + +[node name="Snake5" parent="Enemies" instance=ExtResource( 14 )] +position = Vector2( 568, 168 ) +right_down_boundry = 6.0 +speed = 60 + [node name="Snake2" parent="Enemies" instance=ExtResource( 14 )] position = Vector2( 216, 168 ) left_up_boundry = 3.0 right_down_boundry = 3.0 speed = 60 +[node name="Snake6" parent="Enemies" instance=ExtResource( 14 )] +position = Vector2( 224, 128 ) +left_up_boundry = 5.0 +speed = 60 + [node name="ColorRect2" type="ColorRect" parent="."] margin_left = 512.0 margin_right = 768.0 diff --git a/objects/camera.gd b/objects/camera.gd index 0975960..d91eeb3 100644 --- a/objects/camera.gd +++ b/objects/camera.gd @@ -16,6 +16,7 @@ func _process(delta): #Scroll screen when player is on different sector current_sector = (player.global_position / resolution).floor() if current_sector != last_sector: + Game.respawn_point = player.global_position + Vector2(8,0) if scroll_h: position.x = current_sector.x * resolution.x if scroll_v: position.y = current_sector.y * resolution.y last_sector = current_sector diff --git a/objects/death tile/death_tile.gd b/objects/death tile/death_tile.gd new file mode 100644 index 0000000..5d335b2 --- /dev/null +++ b/objects/death tile/death_tile.gd @@ -0,0 +1,6 @@ +extends Area2D + +func _on_Area2D_area_entered(area): + #Kill player + if area.is_in_group("player"): + area.get_parent().die() diff --git a/objects/death tile/death_tile.tscn b/objects/death tile/death_tile.tscn new file mode 100644 index 0000000..c069e95 --- /dev/null +++ b/objects/death tile/death_tile.tscn @@ -0,0 +1,15 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://objects/death tile/death_tile.gd" type="Script" id=1] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 4, 4 ) + +[node name="Area2D" type="Area2D"] +script = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +position = Vector2( 4, 4 ) +shape = SubResource( 1 ) + +[connection signal="area_entered" from="." to="." method="_on_Area2D_area_entered"] diff --git a/objects/enemy/bat.tscn b/objects/enemy/bat.tscn index 961565c..0fa42a0 100644 --- a/objects/enemy/bat.tscn +++ b/objects/enemy/bat.tscn @@ -26,7 +26,7 @@ animations = [ { } ] [sub_resource type="RectangleShape2D" id=5] -extents = Vector2( 5, 5 ) +extents = Vector2( 4, 4 ) [node name="Bat" type="Node2D"] script = ExtResource( 3 ) @@ -39,7 +39,6 @@ flip_sprite = false [node name="AnimatedSprite" type="AnimatedSprite" parent="."] material = SubResource( 1 ) frames = SubResource( 4 ) -frame = 1 playing = true [node name="Area2D" type="Area2D" parent="."] diff --git a/objects/enemy/snake.tscn b/objects/enemy/snake.tscn index e880c35..b39ddc5 100644 --- a/objects/enemy/snake.tscn +++ b/objects/enemy/snake.tscn @@ -26,7 +26,7 @@ animations = [ { } ] [sub_resource type="RectangleShape2D" id=5] -extents = Vector2( 5.5, 6 ) +extents = Vector2( 4, 4 ) [node name="Snake" type="Node2D"] script = ExtResource( 3 ) @@ -35,13 +35,12 @@ score_for_killing = 15 [node name="AnimatedSprite" type="AnimatedSprite" parent="."] material = SubResource( 1 ) frames = SubResource( 4 ) -frame = 1 playing = true [node name="Area2D" type="Area2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] -position = Vector2( 0.5, 2 ) +position = Vector2( 0, 4 ) shape = SubResource( 5 ) [connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"] diff --git a/objects/exit/exit.gd b/objects/exit/exit.gd new file mode 100644 index 0000000..f5f2608 --- /dev/null +++ b/objects/exit/exit.gd @@ -0,0 +1,19 @@ +extends Node2D + +export var cost = 0 +onready var label = $Label +onready var anims = $AnimationPlayer + +func _ready(): + anims.play("closed") + label.text = str(cost) + + +func _physics_process(delta): + if Game.shards >= cost: + anims.play("open") + +func _on_Area2D_area_entered(area): + if area.is_in_group("player"): + if Game.score > Game.high_score: Game.high_score = Game.score + Game.change_map(load("res://maps/demo_end.tscn")) diff --git a/objects/exit/exit.tscn b/objects/exit/exit.tscn new file mode 100644 index 0000000..69a555f --- /dev/null +++ b/objects/exit/exit.tscn @@ -0,0 +1,151 @@ +[gd_scene load_steps=9 format=2] + +[ext_resource path="res://scripts/theme.tres" type="Theme" id=1] +[ext_resource path="res://objects/exit/exit.gd" type="Script" id=2] +[ext_resource path="res://graphics/exit/exit.png" type="Texture" id=3] +[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=4] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 4 ) +shader_param/border_color = Color( 0, 0, 0, 1 ) +shader_param/border_corners = true + +[sub_resource type="RectangleShape2D" id=2] +extents = Vector2( 8, 7.5 ) + +[sub_resource type="Animation" id=3] +resource_name = "closed" +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:region_rect") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Rect2( 0, 0, 16, 24 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Area2D/CollisionShape2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Label:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ true ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Sprite:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Color( 1, 1, 1, 1 ) ] +} + +[sub_resource type="Animation" id=4] +resource_name = "open" +length = 0.8 +loop = true +tracks/0/type = "value" +tracks/0/path = NodePath("Sprite:region_rect") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 0, +"values": [ Rect2( 16, 0, 16, 24 ) ] +} +tracks/1/type = "value" +tracks/1/path = NodePath("Area2D/CollisionShape2D:disabled") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ false ] +} +tracks/2/type = "value" +tracks/2/path = NodePath("Label:visible") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/keys = { +"times": PoolRealArray( 0 ), +"transitions": PoolRealArray( 1 ), +"update": 1, +"values": [ false ] +} +tracks/3/type = "value" +tracks/3/path = NodePath("Sprite:modulate") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/keys = { +"times": PoolRealArray( 0, 0.4, 0.8 ), +"transitions": PoolRealArray( 1, 1, 1 ), +"update": 0, +"values": [ Color( 1, 0, 0, 1 ), Color( 0, 1, 0.203922, 1 ), Color( 1, 0, 0, 1 ) ] +} + +[node name="Exit" type="Node2D"] +z_index = -1 +script = ExtResource( 2 ) + +[node name="Label" type="Label" parent="."] +visible = false +margin_left = -3.0 +margin_top = -15.0 +margin_right = 37.0 +margin_bottom = 5.0 +theme = ExtResource( 1 ) +text = "2" + +[node name="Sprite" type="Sprite" parent="."] +material = SubResource( 1 ) +texture = ExtResource( 3 ) +region_enabled = true +region_rect = Rect2( 0, 0, 16, 24 ) + +[node name="Area2D" type="Area2D" parent="."] +z_index = -3 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2( 0, 4.5 ) +shape = SubResource( 2 ) +disabled = true + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +anims/closed = SubResource( 3 ) +anims/open = SubResource( 4 ) + +[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"] diff --git a/objects/hud/hud.gd b/objects/hud/hud.gd index 0e4e390..b2bef5b 100644 --- a/objects/hud/hud.gd +++ b/objects/hud/hud.gd @@ -9,6 +9,8 @@ onready var blue_star = $BlueStar onready var magenta_star = $MagentaStar onready var score_counter = $ScoreCounter onready var arrow_counter = $ArrowCounter +onready var lives_counter = $LivesCounter +onready var high_counter = $HighCounter func _physics_process(delta): #Gold Counter @@ -25,3 +27,8 @@ func _physics_process(delta): score_counter.text = "%06d" % Game.score #Arrow Counter arrow_counter.text = "%02d" % Game.arrows + ##TOUCH UP LATER + #Lives counter + lives_counter.text = str("LIVES:") + str(Game.lives) + #High counter + high_counter.text = str("HIGH:") + str("%06d" % Game.high_score) diff --git a/objects/hud/hud.tscn b/objects/hud/hud.tscn index a3ef2e3..31c9975 100644 --- a/objects/hud/hud.tscn +++ b/objects/hud/hud.tscn @@ -115,6 +115,22 @@ margin_bottom = 21.0 theme = ExtResource( 10 ) text = "000000" +[node name="HighCounter" type="Label" parent="HUD"] +margin_left = 178.0 +margin_top = 178.0 +margin_right = 262.0 +margin_bottom = 198.0 +theme = ExtResource( 10 ) +text = "High:000000" + +[node name="LivesCounter" type="Label" parent="HUD"] +margin_left = 1.0 +margin_top = 178.0 +margin_right = 85.0 +margin_bottom = 198.0 +theme = ExtResource( 10 ) +text = "Lives:2" + [node name="ArrowCounter" type="Label" parent="HUD"] margin_left = 237.0 margin_top = 1.0 diff --git a/objects/player/player.gd b/objects/player/player.gd index a13f585..293f29d 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -24,8 +24,11 @@ var jump_force = 150 var doublejump_force = 120 var current_ladder = null #Used for checking climbing every frame instead of area entered var can_doublejump = true +var can_move_in_air = false #Positions var arrowpos = Vector2(5,3) + #Tiles +onready var deathtiles = map.get_node("Death") ##Preload var pre_arrow = preload("res://objects/player/arrow_projectile.tscn") @@ -95,8 +98,9 @@ func _process_walk(): collision.get_collider().push(collision.normal) func _process_idle_walk(): + can_doublejump = false + can_move_in_air = false velocity.y = 0 - can_doublejump = true #Goto Fall if !is_on_floor(): current_state = State.FALL #Goto Jump @@ -123,6 +127,8 @@ func _process_fall(): if is_on_floor(): current_state = State.IDLE return + #Cant move in air + if !can_move_in_air: velocity.x = 0 func _process_jump_fall(): check_double_jump() @@ -131,6 +137,7 @@ func _process_jump_fall(): check_shoot() func _process_climb(): + can_move_in_air = true can_doublejump = true #Graphics anims.play("climb") @@ -184,6 +191,8 @@ func check_jump(): position.x -= sprite.scale.x * 5 anims.set_speed_scale(1) # Jump + can_doublejump = true + can_move_in_air = true velocity.y = 0 jump_pressure = 0 current_state = State.JUMP @@ -209,9 +218,10 @@ func check_shoot(): anims.play("shoot air") #Shoot immediately in air func move(hsp,vsp,flip:bool): - velocity.x = hsp * axis.x - #Flip - if flip: if sign(axis.x) != 0: sprite.scale.x = axis.x + if is_on_floor() or can_move_in_air: + velocity.x = hsp * axis.x + #Flip + if flip: if sign(axis.x) != 0: sprite.scale.x = axis.x func check_ladder(): if climb_ray.get_collider() != null: @@ -231,7 +241,20 @@ func check_ladder(): climb_ray.position.x = 4 * sprite.scale.x func die(): - get_tree().reload_current_scene() + position = Game.respawn_point + Game.lives -= 1 + Game.play_sound(Game.a_die,Game.ac_die) + if Game.lives < 0: + if Game.score > Game.high_score: Game.high_score = Game.score + Game.score = 0 + Game.golds = 0 + Game.stars = [false,false,false,false,false] + Game.shards = 0 + Game.arrows = 0 + Game.lives = 2 + Game.ac_climb.stop() + get_tree().reload_current_scene() + func _on_AnimationPlayer_animation_finished(anim_name): #Return to idle after slash @@ -255,3 +278,4 @@ func debug(): if Input.is_action_pressed("debug_move_player"): position = get_viewport().get_mouse_position() print(get_viewport().get_mouse_position()) + diff --git a/objects/turniwood/turniwood.tscn b/objects/turniwood/turniwood.tscn index 0190c5e..f8708cb 100644 --- a/objects/turniwood/turniwood.tscn +++ b/objects/turniwood/turniwood.tscn @@ -93,15 +93,17 @@ script = ExtResource( 1 ) [node name="Sprite" type="Sprite" parent="."] position = Vector2( 4, 4 ) +rotation = 1.5708 texture = ExtResource( 2 ) region_enabled = true -region_rect = Rect2( 0, 0, 8, 8 ) +region_rect = Rect2( 8, 0, 8, 8 ) [node name="StaticBody2D" type="StaticBody2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] position = Vector2( 4, 4 ) shape = SubResource( 1 ) +disabled = true [node name="AnimationPlayer" type="AnimationPlayer" parent="."] anims/idle = SubResource( 2 ) diff --git a/project.godot b/project.godot index 3e58672..484949f 100644 --- a/project.godot +++ b/project.godot @@ -64,6 +64,7 @@ ogg_vorbis={ jump={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":88,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null) ] } debug_restart={ @@ -94,6 +95,12 @@ debug_move_player={ shoot={ "deadzone": 0.5, "events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"physical_scancode":0,"unicode":0,"echo":false,"script":null) +, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":2,"pressure":0.0,"pressed":false,"script":null) + ] +} +fullscreen={ +"deadzone": 0.5, +"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":70,"physical_scancode":0,"unicode":0,"echo":false,"script":null) ] } diff --git a/tilesets/t_death.tres b/tilesets/t_death.tres new file mode 100644 index 0000000..e7007a5 --- /dev/null +++ b/tilesets/t_death.tres @@ -0,0 +1,70 @@ +[gd_resource type="TileSet" load_steps=4 format=2] + +[ext_resource path="res://graphics/tiles/water.tres" type="Texture" id=1] +[ext_resource path="res://graphics/tiles/spike.png" type="Texture" id=2] +[ext_resource path="res://graphics/tiles/water_bottom.png" type="Texture" id=3] + +[resource] +0/name = "water.tres 0" +0/texture = ExtResource( 1 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 8, 8 ) +0/tile_mode = 2 +0/autotile/icon_coordinate = Vector2( 0, 0 ) +0/autotile/tile_size = Vector2( 8, 8 ) +0/autotile/spacing = 0 +0/autotile/occluder_map = [ ] +0/autotile/navpoly_map = [ ] +0/autotile/priority_map = [ ] +0/autotile/z_index_map = [ ] +0/occluder_offset = Vector2( 0, 0 ) +0/navigation_offset = Vector2( 0, 0 ) +0/shape_offset = Vector2( 0, 0 ) +0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +0/shape_one_way = false +0/shape_one_way_margin = 0.0 +0/shapes = [ ] +0/z_index = 0 +1/name = "spike.png 1" +1/texture = ExtResource( 2 ) +1/tex_offset = Vector2( 0, 0 ) +1/modulate = Color( 1, 1, 1, 1 ) +1/region = Rect2( 0, 0, 8, 8 ) +1/tile_mode = 0 +1/occluder_offset = Vector2( 0, 0 ) +1/navigation_offset = Vector2( 0, 0 ) +1/shape_offset = Vector2( 0, 0 ) +1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +1/shape_one_way = false +1/shape_one_way_margin = 0.0 +1/shapes = [ ] +1/z_index = 0 +2/name = "spike.png 2" +2/texture = ExtResource( 2 ) +2/tex_offset = Vector2( 0, 0 ) +2/modulate = Color( 1, 1, 1, 1 ) +2/region = Rect2( 8, 0, 8, 8 ) +2/tile_mode = 0 +2/occluder_offset = Vector2( 0, 0 ) +2/navigation_offset = Vector2( 0, 0 ) +2/shape_offset = Vector2( 0, 0 ) +2/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +2/shape_one_way = false +2/shape_one_way_margin = 0.0 +2/shapes = [ ] +2/z_index = 0 +3/name = "water_bottom.png 3" +3/texture = ExtResource( 3 ) +3/tex_offset = Vector2( 0, 0 ) +3/modulate = Color( 1, 1, 1, 1 ) +3/region = Rect2( 0, 0, 8, 8 ) +3/tile_mode = 0 +3/occluder_offset = Vector2( 0, 0 ) +3/navigation_offset = Vector2( 0, 0 ) +3/shape_offset = Vector2( 0, 0 ) +3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) +3/shape_one_way = false +3/shape_one_way_margin = 0.0 +3/shapes = [ ] +3/z_index = 0 diff --git a/tilesets/t_water.tres b/tilesets/t_water.tres deleted file mode 100644 index 3258d60..0000000 --- a/tilesets/t_water.tres +++ /dev/null @@ -1,26 +0,0 @@ -[gd_resource type="TileSet" load_steps=2 format=2] - -[ext_resource path="res://graphics/tiles/water.tres" type="Texture" id=1] - -[resource] -0/name = "water.tres 0" -0/texture = ExtResource( 1 ) -0/tex_offset = Vector2( 0, 0 ) -0/modulate = Color( 1, 1, 1, 1 ) -0/region = Rect2( 0, 0, 8, 8 ) -0/tile_mode = 2 -0/autotile/icon_coordinate = Vector2( 0, 0 ) -0/autotile/tile_size = Vector2( 8, 8 ) -0/autotile/spacing = 0 -0/autotile/occluder_map = [ ] -0/autotile/navpoly_map = [ ] -0/autotile/priority_map = [ ] -0/autotile/z_index_map = [ ] -0/occluder_offset = Vector2( 0, 0 ) -0/navigation_offset = Vector2( 0, 0 ) -0/shape_offset = Vector2( 0, 0 ) -0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 ) -0/shape_one_way = false -0/shape_one_way_margin = 0.0 -0/shapes = [ ] -0/z_index = 0