Browse Source

Final State after Game Jam

master
Denis Thiessen 2 years ago
parent
commit
ad7ef13c36
  1. BIN
      assets/fonts/SlimeBox-GWMD.ttf
  2. 9
      assets/fonts/StartGame.tres
  3. BIN
      assets/sounds/coin.wav
  4. 21
      assets/sounds/coin.wav.import
  5. BIN
      assets/sounds/ocean_idle.wav
  6. 21
      assets/sounds/ocean_idle.wav.import
  7. BIN
      assets/sounds/oxygen_depletion_sound.wav
  8. 21
      assets/sounds/oxygen_depletion_sound.wav.import
  9. BIN
      assets/sounds/submarine_touchdown.wav
  10. 21
      assets/sounds/submarine_touchdown.wav.import
  11. BIN
      assets/sounds/underwater.wav
  12. 21
      assets/sounds/underwater.wav.import
  13. BIN
      assets/sounds/upgrade_fail.wav
  14. 21
      assets/sounds/upgrade_fail.wav.import
  15. BIN
      assets/sounds/upgrade_sound.wav
  16. 21
      assets/sounds/upgrade_sound.wav.import
  17. BIN
      assets/textures/coin.png
  18. 34
      assets/textures/coin.png.import
  19. BIN
      assets/textures/coin_frames/coin1.png
  20. 34
      assets/textures/coin_frames/coin1.png.import
  21. BIN
      assets/textures/coin_frames/coin2.png
  22. 34
      assets/textures/coin_frames/coin2.png.import
  23. BIN
      assets/textures/coin_frames/coin3.png
  24. 34
      assets/textures/coin_frames/coin3.png.import
  25. BIN
      assets/textures/coin_frames/coin4.png
  26. 34
      assets/textures/coin_frames/coin4.png.import
  27. BIN
      assets/textures/coin_frames/coin5.png
  28. 34
      assets/textures/coin_frames/coin5.png.import
  29. BIN
      assets/textures/game_icon.ico
  30. BIN
      assets/textures/game_icon.png
  31. 34
      assets/textures/game_icon.png.import
  32. BIN
      assets/textures/ocean_floor.png
  33. 34
      assets/textures/ocean_floor.png.import
  34. BIN
      assets/textures/oxygen_meter.png
  35. 34
      assets/textures/oxygen_meter.png.import
  36. BIN
      assets/textures/oxygen_tank.png
  37. 34
      assets/textures/oxygen_tank.png.import
  38. BIN
      assets/textures/startGameButton.png
  39. 34
      assets/textures/startGameButton.png.import
  40. BIN
      assets/textures/submarine.png
  41. 34
      assets/textures/submarine.png.import
  42. BIN
      assets/textures/submarine_frames/submarine1.png
  43. 34
      assets/textures/submarine_frames/submarine1.png.import
  44. BIN
      assets/textures/submarine_frames/submarine2.png
  45. 34
      assets/textures/submarine_frames/submarine2.png.import
  46. BIN
      assets/textures/treasure_diver_launcher_background.png
  47. 34
      assets/textures/treasure_diver_launcher_background.png.import
  48. BIN
      assets/textures/treasure_diver_launcher_foreground.png
  49. 34
      assets/textures/treasure_diver_launcher_foreground.png.import
  50. BIN
      assets/textures/unlock_button.png
  51. 34
      assets/textures/unlock_button.png.import
  52. BIN
      assets/textures/water_background.png
  53. 34
      assets/textures/water_background.png.import
  54. BIN
      assets/textures/waves.png
  55. 34
      assets/textures/waves.png.import
  56. 7
      default_env.tres
  57. 54
      project.godot
  58. 52
      scenes/Coin.tscn
  59. 73
      scenes/GameEnd.tscn
  60. 14
      scenes/OceanIdlePlayers.tscn
  61. 122
      scenes/StartGame.tscn
  62. 319
      scenes/World.tscn
  63. 18
      scripts/Coin.gd
  64. 16
      scripts/CoinCounter.gd
  65. 49
      scripts/Player.gd
  66. 34
      scripts/PlayerVariables.gd
  67. 23
      scripts/ScoreController.gd
  68. 12
      scripts/StartGame.gd
  69. 63
      scripts/TextureProgress.gd
  70. 23
      scripts/UpgradePanel.gd
  71. 102
      scripts/World.gd
  72. 17
      shader/WavesShaderMaterial.tres

BIN
assets/fonts/SlimeBox-GWMD.ttf

9
assets/fonts/StartGame.tres

@ -0,0 +1,9 @@
[gd_resource type="DynamicFont" load_steps=2 format=2]
[ext_resource path="res://assets/fonts/SlimeBox-GWMD.ttf" type="DynamicFontData" id=1]
[resource]
size = 92
outline_size = 8
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 1 )

BIN
assets/sounds/coin.wav

21
assets/sounds/coin.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/coin.wav-9081ee1c6d81d9c34d08bc916297b892.sample"
[deps]
source_file="res://assets/sounds/coin.wav"
dest_files=[ "res://.import/coin.wav-9081ee1c6d81d9c34d08bc916297b892.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=false
compress/mode=0

BIN
assets/sounds/ocean_idle.wav

21
assets/sounds/ocean_idle.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/ocean_idle.wav-057260acfdaf7f2a5315c7e59322b114.sample"
[deps]
source_file="res://assets/sounds/ocean_idle.wav"
dest_files=[ "res://.import/ocean_idle.wav-057260acfdaf7f2a5315c7e59322b114.sample" ]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=false
edit/loop=true
compress/mode=0

BIN
assets/sounds/oxygen_depletion_sound.wav

21
assets/sounds/oxygen_depletion_sound.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/oxygen_depletion_sound.wav-5de385eb62d312ac0a3ffe34fb377d7d.sample"
[deps]
source_file="res://assets/sounds/oxygen_depletion_sound.wav"
dest_files=[ "res://.import/oxygen_depletion_sound.wav-5de385eb62d312ac0a3ffe34fb377d7d.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=false
compress/mode=0

BIN
assets/sounds/submarine_touchdown.wav

21
assets/sounds/submarine_touchdown.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/submarine_touchdown.wav-85d98cafc320d2f158a53c428a297c69.sample"
[deps]
source_file="res://assets/sounds/submarine_touchdown.wav"
dest_files=[ "res://.import/submarine_touchdown.wav-85d98cafc320d2f158a53c428a297c69.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=false
compress/mode=0

BIN
assets/sounds/underwater.wav

21
assets/sounds/underwater.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/underwater.wav-d47654c8834cc99e69509424ca7e5333.sample"
[deps]
source_file="res://assets/sounds/underwater.wav"
dest_files=[ "res://.import/underwater.wav-d47654c8834cc99e69509424ca7e5333.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=false
compress/mode=0

BIN
assets/sounds/upgrade_fail.wav

21
assets/sounds/upgrade_fail.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/upgrade_fail.wav-8cbae7d9b6b554b8785f840c06322b4f.sample"
[deps]
source_file="res://assets/sounds/upgrade_fail.wav"
dest_files=[ "res://.import/upgrade_fail.wav-8cbae7d9b6b554b8785f840c06322b4f.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=false
compress/mode=0

BIN
assets/sounds/upgrade_sound.wav

21
assets/sounds/upgrade_sound.wav.import

@ -0,0 +1,21 @@
[remap]
importer="wav"
type="AudioStreamSample"
path="res://.import/upgrade_sound.wav-8f9c1083195b8009072df89439322cac.sample"
[deps]
source_file="res://assets/sounds/upgrade_sound.wav"
dest_files=[ "res://.import/upgrade_sound.wav-8f9c1083195b8009072df89439322cac.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=false
compress/mode=0

BIN
assets/textures/coin.png

After

Width: 148  |  Height: 148  |  Size: 6.0 KiB

34
assets/textures/coin.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/coin.png-a2185d81c51e3615d0293c91c41f2138.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/coin.png"
dest_files=[ "res://.import/coin.png-a2185d81c51e3615d0293c91c41f2138.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/coin_frames/coin1.png

After

Width: 170  |  Height: 170  |  Size: 16 KiB

34
assets/textures/coin_frames/coin1.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/coin1.png-f965e2b18f437007c16adfc4fdf12e9f.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/coin_frames/coin1.png"
dest_files=[ "res://.import/coin1.png-f965e2b18f437007c16adfc4fdf12e9f.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/coin_frames/coin2.png

After

Width: 170  |  Height: 170  |  Size: 10 KiB

34
assets/textures/coin_frames/coin2.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/coin2.png-597b119b0799164342181a8328801e78.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/coin_frames/coin2.png"
dest_files=[ "res://.import/coin2.png-597b119b0799164342181a8328801e78.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/coin_frames/coin3.png

After

Width: 170  |  Height: 170  |  Size: 11 KiB

34
assets/textures/coin_frames/coin3.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/coin3.png-6b916204a23c1c43dca407da2bbbe205.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/coin_frames/coin3.png"
dest_files=[ "res://.import/coin3.png-6b916204a23c1c43dca407da2bbbe205.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/coin_frames/coin4.png

After

Width: 170  |  Height: 170  |  Size: 16 KiB

34
assets/textures/coin_frames/coin4.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/coin4.png-d0ef1a1354917452a8bec31bcc5ac091.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/coin_frames/coin4.png"
dest_files=[ "res://.import/coin4.png-d0ef1a1354917452a8bec31bcc5ac091.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/coin_frames/coin5.png

After

Width: 170  |  Height: 170  |  Size: 13 KiB

34
assets/textures/coin_frames/coin5.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/coin5.png-e18f0532a42555d7aa1b88b54d656325.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/coin_frames/coin5.png"
dest_files=[ "res://.import/coin5.png-e18f0532a42555d7aa1b88b54d656325.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/game_icon.ico

BIN
assets/textures/game_icon.png

After

Width: 192  |  Height: 192  |  Size: 19 KiB

34
assets/textures/game_icon.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/game_icon.png-ac0bb745cd03fcdd6f5b794cb23f8100.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/game_icon.png"
dest_files=[ "res://.import/game_icon.png-ac0bb745cd03fcdd6f5b794cb23f8100.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/ocean_floor.png

After

Width: 720  |  Height: 200  |  Size: 9.2 KiB

34
assets/textures/ocean_floor.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/ocean_floor.png-8e3f3488156156f3ac6ac3800da5a602.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/ocean_floor.png"
dest_files=[ "res://.import/ocean_floor.png-8e3f3488156156f3ac6ac3800da5a602.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/oxygen_meter.png

After

Width: 100  |  Height: 175  |  Size: 1.1 KiB

34
assets/textures/oxygen_meter.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/oxygen_meter.png-1a1ff47855b57ae3248f2161e05e091c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/oxygen_meter.png"
dest_files=[ "res://.import/oxygen_meter.png-1a1ff47855b57ae3248f2161e05e091c.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/oxygen_tank.png

After

Width: 238  |  Height: 566  |  Size: 10 KiB

34
assets/textures/oxygen_tank.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/oxygen_tank.png-d5bef70fc08225028248db1d66b1931e.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/oxygen_tank.png"
dest_files=[ "res://.import/oxygen_tank.png-d5bef70fc08225028248db1d66b1931e.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/startGameButton.png

After

Width: 176  |  Height: 171  |  Size: 1.6 KiB

34
assets/textures/startGameButton.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/startGameButton.png-b428776fd556e8cf5523bdb68d296791.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/startGameButton.png"
dest_files=[ "res://.import/startGameButton.png-b428776fd556e8cf5523bdb68d296791.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/submarine.png

After

Width: 100  |  Height: 75  |  Size: 3.3 KiB

34
assets/textures/submarine.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/submarine.png-359a64fb9c32345f9bc4278cca97ce3d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/submarine.png"
dest_files=[ "res://.import/submarine.png-359a64fb9c32345f9bc4278cca97ce3d.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/submarine_frames/submarine1.png

After

Width: 100  |  Height: 75  |  Size: 3.2 KiB

34
assets/textures/submarine_frames/submarine1.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/submarine1.png-6ba87c700ae69271f50398cbbb68bb9d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/submarine_frames/submarine1.png"
dest_files=[ "res://.import/submarine1.png-6ba87c700ae69271f50398cbbb68bb9d.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/submarine_frames/submarine2.png

After

Width: 100  |  Height: 75  |  Size: 3.1 KiB

34
assets/textures/submarine_frames/submarine2.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/submarine2.png-ca700240259610a0433a24f9e509b11d.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/submarine_frames/submarine2.png"
dest_files=[ "res://.import/submarine2.png-ca700240259610a0433a24f9e509b11d.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/treasure_diver_launcher_background.png

After

Width: 432  |  Height: 432  |  Size: 12 KiB

34
assets/textures/treasure_diver_launcher_background.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/treasure_diver_launcher_background.png-4c59fc2b4cccfbb766d74e6f89cbcf23.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/treasure_diver_launcher_background.png"
dest_files=[ "res://.import/treasure_diver_launcher_background.png-4c59fc2b4cccfbb766d74e6f89cbcf23.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/treasure_diver_launcher_foreground.png

After

Width: 432  |  Height: 432  |  Size: 6.6 KiB

34
assets/textures/treasure_diver_launcher_foreground.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/treasure_diver_launcher_foreground.png-e7b00d32d2343c9f1091791783c657b7.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/treasure_diver_launcher_foreground.png"
dest_files=[ "res://.import/treasure_diver_launcher_foreground.png-e7b00d32d2343c9f1091791783c657b7.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/unlock_button.png

After

Width: 360  |  Height: 360  |  Size: 6.8 KiB

34
assets/textures/unlock_button.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/unlock_button.png-149031dea4afdd27d225a1e4e0c1efcb.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/unlock_button.png"
dest_files=[ "res://.import/unlock_button.png-149031dea4afdd27d225a1e4e0c1efcb.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=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/water_background.png

After

Width: 720  |  Height: 6100  |  Size: 118 KiB

34
assets/textures/water_background.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/water_background.png-bffb9ae1c4df6ae13c696f5355fc8e05.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/water_background.png"
dest_files=[ "res://.import/water_background.png-bffb9ae1c4df6ae13c696f5355fc8e05.stex" ]
[params]
compress/mode=1
compress/lossy_quality=0.3
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

BIN
assets/textures/waves.png

After

Width: 773  |  Height: 35  |  Size: 1.1 KiB

34
assets/textures/waves.png.import

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/waves.png-f952e58e46f71076cbfeb4dad66b424c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/waves.png"
dest_files=[ "res://.import/waves.png-f952e58e46f71076cbfeb4dad66b424c.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=1
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

7
default_env.tres

@ -0,0 +1,7 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

54
project.godot

@ -0,0 +1,54 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=4
_global_script_classes=[ {
"base": "Node2D",
"class": "Player",
"language": "GDScript",
"path": "res://scripts/Player.gd"
} ]
_global_script_class_icons={
"Player": ""
}
[application]
config/name="Treasure Diver"
config/description="A game made during LD48 by RocketNinjaGames"
run/main_scene="res://scenes/StartGame.tscn"
config/icon="res://assets/textures/game_icon.png"
config/windows_native_icon="res://assets/textures/game_icon.ico"
[autoload]
PlayerVariables="*res://scripts/PlayerVariables.gd"
[display]
window/size/width=720
window/size/height=1280
window/size/test_width=360
window/size/test_height=640
window/handheld/orientation="portrait"
window/stretch/mode="2d"
window/stretch/aspect="keep_width"
[input]
space={
"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":32,"unicode":0,"echo":false,"script":null)
, Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
]
}
[rendering]
environment/default_environment="res://default_env.tres"

52
scenes/Coin.tscn

@ -0,0 +1,52 @@
[gd_scene load_steps=11 format=2]
[ext_resource path="res://assets/textures/coin.png" type="Texture" id=1]
[ext_resource path="res://scripts/Coin.gd" type="Script" id=2]
[ext_resource path="res://assets/sounds/coin.wav" type="AudioStream" id=3]
[ext_resource path="res://assets/textures/coin_frames/coin1.png" type="Texture" id=7]
[ext_resource path="res://assets/textures/coin_frames/coin2.png" type="Texture" id=8]
[ext_resource path="res://assets/textures/coin_frames/coin5.png" type="Texture" id=9]
[ext_resource path="res://assets/textures/coin_frames/coin3.png" type="Texture" id=11]
[ext_resource path="res://assets/textures/coin_frames/coin4.png" type="Texture" id=12]
[sub_resource type="CircleShape2D" id=1]
[sub_resource type="Animation" id=2]
resource_name = "collect"
length = 0.38
step = 0.01
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:texture")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.08, 0.15, 0.23, 0.3, 0.38 ),
"transitions": PoolRealArray( 1.1487, 1.36604, 0.965936, 0.784584, 4.43828, 2.54912 ),
"update": 1,
"values": [ ExtResource( 1 ), ExtResource( 7 ), ExtResource( 8 ), ExtResource( 11 ), ExtResource( 12 ), ExtResource( 9 ) ]
}
[node name="Coin" type="Node2D"]
script = ExtResource( 2 )
[node name="Sprite" type="Sprite" parent="."]
scale = Vector2( 0.4, 0.4 )
texture = ExtResource( 1 )
[node name="CoinArea" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="CoinArea"]
scale = Vector2( 3, 3 )
shape = SubResource( 1 )
[node name="AudioStreamPlayer2D" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 3 )
attenuation = 0.57435
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/collect = SubResource( 2 )
[connection signal="body_entered" from="CoinArea" to="." method="_on_CoinArea_body_entered"]
[connection signal="finished" from="AudioStreamPlayer2D" to="." method="_on_AudioStreamPlayer2D_finished"]

73
scenes/GameEnd.tscn

@ -0,0 +1,73 @@
[gd_scene load_steps=11 format=2]
[ext_resource path="res://assets/textures/waves.png" type="Texture" id=1]
[ext_resource path="res://assets/textures/water_background.png" type="Texture" id=2]
[ext_resource path="res://shader/WavesShaderMaterial.tres" type="Material" id=3]
[ext_resource path="res://assets/textures/submarine_frames/submarine1.png" type="Texture" id=4]
[ext_resource path="res://assets/textures/submarine_frames/submarine2.png" type="Texture" id=5]
[ext_resource path="res://assets/textures/submarine.png" type="Texture" id=6]
[ext_resource path="res://assets/fonts/SlimeBox-GWMD.ttf" type="DynamicFontData" id=7]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 6 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]
[sub_resource type="DynamicFont" id=2]
size = 120
outline_size = 12
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 7 )
[sub_resource type="DynamicFont" id=3]
size = 32
outline_size = 4
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 7 )
[node name="GameEnd" type="Node2D"]
[node name="Water" type="Sprite" parent="."]
process_priority = -2
position = Vector2( 360, 3050 )
texture = ExtResource( 2 )
[node name="Waves" type="Sprite" parent="."]
material = ExtResource( 3 )
position = Vector2( 360, 370 )
texture = ExtResource( 1 )
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 350, 330 )
scale = Vector2( 2, 2 )
frames = SubResource( 1 )
frame = 1
playing = true
[node name="ThanksLabel" type="Label" parent="."]
margin_top = 500.0
margin_right = 739.0
margin_bottom = 805.0
custom_fonts/font = SubResource( 2 )
text = "Thanks for
playing"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OtherLabel" type="Label" parent="."]
margin_left = 440.0
margin_top = 1155.0
margin_right = 682.0
margin_bottom = 1224.0
custom_fonts/font = SubResource( 3 )
text = "Have fun playing
other games :)"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}

14
scenes/OceanIdlePlayers.tscn

@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://assets/sounds/ocean_idle.wav" type="AudioStream" id=1]
[node name="OceanIdlePlayers" type="Node2D"]
[node name="OceanIdleSoundPlayer1" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 1 )
volume_db = -8.0
[node name="OceanIdleSoundPlayer2" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 1 )
volume_db = -12.0
attenuation = 0.784584

122
scenes/StartGame.tscn

@ -0,0 +1,122 @@
[gd_scene load_steps=15 format=2]
[ext_resource path="res://assets/textures/water_background.png" type="Texture" id=1]
[ext_resource path="res://assets/textures/waves.png" type="Texture" id=2]
[ext_resource path="res://shader/WavesShaderMaterial.tres" type="Material" id=3]
[ext_resource path="res://assets/textures/submarine_frames/submarine1.png" type="Texture" id=4]
[ext_resource path="res://assets/textures/submarine_frames/submarine2.png" type="Texture" id=5]
[ext_resource path="res://assets/textures/submarine.png" type="Texture" id=6]
[ext_resource path="res://assets/textures/startGameButton.png" type="Texture" id=7]
[ext_resource path="res://assets/fonts/StartGame.tres" type="DynamicFont" id=8]
[ext_resource path="res://assets/fonts/SlimeBox-GWMD.ttf" type="DynamicFontData" id=9]
[ext_resource path="res://scripts/StartGame.gd" type="Script" id=10]
[ext_resource path="res://scenes/OceanIdlePlayers.tscn" type="PackedScene" id=11]
[sub_resource type="SpriteFrames" id=1]
animations = [ {
"frames": [ ExtResource( 6 ), ExtResource( 4 ), ExtResource( 5 ), ExtResource( 6 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]
[sub_resource type="DynamicFont" id=2]
size = 24
outline_size = 2
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 9 )
[sub_resource type="Animation" id=3]
resource_name = "ButtonIdle"
length = 2.3
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("StartGameButton:rect_scale")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.8, 1.5, 2.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 1, 1 ), Vector2( 0.95, 0.95 ), Vector2( 1.05, 1.05 ), Vector2( 1, 1 ) ]
}
[node name="StartGame" type="Node2D"]
script = ExtResource( 10 )
[node name="TitleLabelPart1" type="Label" parent="."]
margin_left = 65.0
margin_top = 550.0
margin_right = 431.0
margin_bottom = 643.0
rect_rotation = -10.0
custom_fonts/font = ExtResource( 8 )
text = "Treasure"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="TitleLabelPart2" type="Label" parent="."]
margin_left = 270.0
margin_top = 640.0
margin_right = 488.0
margin_bottom = 829.0
rect_rotation = -10.0
custom_fonts/font = ExtResource( 8 )
text = "Diver
"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Water" type="Sprite" parent="."]
process_priority = -2
position = Vector2( 360, 3050 )
z_index = -1
texture = ExtResource( 1 )
[node name="Waves" type="Sprite" parent="."]
material = ExtResource( 3 )
position = Vector2( 360, 370 )
texture = ExtResource( 2 )
[node name="StartGameButton" type="TextureButton" parent="."]
margin_left = 290.0
margin_top = 830.0
margin_right = 466.0
margin_bottom = 1001.0
rect_pivot_offset = Vector2( 90, 90 )
texture_normal = ExtResource( 7 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 350, 330 )
scale = Vector2( 2, 2 )
z_index = 1
frames = SubResource( 1 )
frame = 1
playing = true
[node name="Label" type="Label" parent="."]
margin_left = 450.0
margin_top = 1160.0
margin_right = 688.0
margin_bottom = 1241.0
custom_fonts/font = SubResource( 2 )
text = "By RocketNinjaGames
For LD48"
align = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/ButtonIdle = SubResource( 3 )
[node name="OceanIdlePlayers" parent="." instance=ExtResource( 11 )]
[connection signal="pressed" from="StartGameButton" to="." method="_on_StartGameButton_pressed"]

319
scenes/World.tscn

@ -0,0 +1,319 @@
[gd_scene load_steps=37 format=2]
[ext_resource path="res://assets/textures/water_background.png" type="Texture" id=1]
[ext_resource path="res://assets/textures/submarine_frames/submarine1.png" type="Texture" id=2]
[ext_resource path="res://scripts/Player.gd" type="Script" id=3]
[ext_resource path="res://assets/textures/oxygen_meter.png" type="Texture" id=4]
[ext_resource path="res://scripts/TextureProgress.gd" type="Script" id=5]
[ext_resource path="res://scripts/World.gd" type="Script" id=6]
[ext_resource path="res://scripts/ScoreController.gd" type="Script" id=7]
[ext_resource path="res://assets/fonts/SlimeBox-GWMD.ttf" type="DynamicFontData" id=8]
[ext_resource path="res://scenes/Coin.tscn" type="PackedScene" id=9]
[ext_resource path="res://scripts/CoinCounter.gd" type="Script" id=10]
[ext_resource path="res://assets/textures/coin.png" type="Texture" id=11]
[ext_resource path="res://scripts/UpgradePanel.gd" type="Script" id=12]
[ext_resource path="res://assets/textures/ocean_floor.png" type="Texture" id=13]
[ext_resource path="res://assets/textures/unlock_button.png" type="Texture" id=14]
[ext_resource path="res://shader/WavesShaderMaterial.tres" type="Material" id=15]
[ext_resource path="res://assets/textures/oxygen_tank.png" type="Texture" id=16]
[ext_resource path="res://scenes/OceanIdlePlayers.tscn" type="PackedScene" id=17]
[ext_resource path="res://assets/textures/submarine_frames/submarine2.png" type="Texture" id=18]
[ext_resource path="res://assets/textures/submarine.png" type="Texture" id=19]
[ext_resource path="res://assets/sounds/oxygen_depletion_sound.wav" type="AudioStream" id=20]
[ext_resource path="res://assets/textures/waves.png" type="Texture" id=21]
[ext_resource path="res://assets/sounds/upgrade_sound.wav" type="AudioStream" id=22]
[ext_resource path="res://assets/sounds/underwater.wav" type="AudioStream" id=23]
[ext_resource path="res://assets/sounds/submarine_touchdown.wav" type="AudioStream" id=24]
[ext_resource path="res://assets/sounds/upgrade_fail.wav" type="AudioStream" id=25]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 44.4904, 26.6096 )
[sub_resource type="SpriteFrames" id=2]
animations = [ {
"frames": [ ExtResource( 19 ), ExtResource( 2 ), ExtResource( 18 ), ExtResource( 2 ), ExtResource( 19 ) ],
"loop": true,
"name": "idle",
"speed": 10.0
} ]
[sub_resource type="Animation" id=3]
length = 0.5
step = 0.05
tracks/0/type = "value"
tracks/0/path = NodePath("PlayerSprite:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.17, 0.33, 0.5 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ 0.0, -15.0, 15.0, 180.0 ]
}
[sub_resource type="Animation" id=4]
length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("PlayerSprite:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ 180.0, 0.0 ]
}
[sub_resource type="DynamicFont" id=5]
size = 72
outline_size = 8
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 8 )
[sub_resource type="DynamicFont" id=6]
size = 64
outline_size = 6
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 8 )
[sub_resource type="DynamicFont" id=7]
size = 64
outline_size = 6
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 8 )
[sub_resource type="DynamicFont" id=8]
size = 40
outline_size = 5
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 8 )
[sub_resource type="DynamicFont" id=9]
size = 100
outline_size = 6
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 8 )
[sub_resource type="DynamicFont" id=10]
size = 48
outline_size = 6
outline_color = Color( 0, 0, 0, 1 )
font_data = ExtResource( 8 )
[sub_resource type="RectangleShape2D" id=11]
extents = Vector2( 358.847, 31.1499 )
[node name="World" type="Node2D"]
script = ExtResource( 6 )
[node name="Background" type="Sprite" parent="."]
process_priority = -2
position = Vector2( 360, 3050 )
z_index = -1
texture = ExtResource( 1 )
[node name="Player" type="Node2D" parent="."]
position = Vector2( 360, 340 )
script = ExtResource( 3 )
[node name="PlayerBody" type="KinematicBody2D" parent="Player"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Player/PlayerBody"]
shape = SubResource( 1 )
[node name="PlayerSprite" type="AnimatedSprite" parent="Player/PlayerBody"]
scale = Vector2( 1.5, 1.5 )
frames = SubResource( 2 )
animation = "idle"
frame = 3
playing = true
[node name="Camera2D" type="Camera2D" parent="Player/PlayerBody"]
offset = Vector2( 0, 300 )
current = true
limit_bottom = 5800
[node name="OxygenDepletionSound" type="AudioStreamPlayer2D" parent="Player/PlayerBody"]
position = Vector2( -360, -340 )
stream = ExtResource( 20 )
[node name="SubmarineTouchdownPlayer" type="AudioStreamPlayer2D" parent="Player/PlayerBody"]
position = Vector2( -360, -340 )
stream = ExtResource( 24 )
volume_db = -10.0
[node name="PlayerAnimationPlayer" type="AnimationPlayer" parent="Player/PlayerBody"]
anims/oxygen_depletion = SubResource( 3 )
anims/reset = SubResource( 4 )
[node name="OxygenMeter" type="Node2D" parent="."]
position = Vector2( 580, 1050 )
z_index = 1
[node name="TextureProgress" type="TextureProgress" parent="OxygenMeter"]
margin_left = -2.0
margin_top = 20.0
margin_right = 98.0
margin_bottom = 195.0
rect_scale = Vector2( 0.75, 0.75 )
value = 100.0
texture_under = ExtResource( 4 )
texture_progress = ExtResource( 4 )
fill_mode = 2
tint_under = Color( 0.105882, 0.835294, 0.909804, 1 )
tint_progress = Color( 0.105882, 0.835294, 0.909804, 0 )
script = ExtResource( 5 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OxygenMeterSprite" type="Node2D" parent="OxygenMeter"]
position = Vector2( 35, 40 )
scale = Vector2( 0.6, 0.6 )
z_index = -1
[node name="Sprite" type="Sprite" parent="OxygenMeter/OxygenMeterSprite"]
texture = ExtResource( 16 )
[node name="Score" type="Node2D" parent="."]
position = Vector2( 520, 30 )
script = ExtResource( 7 )
[node name="ScoreLabel" type="Label" parent="Score"]
margin_right = 40.0
margin_bottom = 14.0
custom_fonts/font = SubResource( 5 )
text = "0"
align = 2
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Coin" parent="." groups=[
"coins",
] instance=ExtResource( 9 )]
position = Vector2( 0, -50 )
[node name="CoinCounter" type="Node2D" parent="."]
position = Vector2( 50, 50 )
script = ExtResource( 10 )
[node name="CoinLabel" type="Label" parent="CoinCounter"]
margin_left = 48.6863
margin_top = -27.6274
margin_right = 114.686
margin_bottom = 37.3726
custom_fonts/font = SubResource( 6 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="CoinSprite" type="Sprite" parent="CoinCounter"]
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 11 )
[node name="UpgradePanel" type="Node2D" parent="."]
position = Vector2( 0, 1010 )
script = ExtResource( 12 )
[node name="Button" type="TextureButton" parent="UpgradePanel"]
margin_right = 200.0
margin_bottom = 100.0
rect_scale = Vector2( 0.75, 0.75 )
texture_normal = ExtResource( 14 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OxygenLabel" type="Node2D" parent="UpgradePanel"]
position = Vector2( 80, 80 )
[node name="OxygenPart1" type="Label" parent="UpgradePanel/OxygenLabel"]
margin_right = 40.0
margin_bottom = 14.0
custom_fonts/font = SubResource( 7 )
text = "O"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OxygenPart2" type="Label" parent="UpgradePanel/OxygenLabel"]
margin_left = 40.7608
margin_top = 41.6892
margin_right = 80.7608
margin_bottom = 82.6892
custom_fonts/font = SubResource( 8 )
text = "2"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="PlusSign" type="Label" parent="UpgradePanel/OxygenLabel"]
margin_left = -55.0
margin_top = -10.0
margin_right = -14.0
margin_bottom = 91.0
custom_fonts/font = SubResource( 9 )
text = "+"
__meta__ = {
"_edit_use_anchors_": false
}
[node name="UpgradeSoundPlayer" type="AudioStreamPlayer2D" parent="UpgradePanel"]
stream = ExtResource( 22 )
[node name="UpgradeFailedSoundPlayer" type="AudioStreamPlayer2D" parent="UpgradePanel"]
stream = ExtResource( 25 )
[node name="UpgradeCostPart" type="Node2D" parent="UpgradePanel"]
position = Vector2( 20, -10 )
[node name="CoinSprite" type="Sprite" parent="UpgradePanel/UpgradeCostPart"]
position = Vector2( 140, 215 )
scale = Vector2( 0.3, 0.3 )
texture = ExtResource( 11 )
[node name="UpgradeCostLabelWrapper" type="Node2D" parent="UpgradePanel/UpgradeCostPart"]
[node name="UpgradeCost" type="Label" parent="UpgradePanel/UpgradeCostPart/UpgradeCostLabelWrapper"]
margin_left = 50.0
margin_top = 190.0
margin_right = 101.0
margin_bottom = 239.0
custom_fonts/font = SubResource( 10 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="OceanFloor" type="Node2D" parent="."]
position = Vector2( 360, 6000 )
[node name="Sprite" type="Sprite" parent="OceanFloor"]
texture = ExtResource( 13 )
[node name="Area2D" type="Area2D" parent="OceanFloor"]
position = Vector2( 0, 70 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="OceanFloor/Area2D"]
shape = SubResource( 11 )
[node name="OceanIdlePlayers" parent="." instance=ExtResource( 17 )]
[node name="Waves" type="Sprite" parent="."]
material = ExtResource( 15 )
position = Vector2( 360, 370 )
z_index = -1
texture = ExtResource( 21 )
[node name="UnderwaterSoundPlayer" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 23 )
[connection signal="finished" from="Player/PlayerBody/SubmarineTouchdownPlayer" to="Player" method="_on_SubmarineTouchdownPlayer_finished"]
[connection signal="oxygen_depleted_signal" from="OxygenMeter/TextureProgress" to="." method="_on_oxygen_depleted_signal"]
[connection signal="oxygen_depleted_signal" from="OxygenMeter/TextureProgress" to="Player" method="_on_oxygen_depleted_signal"]
[connection signal="pressed" from="UpgradePanel/Button" to="UpgradePanel" method="_on_Button_pressed"]
[connection signal="body_entered" from="OceanFloor/Area2D" to="." method="_on_Ocean_Floor_body_entered"]
[connection signal="body_entered" from="OceanFloor/Area2D" to="Player" method="_on_Ocean_Floor_body_entered"]

18
scripts/Coin.gd

@ -0,0 +1,18 @@
extends Node2D
func _ready():
add_to_group("coins")
pass
func _on_CoinArea_body_entered(body):
if body is KinematicBody2D:
PlayerVariables.addCoin()
$AudioStreamPlayer2D.play()
$AnimationPlayer.play("collect")
pass
func _on_AudioStreamPlayer2D_finished():
call_deferred("queue_free")
pass

16
scripts/CoinCounter.gd

@ -0,0 +1,16 @@
extends Node2D
func _ready():
# warning-ignore:return_value_discarded
PlayerVariables.connect("coin_update_signal", self, "_on_PlayerVariables_update_coins")
updateCoinLabel()
pass
func _on_PlayerVariables_update_coins():
updateCoinLabel()
pass
func updateCoinLabel():
$CoinLabel.text = str(PlayerVariables.total_coins)
pass

49
scripts/Player.gd

@ -0,0 +1,49 @@
extends Node2D
class_name Player
const downwards_movement = PlayerVariables.downwards_movement
const start_y_position = 340
var movement_stopped = false
var oxygen_depleted = false
func _ready():
position = Vector2(360, start_y_position)
pass
func _process(_delta):
if (Input.is_action_pressed("space")) and not movement_stopped:
$PlayerBody.move_and_slide(downwards_movement)
else:
if $PlayerBody.position.y > 0 and not movement_stopped:
$PlayerBody.move_and_slide(-downwards_movement)
elif $PlayerBody.position.y < 0 and not movement_stopped:
$PlayerBody.position.y = 0
pass
func _on_Ocean_Floor_body_entered(body):
if body is KinematicBody2D:
movement_stopped = true
$PlayerBody/SubmarineTouchdownPlayer.play()
pass
func _on_oxygen_depleted_signal():
if not oxygen_depleted:
$PlayerBody/OxygenDepletionSound.play()
$PlayerBody/PlayerAnimationPlayer.play("oxygen_depletion")
oxygen_depleted = true
pass
func resetOxygenDepletion():
oxygen_depleted = false
pass
func _on_SubmarineTouchdownPlayer_finished():
get_tree().change_scene("res://scenes/GameEnd.tscn")
pass

34
scripts/PlayerVariables.gd

@ -0,0 +1,34 @@
extends Node
const downwards_movement = Vector2(0, 200)
var total_coins = 0
var upgrade_stage = 0
var upgrade_cost = 10
signal coin_update_signal
signal upgrade_oxygen_signal
func _ready():
pass
func addCoin():
total_coins += 1
emit_signal("coin_update_signal")
pass
func resetCoins():
total_coins = 0
emit_signal("coin_update_signal")
pass
func upgradeOxygenTank() -> bool:
if total_coins >= upgrade_cost:
total_coins -= upgrade_cost
upgrade_cost = round(upgrade_cost * 1.5)
emit_signal("upgrade_oxygen_signal")
emit_signal("coin_update_signal")
return true
return false

23
scripts/ScoreController.gd

@ -0,0 +1,23 @@
extends Node2D
var player_node
var start_y_position
func _ready():
$ScoreLabel.text = "0"
$ScoreLabel.align = Label.ALIGN_RIGHT
player_node = get_node("../Player/PlayerBody")
start_y_position = player_node.position.y
pass
func _process(_delta):
var current_score = round(player_node.position.y)
if current_score <= 0:
$ScoreLabel.text = "0"
else:
$ScoreLabel.text = str(current_score)
pass

12
scripts/StartGame.gd

@ -0,0 +1,12 @@
extends Node2D
func _ready():
$OceanIdlePlayers/OceanIdleSoundPlayer1.play()
$OceanIdlePlayers/OceanIdleSoundPlayer2.play(1.7)
$AnimationPlayer.play("ButtonIdle")
pass
func _on_StartGameButton_pressed():
# warning-ignore:return_value_discarded
get_tree().change_scene("res://scenes/World.tscn")
pass

63
scripts/TextureProgress.gd

@ -0,0 +1,63 @@
extends TextureProgress
var max_timer_value = 4
var timer_running = false
var timer_value = 0
var depleted = false
var oxygen_meter_node
signal oxygen_depleted_signal
func _ready():
value = 0
set_tint_progress(Color(0.6, 0.6, 0.6))
oxygen_meter_node = get_node("..")
# warning-ignore:return_value_discarded
PlayerVariables.connect("upgrade_oxygen_signal", self, "_on_PlayerVariables_upgrade_oxygen")
pass
func _process(delta):
if(Input.is_action_just_pressed("space")):
timer_running = true
depleted = false
if timer_value >= max_timer_value:
Input.action_release("space")
timer_running = false
if(Input.is_action_just_released("space")):
timer_running = false
if timer_running or oxygen_meter_node.position.y > 1050:
value = (timer_value / max_timer_value)*100
timer_value += delta
if not timer_running and (value > 0 and timer_value > 0) and oxygen_meter_node.position.y <= 1050:
timer_value -= delta*(PlayerVariables.upgrade_stage + 3)*2
value = (timer_value / max_timer_value)*100
if (timer_value < 0) or (value < 0):
timer_value = 0
value = 0
if value > 50:
tint_under = Color(0.94, 0.14, 0.24)
else:
tint_under = Color(0.11, 0.84, 0.91)
if value >= 100 and not depleted:
emit_signal("oxygen_depleted_signal")
depleted = true
pass
func _on_PlayerVariables_upgrade_oxygen():
if PlayerVariables.upgrade_stage >= 1:
max_timer_value *= 1.3
else:
max_timer_value *= 1.5
pass

23
scripts/UpgradePanel.gd

@ -0,0 +1,23 @@
extends Node2D
var upgrade_cost_digits = 1
func _ready():
$UpgradeCostPart/UpgradeCostLabelWrapper/UpgradeCost.text = str(PlayerVariables.upgrade_cost)
pass
func _on_Button_pressed():
var upgrade_successful = PlayerVariables.upgradeOxygenTank()
$UpgradeCostPart/UpgradeCostLabelWrapper/UpgradeCost.text = str(PlayerVariables.upgrade_cost)
if upgrade_successful:
$UpgradeSoundPlayer.play()
else:
$UpgradeFailedSoundPlayer.play()
if str(PlayerVariables.upgrade_cost).length() > upgrade_cost_digits:
upgrade_cost_digits = str(PlayerVariables.upgrade_cost).length()
$UpgradeCostPart/UpgradeCostLabelWrapper.position.x -= 20
pass

102
scripts/World.gd

@ -0,0 +1,102 @@
extends Node2D
const downwards_movement = PlayerVariables.downwards_movement
const e_const = 2.71828
const extra_coin_start = 3
const oxygen_meter_initial_position = Vector2()
const score_initial_position = Vector2()
const coin_counter_initial_position = Vector2()
var coin_resettable = false
var movement_stopped = false
var idle_sound_playing = false
var dying_return = false
var diving_return = false
func _ready():
initCoins()
pass
func _process(delta):
if not movement_stopped:
if Input.is_action_just_pressed("space"):
$UnderwaterSoundPlayer.play()
$OceanIdlePlayers/OceanIdleSoundPlayer1.stop()
$OceanIdlePlayers/OceanIdleSoundPlayer2.stop()
if Input.is_action_pressed("space"):
if $Player/PlayerBody.position.y < 4820:
$OxygenMeter.position = $OxygenMeter.position + downwards_movement*delta
$Score.position = $Score.position + downwards_movement*delta
$CoinCounter.position = $CoinCounter.position + downwards_movement*delta
coin_resettable = true
$UpgradePanel.visible = false
idle_sound_playing = false
else:
if $OxygenMeter.position.y > 1050:
$OxygenMeter.position = $OxygenMeter.position - downwards_movement*delta
if $Score.position.y > 30:
$Score.position = $Score.position - downwards_movement*delta
if $CoinCounter.position.y > 50:
$CoinCounter.position = $CoinCounter.position - downwards_movement*delta
if $Player/PlayerBody.position.y == 0:
$UpgradePanel.visible = true
if not idle_sound_playing:
$OceanIdlePlayers/OceanIdleSoundPlayer1.play()
$OceanIdlePlayers/OceanIdleSoundPlayer2.play(1.7)
$UnderwaterSoundPlayer.stop()
if dying_return:
$Player/PlayerBody/PlayerAnimationPlayer.play("reset")
dying_return = false
$Player.resetOxygenDepletion()
idle_sound_playing = true
if coin_resettable and $Player/PlayerBody.position.y == 0:
var coins = get_tree().get_nodes_in_group("coins")
for coin in coins:
coin.queue_free()
coin_resettable = false
initCoins()
pass
func initCoins():
for coin_count in range(2, 9):
if (coin_count > extra_coin_start):
for extra_coin in range(extra_coin_start + 1, coin_count):
spawnCoin(pow(e_const, 0.35*coin_count)*300 + 100*(extra_coin - extra_coin_start))
spawnCoin(pow(e_const, 0.35*coin_count)*300)
pass
func spawnCoin(var y_position):
var coinscene = load("res://scenes/Coin.tscn")
var coin = coinscene.instance()
coin.position = Vector2(360, y_position)
coin.name = "Coin"
call_deferred("add_child", coin)
pass
func _on_oxygen_depleted_signal():
PlayerVariables.resetCoins()
dying_return = true
diving_return = true
pass
func _on_Ocean_Floor_body_entered(body):
if body is KinematicBody2D:
movement_stopped = true
pass

17
shader/WavesShaderMaterial.tres

@ -0,0 +1,17 @@
[gd_resource type="ShaderMaterial" load_steps=2 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
uniform vec2 Direction = vec2(1.0, 0.0);
uniform float Speed = 0.01;
void fragment()
{
COLOR = texture(TEXTURE, UV + (Direction * Speed * TIME));
}"
[resource]
shader = SubResource( 1 )
shader_param/Direction = Vector2( 1, 0 )
shader_param/Speed = 0.01
Loading…
Cancel
Save