From 969364ebcef491df725b018b11d930d819f58c9b Mon Sep 17 00:00:00 2001 From: pennyrigate Date: Tue, 3 Jan 2023 20:52:30 -0500 Subject: [PATCH] added saving --- ...d.png-d633f5249ccc091a7e592fabc835a18c.md5 | 4 +- ....png-d633f5249ccc091a7e592fabc835a18c.stex | Bin 376 -> 448 bytes ...d.png-375dbe46e18dedab40b4fcb3c0bcf043.md5 | 3 + ....png-375dbe46e18dedab40b4fcb3c0bcf043.stex | Bin 0 -> 376 bytes ...w.png-6a165a1051a0c8d94781310f1fd64758.md5 | 3 + ....png-6a165a1051a0c8d94781310f1fd64758.stex | Bin 0 -> 106 bytes ...r.png-11192234a11b3fa8b5fde8905419f955.md5 | 3 + ....png-11192234a11b3fa8b5fde8905419f955.stex | Bin 0 -> 116 bytes ...l.png-7b5414d44097edee437881d0f20be3ce.md5 | 3 + ....png-7b5414d44097edee437881d0f20be3ce.stex | Bin 0 -> 126 bytes ...d.png-8d3be9176bacfd7093743651807c1fb5.md5 | 3 + ....png-8d3be9176bacfd7093743651807c1fb5.stex | Bin 0 -> 256 bytes game.gd | 33 ++- graphics/hud/hud.png | Bin 420 -> 835 bytes graphics/hud/hud_old.png | Bin 0 -> 420 bytes graphics/hud/hud_old.png.import | 35 +++ graphics/hud/levelselect_arrow.png | Bin 0 -> 185 bytes graphics/hud/levelselect_arrow.png.import | 35 +++ graphics/hud/levelselect_border.png | Bin 0 -> 173 bytes graphics/hud/levelselect_border.png.import | 35 +++ graphics/hud/levelselect_nexlevel.png | Bin 0 -> 193 bytes graphics/hud/levelselect_nexlevel.png.import | 35 +++ graphics/hud/stars_hud.png | Bin 0 -> 298 bytes graphics/hud/stars_hud.png.import | 35 +++ maps/level_select.gd | 79 +++++++ maps/level_select.tscn | 218 ++++++++++++++++++ maps/leveldata/level0_info.tres | 9 + maps/leveldata/level1_info.tres | 9 + maps/leveldata/level_info.gd | 5 + maps/leveldata/levels.gd | 3 + maps/leveldata/levels.tres | 9 + maps/map01.gd | 1 + maps/map01.tscn | 9 +- objects/collectibles/shard.gd | 2 + objects/collectibles/star.gd | 1 + objects/exit/exit.gd | 3 +- objects/hud/hud.gd | 4 +- objects/hud/hud.tscn | 122 ++++------ objects/player/player.gd | 7 +- project.godot | 5 + 40 files changed, 625 insertions(+), 88 deletions(-) create mode 100644 .import/hud_old.png-375dbe46e18dedab40b4fcb3c0bcf043.md5 create mode 100644 .import/hud_old.png-375dbe46e18dedab40b4fcb3c0bcf043.stex create mode 100644 .import/levelselect_arrow.png-6a165a1051a0c8d94781310f1fd64758.md5 create mode 100644 .import/levelselect_arrow.png-6a165a1051a0c8d94781310f1fd64758.stex create mode 100644 .import/levelselect_border.png-11192234a11b3fa8b5fde8905419f955.md5 create mode 100644 .import/levelselect_border.png-11192234a11b3fa8b5fde8905419f955.stex create mode 100644 .import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.md5 create mode 100644 .import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.stex create mode 100644 .import/stars_hud.png-8d3be9176bacfd7093743651807c1fb5.md5 create mode 100644 .import/stars_hud.png-8d3be9176bacfd7093743651807c1fb5.stex create mode 100644 graphics/hud/hud_old.png create mode 100644 graphics/hud/hud_old.png.import create mode 100644 graphics/hud/levelselect_arrow.png create mode 100644 graphics/hud/levelselect_arrow.png.import create mode 100644 graphics/hud/levelselect_border.png create mode 100644 graphics/hud/levelselect_border.png.import create mode 100644 graphics/hud/levelselect_nexlevel.png create mode 100644 graphics/hud/levelselect_nexlevel.png.import create mode 100644 graphics/hud/stars_hud.png create mode 100644 graphics/hud/stars_hud.png.import create mode 100644 maps/level_select.gd create mode 100644 maps/level_select.tscn create mode 100644 maps/leveldata/level0_info.tres create mode 100644 maps/leveldata/level1_info.tres create mode 100644 maps/leveldata/level_info.gd create mode 100644 maps/leveldata/levels.gd create mode 100644 maps/leveldata/levels.tres diff --git a/.import/hud.png-d633f5249ccc091a7e592fabc835a18c.md5 b/.import/hud.png-d633f5249ccc091a7e592fabc835a18c.md5 index 10feeaa..9e55e05 100644 --- a/.import/hud.png-d633f5249ccc091a7e592fabc835a18c.md5 +++ b/.import/hud.png-d633f5249ccc091a7e592fabc835a18c.md5 @@ -1,3 +1,3 @@ -source_md5="c8db8b1c88764e5a7f5a5a1f7fb47a41" -dest_md5="7620ce6045a282839caeaf946382dd77" +source_md5="fb67ed3d8705bb1b1df3f390f7c0a76e" +dest_md5="7b559cefb37e265b48ad90421f94dcb4" diff --git a/.import/hud.png-d633f5249ccc091a7e592fabc835a18c.stex b/.import/hud.png-d633f5249ccc091a7e592fabc835a18c.stex index 0e4502cc7949989f54c23004565766212b33e297..8ae7fa24b0a20df1c99e72b83d397b284f8b2493 100644 GIT binary patch literal 448 zcmV;x0YCmnL{n4%0RRBN000000000003Zhe0001_0RRA3MM6+gNk&GP0RRA3MM6+k zP&iDB0RR9m|G+O0pTH)ztwz5B2gxmBFp;4}K~zAQw_F=+Bil;#LYkoj%e@b3q#4iP zyNlA=R-3PJY{CAX!wxCBC%)iCIskyb`YVF^f5lto0u3?oTWf;-&(=N~OE+&=CR{a56+Z6nKFr=ZVp+<!NvH`zNBW9|v-tHV zSt!{^$07YqUduH=k|oJo*xNQcBr|K#S?v(ShMVB#HdGMtESkYKlqm~EVzCxwv2+%Z zK_B5OeW4noUAa(4ip78(xEB3ChW;$DTtqmTMm`i-Dx^d}iMeK$VBP~xkawpC@asZ9 q**x%YF2@YXkWMB|tfB^+|AeSKqNQApO1q6AzxdlMkVF4CC&Oo;Qe+L$Z@C6HUr8Di< ziXZ>sz1y0{-PxBxpr`P($zuJrpLI%YiTMoQ$+Q=*1^-p}YUUA~gwpfP8abl`k zf=8x#Bd5sO&--g4Urvlk@P6`OQpQ|?SLqiSmz}iSrDD}FZB4YUrT>v> z?u&Z!j*Hyi^e*j_jqBgul1!GVERD0A7gc^cpMFfafai^6L+4CSkpfSXd7W2|Jq$EA U;k_);@IUVV|KIm(`R_9T085#m8vpF2@YXkWMB|tfB^+|AeSKqNQApO1q6AzxdlMkVF4CC&Oo;Qe+L$Z@C6HUr8Di< ziXZ>sz1y0{-PxBxpr`P($zuJrpLI%YiTMoQ$+Q=*1^-p}YUUA~gwpfP8abl`k zf=8x#Bd5sO&--g4Urvlk@P6`OQpQ|?SLqiSmz}iSrDD}FZB4YUrT>v> z?u&Z!j*Hyi^e*j_jqBgul1!GVERD0A7gc^cpMFfafai^6L+4CSkpfSXd7W2|Jq$EA U;k_);@IUVV|KIm(`R_9T085#m8vpF2@c_8U|`?^VhB)RX9P0*fH>UMDImzx&CLnQ4hyjGF$J>qIUJY-#0`vt?VUc$ vH?W6IOfkLXUNqsVLSw$l0yXOfZ@cr(F8`G?uY8D}d9T0Bk+*|Ofq?-4|6>}0 literal 0 HcmV?d00001 diff --git a/.import/levelselect_border.png-11192234a11b3fa8b5fde8905419f955.md5 b/.import/levelselect_border.png-11192234a11b3fa8b5fde8905419f955.md5 new file mode 100644 index 0000000..a33c002 --- /dev/null +++ b/.import/levelselect_border.png-11192234a11b3fa8b5fde8905419f955.md5 @@ -0,0 +1,3 @@ +source_md5="5d11ec7621772ba701c050f01d67583a" +dest_md5="39fa25b6bddfa7660a03f438684583ae" + diff --git a/.import/levelselect_border.png-11192234a11b3fa8b5fde8905419f955.stex b/.import/levelselect_border.png-11192234a11b3fa8b5fde8905419f955.stex new file mode 100644 index 0000000000000000000000000000000000000000..79f83d0eb4dcac52ca40c95eafe9cb562851685b GIT binary patch literal 116 zcmZ>F2@a89U|`??VhB)RX9O}LfH>UMDImzx&CLhO4hyjGu?MpC#SbtF$SVkV1kJDE zWpun)dYY4?YhARTL%@^&8I1o$SzH+}xR@xjcE4!cyW-$=4#B_t47|7N>~25w;F|tc GfB^tC?jL>t literal 0 HcmV?d00001 diff --git a/.import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.md5 b/.import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.md5 new file mode 100644 index 0000000..beb64fc --- /dev/null +++ b/.import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.md5 @@ -0,0 +1,3 @@ +source_md5="34535b07495be808914a380f90fd87e7" +dest_md5="79a7df7ae2329a369be13218be8e7abb" + diff --git a/.import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.stex b/.import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.stex new file mode 100644 index 0000000000000000000000000000000000000000..fced77a4462b85c6ef983b1b577ce5cb488442ee GIT binary patch literal 126 zcmZ>F2@VlpU|`??VhB)RX9O~mfH>UMDImzx%`FVd4hyjG@dC2-`42D($SVkV1kJDE zWpun)dYY4?YhARTL%@^&86OXevbauEF;!r)_c(Ersm!2ItwNDi@Ml~_$BX(&{lVF; QF2@cUA!yiqpY+bK1MJ$SMXIqr3srrjO;$Ob;-TKaU*Sl4( x%bAx?xS*vmS%9xM1MG6B0Q;DaGV@O5Z+bM~`iwz{$GIi%%%R2w>zkIdljV8XM3(wTvPCvfM^UaF) zO>Yl5p0z#ju_CAL40qiT&i@PEN9M$Z?vUMlLuBz?o&#lV^3l)!FFkO2{#T~umlreb zW-3|VD!*#-`Bm+EzD7#yKXCAf#DcT?qZXX`@7-u_bNTSMs~qJs6<5FNJ6vWvg>AP) zTk%h=^|p++{=8=W7vE4d`SqH|>sGycwO2pu`dyyd_-Fe2v;7;soBg-m&3c-_=i8aA zB*_J4Gx@$7eTj`{D#>Ql%l&t{V#@-th`IkCziqyH#^%Pgt1hyYQN6pv9^8H?*H-+! z(yqSj`Ba9r2X6h@df?X|)dPzT02PHU{-YaPc`kmnd#`-;+y70@_kQU-{V5;GU9cnO z+H-x@50hShegE}T)gr!9`NG?)0_~ai&3yf1Rr=f6zkg)SXGs00&!_f|amyC>(`SAC wm=bh38@8%2T${uY;XTU141-S$+i%;aN z4uUWcMT;jW8`p-p!8D?A3*iFB6KJ@Ai^h|905`-_+ENyD7=Z>%{b@pfL+I=Dw}|L} zO46v3A{io0cy1N*7c8kwHW^Vng2az&#w(q6GRqY9>=ytiSRimC0}})Qdqn`Chtz#7 zuh0i_vtc_rG+_XjGXXg0I{|=gb^RT{kyHTmQ=<=%*Hw)@Z%SkuDBCy_mVqP506a7S zfU>-mMbFy@xUEOdECkScssgr;ZR#LpWKXh_V3@H`v3p;Yw8J>=3m}i`D*NRLM&?= zP>!>}BeIx*f$snaGiF`ucl`zSqRolcRwjuI(~TJ|URX0W zM#dW{V$9&l0DurnpAEs*4q8Dhm*;| zG@r@g$eosiO?g$P$}EJ#7?-9o^i;SdDt>t*|ECA!jdd+Q7$USDdFnFXbOQz!gQu&X J%Q~loCIHISolO7$ literal 0 HcmV?d00001 diff --git a/graphics/hud/hud_old.png.import b/graphics/hud/hud_old.png.import new file mode 100644 index 0000000..d689cbe --- /dev/null +++ b/graphics/hud/hud_old.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/hud_old.png-375dbe46e18dedab40b4fcb3c0bcf043.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/hud/hud_old.png" +dest_files=[ "res://.import/hud_old.png-375dbe46e18dedab40b4fcb3c0bcf043.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/hud/levelselect_arrow.png b/graphics/hud/levelselect_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..e151eada38c772efb2e64fdb3cb2fcf9e997e246 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^oIuRQ!3HGLSWET+DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheoCO|{#S9F5he4R}c>anMprD_pi(`mJaB_-6!~Xy&$%dzaBDJPvO-7Ou zJI=pj4os+26L91ZSj+K5Eax2~;|7@%ej?i!Fi*Ihz;}F=z_W@)HSK&3TpxD|@?8)y bFkoOC|EsDU&}0TrS3j3^P6Nn{1`ISV`@iy0XB4ude`@%$AjKtU%@7sn6_|KtTCCMG6-*cka|ZZ?xc>kDzoDT4$g_#ttplW(OM?7@|Nm#Weu@{UmVvXtBeIx*f$uN~ zGak=hkpdJn@^ozopr08F$zX8-^I literal 0 HcmV?d00001 diff --git a/graphics/hud/levelselect_nexlevel.png.import b/graphics/hud/levelselect_nexlevel.png.import new file mode 100644 index 0000000..0b6c426 --- /dev/null +++ b/graphics/hud/levelselect_nexlevel.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/hud/levelselect_nexlevel.png" +dest_files=[ "res://.import/levelselect_nexlevel.png-7b5414d44097edee437881d0f20be3ce.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/hud/stars_hud.png b/graphics/hud/stars_hud.png new file mode 100644 index 0000000000000000000000000000000000000000..b526fcc69ccc513a70ebcea3a1eeb291754f78ab GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^8bHj!!3-q#^!R21DaPU;cPEB*=VV?2IV|apzK#qG z8~eHcB(eheiUB?$uK#n={y#}e`(K#W_Wy6%|F!PHNA~&o9ZB$z#}JL+-ab!07DEo^&4LI1 z*ME?hysuyN@X`?3n#BirjK=I1$q&S3C#^>bP0l+XkK{atZA literal 0 HcmV?d00001 diff --git a/graphics/hud/stars_hud.png.import b/graphics/hud/stars_hud.png.import new file mode 100644 index 0000000..ef0b3cb --- /dev/null +++ b/graphics/hud/stars_hud.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/stars_hud.png-8d3be9176bacfd7093743651807c1fb5.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/hud/stars_hud.png" +dest_files=[ "res://.import/stars_hud.png-8d3be9176bacfd7093743651807c1fb5.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/level_select.gd b/maps/level_select.gd new file mode 100644 index 0000000..7e30ccb --- /dev/null +++ b/maps/level_select.gd @@ -0,0 +1,79 @@ +extends Node2D + +##Onreadys +onready var levels = preload("res://maps/leveldata/levels.tres") +onready var title = $Title +onready var shard_title = $ShardTitle +onready var shard_arrow = $ShardArrow +onready var high_score = $HighScore +onready var golds = $Golds +onready var levelarrow_up = $LevelArrowUp +onready var levelarrow_down = $LevelArrowDown + #Shards +onready var shard0 = $ShardGraphics/Shard +onready var shard1 = $ShardGraphics/Shard2 +onready var shard2 = $ShardGraphics/Shard3 +onready var shard3 = $ShardGraphics/Shard4 +onready var shard4 = $ShardGraphics/Shard5 +onready var shard5 = $ShardGraphics/Shard6 +onready var shard6 = $ShardGraphics/Shard7 +onready var shard7 = $ShardGraphics/Shard8 +onready var shard8 = $ShardGraphics/Shard9 +onready var shard9 = $ShardGraphics/Shard10 +##Runtime +var save = 0 +var current_level = 0 +var current_shard = 0 + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass + +func _physics_process(delta): + if Input.is_action_just_pressed("ui_up"): change_current_level(-1) + if Input.is_action_just_pressed("ui_down"): change_current_level(1) + if Input.is_action_just_pressed("ui_left"): change_current_shard(-1) + if Input.is_action_just_pressed("ui_right"): change_current_shard(1) + #Draw level title + title.text = levels.level[current_level].level_title + #Draw Shard Title + shard_title.text = levels.level[current_level].shard_title[current_shard] + +func change_current_shard(amount): + if current_shard + amount != -1 && current_shard + amount != 10: #Check if in range + current_shard += amount + shard_arrow.position.x += 15 * amount + +func change_current_level(amount): + if current_level + amount != -1 && current_level + amount != levels.level.size(): #Check if in range + current_level += amount + #Show arrows or don't + if current_level == 0: + levelarrow_up.visible = false + levelarrow_down.visible = true + elif current_level == levels.level.size() - 1: + levelarrow_up.visible = true + levelarrow_down.visible = false + else: + levelarrow_down.visible = true + levelarrow_up.visible = true + #Return Shard select + current_shard = 0 + shard_arrow.position.x = 61 + #Load new data + var save = ConfigFile.new() + save.load(str("user://file") + str(Game.current_file) + str(".pr")) + #Draw score and golds + high_score.text = str("%06d" % save.get_value(str(current_level),"High Score",0)) + golds.text = str("%02d" % save.get_value(str(current_level),"Golds",0)) + #Draw shards collected + shard0.visible = save.get_value(str(current_level),"Shard0",false) + shard1.visible = save.get_value(str(current_level),"Shard1",false) + shard2.visible = save.get_value(str(current_level),"Shard2",false) + shard3.visible = save.get_value(str(current_level),"Shard3",false) + shard4.visible = save.get_value(str(current_level),"Shard4",false) + shard5.visible = save.get_value(str(current_level),"Shard5",false) + shard6.visible = save.get_value(str(current_level),"Shard6",false) + shard7.visible = save.get_value(str(current_level),"Shard7",false) + shard8.visible = save.get_value(str(current_level),"Shard8",false) + shard9.visible = save.get_value(str(current_level),"Shard9",false) diff --git a/maps/level_select.tscn b/maps/level_select.tscn new file mode 100644 index 0000000..e13021a --- /dev/null +++ b/maps/level_select.tscn @@ -0,0 +1,218 @@ +[gd_scene load_steps=12 format=2] + +[ext_resource path="res://scripts/theme.tres" type="Theme" id=1] +[ext_resource path="res://graphics/hud/levelselect_border.png" type="Texture" id=2] +[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=3] +[ext_resource path="res://graphics/hud/levelselect_arrow.png" type="Texture" id=4] +[ext_resource path="res://objects/collectibles/gold.tscn" type="PackedScene" id=5] +[ext_resource path="res://graphics/hud/levelselect_nexlevel.png" type="Texture" id=6] +[ext_resource path="res://maps/level_select.gd" type="Script" id=7] +[ext_resource path="res://graphics/collectibles/shard.png" type="Texture" id=8] +[ext_resource path="res://objects/collectibles/shard.tscn" type="PackedScene" id=9] + +[sub_resource type="TileSet" id=1] +0/name = "levelselect_border.png 0" +0/texture = ExtResource( 2 ) +0/tex_offset = Vector2( 0, 0 ) +0/modulate = Color( 1, 1, 1, 1 ) +0/region = Rect2( 0, 0, 24, 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 + +[sub_resource type="ShaderMaterial" id=2] +shader = ExtResource( 3 ) +shader_param/border_color = Color( 0, 0, 0, 1 ) +shader_param/border_corners = false + +[node name="LevelSelect" type="Node2D"] +script = ExtResource( 7 ) + +[node name="BackGround" type="ColorRect" parent="."] +margin_right = 256.0 +margin_bottom = 192.0 +color = Color( 0, 0, 0, 1 ) + +[node name="ColorRect2" type="ColorRect" parent="."] +margin_left = 43.0 +margin_top = 48.0 +margin_right = 213.0 +margin_bottom = 144.0 +color = Color( 0.239216, 0.239216, 0.443137, 1 ) + +[node name="Border" type="TileMap" parent="."] +tile_set = SubResource( 1 ) +cell_size = Vector2( 8, 8 ) +format = 1 +tile_data = PoolIntArray( 327685, 0, 0, 327686, 536870912, 1, 327687, 0, 1, 327688, 0, 1, 327689, 0, 1, 327690, 0, 1, 327691, 0, 1, 327692, 0, 1, 327693, 0, 1, 327694, 0, 1, 327695, 0, 1, 327696, 0, 1, 327697, 0, 1, 327698, 0, 1, 327699, 0, 1, 327700, 0, 1, 327701, 0, 1, 327702, 0, 1, 327703, 0, 1, 327704, 0, 1, 327705, 0, 1, 327706, 536870912, 0, 393221, 1073741824, 2, 393242, 1610612736, 2, 458757, 1073741824, 2, 458778, 1610612736, 2, 524293, 1073741824, 2, 524314, 1610612736, 2, 589829, 1073741824, 2, 589850, 1610612736, 2, 655365, 1073741824, 2, 655386, 1610612736, 2, 720901, 1073741824, 2, 720922, 1610612736, 2, 786437, 1073741824, 2, 786458, 1610612736, 2, 851973, 1073741824, 2, 851994, 1610612736, 2, 917509, 1073741824, 2, 917530, 1610612736, 2, 983045, 1073741824, 2, 983066, 1610612736, 2, 1048581, 1073741824, 2, 1048602, 1610612736, 2, 1114117, 1073741824, 2, 1114138, 1610612736, 2, 1179653, 1073741824, 0, 1179654, 1073741824, 1, 1179655, 1610612736, 1, 1179656, 1610612736, 1, 1179657, 1610612736, 1, 1179658, 1610612736, 1, 1179659, 1610612736, 1, 1179660, 1610612736, 1, 1179661, 1610612736, 1, 1179662, 1610612736, 1, 1179663, 1610612736, 1, 1179664, 1610612736, 1, 1179665, 1610612736, 1, 1179666, 1610612736, 1, 1179667, 1610612736, 1, 1179668, 1610612736, 1, 1179669, 1610612736, 1, 1179670, 1610612736, 1, 1179671, 1610612736, 1, 1179672, 1610612736, 1, 1179673, 1073741824, 1, 1179674, 1610612736, 0 ) + +[node name="Title" type="Label" parent="."] +margin_left = 72.0 +margin_top = 48.0 +margin_right = 184.0 +margin_bottom = 68.0 +theme = ExtResource( 1 ) +text = "test text" +align = 1 + +[node name="Golds" type="Label" parent="."] +margin_left = 120.0 +margin_top = 88.0 +margin_right = 136.0 +margin_bottom = 108.0 +theme = ExtResource( 1 ) +text = "00" +align = 1 + +[node name="HighScoreText" type="Label" parent="."] +margin_left = 56.0 +margin_top = 64.0 +margin_right = 200.0 +margin_bottom = 96.0 +theme = ExtResource( 1 ) +text = "High Score:" +align = 1 + +[node name="HighScore" type="Label" parent="."] +margin_left = 56.0 +margin_top = 76.0 +margin_right = 200.0 +margin_bottom = 108.0 +theme = ExtResource( 1 ) +text = "000000" +align = 1 + +[node name="ShardTitle" type="Label" parent="."] +margin_left = 43.0 +margin_top = 124.0 +margin_right = 213.0 +margin_bottom = 167.0 +theme = ExtResource( 1 ) +text = "Collect all coins +" +align = 1 + +[node name="ShardGraphics" type="Node2D" parent="."] + +[node name="Shard11" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 61, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard12" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 76, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard13" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 91, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard14" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 106, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard15" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 121, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard16" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 136, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard17" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 151, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard18" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 166, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard19" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 181, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard20" type="Sprite" parent="ShardGraphics"] +modulate = Color( 0, 0, 0, 1 ) +material = SubResource( 2 ) +position = Vector2( 196, 118 ) +texture = ExtResource( 8 ) + +[node name="Shard" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 56, 115 ) + +[node name="Shard2" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 71, 115 ) + +[node name="Shard3" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 86, 115 ) + +[node name="Shard4" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 101, 115 ) + +[node name="Shard5" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 116, 115 ) + +[node name="Shard6" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 131, 115 ) + +[node name="Shard7" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 146, 115 ) + +[node name="Shard8" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 161, 115 ) + +[node name="Shard9" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 176, 115 ) + +[node name="Shard10" parent="ShardGraphics" instance=ExtResource( 9 )] +position = Vector2( 191, 115 ) + +[node name="Gold" parent="." instance=ExtResource( 5 )] +position = Vector2( 111, 91 ) + +[node name="ShardArrow" type="Sprite" parent="."] +position = Vector2( 61, 106 ) +texture = ExtResource( 4 ) + +[node name="LevelArrowUp" type="Sprite" parent="."] +visible = false +position = Vector2( 128, 40 ) +texture = ExtResource( 6 ) +region_enabled = true +region_rect = Rect2( 0, 0, 8, 8 ) + +[node name="LevelArrowDown" type="Sprite" parent="."] +position = Vector2( 128, 152 ) +texture = ExtResource( 6 ) +region_enabled = true +region_rect = Rect2( 8, 0, 8, 8 ) diff --git a/maps/leveldata/level0_info.tres b/maps/leveldata/level0_info.tres new file mode 100644 index 0000000..22d10d9 --- /dev/null +++ b/maps/leveldata/level0_info.tres @@ -0,0 +1,9 @@ +[gd_resource type="Resource" load_steps=2 format=2] + +[ext_resource path="res://maps/leveldata/level_info.gd" type="Script" id=1] + +[resource] +script = ExtResource( 1 ) +level_title = "Level 0" +shard_title = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j" ] +level_number = 0 diff --git a/maps/leveldata/level1_info.tres b/maps/leveldata/level1_info.tres new file mode 100644 index 0000000..8b01b89 --- /dev/null +++ b/maps/leveldata/level1_info.tres @@ -0,0 +1,9 @@ +[gd_resource type="Resource" load_steps=2 format=2] + +[ext_resource path="res://maps/leveldata/level_info.gd" type="Script" id=1] + +[resource] +script = ExtResource( 1 ) +level_title = "Level 1" +shard_title = [ "Climb the big vine", "Next to the lone tree", "Slime's Treasure", "The snake pit", "5 Rainbow Stars", "All Shards + Beat 0:00", "Beat 000000 score", "Collect Everything", "Beat without dying", "No turning platforms" ] +level_number = 1 diff --git a/maps/leveldata/level_info.gd b/maps/leveldata/level_info.gd new file mode 100644 index 0000000..e0e4c89 --- /dev/null +++ b/maps/leveldata/level_info.gd @@ -0,0 +1,5 @@ +extends Resource + +export var level_title = "" +export var shard_title = ["","","","","","","","","","",] +export var level_number = 0 #level number, used for saving not for level order diff --git a/maps/leveldata/levels.gd b/maps/leveldata/levels.gd new file mode 100644 index 0000000..184a66f --- /dev/null +++ b/maps/leveldata/levels.gd @@ -0,0 +1,3 @@ +extends Resource + +export var level = [] diff --git a/maps/leveldata/levels.tres b/maps/leveldata/levels.tres new file mode 100644 index 0000000..1e64367 --- /dev/null +++ b/maps/leveldata/levels.tres @@ -0,0 +1,9 @@ +[gd_resource type="Resource" load_steps=4 format=2] + +[ext_resource path="res://maps/leveldata/level1_info.tres" type="Resource" id=1] +[ext_resource path="res://maps/leveldata/levels.gd" type="Script" id=2] +[ext_resource path="res://maps/leveldata/level0_info.tres" type="Resource" id=3] + +[resource] +script = ExtResource( 2 ) +level = [ ExtResource( 3 ), ExtResource( 1 ) ] diff --git a/maps/map01.gd b/maps/map01.gd index cefcf06..ca36c6d 100644 --- a/maps/map01.gd +++ b/maps/map01.gd @@ -2,3 +2,4 @@ extends Node2D func _ready(): Game.play_sound(load("res://audio/music/rumble_loop.mp3"),Game.ac_music) + Game.current_level = 1 diff --git a/maps/map01.tscn b/maps/map01.tscn index 691b5df..abe294b 100644 --- a/maps/map01.tscn +++ b/maps/map01.tscn @@ -47,7 +47,7 @@ tile_data = PoolIntArray( 720943, 0, 0, 720944, 0, 0, 720945, 0, 0, 720946, 0, 0 tile_set = ExtResource( 7 ) cell_size = Vector2( 8, 8 ) format = 1 -tile_data = PoolIntArray( 196660, 2, 2, 196661, 2, 2, 196668, 0, 0, 196669, 0, 0, 196670, 0, 0, 196671, 0, 0, 196672, 0, 0, 196673, 0, 131073, 196675, 2, 3, 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, 327715, 2, 2, 327719, 2, 1, 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, 327755, 2, 2, 327763, 2, 1, 327765, 2, 0, 327769, 2, 1, 327771, 2, 0, 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, 655407, 2, 1, 655410, 2, 3, 655413, 2, 2, 655416, 2, 0, 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, 655431, 2, 2, 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, 720979, 2, 3, 720980, 2, 3, 720990, 2, 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, 852006, 2, 1, 852008, 2, 1, 852010, 2, 1, 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, 1048598, 2, 0, 1048600, 2, 1, 1048603, 2, 3, 1048606, 2, 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, 1048657, 2, 2, 1048658, 2, 2, 1048660, 2, 2, 1048661, 2, 2, 1048669, 2, 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, 1114154, 2, 2, 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, 0, 1, 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, 0, 1, 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, 0, 1, 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, 1376279, 2, 3, 1376281, 2, 1, 1376283, 2, 3, 1376285, 2, 0, 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, 0, 1, 1376321, 536870912, 3, 1376322, 536870912, 3, 1376323, 536870912, 3, 1376324, 536870912, 3, 1376325, 536870912, 3, 1376326, 536870912, 3, 1376327, 536870912, 3, 1376328, 536870912, 3, 1376331, 2, 2, 1376333, 2, 0, 1376336, 2, 3, 1376338, 2, 2, 1376340, 2, 1, 1376342, 2, 0, 1376344, 2, 2, 1376346, 2, 3, 1376349, 2, 0, 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, 0, 1441838, 0, 0, 1441839, 0, 0, 1441840, 0, 0, 1441841, 0, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 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( 196660, 2, 2, 196661, 2, 2, 196668, 0, 0, 196669, 0, 0, 196670, 0, 0, 196671, 0, 0, 196672, 0, 0, 196673, 0, 131073, 196675, 2, 3, 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, 327715, 2, 2, 327719, 2, 1, 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, 327755, 2, 2, 327763, 2, 1, 327765, 2, 0, 327769, 2, 1, 327771, 2, 0, 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, 655407, 2, 1, 655410, 2, 3, 655413, 2, 2, 655416, 2, 0, 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, 655431, 2, 2, 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, 720979, 2, 3, 720980, 2, 3, 720990, 2, 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, 852006, 2, 1, 852008, 2, 1, 852010, 2, 1, 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, 1048598, 2, 0, 1048600, 2, 1, 1048603, 2, 3, 1048606, 2, 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, 1048657, 2, 2, 1048658, 2, 2, 1048660, 2, 2, 1048661, 2, 2, 1048669, 2, 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, 1114154, 2, 2, 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, 0, 1, 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, 0, 1, 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, 0, 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, 0, 1, 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, 1376279, 2, 3, 1376281, 2, 1, 1376283, 2, 3, 1376285, 2, 0, 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, 0, 1, 1376321, 536870912, 3, 1376322, 536870912, 3, 1376323, 536870912, 3, 1376324, 536870912, 3, 1376325, 536870912, 3, 1376326, 536870912, 3, 1376327, 536870912, 3, 1376328, 536870912, 3, 1376331, 2, 2, 1376333, 2, 0, 1376336, 2, 3, 1376338, 2, 2, 1376340, 2, 1, 1376342, 2, 0, 1376344, 2, 2, 1376346, 2, 3, 1376349, 2, 0, 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, 0, 1441838, 0, 0, 1441839, 0, 0, 1441840, 0, 0, 1441841, 0, 0, 1441842, 0, 0, 1441843, 0, 0, 1441844, 0, 0, 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, 166 ) @@ -136,10 +136,6 @@ 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 @@ -164,12 +160,15 @@ position = Vector2( 32, 32 ) [node name="Shard3" parent="Collectibles" instance=ExtResource( 12 )] position = Vector2( 464, 168 ) +number = 3 [node name="Shard4" parent="Collectibles" instance=ExtResource( 12 )] position = Vector2( 488, 16 ) +number = 2 [node name="Shard2" parent="Collectibles" instance=ExtResource( 12 )] position = Vector2( 88, 104 ) +number = 1 [node name="Gold" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 48, 32 ) diff --git a/objects/collectibles/shard.gd b/objects/collectibles/shard.gd index a4cf2df..6395767 100644 --- a/objects/collectibles/shard.gd +++ b/objects/collectibles/shard.gd @@ -1,6 +1,7 @@ extends Node2D export var value = 1 +export var number = 0 #Used for saving which specific shards collected func _ready(): $AnimationPlayer.play("glow") @@ -11,4 +12,5 @@ func _on_Area2D_area_entered(area): Game.play_sound(Game.a_shard,Game.ac_collectible) Game.score += 500 Game.shards += value + Game.shards_collected[number] = true queue_free() diff --git a/objects/collectibles/star.gd b/objects/collectibles/star.gd index 2fc153e..c562c13 100644 --- a/objects/collectibles/star.gd +++ b/objects/collectibles/star.gd @@ -30,5 +30,6 @@ func _on_Area2D_area_entered(area): if Game.stars[0] && Game.stars[1] && Game.stars[2] && Game.stars[3] && Game.stars[4]: Game.play_sound(Game.a_shard,Game.ac_collectible) Game.shards += 1 + Game.shards_collected[4] = true Game.score += 500 queue_free() diff --git a/objects/exit/exit.gd b/objects/exit/exit.gd index f5f2608..73bb516 100644 --- a/objects/exit/exit.gd +++ b/objects/exit/exit.gd @@ -16,4 +16,5 @@ func _physics_process(delta): 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")) + Game.save() + Game.change_map(load("res://maps/level_select.tscn")) diff --git a/objects/hud/hud.gd b/objects/hud/hud.gd index b2bef5b..59ae885 100644 --- a/objects/hud/hud.gd +++ b/objects/hud/hud.gd @@ -14,7 +14,7 @@ onready var high_counter = $HighCounter func _physics_process(delta): #Gold Counter - gold_counter.text = "%03d" % Game.golds + gold_counter.text = "%02d" % Game.golds #Shard Counter shard_counter.text = "%02d" % Game.shards #Star Counter @@ -29,6 +29,6 @@ func _physics_process(delta): arrow_counter.text = "%02d" % Game.arrows ##TOUCH UP LATER #Lives counter - lives_counter.text = str("LIVES:") + str(Game.lives) + lives_counter.text = 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 31c9975..839c302 100644 --- a/objects/hud/hud.tscn +++ b/objects/hud/hud.tscn @@ -1,35 +1,13 @@ -[gd_scene load_steps=16 format=2] +[gd_scene load_steps=7 format=2] -[ext_resource path="res://scripts/recolor.tres" type="Shader" id=1] -[ext_resource path="res://graphics/collectibles/pal_star_yellow.png" type="Texture" id=2] +[ext_resource path="res://graphics/hud/stars_hud.png" type="Texture" id=1] [ext_resource path="res://graphics/hud/hud.png" type="Texture" id=3] -[ext_resource path="res://graphics/collectibles/star.png" type="Texture" id=4] -[ext_resource path="res://graphics/collectibles/pal_star_red.png" type="Texture" id=5] [ext_resource path="res://objects/hud/hud.gd" type="Script" id=6] -[ext_resource path="res://graphics/collectibles/pal_star_green.png" type="Texture" id=7] -[ext_resource path="res://graphics/collectibles/pal_star_blue.png" type="Texture" id=8] -[ext_resource path="res://graphics/collectibles/pal_star_magenta.png" type="Texture" id=9] [ext_resource path="res://scripts/theme.tres" type="Theme" id=10] [sub_resource type="ShaderMaterial" id=1] -shader = ExtResource( 1 ) -shader_param/palette = ExtResource( 5 ) [sub_resource type="ShaderMaterial" id=2] -shader = ExtResource( 1 ) -shader_param/palette = ExtResource( 2 ) - -[sub_resource type="ShaderMaterial" id=3] -shader = ExtResource( 1 ) -shader_param/palette = ExtResource( 7 ) - -[sub_resource type="ShaderMaterial" id=4] -shader = ExtResource( 1 ) -shader_param/palette = ExtResource( 8 ) - -[sub_resource type="ShaderMaterial" id=5] -shader = ExtResource( 1 ) -shader_param/palette = ExtResource( 9 ) [node name="CanvasLayer" type="CanvasLayer"] layer = 100 @@ -40,82 +18,76 @@ margin_bottom = 1.0 script = ExtResource( 6 ) [node name="Back" type="Sprite" parent="HUD"] -position = Vector2( 128, 8 ) +position = Vector2( 128, 95 ) texture = ExtResource( 3 ) [node name="GoldCounter" type="Label" parent="HUD"] -margin_left = 14.0 -margin_top = 1.0 -margin_right = 54.0 -margin_bottom = 21.0 +margin_left = 12.0 +margin_top = -2.0 +margin_right = 52.0 +margin_bottom = 18.0 theme = ExtResource( 10 ) -text = "000" +text = "00 +" [node name="ShardCounter" type="Label" parent="HUD"] -margin_left = 53.0 -margin_top = 1.0 -margin_right = 93.0 -margin_bottom = 21.0 +margin_left = 41.0 +margin_top = -2.0 +margin_right = 81.0 +margin_bottom = 18.0 theme = ExtResource( 10 ) text = "00" [node name="RedStar" type="Sprite" parent="HUD"] -visible = false material = SubResource( 1 ) -position = Vector2( 79, 8 ) -texture = ExtResource( 4 ) +position = Vector2( 86, 5 ) +texture = ExtResource( 1 ) region_enabled = true -region_rect = Rect2( 0, 0, 11, 11 ) +region_rect = Rect2( 0, 0, 8, 8 ) [node name="YellowStar" type="Sprite" parent="HUD"] -visible = false material = SubResource( 2 ) -position = Vector2( 92, 8 ) -texture = ExtResource( 4 ) +position = Vector2( 96, 5 ) +texture = ExtResource( 1 ) region_enabled = true -region_rect = Rect2( 0, 0, 11, 11 ) +region_rect = Rect2( 8, 0, 8, 8 ) [node name="GreenStar" type="Sprite" parent="HUD"] -visible = false -material = SubResource( 3 ) -position = Vector2( 105, 8 ) -texture = ExtResource( 4 ) +position = Vector2( 106, 5 ) +texture = ExtResource( 1 ) region_enabled = true -region_rect = Rect2( 0, 0, 11, 11 ) +region_rect = Rect2( 16, 0, 8, 8 ) [node name="BlueStar" type="Sprite" parent="HUD"] -visible = false -material = SubResource( 4 ) -position = Vector2( 118, 8 ) -texture = ExtResource( 4 ) +position = Vector2( 116, 5 ) +texture = ExtResource( 1 ) region_enabled = true -region_rect = Rect2( 0, 0, 11, 11 ) +region_rect = Rect2( 24, 0, 8, 8 ) [node name="MagentaStar" type="Sprite" parent="HUD"] -visible = false -material = SubResource( 5 ) -position = Vector2( 131, 8 ) -texture = ExtResource( 4 ) +position = Vector2( 126, 5 ) +texture = ExtResource( 1 ) region_enabled = true -region_rect = Rect2( 0, 0, 11, 11 ) +region_rect = Rect2( 32, 0, 8, 8 ) [node name="ScoreText" type="Label" parent="HUD"] -margin_left = 142.0 -margin_top = 1.0 -margin_right = 226.0 -margin_bottom = 21.0 +margin_left = 137.0 +margin_top = -2.0 +margin_right = 221.0 +margin_bottom = 18.0 theme = ExtResource( 10 ) text = "SCORE:" [node name="ScoreCounter" type="Label" parent="HUD"] -margin_left = 180.0 -margin_top = 1.0 -margin_right = 264.0 -margin_bottom = 21.0 +margin_left = 179.0 +margin_top = -2.0 +margin_right = 263.0 +margin_bottom = 18.0 theme = ExtResource( 10 ) text = "000000" [node name="HighCounter" type="Label" parent="HUD"] +visible = false margin_left = 178.0 margin_top = 178.0 margin_right = 262.0 @@ -124,17 +96,17 @@ 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 +margin_left = 240.0 +margin_top = -2.0 +margin_right = 324.0 +margin_bottom = 18.0 theme = ExtResource( 10 ) -text = "Lives:2" +text = "2" [node name="ArrowCounter" type="Label" parent="HUD"] -margin_left = 237.0 -margin_top = 1.0 -margin_right = 321.0 -margin_bottom = 21.0 +margin_left = 68.0 +margin_top = -2.0 +margin_right = 152.0 +margin_bottom = 18.0 theme = ExtResource( 10 ) -text = "00" +text = "0" diff --git a/objects/player/player.gd b/objects/player/player.gd index 293f29d..71179ae 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -278,4 +278,9 @@ func debug(): if Input.is_action_pressed("debug_move_player"): position = get_viewport().get_mouse_position() print(get_viewport().get_mouse_position()) - + if Input.is_action_just_pressed("debug_1"): + Game.save() + if Input.is_action_just_pressed("debug_2"): + var save = ConfigFile.new() + save.load(str("user://file") + str(1) + str(".pr")) + Game.score = save.get_value(str(Game.current_level),"Score",0) diff --git a/project.godot b/project.godot index 484949f..9b127d7 100644 --- a/project.godot +++ b/project.godot @@ -103,6 +103,11 @@ fullscreen={ "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) ] } +debug_2={ +"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":50,"physical_scancode":0,"unicode":0,"echo":false,"script":null) + ] +} [physics]