This commit is contained in:
dan
2025-03-22 20:21:52 -04:00
commit ea36511c71
63 changed files with 1992 additions and 0 deletions

4
.editorconfig Normal file
View File

@@ -0,0 +1,4 @@
root = true
[*]
charset = utf-8

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

3
.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
# Godot 4+ specific ignores
.godot/
/android/

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"godotTools.editorPath.godot4": "c:\\Users\\dan\\Desktop\\Godot\\4.4\\Godot_v4.4-stable_mono_win64.exe"
}

View File

@@ -0,0 +1,26 @@
All assets in the pack have been repackaged and many have been modified by Brackeys.
LICENSE for all assets:
Creative Commons Zero (CC0)
CREDIT:
SPRITES by analogStudios_:
knight (https://analogstudios.itch.io/camelot)
slime (https://analogstudios.itch.io/dungeonsprites)
platforms and coin (https://analogstudios.itch.io/four-seasons-platformer-sprites)
SPRITES by RottingPixels:
world_tileset and fruit (https://rottingpixels.itch.io/four-seasons-platformer-tileset-16x16free)
WORLD TILESET originally
SOUNDS by Brackeys, Asbjørn Thirslund
MUSIC by Brackeys, Sofia Thirslund
FONTS by Jayvee Enaguas - HarvettFox96 - (https://www.dafont.com/pixel-operator.font?l[]=10&l[]=1)

View File

@@ -0,0 +1,35 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://bnroldd715ms"
path="res://.godot/imported/PixelOperator8-Bold.ttf-e69bdd6f613ad84e79b90e6c36af6c14.fontdata"
[deps]
source_file="res://assets/brackeys_platformer_assets/fonts/PixelOperator8-Bold.ttf"
dest_files=["res://.godot/imported/PixelOperator8-Bold.ttf-e69bdd6f613ad84e79b90e6c36af6c14.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View File

@@ -0,0 +1,35 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://bxvk0pw18y75o"
path="res://.godot/imported/PixelOperator8.ttf-4822237c63882e7e8566794820310fb8.fontdata"
[deps]
source_file="res://assets/brackeys_platformer_assets/fonts/PixelOperator8.ttf"
dest_files=["res://.godot/imported/PixelOperator8.ttf-4822237c63882e7e8566794820310fb8.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
multichannel_signed_distance_field=false
msdf_pixel_range=8
msdf_size=48
allow_system_fallback=true
force_autohinter=false
hinting=1
subpixel_positioning=4
keep_rounding_remainders=true
oversampling=0.0
Fallbacks=null
fallbacks=[]
Compress=null
compress=true
preload=[]
language_support={}
script_support={}
opentype_features={}

View File

@@ -0,0 +1,19 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
uid="uid://cqgvfu5x0f21s"
path="res://.godot/imported/time_for_adventure.mp3-c663159e14663aa9758d7c2fc798543b.mp3str"
[deps]
source_file="res://assets/brackeys_platformer_assets/music/time_for_adventure.mp3"
dest_files=["res://.godot/imported/time_for_adventure.mp3-c663159e14663aa9758d7c2fc798543b.mp3str"]
[params]
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://p8u882irnnt1"
path="res://.godot/imported/coin.wav-48f03bcd294ef00ac0220b690593f007.sample"
[deps]
source_file="res://assets/brackeys_platformer_assets/sounds/coin.wav"
dest_files=["res://.godot/imported/coin.wav-48f03bcd294ef00ac0220b690593f007.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dcwy5thvar0n8"
path="res://.godot/imported/explosion.wav-1e42b28b7ddc47d2bb72cdaa50bf012f.sample"
[deps]
source_file="res://assets/brackeys_platformer_assets/sounds/explosion.wav"
dest_files=["res://.godot/imported/explosion.wav-1e42b28b7ddc47d2bb72cdaa50bf012f.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dyfenf7hp3xpu"
path="res://.godot/imported/hurt.wav-ea2da61b1840c0aeb63fbdfecd78d156.sample"
[deps]
source_file="res://assets/brackeys_platformer_assets/sounds/hurt.wav"
dest_files=["res://.godot/imported/hurt.wav-ea2da61b1840c0aeb63fbdfecd78d156.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://dh65x1qlpvap"
path="res://.godot/imported/jump.wav-e87a0938352cd2a585c7d64389fab534.sample"
[deps]
source_file="res://assets/brackeys_platformer_assets/sounds/jump.wav"
dest_files=["res://.godot/imported/jump.wav-e87a0938352cd2a585c7d64389fab534.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://cxwre73mqgtqw"
path="res://.godot/imported/power_up.wav-660f0a389662c1ab2d5d3543e23162ad.sample"
[deps]
source_file="res://assets/brackeys_platformer_assets/sounds/power_up.wav"
dest_files=["res://.godot/imported/power_up.wav-660f0a389662c1ab2d5d3543e23162ad.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://ty6cef7t2wq8"
path="res://.godot/imported/tap.wav-334aa5557feb2bb501873a0cc1279b72.sample"
[deps]
source_file="res://assets/brackeys_platformer_assets/sounds/tap.wav"
dest_files=["res://.godot/imported/tap.wav-334aa5557feb2bb501873a0cc1279b72.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2

Binary file not shown.

After

Width:  |  Height:  |  Size: 500 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bumwkwuxq07qe"
path="res://.godot/imported/coin.png-44fc65ab7ac9365293e147f39c452906.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/brackeys_platformer_assets/sprites/coin.png"
dest_files=["res://.godot/imported/coin.png-44fc65ab7ac9365293e147f39c452906.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: 1.4 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://04ov3bk8mgq1"
path="res://.godot/imported/fruit.png-279224447d23d6bee09668f5e6afe83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/brackeys_platformer_assets/sprites/fruit.png"
dest_files=["res://.godot/imported/fruit.png-279224447d23d6bee09668f5e6afe83b.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: 5.9 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bda78yggl3vfm"
path="res://.godot/imported/knight.png-e6c90432381c63e9c40851d423d1a8f9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/brackeys_platformer_assets/sprites/knight.png"
dest_files=["res://.godot/imported/knight.png-e6c90432381c63e9c40851d423d1a8f9.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: 1.2 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c2cq8egoxepdj"
path="res://.godot/imported/platforms.png-9af175688695b06091faa0c978531708.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/brackeys_platformer_assets/sprites/platforms.png"
dest_files=["res://.godot/imported/platforms.png-9af175688695b06091faa0c978531708.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: 908 B

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bbfytacurofqi"
path="res://.godot/imported/slime_green.png-7537a22022111bb8764aa544858b4d35.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/brackeys_platformer_assets/sprites/slime_green.png"
dest_files=["res://.godot/imported/slime_green.png-7537a22022111bb8764aa544858b4d35.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: 1.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cn2dmotcs1gsn"
path="res://.godot/imported/slime_purple.png-eba899fd7a6bf06f36da4e8018847f7c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/brackeys_platformer_assets/sprites/slime_purple.png"
dest_files=["res://.godot/imported/slime_purple.png-eba899fd7a6bf06f36da4e8018847f7c.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: 15 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cgyegxeda1mdf"
path="res://.godot/imported/world_tileset.png-e79a61bbddfb4c4d3adb9fd28f1e547f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/brackeys_platformer_assets/sprites/world_tileset.png"
dest_files=["res://.godot/imported/world_tileset.png-e79a61bbddfb4c4d3adb9fd28f1e547f.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

15
default_bus_layout.tres Normal file
View File

@@ -0,0 +1,15 @@
[gd_resource type="AudioBusLayout" format=3 uid="uid://bnd6yu8n8j7k5"]
[resource]
bus/1/name = &"Music"
bus/1/solo = false
bus/1/mute = false
bus/1/bypass_fx = false
bus/1/volume_db = -4.34877
bus/1/send = &"Master"
bus/2/name = &"Sfx"
bus/2/solo = false
bus/2/mute = false
bus/2/bypass_fx = false
bus/2/volume_db = -2.11474
bus/2/send = &"Master"

6
globals/GameManager.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dw81sskevybfe"]
[ext_resource type="Script" uid="uid://bevcjiuvoyb6u" path="res://globals/game_manager.gd" id="1_f5sja"]
[node name="GameManager" type="Node"]
script = ExtResource("1_f5sja")

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dw81sskevybfe"]
[ext_resource type="Script" uid="uid://bevcjiuvoyb6u" path="res://globals/game_manager.gd" id="1_f5sja"]
[node name="GameManager" type="Node"]
script = ExtResource("1_f5sja")

14
globals/game_manager.gd Normal file
View File

@@ -0,0 +1,14 @@
extends Node
var score: int = 0
var sl = null
func set_label(label:Label):
score = 0
sl = label
func add_point():
score+=1
sl.text ="You got " + str(score) + " coins"
print(score)

View File

@@ -0,0 +1 @@
uid://bevcjiuvoyb6u

1
icon.svg Normal file
View File

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128"><rect width="124" height="124" x="2" y="2" fill="#363d52" stroke="#212532" stroke-width="4" rx="14"/><g fill="#fff" transform="translate(12.322 12.322)scale(.101)"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 814 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H446l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c0 34 58 34 58 0v-86c0-34-58-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042" transform="translate(12.322 12.322)scale(.101)"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></svg>

After

Width:  |  Height:  |  Size: 994 B

37
icon.svg.import Normal file
View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://vfsuyvjdi1cw"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.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
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

52
project.godot Normal file
View File

@@ -0,0 +1,52 @@
; 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=5
[application]
config/name="FrigginLearnIt"
run/main_scene="uid://bsl5dgs3aimx1"
config/features=PackedStringArray("4.4", "GL Compatibility")
config/icon="res://icon.svg"
[autoload]
GameManager="*res://globals/GameManager.tscn"
Music="*res://scenes/music.tscn"
[dotnet]
project/assembly_name="FrigginLearnIt"
[input]
jump={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_right={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":100,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
move_left={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":97,"location":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
[rendering]
textures/canvas_textures/default_texture_filter=0
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"

223
scenes/coin.tscn Normal file
View File

@@ -0,0 +1,223 @@
[gd_scene load_steps=21 format=3 uid="uid://rbfbwxr7wsro"]
[ext_resource type="Script" uid="uid://dafe64tmpvrbe" path="res://scripts/coin.gd" id="1_i64fm"]
[ext_resource type="Texture2D" uid="uid://bumwkwuxq07qe" path="res://assets/brackeys_platformer_assets/sprites/coin.png" id="1_rwqht"]
[ext_resource type="AudioStream" uid="uid://p8u882irnnt1" path="res://assets/brackeys_platformer_assets/sounds/coin.wav" id="3_11l1o"]
[sub_resource type="AtlasTexture" id="AtlasTexture_i64fm"]
atlas = ExtResource("1_rwqht")
region = Rect2(0, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_11l1o"]
atlas = ExtResource("1_rwqht")
region = Rect2(16, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_d14el"]
atlas = ExtResource("1_rwqht")
region = Rect2(32, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_1ikuy"]
atlas = ExtResource("1_rwqht")
region = Rect2(48, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_wnlwo"]
atlas = ExtResource("1_rwqht")
region = Rect2(64, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_jig8b"]
atlas = ExtResource("1_rwqht")
region = Rect2(80, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_xmuha"]
atlas = ExtResource("1_rwqht")
region = Rect2(96, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_kfxoj"]
atlas = ExtResource("1_rwqht")
region = Rect2(112, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_jsmju"]
atlas = ExtResource("1_rwqht")
region = Rect2(128, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_s0mny"]
atlas = ExtResource("1_rwqht")
region = Rect2(144, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_7cc30"]
atlas = ExtResource("1_rwqht")
region = Rect2(160, 0, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_rojmm"]
atlas = ExtResource("1_rwqht")
region = Rect2(176, 0, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_kahox"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_i64fm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_11l1o")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_d14el")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_1ikuy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_wnlwo")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jig8b")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_xmuha")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_kfxoj")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jsmju")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_s0mny")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_7cc30")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_rojmm")
}],
"loop": true,
"name": &"default",
"speed": 11.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_kahox"]
radius = 5.09902
[sub_resource type="Animation" id="Animation_11l1o"]
resource_name = "pickup_sound"
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CollisionShape2D:disabled")
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("PickupSound:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/3/type = "method"
tracks/3/imported = false
tracks/3/enabled = true
tracks/3/path = NodePath(".")
tracks/3/interp = 1
tracks/3/loop_wrap = true
tracks/3/keys = {
"times": PackedFloat32Array(0.866667),
"transitions": PackedFloat32Array(1),
"values": [{
"args": [],
"method": &"queue_free"
}]
}
[sub_resource type="Animation" id="Animation_d14el"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("AnimatedSprite2D:visible")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [true]
}
tracks/1/type = "value"
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/path = NodePath("CollisionShape2D:disabled")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
tracks/2/type = "value"
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/path = NodePath("PickupSound:playing")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_1ikuy"]
_data = {
&"RESET": SubResource("Animation_d14el"),
&"pickup_sound": SubResource("Animation_11l1o")
}
[node name="Coin" type="Node2D"]
[node name="Area2D" type="Area2D" parent="."]
collision_mask = 2
script = ExtResource("1_i64fm")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="Area2D"]
sprite_frames = SubResource("SpriteFrames_kahox")
autoplay = "default"
frame_progress = 0.772651
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_kahox")
[node name="PickupSound" type="AudioStreamPlayer2D" parent="Area2D"]
stream = ExtResource("3_11l1o")
bus = &"Sfx"
[node name="AnimationPlayer" type="AnimationPlayer" parent="Area2D"]
libraries = {
&"": SubResource("AnimationLibrary_1ikuy")
}
[connection signal="body_entered" from="Area2D" to="Area2D" method="_on_body_entered"]

8
scenes/game.gd Normal file
View File

@@ -0,0 +1,8 @@
extends Node2D
func _ready() -> void:
print("game _ready")
GameManager.set_label($labels/ScoreLabel)
func _init() -> void:
pass

1
scenes/game.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://gyfm5wk3yp3c

368
scenes/game.tscn Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

14
scenes/killzone.tscn Normal file
View File

@@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=3 uid="uid://ddnw180bowxn2"]
[ext_resource type="Script" uid="uid://db8xxth4oa6xg" path="res://scripts/killzone.gd" id="1_xlapc"]
[node name="killzone" type="Area2D"]
collision_mask = 2
script = ExtResource("1_xlapc")
[node name="Timer" type="Timer" parent="."]
wait_time = 0.6
one_shot = true
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

8
scenes/music.tscn Normal file
View File

@@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://d1mcuinlcj13w"]
[ext_resource type="AudioStream" uid="uid://cqgvfu5x0f21s" path="res://assets/brackeys_platformer_assets/music/time_for_adventure.mp3" id="1_05ggv"]
[node name="Music" type="AudioStreamPlayer2D"]
stream = ExtResource("1_05ggv")
autoplay = true
bus = &"Music"

17
scenes/platform.tscn Normal file
View File

@@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=3 uid="uid://ct26ixf6dfdec"]
[ext_resource type="Texture2D" uid="uid://c2cq8egoxepdj" path="res://assets/brackeys_platformer_assets/sprites/platforms.png" id="1_ba0x2"]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_nlgqw"]
size = Vector2(32, 8)
[node name="Platform" type="AnimatableBody2D"]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_ba0x2")
region_enabled = true
region_rect = Rect2(16, 0, 32, 9)
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("RectangleShape2D_nlgqw")
one_way_collision = true

186
scenes/player.tscn Normal file
View File

@@ -0,0 +1,186 @@
[gd_scene load_steps=26 format=3 uid="uid://b72smvvbacy6g"]
[ext_resource type="Texture2D" uid="uid://bda78yggl3vfm" path="res://assets/brackeys_platformer_assets/sprites/knight.png" id="1_3vyb7"]
[ext_resource type="Script" uid="uid://dfmh1h3u1186s" path="res://scripts/playermovement.gd" id="1_g2els"]
[sub_resource type="AtlasTexture" id="AtlasTexture_g2els"]
atlas = ExtResource("1_3vyb7")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_qhqgy"]
atlas = ExtResource("1_3vyb7")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_dqkch"]
atlas = ExtResource("1_3vyb7")
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_qlg0r"]
atlas = ExtResource("1_3vyb7")
region = Rect2(96, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_tuyoq"]
atlas = ExtResource("1_3vyb7")
region = Rect2(64, 160, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_fjrip"]
atlas = ExtResource("1_3vyb7")
region = Rect2(0, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_smehm"]
atlas = ExtResource("1_3vyb7")
region = Rect2(32, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ur7pv"]
atlas = ExtResource("1_3vyb7")
region = Rect2(64, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_y4r1p"]
atlas = ExtResource("1_3vyb7")
region = Rect2(96, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_d2wvv"]
atlas = ExtResource("1_3vyb7")
region = Rect2(128, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_3v2ag"]
atlas = ExtResource("1_3vyb7")
region = Rect2(160, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_jej6c"]
atlas = ExtResource("1_3vyb7")
region = Rect2(192, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_f1ej7"]
atlas = ExtResource("1_3vyb7")
region = Rect2(224, 64, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_oprun"]
atlas = ExtResource("1_3vyb7")
region = Rect2(0, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_a8ls1"]
atlas = ExtResource("1_3vyb7")
region = Rect2(32, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_qfm1y"]
atlas = ExtResource("1_3vyb7")
region = Rect2(64, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_fulsm"]
atlas = ExtResource("1_3vyb7")
region = Rect2(96, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_4r5pv"]
atlas = ExtResource("1_3vyb7")
region = Rect2(128, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_60mlk"]
atlas = ExtResource("1_3vyb7")
region = Rect2(160, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_i4ail"]
atlas = ExtResource("1_3vyb7")
region = Rect2(192, 96, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_a38lo"]
atlas = ExtResource("1_3vyb7")
region = Rect2(224, 96, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_tuyoq"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_g2els")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qhqgy")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_dqkch")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qlg0r")
}],
"loop": true,
"name": &"default",
"speed": 6.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_tuyoq")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_fjrip")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_smehm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ur7pv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_y4r1p")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_d2wvv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_3v2ag")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_jej6c")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_f1ej7")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_oprun")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a8ls1")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_qfm1y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fulsm")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_4r5pv")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_60mlk")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_i4ail")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_a38lo")
}],
"loop": true,
"name": &"run",
"speed": 11.0
}]
[sub_resource type="CircleShape2D" id="CircleShape2D_3vyb7"]
radius = 6.0
[node name="Player" type="CharacterBody2D"]
z_index = 3
collision_layer = 2
script = ExtResource("1_g2els")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_tuyoq")
animation = &"jump"
autoplay = "default"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 6)
shape = SubResource("CircleShape2D_3vyb7")

68
scenes/slime.tscn Normal file
View File

@@ -0,0 +1,68 @@
[gd_scene load_steps=10 format=3 uid="uid://cj35suv0ggfps"]
[ext_resource type="Script" uid="uid://b3qxwn2ta73vx" path="res://scripts/slime.gd" id="1_n6pvg"]
[ext_resource type="Texture2D" uid="uid://bbfytacurofqi" path="res://assets/brackeys_platformer_assets/sprites/slime_green.png" id="1_p2gj0"]
[ext_resource type="PackedScene" uid="uid://ddnw180bowxn2" path="res://scenes/killzone.tscn" id="2_n6pvg"]
[sub_resource type="AtlasTexture" id="AtlasTexture_pjw23"]
atlas = ExtResource("1_p2gj0")
region = Rect2(0, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_2npkn"]
atlas = ExtResource("1_p2gj0")
region = Rect2(24, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_fd6lc"]
atlas = ExtResource("1_p2gj0")
region = Rect2(48, 24, 24, 24)
[sub_resource type="AtlasTexture" id="AtlasTexture_gstla"]
atlas = ExtResource("1_p2gj0")
region = Rect2(72, 24, 24, 24)
[sub_resource type="SpriteFrames" id="SpriteFrames_v5wyi"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_pjw23")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_2npkn")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fd6lc")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gstla")
}],
"loop": true,
"name": &"idle",
"speed": 10.0
}]
[sub_resource type="RectangleShape2D" id="RectangleShape2D_0l8pv"]
size = Vector2(10, 15)
[node name="Slime" type="Node2D"]
script = ExtResource("1_n6pvg")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, -12)
sprite_frames = SubResource("SpriteFrames_v5wyi")
animation = &"idle"
autoplay = "idle"
frame_progress = 0.153602
[node name="killzone" parent="." instance=ExtResource("2_n6pvg")]
[node name="CollisionShape2D" type="CollisionShape2D" parent="killzone"]
position = Vector2(0, -7.5)
shape = SubResource("RectangleShape2D_0l8pv")
[node name="raycastright" type="RayCast2D" parent="."]
position = Vector2(0, -7)
target_position = Vector2(10, 0)
[node name="raycastleft" type="RayCast2D" parent="."]
position = Vector2(1, -7)
target_position = Vector2(-9, 0)

8
scripts/coin.gd Normal file
View File

@@ -0,0 +1,8 @@
extends Area2D
@onready var aplayer = $AnimationPlayer
func _ready() -> void:
print("coin ready!")
func _on_body_entered(body:Node2D) -> void:
GameManager.add_point()
aplayer.play("pickup_sound")

1
scripts/coin.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://dafe64tmpvrbe

16
scripts/killzone.gd Normal file
View File

@@ -0,0 +1,16 @@
extends Area2D
@onready var timer = $Timer
func _on_body_entered(body:Node2D) -> void:
print("dead.")
body.get_node("CollisionShape2D").queue_free()
Engine.time_scale = 0.5
timer.start()
func _on_timer_timeout() -> void:
print("reloading")
Engine.time_scale = 1.0
get_tree().reload_current_scene()

1
scripts/killzone.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://db8xxth4oa6xg

41
scripts/playermovement.gd Normal file
View File

@@ -0,0 +1,41 @@
extends CharacterBody2D
@onready var mysprite = $AnimatedSprite2D
const SPEED = 100.0
const JUMP_VELOCITY = -250.0
func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Handle jump.
if Input.is_action_just_pressed("jump") :
if is_on_floor():
velocity.y = JUMP_VELOCITY
# gets dir -1,0,1
var direction := Input.get_axis("move_left", "move_right")
#flip sprite
var flippy = direction<0
mysprite.flip_h = flippy
if is_on_floor():
if direction==0:
mysprite.play("default")
else:
mysprite.play("run")
else:
mysprite.play("jump")
if direction:
velocity.x = direction * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
move_and_slide()

View File

@@ -0,0 +1 @@
uid://dfmh1h3u1186s

24
scripts/slime.gd Normal file
View File

@@ -0,0 +1,24 @@
extends Node2D
const SPEED = 50.0
var direction = 1.0
@onready var ray_left = $raycastleft
@onready var ray_right = $raycastright
@onready var mysprite = $AnimatedSprite2D
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
print("slime..ready to eat.")
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
if ray_right.is_colliding():
direction = -1
mysprite.flip_h = true
if ray_left.is_colliding():
direction = 1
mysprite.flip_h = false
position.x += direction * SPEED * delta

1
scripts/slime.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://b3qxwn2ta73vx