Made some changes :)

This commit is contained in:
pennyrigate 2022-12-08 23:28:49 -05:00
parent 038935709f
commit 8f6a068eba
76 changed files with 889 additions and 36 deletions

View file

@ -1,3 +1,3 @@
source_md5="742b35bf584146c3feb57d371f801705" source_md5="026ee7e1be4d0ee92d90c670bc3aebc6"
dest_md5="a7b338cd0906e672679eb2b643671325" dest_md5="85f358875be0cc04cc08969b6c60d8fd"

View file

@ -0,0 +1,3 @@
source_md5="aae4d9080cda2af11aae2b25993aac03"
dest_md5="2412ee1c23b047e2192d7cc8f095add3"

View file

@ -0,0 +1,3 @@
source_md5="c779d6ac7cad1bad668c4dcb61365e3f"
dest_md5="8d95d1281197e9da0a9f59a0b213469e"

View file

@ -0,0 +1,3 @@
source_md5="fa3285b3a224412bc02b4acaa1db6629"
dest_md5="bc83e400e402b2929634eca9658dbca3"

Binary file not shown.

View file

@ -0,0 +1,3 @@
source_md5="a3b3cf438c4ab4d9c656c86f5239d0dd"
dest_md5="48c09d999caeb12e4d5d8ea57cc76a72"

View file

@ -0,0 +1,3 @@
source_md5="a3b3cf438c4ab4d9c656c86f5239d0dd"
dest_md5="48c09d999caeb12e4d5d8ea57cc76a72"

View file

@ -1,3 +1,3 @@
source_md5="6ca2e3fa3623a0c9ee8f26d300c67d8a" source_md5="c59ab7db07786b45336a08776bb2c650"
dest_md5="0b62cad39888071aab49161f15aa66e4" dest_md5="eaf951160d0c5c460c91c4973d34864e"

View file

@ -0,0 +1,3 @@
source_md5="bd1294629647d4f3a0412ccc11a46d11"
dest_md5="3bebf6f205f157016a22665138dafc75"

Binary file not shown.

View file

@ -0,0 +1,3 @@
source_md5="4a206b00361f66dc7845f8f9e20bd5ec"
dest_md5="356e43465cb5da46d2a444b98dbecea8"

View file

@ -0,0 +1,3 @@
source_md5="50c7ca428388380b4e3371e36bac6590"
dest_md5="4cb7c8a33151d997fb2b64616489f751"

View file

@ -0,0 +1,3 @@
source_md5="ed666ac4ec5b3efcd3db6c36a786ba6c"
dest_md5="1a0e86b5951f0b5d1122adaca79678fc"

View file

@ -0,0 +1,3 @@
source_md5="8a65efa898267c8c69299db9cc40c37f"
dest_md5="5547e1a82c8f3a2d89746cf6bf70f8d5"

View file

@ -0,0 +1,3 @@
source_md5="1a8ad796076d3ea33646c9ff925b0e25"
dest_md5="5ecb10cac189aed82e4e5c85883cc1d2"

View file

@ -0,0 +1,3 @@
source_md5="ccde49efd86bb41470bac3530c6eef55"
dest_md5="789972e26b13ed624f234f796699bce7"

View file

@ -0,0 +1,3 @@
source_md5="f31a92be6a8af2815005a45cc6be9a9a"
dest_md5="e117672c35c8fdd1ee6b1ba743880361"

View file

@ -0,0 +1,3 @@
source_md5="0e3b1f3cb3e8c06798d3400b9a36cbc6"
dest_md5="bb72c5db654c687ac04b6604279d44eb"

BIN
audio/sounds/a_bmilc.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/a_bmilc.ogg-cb786a4aec8fbf031b4e9635d452a4a8.oggstr"
[deps]
source_file="res://audio/sounds/a_bmilc.ogg"
dest_files=[ "res://.import/a_bmilc.ogg-cb786a4aec8fbf031b4e9635d452a4a8.oggstr" ]
[params]
loop=true
loop_offset=0

BIN
audio/sounds/a_climb.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/a_climb.ogg-478222e5725714de088f1c4b609997c5.oggstr"
[deps]
source_file="res://audio/sounds/a_climb.ogg"
dest_files=[ "res://.import/a_climb.ogg-478222e5725714de088f1c4b609997c5.oggstr" ]
[params]
loop=true
loop_offset=0

BIN
audio/sounds/sword.ogg Normal file

Binary file not shown.

View file

@ -0,0 +1,15 @@
[remap]
importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/sword.ogg-dba4b3e0868285d6316b38990f0d353e.oggstr"
[deps]
source_file="res://audio/sounds/sword.ogg"
dest_files=[ "res://.import/sword.ogg-dba4b3e0868285d6316b38990f0d353e.oggstr" ]
[params]
loop=false
loop_offset=0

BIN
audio/sounds/tempjingle.wav Normal file

Binary file not shown.

View file

@ -0,0 +1,23 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/tempjingle.wav-bb9c1796b8de81e98ac7272cbb1283ae.sample"
[deps]
source_file="res://audio/sounds/tempjingle.wav"
dest_files=[ "res://.import/tempjingle.wav-bb9c1796b8de81e98ac7272cbb1283ae.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 4 KiB

Before After
Before After

10
game.gd
View file

@ -6,15 +6,23 @@ var current_sector = Vector2(0,0)
onready var viewport_container = get_parent().get_node("Main/Control/ViewportContainer") onready var viewport_container = get_parent().get_node("Main/Control/ViewportContainer")
#Collectibles #Collectibles
var golds = 0 var golds = 0
var stars = 0 var stars = [false,false,false,false,false]
var shards = 0 var shards = 0
var score = 0
#Audio Channels #Audio Channels
onready var ac_jump = $JumpSound onready var ac_jump = $JumpSound
onready var ac_collectible = $CollecitbleSound onready var ac_collectible = $CollecitbleSound
onready var ac_climb = $ClimbSound
#Sounds #Sounds
onready var a_gold = preload("res://audio/sounds/snd_coin.ogg") onready var a_gold = preload("res://audio/sounds/snd_coin.ogg")
onready var a_jump = preload("res://audio/sounds/jump.ogg") onready var a_jump = preload("res://audio/sounds/jump.ogg")
onready var a_star = preload("res://audio/sounds/a_jinjo.ogg") onready var a_star = preload("res://audio/sounds/a_jinjo.ogg")
onready var a_shard = preload("res://audio/sounds/tempjingle.wav")
onready var a_climb_up = preload("res://audio/sounds/a_climb.ogg")
onready var a_climb_down = preload("res://audio/sounds/a_bmilc.ogg")
onready var a_sword = preload("res://audio/sounds/sword.ogg")
#Objects
onready var block_text = preload("res://objects/hud/blocktext.tscn")
func instance_node(node:PackedScene,x:float,y:float,parent): func instance_node(node:PackedScene,x:float,y:float,parent):
var Instance = node.instance() var Instance = node.instance()

View file

@ -10,3 +10,6 @@ volume_db = -8.0
[node name="JumpSound" type="AudioStreamPlayer" parent="."] [node name="JumpSound" type="AudioStreamPlayer" parent="."]
volume_db = -12.0 volume_db = -12.0
[node name="ClimbSound" type="AudioStreamPlayer" parent="."]
volume_db = -12.0

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/star_blue.png-e5bcc7604832ad6c1269fea136d51c5d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/collectibles/star_blue.png"
dest_files=[ "res://.import/star_blue.png-e5bcc7604832ad6c1269fea136d51c5d.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

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/star_green.png-c7fbc1322c67118272cc12bb63499b0b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/collectibles/star_green.png"
dest_files=[ "res://.import/star_green.png-c7fbc1322c67118272cc12bb63499b0b.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

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/star_magenta.png-53e023c3de5374393ea55d0dc97fc43a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/collectibles/star_magenta.png"
dest_files=[ "res://.import/star_magenta.png-53e023c3de5374393ea55d0dc97fc43a.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

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/star_red.png-e442fe3e282bb73f7112258f82eb8d77.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/collectibles/star_red.png"
dest_files=[ "res://.import/star_red.png-e442fe3e282bb73f7112258f82eb8d77.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

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/star_yellow.png-cda8dd67e017975111fa237e374da125.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/collectibles/star_yellow.png"
dest_files=[ "res://.import/star_yellow.png-cda8dd67e017975111fa237e374da125.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

BIN
graphics/enemy/bat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 252 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/bat.png-736f06aa9f4565db6a04c3fc0d0ebab3.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/enemy/bat.png"
dest_files=[ "res://.import/bat.png-736f06aa9f4565db6a04c3fc0d0ebab3.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

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/block.png-6c3011ecb25b7007af8a33748dd77d74.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/hud/block.png"
dest_files=[ "res://.import/block.png-6c3011ecb25b7007af8a33748dd77d74.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

BIN
graphics/hud/block_text.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/block_text.png-33d1b26072b03aec254213ead1bd7b44.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/hud/block_text.png"
dest_files=[ "res://.import/block_text.png-33d1b26072b03aec254213ead1bd7b44.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

BIN
graphics/hud/hud.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/hud.png-d633f5249ccc091a7e592fabc835a18c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/hud/hud.png"
dest_files=[ "res://.import/hud.png-d633f5249ccc091a7e592fabc835a18c.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

View file

@ -0,0 +1,35 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/mockup hud.png-692bec9bf3259505e14bde69f0cdea49.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://graphics/hud/mockup hud.png"
dest_files=[ "res://.import/mockup hud.png-692bec9bf3259505e14bde69f0cdea49.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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

After

Width:  |  Height:  |  Size: 416 B

Before After
Before After

View file

@ -1,18 +1,22 @@
[gd_scene load_steps=12 format=2] [gd_scene load_steps=16 format=2]
[ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1] [ext_resource path="res://objects/player/player.tscn" type="PackedScene" id=1]
[ext_resource path="res://objects/ladder/ladder.tscn" type="PackedScene" id=2] [ext_resource path="res://objects/ladder/ladder.tscn" type="PackedScene" id=2]
[ext_resource path="res://graphics/backgrounds/blue_sky.png" type="Texture" id=3] [ext_resource path="res://graphics/backgrounds/blue_sky.png" type="Texture" id=3]
[ext_resource path="res://objects/collectibles/star.tscn" type="PackedScene" id=4] [ext_resource path="res://objects/collectibles/star.tscn" type="PackedScene" id=4]
[ext_resource path="res://objects/collectibles/gold.tscn" type="PackedScene" id=5] [ext_resource path="res://objects/collectibles/gold.tscn" type="PackedScene" id=5]
[ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=6]
[ext_resource path="res://tilesets/t_grass.tres" type="TileSet" id=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://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://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_water.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/collectibles/shard.tscn" type="PackedScene" id=12]
[ext_resource path="res://objects/enemy/bat.tscn" type="PackedScene" id=13]
[ext_resource path="res://objects/enemy/snake.tscn" type="PackedScene" id=14]
[sub_resource type="RectangleShape2D" id=1] [sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 8, 96 ) extents = Vector2( 8, 128 )
[node name="Map" type="Node2D"] [node name="Map" type="Node2D"]
@ -31,16 +35,15 @@ __meta__ = {
tile_set = ExtResource( 7 ) tile_set = ExtResource( 7 )
cell_size = Vector2( 8, 8 ) cell_size = Vector2( 8, 8 )
format = 1 format = 1
tile_data = PoolIntArray( 393219, 0, 65536, 393220, 0, 65537, 393221, 0, 65537, 393222, 0, 65537, 393223, 0, 65537, 393224, 0, 65537, 393225, 0, 65537, 393226, 0, 65537, 393227, 0, 65538, 393230, 0, 65536, 393231, 0, 65537, 393232, 0, 65537, 393233, 0, 65538, 393236, 0, 65536, 393237, 0, 65537, 393238, 0, 65537, 393239, 0, 65537, 393240, 0, 65537, 393241, 0, 65538, 720904, 0, 65536, 720905, 0, 65537, 720906, 0, 65537, 720907, 0, 65537, 720908, 0, 65537, 720909, 0, 65537, 720910, 0, 65537, 720911, 0, 65538, 786433, 0, 65536, 786434, 0, 65537, 786435, 0, 65537, 786436, 0, 65537, 786437, 0, 65538, 917521, 0, 65536, 917522, 0, 65537, 917523, 0, 65537, 917524, 0, 65537, 917525, 0, 65537, 917526, 0, 65537, 917527, 0, 65537, 917528, 0, 65537, 917529, 0, 65537, 917530, 0, 65537, 917531, 0, 65537, 917532, 0, 65538, 1114118, 0, 65536, 1114119, 0, 65537, 1114120, 0, 65537, 1114121, 0, 65537, 1114122, 0, 65537, 1114123, 0, 65537, 1114124, 0, 65537, 1114125, 0, 65537, 1114126, 0, 65538, 1179649, 0, 65536, 1179650, 0, 65537, 1179651, 0, 65538, 1310736, 0, 131072, 1310737, 536870912, 0, 1310738, 536870912, 0, 1310739, 536870912, 0, 1310740, 0, 131073, 1376271, 0, 131072, 1376272, 0, 131075, 1376273, 536870912, 1, 1376274, 536870912, 1, 1376275, 536870912, 1, 1376276, 0, 131074, 1376277, 0, 131073, 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, 0, 1441833, 0, 0, 1441834, 0, 0, 1441835, 0, 0, 1441836, 0, 0, 1441837, 0, 0, 1441838, 0, 0, 1441839, 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 ) tile_data = PoolIntArray( 327687, 2, 1, 327689, 2, 0, 327695, 2, 2, 327696, 2, 2, 327702, 2, 3, 327703, 2, 3, 393219, 0, 65536, 393220, 0, 65537, 393221, 0, 65537, 393222, 0, 65537, 393223, 0, 65537, 393224, 0, 65537, 393225, 0, 65537, 393226, 0, 65537, 393227, 0, 65538, 393230, 0, 65536, 393231, 0, 65537, 393232, 0, 65537, 393233, 0, 65538, 393236, 0, 65536, 393237, 0, 65537, 393238, 0, 65537, 393239, 0, 65537, 393240, 0, 65537, 393241, 0, 65538, 589844, 0, 65536, 589845, 0, 65537, 589846, 0, 65537, 589847, 0, 65537, 589848, 0, 65537, 589849, 0, 65538, 655370, 2, 2, 655373, 2, 0, 720904, 0, 65536, 720905, 0, 65537, 720906, 0, 65537, 720907, 0, 65537, 720908, 0, 65537, 720909, 0, 65537, 720910, 0, 65537, 720911, 0, 65538, 786433, 0, 65536, 786434, 0, 65537, 786435, 0, 65537, 786436, 0, 65537, 786437, 0, 65538, 851987, 2, 1, 851989, 2, 2, 917521, 0, 65536, 917522, 0, 65537, 917523, 0, 65537, 917524, 0, 65537, 917525, 0, 65537, 917526, 0, 65537, 917527, 0, 65537, 917528, 0, 65537, 917529, 0, 65537, 917530, 0, 65537, 917531, 0, 65537, 917532, 0, 65538, 1114118, 0, 65536, 1114119, 0, 65537, 1114120, 0, 65537, 1114121, 0, 65537, 1114122, 0, 65537, 1114123, 0, 65537, 1114124, 0, 65537, 1114125, 0, 65537, 1114126, 0, 65538, 1114152, 0, 131072, 1114153, 0, 0, 1114154, 0, 131073, 1179649, 0, 65536, 1179650, 0, 65537, 1179651, 0, 65538, 1179655, 2, 2, 1179688, 0, 2, 1179689, 0, 1, 1179690, 536870912, 2, 1245191, 2, 2, 1245202, 2, 2, 1245224, 0, 2, 1245225, 0, 1, 1245226, 536870912, 2, 1310727, 2, 2, 1310736, 0, 131072, 1310737, 536870912, 0, 1310738, 536870912, 0, 1310739, 536870912, 0, 1310740, 0, 131073, 1310760, 0, 2, 1310761, 0, 1, 1310762, 536870912, 2, 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, 536870912, 2, 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, 131074, 1441835, 0, 0, 1441836, 0, 0, 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="Water" type="TileMap" parent="."] [node name="Water" type="TileMap" parent="."]
tile_set = ExtResource( 10 ) tile_set = ExtResource( 10 )
cell_size = Vector2( 8, 8 ) cell_size = Vector2( 8, 8 )
format = 1 format = 1
tile_data = PoolIntArray( 1507376, 0, 0, 1507377, 0, 0, 1507378, 0, 0, 1507379, 0, 0, 1507380, 0, 0, 1507381, 0, 0, 1507382, 0, 0, 1507383, 0, 0, 1507384, 0, 0, 1507385, 0, 0, 1507386, 0, 0, 1507387, 0, 0, 1507388, 0, 0, 1507389, 0, 0, 1507390, 0, 0, 1507391, 0, 0 )
[node name="Player" parent="." instance=ExtResource( 1 )] [node name="Player" parent="." instance=ExtResource( 1 )]
position = Vector2( 168, 96 ) position = Vector2( 32, 160 )
[node name="Ladder" type="TileMap" parent="."] [node name="Ladder" type="TileMap" parent="."]
tile_set = ExtResource( 7 ) tile_set = ExtResource( 7 )
@ -54,6 +57,11 @@ tile_data = PoolIntArray( 327707, 1, 0, 393243, 1, 0, 458779, 1, 0, 524315, 1, 0
position = Vector2( -8, 96 ) position = Vector2( -8, 96 )
shape = SubResource( 1 ) shape = SubResource( 1 )
[node name="CollisionShape2D2" type="CollisionShape2D" parent="StaticBody2D"]
position = Vector2( 128, -8 )
rotation = 1.5708
shape = SubResource( 1 )
[node name="Platforms" type="Node2D" parent="."] [node name="Platforms" type="Node2D" parent="."]
[node name="Ladder" parent="Platforms" instance=ExtResource( 2 )] [node name="Ladder" parent="Platforms" instance=ExtResource( 2 )]
@ -108,9 +116,6 @@ position = Vector2( 160, 104 )
[node name="Gold13" parent="Collectibles" instance=ExtResource( 5 )] [node name="Gold13" parent="Collectibles" instance=ExtResource( 5 )]
position = Vector2( 176, 104 ) position = Vector2( 176, 104 )
[node name="Gold14" parent="Collectibles" instance=ExtResource( 5 )]
position = Vector2( 192, 104 )
[node name="Gold15" parent="Collectibles" instance=ExtResource( 5 )] [node name="Gold15" parent="Collectibles" instance=ExtResource( 5 )]
position = Vector2( 112, 80 ) position = Vector2( 112, 80 )
@ -126,17 +131,61 @@ position = Vector2( 24, 88 )
[node name="Star" parent="Collectibles" instance=ExtResource( 4 )] [node name="Star" parent="Collectibles" instance=ExtResource( 4 )]
position = Vector2( 16, 136 ) position = Vector2( 16, 136 )
[node name="Star2" parent="Collectibles" instance=ExtResource( 4 )]
position = Vector2( 176, 64 )
color = 1
[node name="Gold21" parent="Collectibles" instance=ExtResource( 5 )] [node name="Gold21" parent="Collectibles" instance=ExtResource( 5 )]
position = Vector2( 32, 88 ) position = Vector2( 32, 88 )
[node name="Enemies" type="Node2D" parent="."] [node name="Enemies" type="Node2D" parent="."]
[node name="Slime" parent="Enemies" instance=ExtResource( 11 )]
position = Vector2( 208, 104 )
scale = Vector2( -1, 1 )
[node name="Slime3" parent="Enemies" instance=ExtResource( 11 )]
position = Vector2( 232, 168 )
scale = Vector2( -1, 1 )
[node name="Bat" parent="Enemies" instance=ExtResource( 13 )]
position = Vector2( 104, 48 )
left_up_boundry = 3.0
right_down_boundry = 2.0
[node name="Slime2" parent="Enemies" instance=ExtResource( 11 )]
position = Vector2( 192, 64 )
[node name="Snake" parent="Enemies" instance=ExtResource( 14 )]
position = Vector2( 96, 80 )
left_up_boundry = 3.0
right_down_boundry = 3.0
speed = 35
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]
margin_left = 256.0 margin_left = 256.0
margin_right = 512.0 margin_right = 512.0
margin_bottom = 192.0 margin_bottom = 192.0
color = Color( 0.87451, 0, 1, 0.364706 ) color = Color( 0.87451, 0, 1, 0.0901961 )
script = ExtResource( 9 ) script = ExtResource( 9 )
__meta__ = { __meta__ = {
"_edit_lock_": true "_edit_lock_": true
} }
[node name="ColorRect2" type="ColorRect" parent="."]
margin_left = 512.0
margin_right = 768.0
margin_bottom = 192.0
color = Color( 1, 0.843137, 0, 0.0901961 )
script = ExtResource( 9 )
__meta__ = {
"_edit_lock_": true
}
[node name="ColorRect3" type="ColorRect" parent="."]
visible = false
margin_right = 256.0
margin_bottom = 8.0
color = Color( 0, 0, 0, 1 )
[node name="HUD" parent="." instance=ExtResource( 6 )]

View file

@ -10,5 +10,6 @@ func _on_Area2D_area_entered(area):
#Collect #Collect
if area.is_in_group("player"): if area.is_in_group("player"):
Game.golds += value Game.golds += value
Game.score += 5
Game.play_sound(Game.a_gold,Game.ac_collectible) Game.play_sound(Game.a_gold,Game.ac_collectible)
queue_free() queue_free()

View file

@ -45,6 +45,7 @@ playing = true
centered = false centered = false
[node name="Area2D" type="Area2D" parent="."] [node name="Area2D" type="Area2D" parent="."]
visible = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 4, 4 ) position = Vector2( 4, 4 )

View file

@ -8,5 +8,7 @@ func _ready():
func _on_Area2D_area_entered(area): func _on_Area2D_area_entered(area):
#Collect #Collect
if area.is_in_group("player"): if area.is_in_group("player"):
Game.play_sound(Game.a_shard,Game.ac_collectible)
Game.score += 500
Game.shards += value Game.shards += value
queue_free() queue_free()

View file

@ -1,16 +1,34 @@
extends Node2D extends Node2D
export(int, "Red", "Yellow","Green","Blue","Magenta") var color
export var value = 1 export var value = 1
onready var sprite = $AnimatedSprite
func _ready(): func _ready():
#Sync all coinframes #Sync all coinframes
$AnimatedSprite.play() sprite.play()
#Change color
match color:
0:
sprite.material.set_shader_param("palette",load("res://graphics/collectibles/pal_star_red.png"))
1:
sprite.material.set_shader_param("palette",load("res://graphics/collectibles/pal_star_yellow.png"))
2:
sprite.material.set_shader_param("palette",load("res://graphics/collectibles/pal_star_green.png"))
3:
sprite.material.set_shader_param("palette",load("res://graphics/collectibles/pal_star_blue.png"))
4:
sprite.material.set_shader_param("palette",load("res://graphics/collectibles/pal_star_magenta.png"))
func _on_Area2D_area_entered(area): func _on_Area2D_area_entered(area):
#Collect #Collect
if area.is_in_group("player"): if area.is_in_group("player"):
Game.play_sound(Game.a_star,Game.ac_collectible) Game.play_sound(Game.a_star,Game.ac_collectible)
Game.stars += value Game.score += 100
Game.stars[color] = true
#5 Star reward #5 Star reward
if Game.stars == 5: Game.shards += 1 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.score += 500
queue_free() queue_free()

View file

@ -5,39 +5,40 @@
[ext_resource path="res://objects/collectibles/star.gd" type="Script" id=3] [ext_resource path="res://objects/collectibles/star.gd" type="Script" id=3]
[ext_resource path="res://graphics/collectibles/star.png" type="Texture" id=4] [ext_resource path="res://graphics/collectibles/star.png" type="Texture" id=4]
[sub_resource type="ShaderMaterial" id=1] [sub_resource type="ShaderMaterial" id=10]
resource_local_to_scene = true
shader = ExtResource( 2 ) shader = ExtResource( 2 )
shader_param/border_color = Color( 0, 0, 0, 1 ) shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false shader_param/border_corners = false
shader_param/palette = ExtResource( 1 ) shader_param/palette = ExtResource( 1 )
[sub_resource type="AtlasTexture" id=2] [sub_resource type="AtlasTexture" id=11]
atlas = ExtResource( 4 ) atlas = ExtResource( 4 )
region = Rect2( 0, 0, 11, 11 ) region = Rect2( 0, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=3] [sub_resource type="AtlasTexture" id=12]
atlas = ExtResource( 4 ) atlas = ExtResource( 4 )
region = Rect2( 11, 0, 11, 11 ) region = Rect2( 11, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=4] [sub_resource type="AtlasTexture" id=13]
atlas = ExtResource( 4 ) atlas = ExtResource( 4 )
region = Rect2( 22, 0, 11, 11 ) region = Rect2( 22, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=5] [sub_resource type="AtlasTexture" id=14]
atlas = ExtResource( 4 ) atlas = ExtResource( 4 )
region = Rect2( 33, 0, 11, 11 ) region = Rect2( 33, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=6] [sub_resource type="AtlasTexture" id=15]
atlas = ExtResource( 4 ) atlas = ExtResource( 4 )
region = Rect2( 44, 0, 11, 11 ) region = Rect2( 44, 0, 11, 11 )
[sub_resource type="AtlasTexture" id=7] [sub_resource type="AtlasTexture" id=16]
atlas = ExtResource( 4 ) atlas = ExtResource( 4 )
region = Rect2( 55, 0, 11, 11 ) region = Rect2( 55, 0, 11, 11 )
[sub_resource type="SpriteFrames" id=8] [sub_resource type="SpriteFrames" id=8]
animations = [ { animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ) ], "frames": [ SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ) ],
"loop": true, "loop": true,
"name": "default", "name": "default",
"speed": 8.0 "speed": 8.0
@ -50,10 +51,10 @@ extents = Vector2( 4, 4 )
script = ExtResource( 3 ) script = ExtResource( 3 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."] [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
material = SubResource( 1 ) material = SubResource( 10 )
position = Vector2( -1, -3 ) position = Vector2( -1, -3 )
frames = SubResource( 8 ) frames = SubResource( 8 )
frame = 3 frame = 2
playing = true playing = true
centered = false centered = false

48
objects/enemy/bat.tscn Normal file
View file

@ -0,0 +1,48 @@
[gd_scene load_steps=9 format=2]
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1]
[ext_resource path="res://graphics/enemy/bat.png" type="Texture" id=2]
[ext_resource path="res://objects/enemy/enemy_move_sidesideupdown.gd" type="Script" id=3]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 1 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 18, 10 )
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 2 )
region = Rect2( 18, 0, 18, 10 )
[sub_resource type="SpriteFrames" id=4]
animations = [ {
"frames": [ SubResource( 2 ), SubResource( 3 ) ],
"loop": true,
"name": "default",
"speed": 8.0
} ]
[sub_resource type="RectangleShape2D" id=5]
extents = Vector2( 5, 5 )
[node name="Bat" type="Node2D"]
script = ExtResource( 3 )
can_be_killed_by_sword = false
speed = 40
move_direction = 1
flip_sprite = false
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
material = SubResource( 1 )
frames = SubResource( 4 )
playing = true
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 5 )
[connection signal="area_entered" from="Area2D" to="." method="_on_Area2D_area_entered"]

View file

@ -2,6 +2,7 @@ extends Node2D
export var can_be_killed_by_sword = true export var can_be_killed_by_sword = true
export var can_be_squashed = true export var can_be_squashed = true
export var score_for_killing = 0
func _on_Area2D_area_entered(area): func _on_Area2D_area_entered(area):
#Kill player #Kill player
@ -10,9 +11,15 @@ func _on_Area2D_area_entered(area):
#Die from sword #Die from sword
if area.is_in_group("sword"): if area.is_in_group("sword"):
if can_be_killed_by_sword: if can_be_killed_by_sword:
queue_free() die()
else:
Game.instance_node(Game.block_text,global_position.x,global_position.y,get_parent())
#Die from rock/ get squashed #Die from rock/ get squashed
if area.is_in_group("squash"): if area.is_in_group("squash"):
var squasher = area.get_parent() var squasher = area.get_parent()
if squasher.position.y + squasher.bottom.position.y < global_position.y: if squasher.position.y + squasher.bottom.position.y < global_position.y:
queue_free() die()
func die():
Game.score += score_for_killing
queue_free()

View file

@ -32,14 +32,16 @@ extents = Vector2( 5.5, 4.5 )
[node name="Slime" type="Node2D"] [node name="Slime" type="Node2D"]
script = ExtResource( 4 ) script = ExtResource( 4 )
score_for_killing = 10
[node name="AnimatedSprite" type="AnimatedSprite" parent="."] [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
material = SubResource( 1 ) material = SubResource( 1 )
position = Vector2( 5, 3 ) position = Vector2( 1, 3 )
frames = SubResource( 4 ) frames = SubResource( 4 )
playing = true playing = true
[node name="Area2D" type="Area2D" parent="."] [node name="Area2D" type="Area2D" parent="."]
position = Vector2( -4, 0 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] [node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2( 4.5, 3.5 ) position = Vector2( 4.5, 3.5 )

View file

@ -30,10 +30,12 @@ extents = Vector2( 8, 8 )
[node name="Snake" type="Node2D"] [node name="Snake" type="Node2D"]
script = ExtResource( 3 ) script = ExtResource( 3 )
score_for_killing = 15
[node name="AnimatedSprite" type="AnimatedSprite" parent="."] [node name="AnimatedSprite" type="AnimatedSprite" parent="."]
material = SubResource( 1 ) material = SubResource( 1 )
frames = SubResource( 4 ) frames = SubResource( 4 )
frame = 1
playing = true playing = true
[node name="Area2D" type="Area2D" parent="."] [node name="Area2D" type="Area2D" parent="."]

7
objects/hud/blocktext.gd Normal file
View file

@ -0,0 +1,7 @@
extends Node2D
func _ready():
$AnimationPlayer.play("block")
func _on_AnimationPlayer_animation_finished(anim_name):
queue_free()

View file

@ -0,0 +1,51 @@
[gd_scene load_steps=6 format=2]
[ext_resource path="res://scripts/1px_border.gdshader" type="Shader" id=1]
[ext_resource path="res://objects/hud/blocktext.gd" type="Script" id=2]
[ext_resource path="res://graphics/hud/block_text.png" type="Texture" id=3]
[sub_resource type="ShaderMaterial" id=1]
shader = ExtResource( 1 )
shader_param/border_color = Color( 0, 0, 0, 1 )
shader_param/border_corners = false
[sub_resource type="Animation" id=2]
resource_name = "block"
length = 0.3
step = 0.15
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:position")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.3 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 0 ), Vector2( 0, -8 ) ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.15, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 0,
"values": [ Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
}
[node name="BlockText" type="Node2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
material = SubResource( 1 )
texture = ExtResource( 3 )
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/block = SubResource( 2 )
[connection signal="animation_finished" from="AnimationPlayer" to="." method="_on_AnimationPlayer_animation_finished"]

24
objects/hud/hud.gd Normal file
View file

@ -0,0 +1,24 @@
extends Control
onready var gold_counter = $GoldCounter
onready var shard_counter = $ShardCounter
onready var red_star = $RedStar
onready var yellow_star = $YellowStar
onready var green_star = $GreenStar
onready var blue_star = $BlueStar
onready var magenta_star = $MagentaStar
onready var score_counter = $ScoreCounter
func _physics_process(delta):
#Gold Counter
gold_counter.text = "%03d" % Game.golds
#Shard Counter
shard_counter.text = "%02d" % Game.shards
#Star Counter
red_star.visible = Game.stars[0]
yellow_star.visible = Game.stars[1]
green_star.visible = Game.stars[2]
blue_star.visible = Game.stars[3]
magenta_star.visible = Game.stars[4]
#Score Counter
score_counter.text = "%06d" % Game.score

113
objects/hud/hud.tscn Normal file
View file

@ -0,0 +1,113 @@
[gd_scene load_steps=16 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/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="HUD" type="Control"]
margin_top = 1.0
margin_bottom = 1.0
script = ExtResource( 6 )
[node name="Back" type="Sprite" parent="."]
position = Vector2( 128, 8 )
texture = ExtResource( 3 )
[node name="GoldCounter" type="Label" parent="."]
margin_left = 14.0
margin_top = 1.0
margin_right = 54.0
margin_bottom = 21.0
theme = ExtResource( 10 )
text = "000"
[node name="ShardCounter" type="Label" parent="."]
margin_left = 53.0
margin_top = 1.0
margin_right = 93.0
margin_bottom = 21.0
theme = ExtResource( 10 )
text = "00"
[node name="RedStar" type="Sprite" parent="."]
visible = false
material = SubResource( 1 )
position = Vector2( 79, 8 )
texture = ExtResource( 4 )
region_enabled = true
region_rect = Rect2( 0, 0, 11, 11 )
[node name="YellowStar" type="Sprite" parent="."]
visible = false
material = SubResource( 2 )
position = Vector2( 92, 8 )
texture = ExtResource( 4 )
region_enabled = true
region_rect = Rect2( 0, 0, 11, 11 )
[node name="GreenStar" type="Sprite" parent="."]
visible = false
material = SubResource( 3 )
position = Vector2( 105, 8 )
texture = ExtResource( 4 )
region_enabled = true
region_rect = Rect2( 0, 0, 11, 11 )
[node name="BlueStar" type="Sprite" parent="."]
visible = false
material = SubResource( 4 )
position = Vector2( 118, 8 )
texture = ExtResource( 4 )
region_enabled = true
region_rect = Rect2( 0, 0, 11, 11 )
[node name="MagentaStar" type="Sprite" parent="."]
visible = false
material = SubResource( 5 )
position = Vector2( 131, 8 )
texture = ExtResource( 4 )
region_enabled = true
region_rect = Rect2( 0, 0, 11, 11 )
[node name="ScoreText" type="Label" parent="."]
margin_left = 142.0
margin_top = 1.0
margin_right = 226.0
margin_bottom = 21.0
theme = ExtResource( 10 )
text = "SCORE:"
[node name="ScoreCounter" type="Label" parent="."]
margin_left = 180.0
margin_top = 1.0
margin_right = 264.0
margin_bottom = 21.0
theme = ExtResource( 10 )
text = "000000"

View file

@ -50,6 +50,11 @@ func _physics_process(delta):
#Apply velocity #Apply velocity
move_and_slide(velocity,Vector2.UP) move_and_slide(velocity,Vector2.UP)
#Debug
if Input.is_action_pressed("debug_move_player"):
position = get_viewport().get_mouse_position()
print(get_viewport().get_mouse_position())
func _process_idle(): func _process_idle():
if anims.get_current_animation() != "idle": anims.play("idle") if anims.get_current_animation() != "idle": anims.play("idle")
#Stop #Stop
@ -78,6 +83,7 @@ func _process_idle_walk():
check_jump() check_jump()
#Goto Sword #Goto Sword
if Input.is_action_just_pressed("sword"): if Input.is_action_just_pressed("sword"):
Game.play_sound(Game.a_sword,Game.ac_jump)
current_state = State.SWORD current_state = State.SWORD
return return
@ -104,11 +110,18 @@ func _process_climb():
anims.set_speed_scale(abs(axis.y)) anims.set_speed_scale(abs(axis.y))
#Climb #Climb
position.y += axis.y * 0.65 position.y += axis.y * 0.65
#Sound
if axis.y == -1:
if Game.ac_climb.get_stream() != Game.a_climb_up: Game.play_sound(Game.a_climb_up,Game.ac_climb)
if axis.y == 1:
if Game.ac_climb.get_stream() != Game.a_climb_down: Game.play_sound(Game.a_climb_down,Game.ac_climb)
if axis.y == 0: Game.ac_climb.set_stream(null)
#Manual Jump,, only works when holding neutral or away from ladder #Manual Jump,, only works when holding neutral or away from ladder
if axis.x != sprite.scale.x: check_jump() if axis.x != sprite.scale.x: check_jump()
#Auto Jump #Auto Jump
if climb_ray.get_collider() == null: if climb_ray.get_collider() == null:
velocity.y = -jump_force velocity.y = -jump_force
Game.ac_climb.set_stream(null)
Game.play_sound(Game.a_jump,Game.ac_jump) Game.play_sound(Game.a_jump,Game.ac_jump)
current_state = State.FALL current_state = State.FALL
return return
@ -119,7 +132,7 @@ func _process_sword():
velocity.x = 0 velocity.x = 0
sword_sprite.scale.x = sprite.scale.x sword_sprite.scale.x = sprite.scale.x
#Move hitbox with flip #Move hitbox with flip
sword_hitbox.position.x = 10 * sprite.scale.x sword_hitbox.position.x = sprite.scale.x * 10
#Return to idle after animationplayer end anim signal #Return to idle after animationplayer end anim signal
@ -127,7 +140,9 @@ func _process_sword():
func check_jump(): func check_jump():
if Input.is_action_just_pressed("jump") && !Input.is_action_pressed("ui_down"): if Input.is_action_just_pressed("jump") && !Input.is_action_pressed("ui_down"):
#Detach ladder #Detach ladder
if current_state == State.CLIMB: position.x -= sprite.scale.x * 5 if current_state == State.CLIMB:
Game.ac_climb.set_stream(null)
position.x -= sprite.scale.x * 5
anims.set_speed_scale(1) anims.set_speed_scale(1)
# Jump # Jump
jump_pressure = 0 jump_pressure = 0

View file

@ -458,15 +458,17 @@ region_rect = Rect2( 0, 0, 20, 20 )
[node name="SwordSprite" type="Sprite" parent="."] [node name="SwordSprite" type="Sprite" parent="."]
material = SubResource( 28 ) material = SubResource( 28 )
region_enabled = true region_enabled = true
region_rect = Rect2( 32, 0, 32, 32 ) region_rect = Rect2( 0, 0, 32, 32 )
[node name="Area2D" type="Area2D" parent="." groups=["player"]] [node name="Area2D" type="Area2D" parent="." groups=["player"]]
visible = false
position = Vector2( 0, 3 ) position = Vector2( 0, 3 )
[node name="CollisionShape2D2" type="CollisionShape2D" parent="Area2D"] [node name="CollisionShape2D2" type="CollisionShape2D" parent="Area2D"]
shape = SubResource( 6 ) shape = SubResource( 6 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="." groups=["sword"]] [node name="CollisionShape2D" type="CollisionShape2D" parent="." groups=["sword"]]
visible = false
position = Vector2( 0, 3 ) position = Vector2( 0, 3 )
shape = SubResource( 6 ) shape = SubResource( 6 )
@ -487,9 +489,10 @@ anims/stab = SubResource( 32 )
anims/walk = SubResource( 33 ) anims/walk = SubResource( 33 )
[node name="SwordArea" type="Area2D" parent="." groups=["sword"]] [node name="SwordArea" type="Area2D" parent="." groups=["sword"]]
visible = false
[node name="SwordHitBox" type="CollisionShape2D" parent="SwordArea"] [node name="SwordHitBox" type="CollisionShape2D" parent="SwordArea"]
position = Vector2( 10, 3 ) position = Vector2( 0, 3 )
shape = SubResource( 34 ) shape = SubResource( 34 )
disabled = true disabled = true

View file

@ -82,6 +82,11 @@ crt={
"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":48,"physical_scancode":0,"unicode":0,"echo":false,"script":null) "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":48,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
] ]
} }
debug_move_player={
"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":77,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
[physics] [physics]

6
scripts/theme.tres Normal file
View file

@ -0,0 +1,6 @@
[gd_resource type="Theme" load_steps=2 format=2]
[ext_resource path="res://fonts/2ndpuberty..fnt" type="BitmapFont" id=1]
[resource]
default_font = ExtResource( 1 )

View file

@ -1,4 +1,4 @@
[gd_resource type="TileSet" load_steps=12 format=2] [gd_resource type="TileSet" load_steps=15 format=2]
[ext_resource path="res://graphics/tiles/grass.png" type="Texture" id=1] [ext_resource path="res://graphics/tiles/grass.png" type="Texture" id=1]
@ -32,6 +32,15 @@ points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
[sub_resource type="ConvexPolygonShape2D" id=10] [sub_resource type="ConvexPolygonShape2D" id=10]
points = PoolVector2Array( 8, 5, 0, 5, 0, 8, 8, 8 ) points = PoolVector2Array( 8, 5, 0, 5, 0, 8, 8, 8 )
[sub_resource type="ConvexPolygonShape2D" id=11]
points = PoolVector2Array( 8, 0, 8, 0, 8, 0, 8, 0 )
[sub_resource type="ConvexPolygonShape2D" id=12]
points = PoolVector2Array( 8, 0, 8, 0, 8, 8, 8, 8 )
[sub_resource type="ConvexPolygonShape2D" id=13]
points = PoolVector2Array( 8, 8, 0, 8, 0, 0, 8, 0 )
[resource] [resource]
0/name = "grass.png 0" 0/name = "grass.png 0"
0/texture = ExtResource( 1 ) 0/texture = ExtResource( 1 )
@ -113,6 +122,24 @@ points = PoolVector2Array( 8, 5, 0, 5, 0, 8, 8, 8 )
"one_way_margin": 1.0, "one_way_margin": 1.0,
"shape": SubResource( 10 ), "shape": SubResource( 10 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 ) "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 11 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 12 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 13 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ] } ]
0/z_index = 0 0/z_index = 0
1/name = "grass.png 1" 1/name = "grass.png 1"