Compare commits

..

9 commits
2.2.0 ... main

Author SHA1 Message Date
megamichi
947bdba21e fic git again 2024-11-10 20:03:36 +01:00
megamichi
194ae93854 fixing gitignore and removing builds folder 2024-11-10 20:02:12 +01:00
megamichi
dd5b4bcae5 - improving textures
- adding coins (no shop jet)
- adding skin changing [no gui jet
- fixing loops for deleting stuff]
2024-11-10 19:51:00 +01:00
megamichi
45193fc27f - adding coins
- performance improvements
- shake effect
- keyboard support
2024-11-04 19:10:10 +01:00
megamichi
78b4a3bba2 - Fixing Commit 2024-10-22 19:52:35 +02:00
megamichi
d92086f600 - Updating Textures
- Adding Home Button
- Fade Effect
2024-10-22 19:51:43 +02:00
megamichi
21e927966d - fixing hindernis speed
- Biom implementation
- Better Graphics
- again icon fix
2024-10-21 21:22:40 +02:00
megamichi
431fb8220e - implementing biom change
- fixing typo in "highscore"
2024-10-18 16:34:51 +02:00
megamichi
520a5db2c6 again iconfix 2024-10-12 14:47:20 +02:00
110 changed files with 1649 additions and 462 deletions

5
.gitignore vendored
View file

@ -1,5 +1,6 @@
# Godot 4+ specific ignores
.godot/
/android/
/builds/
images/
android/
builds/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 563 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://fon35dtl2fdd"
path="res://.godot/imported/back button f.png-efb6ddf8f429550b2341f025ce20dd5a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/buttons fucused/back button f.png"
dest_files=["res://.godot/imported/back button f.png-efb6ddf8f429550b2341f025ce20dd5a.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8um1xy8sixhb"
path="res://.godot/imported/note button f.png-1397d916f56d1ff7f08e313d3b74bff7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/buttons fucused/note button f.png"
dest_files=["res://.godot/imported/note button f.png-1397d916f56d1ff7f08e313d3b74bff7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bj06y06uq303j"
path="res://.godot/imported/restart button f.png-4b164de13f5dd59ea9c0197ef4d4bfda.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/buttons fucused/restart button f.png"
dest_files=["res://.godot/imported/restart button f.png-4b164de13f5dd59ea9c0197ef4d4bfda.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 568 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c66oktmsmdu0f"
path="res://.godot/imported/settings button f.png-2be0c78f63190ae3eba8fa51c122327b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/buttons fucused/settings button f.png"
dest_files=["res://.godot/imported/settings button f.png-2be0c78f63190ae3eba8fa51c122327b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://botwq4rflsfl3"
path="res://.godot/imported/sound button f.png-93410106fda92fcdc0d46920cf415401.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/buttons fucused/sound button f.png"
dest_files=["res://.godot/imported/sound button f.png-93410106fda92fcdc0d46920cf415401.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dui5dacb5lpfg"
path="res://.godot/imported/sound button off f.png-3945d9207f642dfe8529e5786a9b11c3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/buttons fucused/sound button off f.png"
dest_files=["res://.godot/imported/sound button off f.png-3945d9207f642dfe8529e5786a9b11c3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://2mq6ck123lm"
path="res://.godot/imported/start button f.png-4d7107cb861657e999ab17db80bfd0d5.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/buttons fucused/start button f.png"
dest_files=["res://.godot/imported/start button f.png-4d7107cb861657e999ab17db80bfd0d5.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bkcpp1iryq4hc"
path="res://.godot/imported/slider f.png-3d54eedc4180582468b166aaeccf5dd6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/GUI/theme_slider/slider f.png"
dest_files=["res://.godot/imported/slider f.png-3d54eedc4180582468b166aaeccf5dd6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/Ground/f.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bkvncdu12do8h"
path="res://.godot/imported/f.png-0bb357aaad3f190d3595a1032c921bfe.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/f.png"
dest_files=["res://.godot/imported/f.png-0bb357aaad3f190d3595a1032c921bfe.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View file

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bg78j6xxw3ck4"
path="res://.godot/imported/normal.png-37b1636db5b68b29e796c7291d1e7fb7.ctex"
path="res://.godot/imported/n.png-e0925980109603d0618d5083d12d13a4.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/normal.png"
dest_files=["res://.godot/imported/normal.png-37b1636db5b68b29e796c7291d1e7fb7.ctex"]
source_file="res://assets/Ground/n.png"
dest_files=["res://.godot/imported/n.png-e0925980109603d0618d5083d12d13a4.ctex"]
[params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

BIN
assets/Ground/s.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://h5lmps4jxju7"
path="res://.godot/imported/s.png-0af6d1fd4a1289066043e7b0864be0eb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/s.png"
dest_files=["res://.godot/imported/s.png-0af6d1fd4a1289066043e7b0864be0eb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d3fy8kykhgook"
path="res://.godot/imported/n_s.png-cfcc7a58229e689440ae0dbfa52dc24b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/transisions/n_s.png"
dest_files=["res://.godot/imported/n_s.png-cfcc7a58229e689440ae0dbfa52dc24b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View file

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cthy542lxhe5q"
path="res://.godot/imported/normal_wueste.png-89ab2ffcf2bef316921cd900939a3c10.ctex"
path="res://.godot/imported/n_w.png-6b82a1e9d4c66f03fbccb2ea5d832613.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/normal_wueste.png"
dest_files=["res://.godot/imported/normal_wueste.png-89ab2ffcf2bef316921cd900939a3c10.ctex"]
source_file="res://assets/Ground/transisions/n_w.png"
dest_files=["res://.godot/imported/n_w.png-6b82a1e9d4c66f03fbccb2ea5d832613.ctex"]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c8g0plv3864sx"
path="res://.godot/imported/s_n.png-c020b7ec12c669893cb80100a77473ac.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/transisions/s_n.png"
dest_files=["res://.godot/imported/s_n.png-c020b7ec12c669893cb80100a77473ac.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bvel70kpfhdyx"
path="res://.godot/imported/w_n.png-c6ed57fb0761144dfd54fa145c0d35bb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/transisions/w_n.png"
dest_files=["res://.godot/imported/w_n.png-c6ed57fb0761144dfd54fa145c0d35bb.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
assets/Ground/w.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bc586lwyvhc0x"
path="res://.godot/imported/wueste.png-5ab8ec82be959612090d314f1b3048a9.ctex"
path="res://.godot/imported/w.png-eaecb02b75e3caf6be524da31509ca22.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/wueste.png"
dest_files=["res://.godot/imported/wueste.png-5ab8ec82be959612090d314f1b3048a9.ctex"]
source_file="res://assets/Ground/w.png"
dest_files=["res://.godot/imported/w.png-eaecb02b75e3caf6be524da31509ca22.ctex"]
[params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -3,15 +3,15 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dgfvf2ta4lc4e"
path="res://.godot/imported/stars.png-57bc8dc47b79b5d04d53ace720164aae.ctex"
path="res://.godot/imported/stars.png-0cec3e64e602a6d2ff05e29e04abb435.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/Ground/stars.png"
dest_files=["res://.godot/imported/stars.png-57bc8dc47b79b5d04d53ace720164aae.ctex"]
source_file="res://assets/stars.png"
dest_files=["res://.godot/imported/stars.png-0cec3e64e602a6d2ff05e29e04abb435.ctex"]
[params]

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,6 +1,4 @@
extends Control
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
show()

View file

@ -1,28 +1,23 @@
extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#global_position.y = -80
$AnimationPlayer.play_backwards("out-in")
hide()
func _process(_delta: float) -> void:
pass
#global_position.x = get_viewport().get_visible_rect().size.x * 0.5
func _on_duck_gameover() -> void:
$AnimationPlayer.play_backwards("out-in")
$AnimationPlayer.pop_in()
$"../../Audio/GameOver".play()
$"../../Audio/Gui-in".play()
show()
$Restart.grab_focus()
print($"/root/Global".hiscore)
if %ScoreContainer.get_score() > $"/root/Global".hiscore:
$"/root/Global".write_save()
func _on_restart_pressed() -> void:
$"../..".start_game()
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
await $AnimationPlayer.animation_finished
hide()
$AnimationPlayer.pop_out()
func _on_back_pressed() -> void:
$"/root/Global".reset_game()

View file

@ -3,8 +3,9 @@ extends TextureRect
var audio_bus_music = 1
var audio_bus_sounds = 2
var sound_button_on_of = {true:preload("res://assets/GUI/sound button.png"),false:preload("res://assets/GUI/sound button off.png")}
var sound_button_on_of_f = {true:preload("res://assets/GUI/buttons fucused/sound button f.png"),false:preload("res://assets/GUI/buttons fucused/sound button off f.png")}
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#$"../../Audio/Duckrun".volume_db = linear_to_db(20*0.01)
$AnimationPlayer.play_backwards("out-in")
@ -15,23 +16,18 @@ func _process(_delta: float) -> void:
#$Logo.global_position.x = 0
func open():
show()
$AnimationPlayer.play_backwards("out-in")
$"../../Audio/Gui-in".play()
$AnimationPlayer.pop_in()
$BackButton.grab_focus()
func _on_back_pressed() -> void:
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
await $AnimationPlayer.animation_finished
hide()
$AnimationPlayer.pop_out()
$"../StartSchild"._ready()
func _volume_slider_changed(value: float) -> void:
AudioServer.set_bus_volume_db(audio_bus_music,linear_to_db(value*0.01))
func _on_sound_button_toggled(toggled_on: bool) -> void:
func _on_sound_button_toggled(_toggled_on: bool) -> void:
$SoundToggleButton.texture_normal = sound_button_on_of[AudioServer.is_bus_mute(audio_bus_sounds)]
$SoundToggleButton.texture_focused = sound_button_on_of_f[AudioServer.is_bus_mute(audio_bus_sounds)]
AudioServer.set_bus_mute(audio_bus_sounds,not AudioServer.is_bus_mute(audio_bus_sounds))

View file

@ -1,27 +1,21 @@
extends TextureRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$AnimationPlayer.play_backwards("out-in")
$"../../Audio/Gui-in".play()
show()
func _process(delta: float) -> void:
$Logo.global_position.x = -5
$"../StartSchildLogo/AnimationPlayer".pop_in()
$AnimationPlayer.pop_in()
$Start.grab_focus()
func _on_start_pressed() -> void:
$AnimationPlayer.pop_out()
$"../StartSchildLogo/AnimationPlayer".pop_out()
$"../..".start_game()
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
await $AnimationPlayer.animation_finished
hide()
func _on_settings_pressed() -> void:
$AnimationPlayer.play("out-in")
$"../../Audio/Gui-out".play()
await $AnimationPlayer.animation_finished
hide()
$"../StartSchildLogo/AnimationPlayer".pop_out()
$AnimationPlayer.pop_out()
$"../Settings".open()

View file

@ -1,3 +1,4 @@
{
"hiscore":0
"hiscore":0,
"coins":0
}

View file

@ -4,36 +4,61 @@ extends Node
signal levelup
signal start
var maxspeed = 260
var speed = 100
var score = 0
var active_biom
var gamerunning = false
var hiscore
var hiscore:int
var coins:int
func _ready() -> void:
load_save()
#write_save()
var save = load_save()
hiscore = save["hiscore"]
coins = save["hiscore"]
func reset_game():
speed = 100
score = 0
active_biom = "n"
gamerunning = false
_ready()
get_tree().reload_current_scene()
var data : FileAccess
func load_save() -> Dictionary:
# wenn kein save vorhanden ist, erstelle eins
if (not FileAccess.file_exists("user://save.json")) or (FileAccess.open("user://save.json", FileAccess.READ_WRITE).get_as_text() == ""):
init_save()
data = FileAccess.open("user://save.json", FileAccess.READ)
var content_text: Dictionary = JSON.parse_string(data.get_as_text())
if content_text:
print("loaded: ",content_text)
return content_text
else:
print("Failed to parse JSON")
return {}
func load_save():
var data : FileAccess
if (not FileAccess.file_exists("user://save.json")) or FileAccess.open("user://save.json",FileAccess.READ_WRITE).get_as_text() == "":
data = FileAccess.open("user://save.json",FileAccess.WRITE)
data.store_string(FileAccess.open("res://code/first_save.json",FileAccess.READ).get_as_text())
data.close()
data = FileAccess.open("user://save.json",FileAccess.READ)
var contenttext = JSON.parse_string(data.get_as_text())
print(contenttext)
hiscore = contenttext["hiscore"]
func write_save():
var data : FileAccess
data = FileAccess.open("user://save.json",FileAccess.WRITE)
data.store_string(
JSON.stringify(
var sdata : FileAccess
sdata = FileAccess.open("user://save.json",FileAccess.WRITE)
var content = JSON.stringify(
{
"hiscore":$"/root/Game/Gui/HiscoreContainer/hiscore".get_score()
"hiscore":$/root/Game/Gui/ScoreContainer.get_score()
}
)
)
print("saved: ",content)
sdata.store_string(content)
func init_save():
data = FileAccess.open("user://save.json", FileAccess.WRITE)
data.store_string(FileAccess.open("res://code/first_save.json", FileAccess.READ).get_as_text())
data.close()

View file

@ -1,18 +1,5 @@
extends Label
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
text = str($"/root/Global".hiscore)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func set_new_hiscore():
if int(text) < int(%ScoreContainer/text.text):
text = %ScoreContainer/text.text
$"/root/Global".write_save()
func get_score():
return int(text)

View file

@ -1,26 +1,26 @@
extends Node
var biom_n = preload("res://assets/Ground/normal.png")
var biom_n_w = preload("res://assets/Ground/normal_wueste.png")
var biom_w = preload("res://assets/Ground/wueste.png")
func _ready() -> void:
$Fade/Animation.play_backwards("fade")
$Screen/Background/Floor/EasterEggFixCollision.disabled = false
$Gui/HiscoreContainer.show()
%ScoreContainer.hide()
func start_game():
$Screen/Background/Floor/EasterEggFixCollision.disabled = true
$Screen/HurdleSpawner.del_all()
$Gui/EastereggSpawner.del_all()
$Screen/SpawnTimer.start()
$Screen/CoinSpawnTimer.start()
$Screen/LevelUpTimer.start()
$Screen/Duck.start()
$Screen/HindernissSpawner.del_all()
$Screen/EastereggSpawner.del_all()
$Gui/HiscoreContainer.hide()
%ScoreContainer.show()
$"/root/Global".gamerunning = true
$"/root/Global".start.emit()
$"/root/Global".score = 0
$"/root/Global".speed = 100
print("game started")
func _on_level_up_timer_timeout() -> void:
if $"/root/Global".speed < $"/root/Global".maxspeed:
@ -33,14 +33,3 @@ func _score() -> void:
elif $Screen/Duck.alive:
$"/root/Global".score += 10
%ScoreContainer/score.text = str($"/root/Global".score)
func _process(delta):
var background_size_x = $Screen/Background/Sprite.texture.get_size().x
var bla = (background_size_x) + $Screen/Background/Sprite.position.x
if $"/root/Global".gamerunning:
$Screen/Background/Sprite.position.x -= $"/root/Global".speed*delta
if bla <= 0:
#$Screen/Background/Sprite.texture =biom_n_w
$Screen/Background/Sprite.position.x = 0

14
code/score.gd Normal file
View file

@ -0,0 +1,14 @@
extends HBoxContainer
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void:
pass
func get_score():
return int($score.text)

9
code/screen.gd Normal file
View file

@ -0,0 +1,9 @@
extends Node2D
func shake(intensity):
var preview_pos = global_position
for x in range(14):
global_position.y = randi_range(0-intensity,intensity)
await get_tree().create_timer(0.02).timeout
global_position = preview_pos

BIN
duck_original.aseprite Normal file

Binary file not shown.

BIN
duck_original.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

34
duck_original.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vjgj0agmfm0x"
path="res://.godot/imported/duck_original.png-74e436be6bfe0d180a3751dab0abe3a3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://duck_original.png"
dest_files=["res://.godot/imported/duck_original.png-74e436be6bfe0d180a3751dab0abe3a3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -9,7 +9,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="builds/DuckRun_v2.2.0.apk"
export_path="builds/DuckRun_v2.3.1beta.apk"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
@ -31,7 +31,7 @@ architectures/armeabi-v7a=true
architectures/arm64-v8a=true
architectures/x86=false
architectures/x86_64=false
version/code=9
version/code=10
version/name=""
package/unique_name="at.megamichi.duckrun"
package/name="DuckRun"
@ -39,11 +39,11 @@ package/signed=true
package/app_category=2
package/retain_data_on_uninstall=false
package/exclude_from_recents=false
package/show_in_android_tv=true
package/show_in_android_tv=false
package/show_in_app_library=true
package/show_as_launcher_app=false
launcher_icons/main_192x192="res://icon.png"
launcher_icons/adaptive_foreground_432x432="res://icon.png"
launcher_icons/adaptive_foreground_432x432="res://icon_android.png"
launcher_icons/adaptive_background_432x432="res://icon_bg.png"
graphics/opengl_debug=false
xr_features/xr_mode=0
@ -226,7 +226,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="builds/DuckRun_v2.2.0.zip"
export_path="builds/DuckRun_v2.3.0.zip"
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View file

@ -2,7 +2,7 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cgu1aek7px110"
uid="uid://bkdglxxsrb2cd"
path="res://.godot/imported/icon.png-487276ed1e3a0c39cad0279d744ee560.ctex"
metadata={
"vram_texture": false

BIN
icon_android.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

34
icon_android.png.import Normal file
View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cqjesxgupnh4m"
path="res://.godot/imported/icon_android.png-68be0b3737a0d9e979d0f2a1ecdab0d3.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon_android.png"
dest_files=["res://.godot/imported/icon_android.png-68be0b3737a0d9e979d0f2a1ecdab0d3.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 B

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

View file

@ -11,7 +11,7 @@ config_version=5
[application]
config/name="DuckRun"
config/version="2.2.0"
config/version="2.3.0"
run/main_scene="res://scenes/Main.tscn"
config/features=PackedStringArray("4.3")
boot_splash/image="res://icon.png"
@ -20,6 +20,7 @@ config/icon="res://icon.png"
[autoload]
Global="*res://code/global.gd"
Signal_Debugger="*res://addons/SignalVisualizer/Debugger/SignalDebugger.gd"
[display]
@ -101,5 +102,6 @@ common/enable_pause_aware_picking=true
[rendering]
textures/canvas_textures/default_texture_filter=0
renderer/rendering_method="mobile"
textures/vram_compression/import_etc2_astc=true
environment/defaults/default_environment="res://default_env.tres"

View file

@ -7,6 +7,9 @@ signal gameover
@onready var alive = true
var state = "main-menu"
func _ready() -> void:
%Skin.change_to(0)
func die():
print("die")
gameover.emit()
@ -14,6 +17,7 @@ func die():
func start():
global_position = Vector2(21,91)
velocity = Vector2(0,0)
alive = true
func _physics_process(delta: float) -> void:
@ -25,7 +29,7 @@ func _physics_process(delta: float) -> void:
move_and_slide()
func _process(_delta: float) -> void:
if position.x < -20:
if global_position.x < 20 or global_position.y > 100:
if alive:
die()
@ -42,10 +46,6 @@ func _process(_delta: float) -> void:
else:
$AnimationPlayer.play("walk")
func _collide_with_hindernis(_body: Node2D) -> void:
if alive:
die()
func _color_slider_changed(value) -> void:
$EnteConstantSprite/EnteColormask.modulate.h = $"../../Gui/Settings/ColorSlider".value*0.01
@ -53,3 +53,4 @@ func _color_slider_changed(value) -> void:
func _on_ente_sprite_frame_changed() -> void:
$EnteConstantSprite/EnteColormask.frame = $EnteConstantSprite.frame
$EnteConstantSprite/Skin.frame = $EnteConstantSprite.frame

View file

@ -1,8 +1,10 @@
[gd_scene load_steps=12 format=3 uid="uid://8v5mbbnddorh"]
[gd_scene load_steps=14 format=3 uid="uid://8v5mbbnddorh"]
[ext_resource type="Texture2D" uid="uid://dc6grg2oaq3a6" path="res://scenes/Duck/ente.png" id="1"]
[ext_resource type="Script" path="res://scenes/Duck/Duck.gd" id="1_pvotk"]
[ext_resource type="Texture2D" uid="uid://dsifqpp5l00cr" path="res://scenes/Duck/ente_colormask.png" id="3_a4v8w"]
[ext_resource type="Texture2D" uid="uid://c1mq2xs0uuoxu" path="res://scenes/Duck/customs/1.png" id="4_acy8u"]
[ext_resource type="Script" path="res://scenes/Duck/skin.gd" id="4_gc1nf"]
[sub_resource type="Animation" id="5"]
length = 0.001
@ -113,8 +115,9 @@ libraries = {
[node name="EnteConstantSprite" type="Sprite2D" parent="."]
texture_filter = 3
position = Vector2(0, -7)
position = Vector2(-8, -16)
texture = ExtResource("1")
centered = false
hframes = 3
vframes = 2
frame = 4
@ -122,9 +125,18 @@ frame = 4
[node name="EnteColormask" type="Sprite2D" parent="EnteConstantSprite"]
modulate = Color(1, 1, 0, 1)
texture = ExtResource("3_a4v8w")
centered = false
hframes = 3
vframes = 2
[node name="Skin" type="Sprite2D" parent="EnteConstantSprite"]
unique_name_in_owner = true
texture = ExtResource("4_acy8u")
centered = false
hframes = 3
vframes = 2
script = ExtResource("4_gc1nf")
[node name="physicsbox" type="CollisionShape2D" parent="."]
position = Vector2(2.38419e-07, -6)
scale = Vector2(5, 5)

BIN
scenes/Duck/customs/0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ce0vevqn8ato7"
path="res://.godot/imported/0.png-940815318ee3975aa08c57ce3dd29bc8.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://scenes/Duck/customs/0.png"
dest_files=["res://.godot/imported/0.png-940815318ee3975aa08c57ce3dd29bc8.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
scenes/Duck/customs/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1mq2xs0uuoxu"
path="res://.godot/imported/1.png-db9f6a2a43cc52b4b34f318375c7f5a7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://scenes/Duck/customs/1.png"
dest_files=["res://.godot/imported/1.png-db9f6a2a43cc52b4b34f318375c7f5a7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=1
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
scenes/Duck/customs/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 591 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgs3hrxrrslip"
path="res://.godot/imported/2.png-e7ef44db5e8ec5954a8c29fb6584d647.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://scenes/Duck/customs/2.png"
dest_files=["res://.godot/imported/2.png-e7ef44db5e8ec5954a8c29fb6584d647.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

BIN
scenes/Duck/customs/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bs7mitmimjd4d"
path="res://.godot/imported/3.png-c65c606fbe3fd8bad5ef424c13f9ca84.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://scenes/Duck/customs/3.png"
dest_files=["res://.godot/imported/3.png-c65c606fbe3fd8bad5ef424c13f9ca84.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

5
scenes/Duck/skin.gd Normal file
View file

@ -0,0 +1,5 @@
extends Sprite2D
func change_to(custom_number:int):
texture = load("res://scenes/Duck/customs/{s}.png".format({"s":str(custom_number)}))

View file

@ -1,173 +1,183 @@
[gd_scene load_steps=35 format=3 uid="uid://bb5qp5868y5i"]
[gd_scene load_steps=51 format=3 uid="uid://bb5qp5868y5i"]
[ext_resource type="Script" path="res://code/main.gd" id="1_ar2ah"]
[ext_resource type="PackedScene" uid="uid://8v5mbbnddorh" path="res://scenes/Duck/Duck.tscn" id="2"]
[ext_resource type="Texture2D" uid="uid://dgfvf2ta4lc4e" path="res://assets/Ground/stars.png" id="2_ohf2r"]
[ext_resource type="Texture2D" uid="uid://bg78j6xxw3ck4" path="res://assets/Ground/normal.png" id="3"]
[ext_resource type="Script" path="res://scenes/hindernis/Spawner/hindernis_spawner.gd" id="4_oc6me"]
[ext_resource type="PackedScene" uid="uid://dm307sj4nenjt" path="res://scenes/schild.tscn" id="5_ewtcf"]
[ext_resource type="Texture2D" uid="uid://do0okfxenx2ci" path="res://assets/GUI/restart button.png" id="6_boo0r"]
[ext_resource type="Script" path="res://scenes/easteregg/Spawner/easteregg_spawner.gd" id="8_awkaj"]
[ext_resource type="Script" path="res://code/GUI/gui.gd" id="8_t3tw7"]
[ext_resource type="Script" path="res://code/GUI/startschild.gd" id="10_tn1on"]
[ext_resource type="Texture2D" uid="uid://d2i2d0rmdtklc" path="res://assets/GUI/start button.png" id="11_4sha5"]
[ext_resource type="Script" path="res://code/screen.gd" id="2_cix0i"]
[ext_resource type="Texture2D" uid="uid://dgfvf2ta4lc4e" path="res://assets/stars.png" id="2_ohf2r"]
[ext_resource type="Script" path="res://scenes/ground/spawner/ground_spawner.gd" id="3_va7mo"]
[ext_resource type="Script" path="res://scenes/hurdle/Spawner/spawner.gd" id="4_oc6me"]
[ext_resource type="PackedScene" uid="uid://cjq8kb0mhjh8r" path="res://scenes/ground/ground.tscn" id="4_tt0te"]
[ext_resource type="Script" path="res://scenes/coin/spawner/coin_spawner.gd" id="8_7ggb5"]
[ext_resource type="Script" path="res://scenes/Wolke/Spawner/wolken_spawner.gd" id="11_x2wm3"]
[ext_resource type="Texture2D" uid="uid://dqvnnd3o1eele" path="res://assets/GUI/settings button.png" id="13_0b7u8"]
[ext_resource type="Texture2D" uid="uid://46wo0ufacs5d" path="res://assets/GUI/sound button.png" id="13_hvt5m"]
[ext_resource type="Texture2D" uid="uid://bj7bgtdcbdald" path="res://assets/GUI/logo.png" id="14_4hepj"]
[ext_resource type="Texture2D" uid="uid://nvn254p6tk8j" path="res://assets/GUI/back button.png" id="15_wi7xd"]
[ext_resource type="Script" path="res://code/GUI/settingsschild.gd" id="16_0wi25"]
[ext_resource type="Texture2D" uid="uid://bf82voofmvdj4" path="res://assets/GUI/theme_slider/slider.png" id="17_41xdg"]
[ext_resource type="Script" path="res://scenes/easteregg/Spawner/easteregg_spawner.gd" id="12_hl8it"]
[ext_resource type="FontFile" uid="uid://ddvhypxkj8a1b" path="res://Megamichisfont-small.otf" id="13_666gv"]
[ext_resource type="Texture2D" uid="uid://cfmflpkl335e3" path="res://assets/GUI/schild.png" id="13_yjq5c"]
[ext_resource type="Script" path="res://code/hiscore.gd" id="14_ah063"]
[ext_resource type="Texture2D" uid="uid://fon35dtl2fdd" path="res://assets/GUI/buttons fucused/back button f.png" id="15_2rflk"]
[ext_resource type="Script" path="res://code/GUI/settingsschild.gd" id="16_4ssry"]
[ext_resource type="Texture2D" uid="uid://nvn254p6tk8j" path="res://assets/GUI/back button.png" id="17_3kek5"]
[ext_resource type="Texture2D" uid="uid://bkcpp1iryq4hc" path="res://assets/GUI/theme_slider/slider f.png" id="17_f78xf"]
[ext_resource type="Texture2D" uid="uid://botwq4rflsfl3" path="res://assets/GUI/buttons fucused/sound button f.png" id="18_ahbxs"]
[ext_resource type="Texture2D" uid="uid://bf82voofmvdj4" path="res://assets/GUI/theme_slider/slider.png" id="18_u2no7"]
[ext_resource type="Texture2D" uid="uid://46wo0ufacs5d" path="res://assets/GUI/sound button.png" id="19_vwek8"]
[ext_resource type="Texture2D" uid="uid://bj06y06uq303j" path="res://assets/GUI/buttons fucused/restart button f.png" id="20_5xtpj"]
[ext_resource type="AudioStream" uid="uid://drriw1cka4m3" path="res://assets/audio/gui-in.ogg" id="20_eihxi"]
[ext_resource type="Script" path="res://code/hiscore.gd" id="21_5nnhv"]
[ext_resource type="Texture2D" uid="uid://do0okfxenx2ci" path="res://assets/GUI/restart button.png" id="20_gdgit"]
[ext_resource type="Texture2D" uid="uid://2mq6ck123lm" path="res://assets/GUI/buttons fucused/start button f.png" id="20_i5ekl"]
[ext_resource type="AudioStream" uid="uid://ctt1kb2a66yyl" path="res://assets/audio/boing.mp3" id="21_ch5yv"]
[ext_resource type="AudioStream" uid="uid://bktthpfrs0118" path="res://assets/audio/gui-out.ogg" id="21_frskh"]
[ext_resource type="FontFile" uid="uid://ddvhypxkj8a1b" path="res://Megamichisfont-small.otf" id="21_uy1pc"]
[ext_resource type="Script" path="res://code/GUI/startschild.gd" id="21_owbcl"]
[ext_resource type="Script" path="res://code/GUI/restartschild.gd" id="21_ytgei"]
[ext_resource type="AudioStream" uid="uid://c4wrtvywao1jn" path="res://assets/audio/duckrun.wav" id="22_ijpe0"]
[ext_resource type="Texture2D" uid="uid://d2i2d0rmdtklc" path="res://assets/GUI/start button.png" id="22_x686b"]
[ext_resource type="Texture2D" uid="uid://dqvnnd3o1eele" path="res://assets/GUI/settings button.png" id="23_on2gf"]
[ext_resource type="Texture2D" uid="uid://bj7bgtdcbdald" path="res://assets/GUI/logo.png" id="24_8b8my"]
[ext_resource type="Script" path="res://code/score.gd" id="25_2prek"]
[ext_resource type="Texture2D" uid="uid://c66oktmsmdu0f" path="res://assets/GUI/buttons fucused/settings button f.png" id="25_bjwbg"]
[ext_resource type="PackedScene" uid="uid://dm307sj4nenjt" path="res://scenes/ui/animation.tscn" id="30_30gpa"]
[ext_resource type="PackedScene" uid="uid://yiu5npbi008a" path="res://scenes/ui/animation_logo.tscn" id="31_ugbfy"]
[sub_resource type="Animation" id="Animation_n8ktn"]
[sub_resource type="GDScript" id="GDScript_xq7jv"]
script/source = "extends ColorRect
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
visible = true
"
[sub_resource type="Animation" id="Animation_0cnuw"]
length = 0.001
tracks/0/type = "bezier"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:color:r")
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0.560784, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:color:g")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0),
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0)
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
[sub_resource type="Animation" id="Animation_7cwe6"]
resource_name = "change_time"
length = 6.0
step = 0.25
tracks/0/type = "bezier"
[sub_resource type="Animation" id="Animation_tt0ob"]
resource_name = "fade"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("..:modulate:r")
tracks/0/path = NodePath(".:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/1/type = "bezier"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("..:modulate:g")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/2/type = "bezier"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("..:modulate:b")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(1, -0.5, 0, 1, 0, 0.6, -1, 0, 0.5, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/3/type = "bezier"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".:color:r")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.560784, -0.25, 0, 0.25, 0, 0.1, -0.5, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/4/type = "bezier"
tracks/4/imported = false
tracks/4/enabled = true
tracks/4/path = NodePath(".:color:g")
tracks/4/interp = 1
tracks/4/loop_wrap = true
tracks/4/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0, 0.1, -0.5, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/5/type = "bezier"
tracks/5/imported = false
tracks/5/enabled = true
tracks/5/path = NodePath(".:color:b")
tracks/5/interp = 1
tracks/5/loop_wrap = true
tracks/5/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0.937255, -0.25, 0, 0.25, 0, 0.3, -0.25, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
}
tracks/6/type = "bezier"
tracks/6/imported = false
tracks/6/enabled = true
tracks/6/path = NodePath("../Background/Stars:modulate:a")
tracks/6/interp = 1
tracks/6/loop_wrap = true
tracks/6/keys = {
"handle_modes": PackedInt32Array(0, 0),
"points": PackedFloat32Array(0, -0.25, 0, 1, 0, 1, -1, 0, 0.25, 0),
"times": PackedFloat32Array(0, 6)
"times": PackedFloat32Array(0, 0.3),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 0), Color(1, 1, 1, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_c30x0"]
[sub_resource type="AnimationLibrary" id="AnimationLibrary_qrakk"]
_data = {
"RESET": SubResource("Animation_n8ktn"),
"change_time": SubResource("Animation_7cwe6")
"RESET": SubResource("Animation_0cnuw"),
"fade": SubResource("Animation_tt0ob")
}
[sub_resource type="GDScript" id="GDScript_rkc4w"]
script/source = "extends Timer
var day = true
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _change_time() -> void:
print(day)
if day:
$\"../AnimationPlayer\".play(\"change_time\")
print(\"playing\")
day = not day
else:
$\"../AnimationPlayer\".play_backwards(\"change_time\")
print(\"playing r\")
day = not day
"
[sub_resource type="RectangleShape2D" id="RectangleShape2D_o05as"]
size = Vector2(4, 15)
size = Vector2(2, 9.75)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0a3yj"]
size = Vector2(361, 8)
size = Vector2(356.5, 8)
[sub_resource type="Animation" id="Animation_plyvn"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("../Fade:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("BackgroundColor:color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(0.160784, 0.670588, 0.8, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath(".:modulate")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
[sub_resource type="Animation" id="Animation_8pa57"]
resource_name = "change_time"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("BackgroundColor:color")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(0.160784, 0.670588, 0.8, 1), Color(0.086, 0.0917334, 0.43, 1)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath(".:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0, 1),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(0.470075, 0.470076, 0.470076, 1)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_t75gq"]
_data = {
"RESET": SubResource("Animation_plyvn"),
"change_time": SubResource("Animation_8pa57")
}
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_jin1w"]
@ -185,9 +195,9 @@ expand_margin_top = 1.0
expand_margin_bottom = 2.0
anti_aliasing = false
[sub_resource type="Theme" id="Theme_0130c"]
HSlider/icons/grabber = ExtResource("17_41xdg")
HSlider/icons/grabber_highlight = ExtResource("17_41xdg")
[sub_resource type="Theme" id="Theme_fcgbk"]
HSlider/icons/grabber = ExtResource("18_u2no7")
HSlider/icons/grabber_highlight = ExtResource("17_f78xf")
HSlider/styles/grabber_area = SubResource("StyleBoxEmpty_jin1w")
HSlider/styles/grabber_area_highlight = SubResource("StyleBoxEmpty_g0rdc")
HSlider/styles/slider = SubResource("StyleBoxFlat_xb3tf")
@ -195,24 +205,38 @@ HSlider/styles/slider = SubResource("StyleBoxFlat_xb3tf")
[node name="Game" type="Node"]
script = ExtResource("1_ar2ah")
[node name="Screen" type="Node2D" parent="."]
[node name="Fade" type="ColorRect" parent="."]
modulate = Color(1, 1, 1, 0)
z_index = 1
z_as_relative = false
offset_top = -9.0
offset_right = 485.0
offset_bottom = 300.0
mouse_filter = 2
color = Color(0, 0, 0, 1)
script = SubResource("GDScript_xq7jv")
metadata/_edit_lock_ = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="Screen"]
root_node = NodePath("../BackgroundRect")
[node name="Animation" type="AnimationPlayer" parent="Fade"]
libraries = {
"": SubResource("AnimationLibrary_c30x0")
"": SubResource("AnimationLibrary_qrakk")
}
[node name="Screen" type="Node2D" parent="."]
script = ExtResource("2_cix0i")
[node name="BackgroundColor" type="ColorRect" parent="Screen"]
offset_left = -10.0
offset_top = -9.0
offset_right = 561.0
offset_bottom = 111.0
color = Color(0.160784, 0.670588, 0.8, 1)
[node name="Day-NightTimer" type="Timer" parent="Screen"]
wait_time = 12.0
wait_time = 15.0
autostart = true
script = SubResource("GDScript_rkc4w")
[node name="BackgroundRect" type="ColorRect" parent="Screen"]
offset_right = 1138.0
offset_bottom = 97.0
color = Color(0.560784, 0.937255, 0.937255, 1)
[node name="Background" type="Node2D" parent="Screen"]
[node name="Stars" type="Sprite2D" parent="Screen/Background"]
@ -220,33 +244,41 @@ modulate = Color(1, 1, 1, 0)
position = Vector2(130, 50)
texture = ExtResource("2_ohf2r")
[node name="Sprite" type="TextureRect" parent="Screen/Background"]
offset_top = 8.0
offset_right = 1134.0
offset_bottom = 300.0
texture = ExtResource("3")
stretch_mode = 1
[node name="WolkenSpawner" type="Marker2D" parent="Screen/Background"]
position = Vector2(485, 0)
script = ExtResource("11_x2wm3")
[node name="WolkenTimer" type="Timer" parent="Screen/Background/WolkenSpawner"]
autostart = true
[node name="GroundSpawner" type="Node2D" parent="Screen/Background"]
position = Vector2(0, 8)
script = ExtResource("3_va7mo")
[node name="Ground" parent="Screen/Background/GroundSpawner" instance=ExtResource("4_tt0te")]
[node name="Floor" type="StaticBody2D" parent="Screen/Background"]
[node name="EasterEggFixCollision" type="CollisionShape2D" parent="Screen/Background/Floor"]
position = Vector2(-2, 83)
visible = false
position = Vector2(14, 86.875)
shape = SubResource("RectangleShape2D_o05as")
[node name="CollisionShape2D" type="CollisionShape2D" parent="Screen/Background/Floor"]
position = Vector2(176, 96)
position = Vector2(178.25, 96)
shape = SubResource("RectangleShape2D_0a3yj")
[node name="HindernissSpawner" type="Marker2D" parent="Screen"]
position = Vector2(446, 92)
script = ExtResource("4_oc6me")
[node name="Duck" parent="Screen" instance=ExtResource("2")]
position = Vector2(21, 91)
position = Vector2(25, 52)
[node name="WolkenSpawner" type="Marker2D" parent="Screen"]
position = Vector2(485, -1)
script = ExtResource("11_x2wm3")
[node name="CoinSpawner" type="Marker2D" parent="Screen"]
position = Vector2(485, 80)
script = ExtResource("8_7ggb5")
[node name="HurdleSpawner" type="Marker2D" parent="Screen"]
position = Vector2(485, 92)
script = ExtResource("4_oc6me")
metadata/_edit_lock_ = true
[node name="LevelUpTimer" type="Timer" parent="Screen"]
wait_time = 5.0
@ -254,12 +286,15 @@ wait_time = 5.0
[node name="SpawnTimer" type="Timer" parent="Screen"]
wait_time = 1.6
[node name="WolkenTimer" type="Timer" parent="Screen"]
autostart = true
[node name="CoinSpawnTimer" type="Timer" parent="Screen"]
wait_time = 1.6
[node name="EastereggSpawner" type="Marker2D" parent="Screen"]
position = Vector2(81, -18)
script = ExtResource("8_awkaj")
[node name="partices" type="Node2D" parent="Screen"]
[node name="AnimationPlayer" type="AnimationPlayer" parent="Screen"]
libraries = {
"": SubResource("AnimationLibrary_t75gq")
}
[node name="Gui" type="Control" parent="."]
layout_mode = 3
@ -268,11 +303,14 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("8_t3tw7")
metadata/_edit_lock_ = true
[node name="EastereggSpawner" type="Marker2D" parent="Gui"]
position = Vector2(81, -18)
script = ExtResource("12_hl8it")
[node name="HiscoreContainer" type="VBoxContainer" parent="Gui"]
visible = false
layout_mode = 1
layout_mode = 0
offset_left = 1.0
offset_top = 1.0
offset_right = 66.0
@ -281,53 +319,23 @@ theme_override_constants/separation = 0
[node name="hiscore_text" type="Label" parent="Gui/HiscoreContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("21_uy1pc")
theme_override_fonts/font = ExtResource("13_666gv")
theme_override_font_sizes/font_size = 8
text = "Your Hiscore:"
text = "Your Highscore:"
[node name="hiscore" type="Label" parent="Gui/HiscoreContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("21_uy1pc")
theme_override_fonts/font = ExtResource("13_666gv")
theme_override_font_sizes/font_size = 8
text = "0"
script = ExtResource("21_5nnhv")
script = ExtResource("14_ah063")
[node name="ScoreContainer" type="HBoxContainer" parent="Gui"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -28.0
offset_top = 17.0
offset_right = 29.0
offset_bottom = 24.0
grow_horizontal = 2
[node name="text" type="Label" parent="Gui/ScoreContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("21_uy1pc")
theme_override_font_sizes/font_size = 8
text = "Score:"
[node name="score" type="Label" parent="Gui/ScoreContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("21_uy1pc")
theme_override_font_sizes/font_size = 8
text = " "
[node name="ScoreCounter" type="Timer" parent="Gui/ScoreContainer/score"]
wait_time = 0.1
autostart = true
[node name="Settings" parent="Gui" instance=ExtResource("5_ewtcf")]
[node name="Settings" type="TextureRect" parent="Gui"]
visible = false
layout_mode = 1
anchors_preset = 1
anchor_left = 1.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 0.0
offset_left = -102.0
offset_top = -68.0
offset_right = -2.0
@ -335,34 +343,38 @@ offset_bottom = 82.0
grow_horizontal = 0
size_flags_horizontal = 8
size_flags_vertical = 4
texture = ExtResource("13_yjq5c")
stretch_mode = 2
script = ExtResource("16_0wi25")
script = ExtResource("16_4ssry")
[node name="BackButton" type="TextureButton" parent="Gui/Settings"]
layout_mode = 1
offset_left = 2.0
offset_top = 79.0
offset_right = 17.0
offset_bottom = 94.0
texture_normal = ExtResource("15_wi7xd")
offset_left = 4.0
offset_top = 81.0
offset_right = 19.0
offset_bottom = 96.0
focus_neighbor_bottom = NodePath("../ColorSlider")
focus_next = NodePath("../ColorSlider")
texture_normal = ExtResource("17_3kek5")
texture_focused = ExtResource("15_2rflk")
[node name="ColorLabel" type="Label" parent="Gui/Settings"]
layout_mode = 0
offset_left = 5.0
offset_top = 98.0
offset_top = 106.0
offset_right = 62.0
offset_bottom = 115.0
theme_override_fonts/font = ExtResource("21_uy1pc")
offset_bottom = 123.0
theme_override_fonts/font = ExtResource("13_666gv")
theme_override_font_sizes/font_size = 8
text = "Color"
text = "Duck Color:"
[node name="VolumeLabel" type="Label" parent="Gui/Settings"]
layout_mode = 0
offset_left = 5.0
offset_top = 127.0
offset_top = 126.0
offset_right = 45.0
offset_bottom = 150.0
theme_override_fonts/font = ExtResource("21_uy1pc")
offset_bottom = 149.0
theme_override_fonts/font = ExtResource("13_666gv")
theme_override_font_sizes/font_size = 8
text = "Music:"
@ -371,11 +383,15 @@ layout_mode = 1
anchors_preset = -1
anchor_right = 0.699
anchor_bottom = 0.5
offset_left = 32.0
offset_top = 93.0
offset_right = 26.1
offset_bottom = 34.0
theme = SubResource("Theme_0130c")
offset_left = 5.0
offset_top = 110.0
offset_right = 25.1
offset_bottom = 51.0
focus_neighbor_top = NodePath("../BackButton")
focus_neighbor_bottom = NodePath("../VolumeSlider")
focus_next = NodePath("../VolumeSlider")
focus_previous = NodePath("../BackButton")
theme = SubResource("Theme_fcgbk")
value = 17.0
allow_greater = true
allow_lesser = true
@ -386,10 +402,15 @@ anchors_preset = -1
anchor_right = 0.699
anchor_bottom = 0.5
offset_left = 5.0
offset_top = 131.0
offset_right = 12.1
offset_bottom = 72.0
theme = SubResource("Theme_0130c")
offset_top = 130.0
offset_right = 11.1
offset_bottom = 71.0
focus_neighbor_left = NodePath("../SoundToggleButton")
focus_neighbor_top = NodePath("../ColorSlider")
focus_neighbor_bottom = NodePath("../SoundToggleButton")
focus_next = NodePath("../SoundToggleButton")
focus_previous = NodePath("../ColorSlider")
theme = SubResource("Theme_fcgbk")
value = 20.0
allow_greater = true
allow_lesser = true
@ -401,16 +422,19 @@ anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -18.0
offset_top = -18.05
offset_right = -3.0
offset_bottom = 2.0
offset_left = -19.0
offset_top = -19.0
offset_right = -4.0
offset_bottom = 1.05
grow_horizontal = 0
grow_vertical = 0
toggle_mode = true
texture_normal = ExtResource("13_hvt5m")
texture_normal = ExtResource("19_vwek8")
texture_focused = ExtResource("18_ahbxs")
[node name="GameOverSchild" parent="Gui" instance=ExtResource("5_ewtcf")]
[node name="AnimationPlayer" parent="Gui/Settings" instance=ExtResource("30_30gpa")]
[node name="GameOverSchild" type="TextureRect" parent="Gui"]
visible = false
layout_mode = 1
anchors_preset = 8
@ -424,8 +448,11 @@ offset_right = 49.0
offset_bottom = 34.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("13_yjq5c")
stretch_mode = 2
script = ExtResource("21_ytgei")
[node name="Restart" type="TextureButton" parent="Gui/GameOverSchild"]
texture_repeat = 2
@ -440,26 +467,45 @@ offset_top = -23.3
offset_right = -8.0
offset_bottom = -8.3
scale = Vector2(3, 3)
texture_normal = ExtResource("6_boo0r")
texture_normal = ExtResource("20_gdgit")
texture_focused = ExtResource("20_5xtpj")
stretch_mode = 1
metadata/_edit_lock_ = true
[node name="StartSchild" parent="Gui" instance=ExtResource("5_ewtcf")]
visible = false
[node name="back" type="TextureButton" parent="Gui/GameOverSchild"]
texture_repeat = 2
layout_mode = 1
anchors_preset = -1
anchor_left = 0.5
anchor_top = 0.762
anchor_right = 0.5
anchor_bottom = 0.762
offset_left = -46.0
offset_top = -33.3
offset_right = -31.0
offset_bottom = -18.3
texture_normal = ExtResource("17_3kek5")
texture_focused = ExtResource("15_2rflk")
[node name="AnimationPlayer" parent="Gui/GameOverSchild" instance=ExtResource("30_30gpa")]
[node name="StartSchild" type="TextureRect" parent="Gui"]
layout_mode = 1
anchors_preset = 6
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -101.0
offset_top = -114.0
offset_right = -1.0
offset_bottom = 36.0
offset_left = -100.0
offset_top = -117.0
offset_bottom = 33.0
grow_horizontal = 0
grow_vertical = 2
size_flags_horizontal = 4
size_flags_vertical = 4
texture = ExtResource("13_yjq5c")
stretch_mode = 2
script = ExtResource("10_tn1on")
script = ExtResource("21_owbcl")
[node name="Start" type="TextureButton" parent="Gui/StartSchild"]
texture_repeat = 2
@ -476,7 +522,10 @@ offset_bottom = -8.55
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(3, 3)
texture_normal = ExtResource("11_4sha5")
focus_neighbor_left = NodePath("../Settings")
focus_previous = NodePath("../Settings")
texture_normal = ExtResource("22_x686b")
texture_focused = ExtResource("20_i5ekl")
stretch_mode = 1
[node name="Settings" type="TextureButton" parent="Gui/StartSchild"]
@ -494,26 +543,60 @@ offset_bottom = -8.55
grow_horizontal = 2
grow_vertical = 2
scale = Vector2(3, 3)
texture_normal = ExtResource("13_0b7u8")
focus_neighbor_left = NodePath("../../StartSchildLogo")
focus_neighbor_right = NodePath("../Start")
focus_next = NodePath("../Start")
focus_previous = NodePath("../../StartSchildLogo")
texture_normal = ExtResource("23_on2gf")
texture_focused = ExtResource("25_bjwbg")
stretch_mode = 1
[node name="Logo" type="TextureButton" parent="Gui/StartSchild"]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -177.0
offset_top = -38.0
offset_right = -49.0
offset_bottom = -9.0
grow_horizontal = 0
grow_vertical = 0
[node name="AnimationPlayer" parent="Gui/StartSchild" instance=ExtResource("30_30gpa")]
[node name="StartSchildLogo" type="TextureButton" parent="Gui"]
layout_direction = 1
layout_mode = 0
offset_left = -7.0
offset_top = 44.0
offset_right = 121.0
offset_bottom = 73.0
rotation = -0.413643
size_flags_horizontal = 4
size_flags_vertical = 4
texture_normal = ExtResource("14_4hepj")
focus_neighbor_right = NodePath("../StartSchild/Settings")
focus_next = NodePath("../StartSchild/Settings")
texture_normal = ExtResource("24_8b8my")
[node name="AnimationPlayer" parent="Gui/StartSchildLogo" instance=ExtResource("31_ugbfy")]
[node name="ScoreContainer" type="HBoxContainer" parent="Gui"]
unique_name_in_owner = true
layout_mode = 1
anchors_preset = 5
anchor_left = 0.5
anchor_right = 0.5
offset_left = -28.0
offset_top = 17.0
offset_right = 29.0
offset_bottom = 24.0
grow_horizontal = 2
script = ExtResource("25_2prek")
[node name="text" type="Label" parent="Gui/ScoreContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("13_666gv")
theme_override_font_sizes/font_size = 8
text = "Score:"
[node name="score" type="Label" parent="Gui/ScoreContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("13_666gv")
theme_override_font_sizes/font_size = 8
text = " "
[node name="ScoreCounter" type="Timer" parent="Gui/ScoreContainer/score"]
wait_time = 0.1
autostart = true
[node name="Audio" type="Node" parent="."]
@ -535,17 +618,20 @@ autoplay = true
bus = &"Background"
[connection signal="timeout" from="Screen/Day-NightTimer" to="Screen/Day-NightTimer" method="_change_time"]
[connection signal="gameover" from="Screen/Duck" to="Gui/HiscoreContainer/hiscore" method="set_new_hiscore"]
[connection signal="timeout" from="Screen/Background/WolkenSpawner/WolkenTimer" to="Screen/Background/WolkenSpawner" method="_spawn"]
[connection signal="screen_entered" from="Screen/Background/GroundSpawner/Ground" to="Screen/Background/GroundSpawner" method="_on_ground_sprite_screen_entered"]
[connection signal="gameover" from="Screen/Duck" to="Gui/GameOverSchild" method="_on_duck_gameover"]
[connection signal="gameover" from="Screen/Duck" to="Screen" method="shake" binds= [4]]
[connection signal="timeout" from="Screen/LevelUpTimer" to="." method="_on_level_up_timer_timeout"]
[connection signal="timeout" from="Screen/SpawnTimer" to="Screen/HindernissSpawner" method="_spawn"]
[connection signal="timeout" from="Screen/WolkenTimer" to="Screen/WolkenSpawner" method="_spawn"]
[connection signal="timeout" from="Gui/ScoreContainer/score/ScoreCounter" to="." method="_score"]
[connection signal="timeout" from="Screen/SpawnTimer" to="Screen/HurdleSpawner" method="_spawn"]
[connection signal="timeout" from="Screen/CoinSpawnTimer" to="Screen/CoinSpawner" method="_spawn"]
[connection signal="pressed" from="Gui/Settings/BackButton" to="Gui/Settings" method="_on_back_pressed"]
[connection signal="value_changed" from="Gui/Settings/ColorSlider" to="Screen/Duck" method="_color_slider_changed"]
[connection signal="value_changed" from="Gui/Settings/VolumeSlider" to="Gui/Settings" method="_volume_slider_changed"]
[connection signal="toggled" from="Gui/Settings/SoundToggleButton" to="Gui/Settings" method="_on_sound_button_toggled"]
[connection signal="pressed" from="Gui/GameOverSchild/Restart" to="Gui/GameOverSchild" method="_on_restart_pressed"]
[connection signal="pressed" from="Gui/GameOverSchild/back" to="Gui/GameOverSchild" method="_on_back_pressed"]
[connection signal="pressed" from="Gui/StartSchild/Start" to="Gui/StartSchild" method="_on_start_pressed"]
[connection signal="pressed" from="Gui/StartSchild/Settings" to="Gui/StartSchild" method="_on_settings_pressed"]
[connection signal="pressed" from="Gui/StartSchild/Logo" to="Screen/EastereggSpawner" method="_spawn"]
[connection signal="pressed" from="Gui/StartSchildLogo" to="Gui/EastereggSpawner" method="_spawn"]
[connection signal="timeout" from="Gui/ScoreContainer/score/ScoreCounter" to="." method="_score"]

View file

@ -5,9 +5,8 @@ var speed
func _ready() -> void:
speed = $"/root/Global".speed
func _spawn() -> void:
var wolke = preload("res://scenes/Wolke/wolke.tscn").instantiate()
wolke.global_position.y = randi_range(0,50)
$"../WolkenTimer".wait_time = randf_range(0.5,1.5)
$WolkenTimer.wait_time = randf_range(0.5,1.5)
add_child(wolke)

View file

@ -9,5 +9,6 @@ func _ready() -> void:
frame = randi_range(0,4)
self_modulate = Color(1,1,1,randf_range(0,0.5))
func _process(delta: float) -> void:
global_position.x -= speed * delta

View file

@ -8,3 +8,7 @@ texture_filter = 1
texture = ExtResource("1_c6lhp")
hframes = 5
script = ExtResource("2_tsh5n")
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="queue_free"]

22
scenes/coin/coin.gd Normal file
View file

@ -0,0 +1,22 @@
extends Area2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$AnimationPlayer.play("rotate")
func _physics_process(delta: float) -> void:
if $"/root/Global".gamerunning:
global_position.x -= $"/root/Global".speed*delta
func _on_body_entered(body: Node2D) -> void:
if body.name == "Duck":
#print("duck touched")
$AnimationPlayer.play("explode")
#await await $AnimationPlayer.animation_finished
##queue_free()
#print("animation finisched")
# add coin
if body.name == "hurdle":
pass#queue_free()

BIN
scenes/coin/coin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dtn6mbn4q0plm"
path="res://.godot/imported/coin.png-08ace616f8004d0714e7855bfad24d21.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://scenes/coin/coin.png"
dest_files=["res://.godot/imported/coin.png-08ace616f8004d0714e7855bfad24d21.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

174
scenes/coin/coin.tscn Normal file
View file

@ -0,0 +1,174 @@
[gd_scene load_steps=13 format=3 uid="uid://b0au341yw6g52"]
[ext_resource type="Texture2D" uid="uid://dtn6mbn4q0plm" path="res://scenes/coin/coin.png" id="1_4vkkb"]
[ext_resource type="Script" path="res://scenes/coin/coin.gd" id="1_xp82m"]
[sub_resource type="Animation" id="Animation_jfpvc"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("Sprite:modulate")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Color(1, 1, 1, 1)]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = false
tracks/2/path = NodePath("GPUParticles2D:emitting")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/3/type = "value"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath("Sprite:position")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Vector2(0, 0)]
}
[sub_resource type="Animation" id="Animation_6xqsk"]
resource_name = "explode"
length = 0.2
step = 0.01
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:modulate")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0.01, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Color(1, 1, 1, 1), Color(1, 1, 1, 0)]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("GPUParticles2D:emitting")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("Sprite:position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0, 0.2),
"transitions": PackedFloat32Array(1, 1),
"update": 0,
"values": [Vector2(0, 0), Vector2(0, -12)]
}
[sub_resource type="Animation" id="Animation_64j7p"]
resource_name = "rotate"
loop_mode = 1
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.666667, 0.766667, 0.9),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [0, 1, 2, 1]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_om3ic"]
_data = {
"RESET": SubResource("Animation_jfpvc"),
"explode": SubResource("Animation_6xqsk"),
"rotate": SubResource("Animation_64j7p")
}
[sub_resource type="CircleShape2D" id="CircleShape2D_qamc5"]
radius = 3.0
[sub_resource type="Gradient" id="Gradient_b4fpo"]
offsets = PackedFloat32Array(0, 0.321839, 1)
colors = PackedColorArray(1, 0.921828, 0.423545, 1, 0.98436, 0.850996, 0, 1, 0.79237, 0.68246, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_sasf4"]
gradient = SubResource("Gradient_b4fpo")
[sub_resource type="Curve" id="Curve_01enh"]
_data = [Vector2(0, 1), 0.0, 0.0, 0, 0, Vector2(1, 0), -2.83732, 0.0, 0, 0]
point_count = 2
[sub_resource type="CurveTexture" id="CurveTexture_1vf08"]
curve = SubResource("Curve_01enh")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_bv68t"]
particle_flag_disable_z = true
spread = 180.0
initial_velocity_min = 15.0
initial_velocity_max = 30.0
gravity = Vector3(0, 0, 0)
scale_max = 3.0
scale_curve = SubResource("CurveTexture_1vf08")
color_initial_ramp = SubResource("GradientTexture1D_sasf4")
[node name="Coin" type="Area2D"]
position = Vector2(3, 3)
script = ExtResource("1_xp82m")
[node name="Sprite" type="Sprite2D" parent="."]
texture = ExtResource("1_4vkkb")
hframes = 3
metadata/_edit_lock_ = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_om3ic")
}
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
visible = false
shape = SubResource("CircleShape2D_qamc5")
[node name="GPUParticles2D" type="GPUParticles2D" parent="."]
visible = false
emitting = false
amount = 9
process_material = SubResource("ParticleProcessMaterial_bv68t")
lifetime = 0.5
explosiveness = 1.0
[connection signal="body_entered" from="." to="." method="_on_body_entered"]

View file

@ -0,0 +1,22 @@
extends Marker2D
var speed
func _ready() -> void:
speed = $"/root/Global".speed #get_parent().speed
_spawn()
func _spawn() -> void:
var coin = preload("res://scenes/coin/coin.tscn").instantiate()
speed = $"/root/Global".speed
var v1 = 1.5 - (speed / 200)#260
var v2 = 2.0 - (speed / 200)
coin.global_position.y -= randi_range(0,2)*14
$"../CoinSpawnTimer".wait_time = randf_range(v1,v2)
add_child(coin)
func del_all():
for child in get_children():
child.queue_free()

View file

@ -1,12 +1,5 @@
extends RigidBody2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
$Sprite.frame = randi_range(0,4)
$Sprite.frame = randi_range(0,12)
position.x += randi_range(-10,10)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass

View file

@ -1,7 +1,7 @@
[gd_scene load_steps=4 format=3 uid="uid://co76l7v0x2t8t"]
[ext_resource type="Script" path="res://scenes/easteregg/easteregg.gd" id="1_3dnpr"]
[ext_resource type="Texture2D" uid="uid://bp48x77dixrme" path="res://scenes/hindernis/hindernisse.png" id="1_al4up"]
[ext_resource type="Texture2D" uid="uid://bp48x77dixrme" path="res://scenes/hurdle/hurdle.png" id="1_al4up"]
[sub_resource type="CircleShape2D" id="CircleShape2D_ruej1"]
radius = 8.06226
@ -10,13 +10,20 @@ radius = 8.06226
script = ExtResource("1_3dnpr")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -7)
position = Vector2(8, 9)
shape = SubResource("CircleShape2D_ruej1")
[node name="Sprite" type="Sprite2D" parent="."]
texture_filter = 1
position = Vector2(0, -7)
texture = ExtResource("1_al4up")
offset = Vector2(0, 0.5)
centered = false
hframes = 5
frame = 3
vframes = 3
frame = 1
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
position = Vector2(1, 1)
rect = Rect2(0, 0, 14, 14)
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="queue_free"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="_screen_exited"]

20
scenes/ground/ground.gd Normal file
View file

@ -0,0 +1,20 @@
extends Sprite2D
signal screen_entered
var speed: float
func _ready() -> void:
pass
func _process(delta: float) -> void:
if $"/root/Global".gamerunning:
print("ahhhh")
global_position.x -= $"/root/Global".speed*delta
func screen_e() -> void:
screen_entered.emit()
func screen_exited() -> void:
queue_free()

17
scenes/ground/ground.tscn Normal file
View file

@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://cjq8kb0mhjh8r"]
[ext_resource type="Texture2D" uid="uid://bg78j6xxw3ck4" path="res://assets/Ground/n.png" id="1_ocn3x"]
[ext_resource type="Script" path="res://scenes/ground/ground.gd" id="2_eg3te"]
[node name="Ground" type="Sprite2D"]
texture_filter = 1
texture = ExtResource("1_ocn3x")
centered = false
script = ExtResource("2_eg3te")
[node name="VisibleOnScreenNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
position = Vector2(399.5, 82.5)
scale = Vector2(0.05, -0.05)
[connection signal="screen_entered" from="VisibleOnScreenNotifier2D" to="." method="screen_e"]
[connection signal="screen_exited" from="VisibleOnScreenNotifier2D" to="." method="screen_exited"]

View file

@ -0,0 +1,105 @@
extends Node2D
var texture_new_sprite : Texture
var biom_n_w = preload("res://assets/Ground/transisions/n_w.png")
var biom_w_n = preload("res://assets/Ground/transisions/w_n.png")
var biom_n_s = preload("res://assets/Ground/transisions/n_s.png")
var biom_s_n = preload("res://assets/Ground/transisions/s_n.png")
var biom_n = preload("res://assets/Ground/n.png")
var biom_w = preload("res://assets/Ground/w.png")
var biom_s = preload("res://assets/Ground/s.png")
var biom_f = preload("res://assets/Ground/f.png")
var active_biom = "n"
var biom_type = "n"#normal,o=other,ui=übergangin,uo=übergangout
var change_in = 3
var passed
func probability(prozent):
return randf() > 1 - (0.01 * prozent)
func change_biom():
#if active_biom == "w_n":
# active_biom = "n"
#elif active_biom == "s_n":
# active_biom = "n"
#elif active_biom == "n_w":
# active_biom = "w"
#elif active_biom == "n_s":
# active_biom = "s"
if biom_type == "n":
change_in -= 1
if probability(60):
active_biom = "n"
else:
active_biom = "f"
elif biom_type == "o":
change_in -= 1
biom_type = "o"
elif biom_type == "ui":
if active_biom == "n_w":
active_biom = "w"
elif active_biom == "n_s":
active_biom = "s"
biom_type = "o"
elif biom_type == "uo":
if active_biom == "w":
active_biom = "w_n"
biom_type = "n"
elif active_biom == "s":
active_biom = "s_n"
biom_type = "n"
biom_type = "n"
if change_in <= 0: # bei übergängen
change_in = randi_range(3,7)
if biom_type == "n": #bei normalen biom auf neues biom oder wald
if probability(10): # 50% auf Biomwechsel
biom_type = "n"
else:
biom_type = "ui" #übergang in anderes biom
if probability(50):
active_biom = "n_w"
else:
active_biom = "n_s"
elif biom_type == "o": #bei anderen biomen auf normale Biome
biom_type = "uo"
#print("type : ", biom_type)
#print("active: ", active_biom)
#print("change: ", change_in)
#print(" ")
func set_biom_texture():
if active_biom == "w":
texture_new_sprite = biom_w
elif active_biom == "n":
texture_new_sprite = biom_n
elif active_biom == "s":
texture_new_sprite = biom_s
elif active_biom == "f":
texture_new_sprite = biom_f
elif active_biom == "w_n":
texture_new_sprite = biom_w_n
elif active_biom == "n_w":
texture_new_sprite = biom_n_w
elif active_biom == "s_n":
texture_new_sprite = biom_s_n
elif active_biom == "n_s":
texture_new_sprite = biom_n_s
func _spawn(last_x_position) -> void:
var new_ground = preload("res://scenes/ground/ground.tscn").instantiate()
new_ground.texture = texture_new_sprite
new_ground.global_position.x = last_x_position + 400
add_child(new_ground)
new_ground.connect("screen_entered", _on_ground_sprite_screen_entered)
func _on_ground_sprite_screen_entered() -> void:
change_biom()
$"/root/Global".active_biom = active_biom
set_biom_texture()
_spawn(get_child(0).position.x)

View file

@ -1,11 +0,0 @@
extends CharacterBody2D
@onready var speed = 0
func _ready() -> void:
$"Sprite".frame = randi_range(0,4)
func _process(delta: float) -> void:
speed = $"..".speed
global_position.x -= speed*delta

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Some files were not shown because too many files have changed in this diff Show more