diff --git a/.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.md5 b/.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.md5 new file mode 100644 index 0000000..e3806fd --- /dev/null +++ b/.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.md5 @@ -0,0 +1,3 @@ +source_md5="0400e19a2fa485f9c0d8b833a79e396b" +dest_md5="408862312b7ffba0f4e428ab61158f59" + diff --git a/.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.oggstr b/.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.oggstr new file mode 100644 index 0000000..7d69cc2 Binary files /dev/null and b/.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.oggstr differ diff --git a/.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.md5 b/.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.md5 new file mode 100644 index 0000000..67b3fcf --- /dev/null +++ b/.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.md5 @@ -0,0 +1,3 @@ +source_md5="2f722d590000bcd4105c435d63c56d62" +dest_md5="468e5c7dc047d4c3f4a5678e109654c7" + diff --git a/.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.oggstr b/.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.oggstr new file mode 100644 index 0000000..f8258d4 Binary files /dev/null and b/.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.oggstr differ diff --git a/.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.md5 b/.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.md5 new file mode 100644 index 0000000..f18b2a5 --- /dev/null +++ b/.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.md5 @@ -0,0 +1,3 @@ +source_md5="ae4d82d1cc3cbfcc26e3138508e61969" +dest_md5="af4ba30a0295d4e1f52be810adb0656c" + diff --git a/.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.oggstr b/.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.oggstr new file mode 100644 index 0000000..edb4fa6 Binary files /dev/null and b/.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.oggstr differ diff --git a/audio/sounds/a_jinjo.ogg b/audio/sounds/a_jinjo.ogg new file mode 100644 index 0000000..6bcae76 Binary files /dev/null and b/audio/sounds/a_jinjo.ogg differ diff --git a/audio/sounds/a_jinjo.ogg.import b/audio/sounds/a_jinjo.ogg.import new file mode 100644 index 0000000..128d757 --- /dev/null +++ b/audio/sounds/a_jinjo.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.oggstr" + +[deps] + +source_file="res://audio/sounds/a_jinjo.ogg" +dest_files=[ "res://.import/a_jinjo.ogg-4b16bf4d913dc9acb601fc4cd65887c1.oggstr" ] + +[params] + +loop=false +loop_offset=0 diff --git a/audio/sounds/jump.ogg b/audio/sounds/jump.ogg new file mode 100644 index 0000000..8a4c658 Binary files /dev/null and b/audio/sounds/jump.ogg differ diff --git a/audio/sounds/jump.ogg.import b/audio/sounds/jump.ogg.import new file mode 100644 index 0000000..7f25192 --- /dev/null +++ b/audio/sounds/jump.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.oggstr" + +[deps] + +source_file="res://audio/sounds/jump.ogg" +dest_files=[ "res://.import/jump.ogg-3d03825ba28b5d65e7ecc96d371fc49a.oggstr" ] + +[params] + +loop=false +loop_offset=0 diff --git a/audio/sounds/snd_coin.ogg b/audio/sounds/snd_coin.ogg new file mode 100644 index 0000000..0506764 Binary files /dev/null and b/audio/sounds/snd_coin.ogg differ diff --git a/audio/sounds/snd_coin.ogg.import b/audio/sounds/snd_coin.ogg.import new file mode 100644 index 0000000..273d5e8 --- /dev/null +++ b/audio/sounds/snd_coin.ogg.import @@ -0,0 +1,15 @@ +[remap] + +importer="ogg_vorbis" +type="AudioStreamOGGVorbis" +path="res://.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.oggstr" + +[deps] + +source_file="res://audio/sounds/snd_coin.ogg" +dest_files=[ "res://.import/snd_coin.ogg-e43af4b2a5fcdba9e9309ebc8f191147.oggstr" ] + +[params] + +loop=false +loop_offset=0 diff --git a/control.tscn b/control.tscn index 974e394..a837b7a 100644 --- a/control.tscn +++ b/control.tscn @@ -1,9 +1,11 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=5 format=2] [ext_resource path="res://scripts/scaling.gd" type="Script" id=1] [ext_resource path="res://graphics/borders/prideborder.png" type="Texture" id=2] [ext_resource path="res://maps/map01.tscn" type="PackedScene" id=3] +[sub_resource type="ShaderMaterial" id=1] + [node name="Control" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 @@ -21,6 +23,7 @@ texture = ExtResource( 2 ) expand = true [node name="ViewportContainer" type="ViewportContainer" parent="."] +material = SubResource( 1 ) anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 diff --git a/credits.txt b/credits.txt new file mode 100644 index 0000000..55b8883 --- /dev/null +++ b/credits.txt @@ -0,0 +1,2 @@ +Game by Penny Rigate +Shaders by Hazel Aranda \ No newline at end of file diff --git a/game.gd b/game.gd index 963feb5..caf0fc3 100644 --- a/game.gd +++ b/game.gd @@ -6,6 +6,13 @@ var current_sector = Vector2(0,0) var golds = 0 var stars = 0 var shards = 0 +#Audio Channels +onready var ac_jump = $JumpSound +onready var ac_collectible = $CollecitbleSound +#Sounds +onready var a_gold = preload("res://audio/sounds/snd_coin.ogg") +onready var a_jump = preload("res://audio/sounds/jump.ogg") +onready var a_star = preload("res://audio/sounds/a_jinjo.ogg") func instance_node(node:PackedScene,x:float,y:float,parent): var Instance = node.instance() diff --git a/game.tscn b/game.tscn index 4d48420..cacecb2 100644 --- a/game.tscn +++ b/game.tscn @@ -4,3 +4,9 @@ [node name="Game" type="Node"] script = ExtResource( 1 ) + +[node name="CollecitbleSound" type="AudioStreamPlayer" parent="."] +volume_db = -8.0 + +[node name="JumpSound" type="AudioStreamPlayer" parent="."] +volume_db = -12.0 diff --git a/maps/map01.tscn b/maps/map01.tscn index fdf9067..80b5c6d 100644 --- a/maps/map01.tscn +++ b/maps/map01.tscn @@ -3,12 +3,12 @@ [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://graphics/backgrounds/blue_sky.png" type="Texture" id=3] -[ext_resource path="res://objects/enemy/slime.tscn" type="PackedScene" id=5] +[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://tilesets/t_grass.tres" type="TileSet" id=7] [ext_resource path="res://objects/Camera2D.tscn" type="PackedScene" id=8] [ext_resource path="res://scripts/delete_on_game_running.gd" type="Script" id=9] [ext_resource path="res://tilesets/t_water.tres" type="TileSet" id=10] -[ext_resource path="res://objects/rock/rock.tscn" type="PackedScene" id=11] [ext_resource path="res://objects/collectibles/shard.tscn" type="PackedScene" id=12] [sub_resource type="RectangleShape2D" id=1] @@ -69,16 +69,67 @@ scale = Vector2( 1, 9 ) [node name="Shard" parent="Collectibles" instance=ExtResource( 12 )] position = Vector2( 32, 40 ) -[node name="Enemies" type="Node2D" parent="."] +[node name="Gold" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 48, 40 ) -[node name="Slime" parent="Enemies" instance=ExtResource( 5 )] -position = Vector2( 128, 152 ) +[node name="Gold2" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 64, 40 ) -[node name="Rock" parent="." instance=ExtResource( 11 )] +[node name="Gold3" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 80, 40 ) + +[node name="Gold4" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 168, 40 ) + +[node name="Gold5" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 192, 40 ) + +[node name="Gold6" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 136, 152 ) + +[node name="Gold7" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 152, 152 ) + +[node name="Gold8" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 104, 128 ) + +[node name="Gold9" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 88, 128 ) + +[node name="Gold10" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 72, 128 ) + +[node name="Gold11" parent="Collectibles" instance=ExtResource( 5 )] position = Vector2( 144, 104 ) -[node name="Rock2" parent="." instance=ExtResource( 11 )] -position = Vector2( 144, 152 ) +[node name="Gold12" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 160, 104 ) + +[node name="Gold13" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 176, 104 ) + +[node name="Gold14" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 192, 104 ) + +[node name="Gold15" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 112, 80 ) + +[node name="Gold17" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 72, 80 ) + +[node name="Gold19" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 16, 88 ) + +[node name="Gold20" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 24, 88 ) + +[node name="Star" parent="Collectibles" instance=ExtResource( 4 )] +position = Vector2( 16, 136 ) + +[node name="Gold21" parent="Collectibles" instance=ExtResource( 5 )] +position = Vector2( 32, 88 ) + +[node name="Enemies" type="Node2D" parent="."] [node name="ColorRect" type="ColorRect" parent="."] margin_left = 256.0 diff --git a/objects/collectibles/gold.gd b/objects/collectibles/gold.gd index fdbe395..8889ea4 100644 --- a/objects/collectibles/gold.gd +++ b/objects/collectibles/gold.gd @@ -10,4 +10,5 @@ func _on_Area2D_area_entered(area): #Collect if area.is_in_group("player"): Game.golds += value + Game.play_sound(Game.a_gold,Game.ac_collectible) queue_free() diff --git a/objects/collectibles/star.gd b/objects/collectibles/star.gd index 14e30a5..272f220 100644 --- a/objects/collectibles/star.gd +++ b/objects/collectibles/star.gd @@ -9,6 +9,7 @@ func _ready(): func _on_Area2D_area_entered(area): #Collect if area.is_in_group("player"): + Game.play_sound(Game.a_star,Game.ac_collectible) Game.stars += value #5 Star reward if Game.stars == 5: Game.shards += 1 diff --git a/objects/player/player.gd b/objects/player/player.gd index 6af85d9..1fae3d9 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -49,9 +49,6 @@ func _physics_process(delta): if current_state != State.CLIMB: velocity.y += gravity #Apply velocity move_and_slide(velocity,Vector2.UP) - - print(Game.shards) - if Input.is_action_just_pressed("debug_1"): $AnimationPlayer.play("Stab") func _process_idle(): if anims.get_current_animation() != "idle": anims.play("idle") @@ -112,6 +109,7 @@ func _process_climb(): #Auto Jump if climb_ray.get_collider() == null: velocity.y = -jump_force + Game.play_sound(Game.a_jump,Game.ac_jump) current_state = State.FALL return @@ -134,6 +132,7 @@ func check_jump(): # Jump jump_pressure = 0 current_state = State.JUMP + Game.play_sound(Game.a_jump,Game.ac_jump) anims.play("jump") velocity.y = -jump_force move(walk_speed,0,true) diff --git a/project.godot b/project.godot index 391474d..0965578 100644 --- a/project.godot +++ b/project.godot @@ -50,6 +50,10 @@ texture={ "stream": false, "svg/scale": 1.0 } +ogg_vorbis={ +"loop": false, +"loop_offset": 0 +} [input]