diff --git a/FUNDING.yml b/FUNDING.yml new file mode 100644 index 0000000..c49f30e --- /dev/null +++ b/FUNDING.yml @@ -0,0 +1 @@ +patreon: joy_less \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..90cd143 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Joyless + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..5282e92 --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ + + +# You Can Do It! + +Anime girls motivate you every 15-30 minutes in Godot 4. + +## Screenshots + + + + + +## Features + +- Girls holding programming books +- Nice girls to compliment you +- Chill girls to greet you +- Mean girls to insult you +- Collect girls in the catalog + +## Disclaimer + +The girls included are not owned by the author of this repository. +You can replace them with your own images. +This plugin is for entertainment purposes only. + +## Credits + +- Inspired by [Anime Girl Messages](https://github.com/raphtalia/AnimeGirlMessages) by [SnakeWorl](https://www.roblox.com/users/633527) +- [Anime Girls Holding Programming Books](https://github.com/cat-milk/Anime-Girls-Holding-Programming-Books) by [cat-milk](https://github.com/cat-milk) +- [Speech Bubble](https://pixabay.com/vectors/speech-bubble-speech-balloon-chat-145975) by [OpenClipart-Vectors](https://pixabay.com/users/openclipart-vectors-30363) +- [Settings Cog](https://www.svgrepo.com/svg/134164/settings) by [SVG Repo](https://www.svgrepo.com) +- [Nya](https://freesound.org/s/336012) by [Mike_bes](https://freesound.org/people/Mike_bes) +- [Hello](https://freesound.org/s/550890) & [Hi](https://freesound.org/s/550889) & [Hii](https://freesound.org/s/550891) by [miiumiiu](https://freesound.org/people/miiumiiu) +- Icon made with [Dezgo](https://dezgo.com/txt2img) diff --git a/assets/Icon.png b/assets/Icon.png new file mode 100644 index 0000000..5d1bb1a Binary files /dev/null and b/assets/Icon.png differ diff --git a/assets/Icon.png.import b/assets/Icon.png.import new file mode 100644 index 0000000..916fe28 --- /dev/null +++ b/assets/Icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://e3d4nwyjtvjs" +path="res://.godot/imported/Icon.png-896f464254352577efcf887232694853.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/Icon.png" +dest_files=["res://.godot/imported/Icon.png-896f464254352577efcf887232694853.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 diff --git a/assets/YouCanDoIt Screenshot 1.png b/assets/YouCanDoIt Screenshot 1.png new file mode 100644 index 0000000..3a70b9c Binary files /dev/null and b/assets/YouCanDoIt Screenshot 1.png differ diff --git a/assets/YouCanDoIt Screenshot 1.png.import b/assets/YouCanDoIt Screenshot 1.png.import new file mode 100644 index 0000000..6c8bb51 --- /dev/null +++ b/assets/YouCanDoIt Screenshot 1.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c1tikf281jdoy" +path="res://.godot/imported/YouCanDoIt Screenshot 1.png-f228c4726afd40453cccc3bd8d628c9f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/YouCanDoIt Screenshot 1.png" +dest_files=["res://.godot/imported/YouCanDoIt Screenshot 1.png-f228c4726afd40453cccc3bd8d628c9f.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 diff --git a/assets/YouCanDoIt Screenshot 2.png b/assets/YouCanDoIt Screenshot 2.png new file mode 100644 index 0000000..4c4c7d9 Binary files /dev/null and b/assets/YouCanDoIt Screenshot 2.png differ diff --git a/assets/YouCanDoIt Screenshot 2.png.import b/assets/YouCanDoIt Screenshot 2.png.import new file mode 100644 index 0000000..24f2f0d --- /dev/null +++ b/assets/YouCanDoIt Screenshot 2.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://v7yhbtls7bbi" +path="res://.godot/imported/YouCanDoIt Screenshot 2.png-3b074b568316c63268a41f55d9e79a2c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/YouCanDoIt Screenshot 2.png" +dest_files=["res://.godot/imported/YouCanDoIt Screenshot 2.png-3b074b568316c63268a41f55d9e79a2c.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 diff --git a/assets/YouCanDoIt Screenshot 3.png b/assets/YouCanDoIt Screenshot 3.png new file mode 100644 index 0000000..f3c9b71 Binary files /dev/null and b/assets/YouCanDoIt Screenshot 3.png differ diff --git a/assets/YouCanDoIt Screenshot 3.png.import b/assets/YouCanDoIt Screenshot 3.png.import new file mode 100644 index 0000000..624bf7e --- /dev/null +++ b/assets/YouCanDoIt Screenshot 3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtdp0trw0i10m" +path="res://.godot/imported/YouCanDoIt Screenshot 3.png-65c6d17b40dda3ea4e2e25eb0e2378a1.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/YouCanDoIt Screenshot 3.png" +dest_files=["res://.godot/imported/YouCanDoIt Screenshot 3.png-65c6d17b40dda3ea4e2e25eb0e2378a1.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 diff --git a/assets/audio/bgs/amb_sog.wav b/assets/audio/bgs/amb_sog.wav new file mode 100644 index 0000000..29683dc Binary files /dev/null and b/assets/audio/bgs/amb_sog.wav differ diff --git a/assets/audio/bgs/amb_sog.wav.import b/assets/audio/bgs/amb_sog.wav.import new file mode 100644 index 0000000..b2aa65a --- /dev/null +++ b/assets/audio/bgs/amb_sog.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://sci5aqar0oyx" +path="res://.godot/imported/amb_sog.wav-935ccbe02159e83aca24e762497b9dab.sample" + +[deps] + +source_file="res://assets/audio/bgs/amb_sog.wav" +dest_files=["res://.godot/imported/amb_sog.wav-935ccbe02159e83aca24e762497b9dab.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/assets/audio/sfx/jump.wav b/assets/audio/sfx/jump.wav new file mode 100644 index 0000000..d063a9d Binary files /dev/null and b/assets/audio/sfx/jump.wav differ diff --git a/assets/audio/sfx/jump.wav.import b/assets/audio/sfx/jump.wav.import new file mode 100644 index 0000000..87e2772 --- /dev/null +++ b/assets/audio/sfx/jump.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://b8q3dww80nicd" +path="res://.godot/imported/jump.wav-127418ac4fc0b61a7fed0684053202c7.sample" + +[deps] + +source_file="res://assets/audio/sfx/jump.wav" +dest_files=["res://.godot/imported/jump.wav-127418ac4fc0b61a7fed0684053202c7.sample"] + +[params] + +force/8_bit=false +force/mono=false +force/max_rate=false +force/max_rate_hz=44100 +edit/trim=false +edit/normalize=false +edit/loop_mode=0 +edit/loop_begin=0 +edit/loop_end=-1 +compress/mode=0 diff --git a/assets/audio/sfx/level_win.ogg b/assets/audio/sfx/level_win.ogg new file mode 100644 index 0000000..5ed9bc7 Binary files /dev/null and b/assets/audio/sfx/level_win.ogg differ diff --git a/assets/audio/sfx/level_win.ogg.import b/assets/audio/sfx/level_win.ogg.import new file mode 100644 index 0000000..3ce43c4 --- /dev/null +++ b/assets/audio/sfx/level_win.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://flc817bekeh6" +path="res://.godot/imported/level_win.ogg-ede92ab1c9cab81956d530ed1483c62e.oggvorbisstr" + +[deps] + +source_file="res://assets/audio/sfx/level_win.ogg" +dest_files=["res://.godot/imported/level_win.ogg-ede92ab1c9cab81956d530ed1483c62e.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/audio/vox/capri_die.ogg b/assets/audio/vox/capri_die.ogg new file mode 100644 index 0000000..2ce76ce Binary files /dev/null and b/assets/audio/vox/capri_die.ogg differ diff --git a/assets/audio/vox/capri_die.ogg.import b/assets/audio/vox/capri_die.ogg.import new file mode 100644 index 0000000..11d415c --- /dev/null +++ b/assets/audio/vox/capri_die.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://dfa1ev73rsc7g" +path="res://.godot/imported/capri_die.ogg-c83742ee2fc7f7161b2cd8ba8b01aa2b.oggvorbisstr" + +[deps] + +source_file="res://assets/audio/vox/capri_die.ogg" +dest_files=["res://.godot/imported/capri_die.ogg-c83742ee2fc7f7161b2cd8ba8b01aa2b.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/audio/vox/capri_jump.ogg b/assets/audio/vox/capri_jump.ogg new file mode 100644 index 0000000..b1a8cd9 Binary files /dev/null and b/assets/audio/vox/capri_jump.ogg differ diff --git a/assets/audio/vox/capri_jump.ogg.import b/assets/audio/vox/capri_jump.ogg.import new file mode 100644 index 0000000..35a51d7 --- /dev/null +++ b/assets/audio/vox/capri_jump.ogg.import @@ -0,0 +1,19 @@ +[remap] + +importer="oggvorbisstr" +type="AudioStreamOggVorbis" +uid="uid://7be7ts3rdegh" +path="res://.godot/imported/capri_jump.ogg-c4a5e1632cc76a030a1f97f275a2a259.oggvorbisstr" + +[deps] + +source_file="res://assets/audio/vox/capri_jump.ogg" +dest_files=["res://.godot/imported/capri_jump.ogg-c4a5e1632cc76a030a1f97f275a2a259.oggvorbisstr"] + +[params] + +loop=false +loop_offset=0 +bpm=0 +beat_count=0 +bar_beats=4 diff --git a/assets/fonts/Super Mario Bros. NES.ttf b/assets/fonts/Super Mario Bros. NES.ttf new file mode 100644 index 0000000..b6cd7d9 Binary files /dev/null and b/assets/fonts/Super Mario Bros. NES.ttf differ diff --git a/assets/fonts/Super Mario Bros. NES.ttf.import b/assets/fonts/Super Mario Bros. NES.ttf.import new file mode 100644 index 0000000..586517d --- /dev/null +++ b/assets/fonts/Super Mario Bros. NES.ttf.import @@ -0,0 +1,34 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://dets0g4ce7npf" +path="res://.godot/imported/Super Mario Bros. NES.ttf-eac8c979f968e3d107d6d814bad4ee24.fontdata" + +[deps] + +source_file="res://assets/fonts/Super Mario Bros. NES.ttf" +dest_files=["res://.godot/imported/Super Mario Bros. NES.ttf-eac8c979f968e3d107d6d814bad4ee24.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=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/assets/textures/door/door.png b/assets/textures/door/door.png new file mode 100644 index 0000000..e52f49e Binary files /dev/null and b/assets/textures/door/door.png differ diff --git a/assets/textures/door/door.png.import b/assets/textures/door/door.png.import new file mode 100644 index 0000000..da57a79 --- /dev/null +++ b/assets/textures/door/door.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bwq21el575t1g" +path="res://.godot/imported/door.png-9a9326be76d6307688dae18f3a375f7b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/door/door.png" +dest_files=["res://.godot/imported/door.png-9a9326be76d6307688dae18f3a375f7b.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 diff --git a/assets/textures/portal/portal.png b/assets/textures/portal/portal.png new file mode 100644 index 0000000..db2cc58 Binary files /dev/null and b/assets/textures/portal/portal.png differ diff --git a/assets/textures/portal/portal.png.import b/assets/textures/portal/portal.png.import new file mode 100644 index 0000000..8d63676 --- /dev/null +++ b/assets/textures/portal/portal.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dtwp3ohanw2sn" +path="res://.godot/imported/portal.png-8dfee6c0f353a6daf48ba7bcaf744ce5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/portal/portal.png" +dest_files=["res://.godot/imported/portal.png-8dfee6c0f353a6daf48ba7bcaf744ce5.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 diff --git a/assets/textures/spikes/spikes.png b/assets/textures/spikes/spikes.png new file mode 100644 index 0000000..be3fdd9 Binary files /dev/null and b/assets/textures/spikes/spikes.png differ diff --git a/assets/textures/spikes/spikes.png.import b/assets/textures/spikes/spikes.png.import new file mode 100644 index 0000000..b03bacf --- /dev/null +++ b/assets/textures/spikes/spikes.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cmjre2dn67avi" +path="res://.godot/imported/spikes.png-a552f4210222dbbd0b67fa565f3997b8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/textures/spikes/spikes.png" +dest_files=["res://.godot/imported/spikes.png-a552f4210222dbbd0b67fa565f3997b8.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 diff --git a/autoloads/scene_manager.gd b/autoloads/scene_manager.gd index 6258ad2..ca9f723 100644 --- a/autoloads/scene_manager.gd +++ b/autoloads/scene_manager.gd @@ -28,6 +28,7 @@ enum ScaleMode { ProjectSettings.get_setting("display/window/size/viewport_height") ) +@onready var win_sound = $WinSound ## The currently active scene. ## diff --git a/autoloads/scene_manager.tscn b/autoloads/scene_manager.tscn index c6b2b0d..377cfbe 100644 --- a/autoloads/scene_manager.tscn +++ b/autoloads/scene_manager.tscn @@ -1,6 +1,8 @@ -[gd_scene load_steps=2 format=3 uid="uid://ckgsfhfpg00ys"] +[gd_scene load_steps=4 format=3 uid="uid://ckgsfhfpg00ys"] [ext_resource type="Script" path="res://autoloads/scene_manager.gd" id="1_1hxm1"] +[ext_resource type="AudioStream" uid="uid://sci5aqar0oyx" path="res://assets/audio/bgs/amb_sog.wav" id="2_dr7pa"] +[ext_resource type="AudioStream" uid="uid://flc817bekeh6" path="res://assets/audio/sfx/level_win.ogg" id="3_8ri5f"] [node name="SceneManager" type="Node" node_paths=PackedStringArray("viewport", "viewport_holder")] script = ExtResource("1_1hxm1") @@ -47,3 +49,14 @@ handle_input_locally = false canvas_item_default_texture_filter = 0 size = Vector2i(288, 216) render_target_update_mode = 4 + +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +stream = ExtResource("2_dr7pa") +volume_db = -10.0 +autoplay = true +bus = &"Background Sound" + +[node name="WinSound" type="AudioStreamPlayer" parent="."] +stream = ExtResource("3_8ri5f") +volume_db = -6.558 +bus = &"Sound Effects" diff --git a/default_bus_layout.tres b/default_bus_layout.tres new file mode 100644 index 0000000..c20f634 --- /dev/null +++ b/default_bus_layout.tres @@ -0,0 +1,32 @@ +[gd_resource type="AudioBusLayout" load_steps=2 format=3 uid="uid://dbggc1r8khyvp"] + +[sub_resource type="AudioEffectReverb" id="AudioEffectReverb_rn7sq"] +resource_name = "Reverb" +predelay_msec = 40.0 +predelay_feedback = 0.0 +room_size = 0.1 +damping = 0.8 +spread = 0.3 +wet = 0.1 + +[resource] +bus/1/name = &"Capri" +bus/1/solo = false +bus/1/mute = false +bus/1/bypass_fx = false +bus/1/volume_db = 0.0 +bus/1/send = &"Master" +bus/1/effect/0/effect = SubResource("AudioEffectReverb_rn7sq") +bus/1/effect/0/enabled = true +bus/2/name = &"Background Sound" +bus/2/solo = false +bus/2/mute = false +bus/2/bypass_fx = false +bus/2/volume_db = 0.0 +bus/2/send = &"Master" +bus/3/name = &"Sound Effects" +bus/3/solo = false +bus/3/mute = false +bus/3/bypass_fx = false +bus/3/volume_db = 0.0 +bus/3/send = &"Master" diff --git a/maps/its4673.tmp b/maps/its4673.tmp new file mode 100644 index 0000000..057e953 --- /dev/null +++ b/maps/its4673.tmp @@ -0,0 +1,88 @@ +[gd_scene load_steps=12 format=3 uid="uid://bd2srrfspy7ft"] + +[ext_resource type="Texture2D" uid="uid://d13tqqx8ygak4" path="res://assets/textures/backgrounds/hell.png" id="1_p8vut"] +[ext_resource type="Shader" path="res://noise/noise.gdshader" id="2_hpwyk"] +[ext_resource type="PackedScene" uid="uid://mh2gfm7iqqsm" path="res://objects/player/player.tscn" id="3_edpy5"] +[ext_resource type="TileSet" uid="uid://xwfn24if3pxk" path="res://assets/tilesets/chocomint.tres" id="4_onc0l"] +[ext_resource type="FontFile" uid="uid://dets0g4ce7npf" path="res://fonts/Super Mario Bros. NES.ttf" id="5_s8gph"] +[ext_resource type="PackedScene" uid="uid://bhnse651bcybm" path="res://objects/end_door/end_door.tscn" id="6_8fhro"] +[ext_resource type="PackedScene" uid="uid://bbnq7ptk8hhxa" path="res://maps/level1.tscn" id="7_bmr8a"] +[ext_resource type="PackedScene" uid="uid://cnqmbq84hbnvj" path="res://objects/spikes/spikes.tscn" id="8_cfxl1"] +[ext_resource type="PackedScene" uid="uid://68lav5rke5ag" path="res://objects/spring/spring.tscn" id="9_dtd3x"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sf5kh"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mq2td"] +shader = ExtResource("2_hpwyk") +shader_parameter/animate_noise = true +shader_parameter/noise_intensity = 1.0 +shader_parameter/fps = 15.0 + +[node name="Level1" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = SubResource("ShaderMaterial_sf5kh") +position = Vector2(144, 108) +texture = ExtResource("1_p8vut") +metadata/_edit_lock_ = true + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_mq2td") +offset_right = 288.0 +offset_bottom = 216.0 +color = Color(0.194349, 0.194349, 0.194349, 0.447059) +metadata/_edit_lock_ = true + +[node name="Player" parent="." instance=ExtResource("3_edpy5")] +position = Vector2(16, 176) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource("4_onc0l") +format = 2 +layer_0/tile_data = PackedInt32Array(720912, 0, 0, 720913, 0, 0, 720911, 0, 0, 720910, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 458754, 0, 0, 458753, 0, 0, 458752, 0, 0, 393216, 0, 0, 327680, 0, 0, 262144, 0, 0, 196608, 0, 0, 131072, 0, 0, 65536, 0, 0, 0, 0, 0, 196621, 0, 0, 196622, 0, 0, 196624, 0, 0, 196625, 0, 0) + +[node name="Label" type="Label" parent="."] +offset_top = 199.0 +offset_right = 288.0 +offset_bottom = 216.0 +theme_override_fonts/font = ExtResource("5_s8gph") +theme_override_font_sizes/font_size = 8 +text = "Spring time!" +horizontal_alignment = 1 + +[node name="EndDoor" parent="." instance=ExtResource("6_8fhro")] +position = Vector2(280, 40) +next_map = ExtResource("7_bmr8a") + +[node name="Node2D" type="Node2D" parent="."] + +[node name="Spikes5" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(184, 168) + +[node name="Spikes6" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(200, 168) + +[node name="Spikes7" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(216, 168) + +[node name="Spikes8" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(232, 168) + +[node name="Spikes9" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(248, 168) + +[node name="Spikes10" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(264, 168) + +[node name="Spikes11" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(280, 168) + +[node name="Spikes12" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(296, 0) +scale = Vector2(1, 31.84) + +[node name="Spring" parent="." instance=ExtResource("9_dtd3x")] +position = Vector2(96, 176) + +[node name="Spring2" parent="." instance=ExtResource("9_dtd3x")] +position = Vector2(80, 88) diff --git a/maps/its_spring.tscn b/maps/its_spring.tscn new file mode 100644 index 0000000..e335282 --- /dev/null +++ b/maps/its_spring.tscn @@ -0,0 +1,88 @@ +[gd_scene load_steps=12 format=3 uid="uid://bd2srrfspy7ft"] + +[ext_resource type="Texture2D" uid="uid://d13tqqx8ygak4" path="res://assets/textures/backgrounds/hell.png" id="1_p8vut"] +[ext_resource type="Shader" path="res://noise/noise.gdshader" id="2_hpwyk"] +[ext_resource type="PackedScene" uid="uid://mh2gfm7iqqsm" path="res://objects/player/player.tscn" id="3_edpy5"] +[ext_resource type="TileSet" uid="uid://xwfn24if3pxk" path="res://assets/tilesets/chocomint.tres" id="4_onc0l"] +[ext_resource type="FontFile" uid="uid://dets0g4ce7npf" path="res://assets/fonts/Super Mario Bros. NES.ttf" id="5_s8gph"] +[ext_resource type="PackedScene" uid="uid://bhnse651bcybm" path="res://objects/end_door/end_door.tscn" id="6_8fhro"] +[ext_resource type="PackedScene" uid="uid://bbnq7ptk8hhxa" path="res://maps/level1.tscn" id="7_bmr8a"] +[ext_resource type="PackedScene" uid="uid://cnqmbq84hbnvj" path="res://objects/spikes/spikes.tscn" id="8_cfxl1"] +[ext_resource type="PackedScene" uid="uid://68lav5rke5ag" path="res://objects/spring/spring.tscn" id="9_dtd3x"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sf5kh"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mq2td"] +shader = ExtResource("2_hpwyk") +shader_parameter/animate_noise = true +shader_parameter/noise_intensity = 1.0 +shader_parameter/fps = 15.0 + +[node name="Level1" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = SubResource("ShaderMaterial_sf5kh") +position = Vector2(144, 108) +texture = ExtResource("1_p8vut") +metadata/_edit_lock_ = true + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_mq2td") +offset_right = 288.0 +offset_bottom = 216.0 +color = Color(0.194349, 0.194349, 0.194349, 0.447059) +metadata/_edit_lock_ = true + +[node name="Player" parent="." instance=ExtResource("3_edpy5")] +position = Vector2(16, 176) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource("4_onc0l") +format = 2 +layer_0/tile_data = PackedInt32Array(720912, 0, 0, 720913, 0, 0, 720911, 0, 0, 720910, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720908, 0, 0, 720909, 0, 0, 458754, 0, 0, 458753, 0, 0, 458752, 0, 0, 393216, 0, 0, 327680, 0, 0, 262144, 0, 0, 196608, 0, 0, 131072, 0, 0, 65536, 0, 0, 0, 0, 0, 196621, 0, 0, 196622, 0, 0, 196624, 0, 0, 196625, 0, 0) + +[node name="Label" type="Label" parent="."] +offset_top = 199.0 +offset_right = 288.0 +offset_bottom = 216.0 +theme_override_fonts/font = ExtResource("5_s8gph") +theme_override_font_sizes/font_size = 8 +text = "Spring time!" +horizontal_alignment = 1 + +[node name="EndDoor" parent="." instance=ExtResource("6_8fhro")] +position = Vector2(280, 24) +next_map = ExtResource("7_bmr8a") + +[node name="Node2D" type="Node2D" parent="."] + +[node name="Spikes5" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(184, 168) + +[node name="Spikes6" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(200, 168) + +[node name="Spikes7" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(216, 168) + +[node name="Spikes8" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(232, 168) + +[node name="Spikes9" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(248, 168) + +[node name="Spikes10" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(264, 168) + +[node name="Spikes11" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(280, 168) + +[node name="Spikes12" parent="." instance=ExtResource("8_cfxl1")] +position = Vector2(296, 0) +scale = Vector2(1.09184, 27.4543) + +[node name="Spring" parent="." instance=ExtResource("9_dtd3x")] +position = Vector2(96, 176) + +[node name="Spring2" parent="." instance=ExtResource("9_dtd3x")] +position = Vector2(80, 88) diff --git a/maps/tut5386.tmp b/maps/tut5386.tmp new file mode 100644 index 0000000..5b55580 --- /dev/null +++ b/maps/tut5386.tmp @@ -0,0 +1,53 @@ +[gd_scene load_steps=10 format=3 uid="uid://byx8blpt2i8hx"] + +[ext_resource type="Texture2D" uid="uid://d13tqqx8ygak4" path="res://assets/textures/backgrounds/hell.png" id="1_5dne7"] +[ext_resource type="Shader" path="res://noise/noise.gdshader" id="2_els7d"] +[ext_resource type="PackedScene" uid="uid://mh2gfm7iqqsm" path="res://objects/player/player.tscn" id="3_imjpd"] +[ext_resource type="TileSet" uid="uid://xwfn24if3pxk" path="res://assets/tilesets/chocomint.tres" id="4_1rmvv"] +[ext_resource type="FontFile" uid="uid://dets0g4ce7npf" path="res://fonts/Super Mario Bros. NES.ttf" id="5_ae2vf"] +[ext_resource type="PackedScene" uid="uid://bhnse651bcybm" path="res://objects/end_door/end_door.tscn" id="6_yywag"] +[ext_resource type="PackedScene" uid="uid://cun6ov7vdfr6a" path="res://maps/yikes_spikes.tscn" id="7_0g05i"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sf5kh"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mq2td"] +shader = ExtResource("2_els7d") +shader_parameter/animate_noise = true +shader_parameter/noise_intensity = 1.0 +shader_parameter/fps = 15.0 + +[node name="Level1" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = SubResource("ShaderMaterial_sf5kh") +position = Vector2(144, 108) +texture = ExtResource("1_5dne7") +metadata/_edit_lock_ = true + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_mq2td") +offset_right = 288.0 +offset_bottom = 216.0 +color = Color(0.194349, 0.194349, 0.194349, 0.447059) +metadata/_edit_lock_ = true + +[node name="Player" parent="." instance=ExtResource("3_imjpd")] +position = Vector2(24, 176) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource("4_1rmvv") +format = 2 +layer_0/tile_data = PackedInt32Array(720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720908, 0, 0) + +[node name="Label" type="Label" parent="."] +offset_top = 199.0 +offset_right = 288.0 +offset_bottom = 216.0 +theme_override_fonts/font = ExtResource("5_ae2vf") +theme_override_font_sizes/font_size = 8 +text = "Obligatory Tutorial Level" +horizontal_alignment = 1 + +[node name="EndDoor" parent="." instance=ExtResource("6_yywag")] +position = Vector2(264, 168) +next_map = ExtResource("7_0g05i") diff --git a/maps/tutorial.tscn b/maps/tutorial.tscn new file mode 100644 index 0000000..42852c3 --- /dev/null +++ b/maps/tutorial.tscn @@ -0,0 +1,53 @@ +[gd_scene load_steps=10 format=3 uid="uid://byx8blpt2i8hx"] + +[ext_resource type="Texture2D" uid="uid://d13tqqx8ygak4" path="res://assets/textures/backgrounds/hell.png" id="1_5dne7"] +[ext_resource type="Shader" path="res://noise/noise.gdshader" id="2_els7d"] +[ext_resource type="PackedScene" uid="uid://mh2gfm7iqqsm" path="res://objects/player/player.tscn" id="3_imjpd"] +[ext_resource type="TileSet" uid="uid://xwfn24if3pxk" path="res://assets/tilesets/chocomint.tres" id="4_1rmvv"] +[ext_resource type="FontFile" uid="uid://dets0g4ce7npf" path="res://assets/fonts/Super Mario Bros. NES.ttf" id="5_ae2vf"] +[ext_resource type="PackedScene" uid="uid://bhnse651bcybm" path="res://objects/end_door/end_door.tscn" id="6_yywag"] +[ext_resource type="PackedScene" uid="uid://cun6ov7vdfr6a" path="res://maps/yikes_spikes.tscn" id="7_0g05i"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sf5kh"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mq2td"] +shader = ExtResource("2_els7d") +shader_parameter/animate_noise = true +shader_parameter/noise_intensity = 1.0 +shader_parameter/fps = 15.0 + +[node name="Level1" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = SubResource("ShaderMaterial_sf5kh") +position = Vector2(144, 108) +texture = ExtResource("1_5dne7") +metadata/_edit_lock_ = true + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_mq2td") +offset_right = 288.0 +offset_bottom = 216.0 +color = Color(0.194349, 0.194349, 0.194349, 0.447059) +metadata/_edit_lock_ = true + +[node name="Player" parent="." instance=ExtResource("3_imjpd")] +position = Vector2(24, 176) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource("4_1rmvv") +format = 2 +layer_0/tile_data = PackedInt32Array(720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720908, 0, 0) + +[node name="Label" type="Label" parent="."] +offset_top = 199.0 +offset_right = 288.0 +offset_bottom = 216.0 +theme_override_fonts/font = ExtResource("5_ae2vf") +theme_override_font_sizes/font_size = 8 +text = "Obligatory Tutorial Level" +horizontal_alignment = 1 + +[node name="EndDoor" parent="." instance=ExtResource("6_yywag")] +position = Vector2(264, 168) +next_map = ExtResource("7_0g05i") diff --git a/maps/yikes_more_spikes.tscn b/maps/yikes_more_spikes.tscn new file mode 100644 index 0000000..2eaf6e9 --- /dev/null +++ b/maps/yikes_more_spikes.tscn @@ -0,0 +1,74 @@ +[gd_scene load_steps=11 format=3 uid="uid://hrrypch7psfa"] + +[ext_resource type="Texture2D" uid="uid://d13tqqx8ygak4" path="res://assets/textures/backgrounds/hell.png" id="1_6i0lb"] +[ext_resource type="Shader" path="res://noise/noise.gdshader" id="2_3dp43"] +[ext_resource type="PackedScene" uid="uid://mh2gfm7iqqsm" path="res://objects/player/player.tscn" id="3_mts2t"] +[ext_resource type="TileSet" uid="uid://xwfn24if3pxk" path="res://assets/tilesets/chocomint.tres" id="4_evy0b"] +[ext_resource type="FontFile" uid="uid://dets0g4ce7npf" path="res://assets/fonts/Super Mario Bros. NES.ttf" id="5_eo1kb"] +[ext_resource type="PackedScene" uid="uid://bhnse651bcybm" path="res://objects/end_door/end_door.tscn" id="6_vvcgd"] +[ext_resource type="PackedScene" uid="uid://bd2srrfspy7ft" path="res://maps/its_spring.tscn" id="7_4f1b6"] +[ext_resource type="PackedScene" uid="uid://cnqmbq84hbnvj" path="res://objects/spikes/spikes.tscn" id="8_8qxg7"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sf5kh"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mq2td"] +shader = ExtResource("2_3dp43") +shader_parameter/animate_noise = true +shader_parameter/noise_intensity = 1.0 +shader_parameter/fps = 15.0 + +[node name="Level1" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = SubResource("ShaderMaterial_sf5kh") +position = Vector2(144, 108) +texture = ExtResource("1_6i0lb") +metadata/_edit_lock_ = true + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_mq2td") +offset_right = 288.0 +offset_bottom = 216.0 +color = Color(0.194349, 0.194349, 0.194349, 0.447059) +metadata/_edit_lock_ = true + +[node name="Player" parent="." instance=ExtResource("3_mts2t")] +position = Vector2(16, 96) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource("4_evy0b") +format = 2 +layer_0/tile_data = PackedInt32Array(720912, 0, 0, 720913, 0, 0, 720911, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 458760, 0, 0, 589836, 0, 0, 589835, 0, 0, 720910, 0, 0, 458759, 0, 0, 458761, 0, 0, 589837, 0, 0, 327697, 0, 0, 393233, 0, 0, 458769, 0, 0) + +[node name="Label" type="Label" parent="."] +offset_top = 199.0 +offset_right = 288.0 +offset_bottom = 216.0 +theme_override_fonts/font = ExtResource("5_eo1kb") +theme_override_font_sizes/font_size = 8 +text = "Yikes! MORE Spikes!" +horizontal_alignment = 1 + +[node name="EndDoor" parent="." instance=ExtResource("6_vvcgd")] +position = Vector2(264, 168) +next_map = ExtResource("7_4f1b6") + +[node name="Node2D" type="Node2D" parent="."] + +[node name="Spikes" parent="." instance=ExtResource("8_8qxg7")] +position = Vector2(152, 104) + +[node name="Spikes5" parent="." instance=ExtResource("8_8qxg7")] +position = Vector2(200, 136) + +[node name="Spikes2" parent="." instance=ExtResource("8_8qxg7")] +position = Vector2(264, 88) +rotation = -1.5708 + +[node name="Spikes4" parent="." instance=ExtResource("8_8qxg7")] +position = Vector2(264, 120) +rotation = -1.5708 + +[node name="Spikes3" parent="." instance=ExtResource("8_8qxg7")] +position = Vector2(264, 104) +rotation = -1.5708 diff --git a/maps/yikes_spikes.tscn b/maps/yikes_spikes.tscn new file mode 100644 index 0000000..2e98fb2 --- /dev/null +++ b/maps/yikes_spikes.tscn @@ -0,0 +1,62 @@ +[gd_scene load_steps=11 format=3 uid="uid://cun6ov7vdfr6a"] + +[ext_resource type="Texture2D" uid="uid://d13tqqx8ygak4" path="res://assets/textures/backgrounds/hell.png" id="1_588ks"] +[ext_resource type="Shader" path="res://noise/noise.gdshader" id="2_rvhjv"] +[ext_resource type="PackedScene" uid="uid://mh2gfm7iqqsm" path="res://objects/player/player.tscn" id="3_pdn7u"] +[ext_resource type="TileSet" uid="uid://xwfn24if3pxk" path="res://assets/tilesets/chocomint.tres" id="4_pcxb3"] +[ext_resource type="FontFile" uid="uid://dets0g4ce7npf" path="res://assets/fonts/Super Mario Bros. NES.ttf" id="5_bpruh"] +[ext_resource type="PackedScene" uid="uid://bhnse651bcybm" path="res://objects/end_door/end_door.tscn" id="6_uyuca"] +[ext_resource type="PackedScene" uid="uid://hrrypch7psfa" path="res://maps/yikes_more_spikes.tscn" id="7_7rv68"] +[ext_resource type="PackedScene" uid="uid://cnqmbq84hbnvj" path="res://objects/spikes/spikes.tscn" id="7_y3eq7"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_sf5kh"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_mq2td"] +shader = ExtResource("2_rvhjv") +shader_parameter/animate_noise = true +shader_parameter/noise_intensity = 1.0 +shader_parameter/fps = 15.0 + +[node name="Level1" type="Node2D"] + +[node name="Sprite2D" type="Sprite2D" parent="."] +material = SubResource("ShaderMaterial_sf5kh") +position = Vector2(144, 108) +texture = ExtResource("1_588ks") +metadata/_edit_lock_ = true + +[node name="ColorRect" type="ColorRect" parent="."] +material = SubResource("ShaderMaterial_mq2td") +offset_right = 288.0 +offset_bottom = 216.0 +color = Color(0.194349, 0.194349, 0.194349, 0.447059) +metadata/_edit_lock_ = true + +[node name="Player" parent="." instance=ExtResource("3_pdn7u")] +position = Vector2(24, 176) + +[node name="TileMap" type="TileMap" parent="."] +tile_set = ExtResource("4_pcxb3") +format = 2 +layer_0/tile_data = PackedInt32Array(720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720903, 0, 0, 720904, 0, 0, 720905, 0, 0, 720906, 0, 0, 720907, 0, 0, 720909, 0, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720908, 0, 0) + +[node name="Label" type="Label" parent="."] +offset_top = 199.0 +offset_right = 288.0 +offset_bottom = 216.0 +theme_override_fonts/font = ExtResource("5_bpruh") +theme_override_font_sizes/font_size = 8 +text = "Yikes! Spikes!" +horizontal_alignment = 1 + +[node name="EndDoor" parent="." instance=ExtResource("6_uyuca")] +position = Vector2(264, 168) +next_map = ExtResource("7_7rv68") + +[node name="Node2D" type="Node2D" parent="."] + +[node name="Spikes" parent="." instance=ExtResource("7_y3eq7")] +position = Vector2(88, 168) + +[node name="Spikes2" parent="." instance=ExtResource("7_y3eq7")] +position = Vector2(176, 168) diff --git a/objects/end_door/end_door.gd b/objects/end_door/end_door.gd new file mode 100644 index 0000000..ece7293 --- /dev/null +++ b/objects/end_door/end_door.gd @@ -0,0 +1,18 @@ +extends Node2D + +@export var next_map:PackedScene + +# 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 _on_area_2d_body_entered(body: Node2D) -> void: + if body is Player: + SceneManager.current_scene = next_map.instantiate() + SceneManager.win_sound.play() diff --git a/objects/end_door/end_door.tscn b/objects/end_door/end_door.tscn new file mode 100644 index 0000000..c840a46 --- /dev/null +++ b/objects/end_door/end_door.tscn @@ -0,0 +1,22 @@ +[gd_scene load_steps=4 format=3 uid="uid://bhnse651bcybm"] + +[ext_resource type="Texture2D" uid="uid://bwq21el575t1g" path="res://assets/textures/door/door.png" id="1_4beu0"] +[ext_resource type="Script" path="res://objects/end_door/end_door.gd" id="1_ph88k"] + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_qkffx"] +size = Vector2(16, 16) + +[node name="EndDoor" type="Node2D"] +script = ExtResource("1_ph88k") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_4beu0") + +[node name="Area2D" type="Area2D" parent="."] +collision_mask = 16 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +shape = SubResource("RectangleShape2D_qkffx") +debug_color = Color(0, 1, 0.701961, 0.419608) + +[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] diff --git a/objects/player/player.gd b/objects/player/player.gd index 9d3bd2d..6bcbde9 100644 --- a/objects/player/player.gd +++ b/objects/player/player.gd @@ -10,6 +10,9 @@ extends CharacterBody2D @export var state_chart: StateChart @export var graphics: Node2D +@onready var start_position = position +@onready var voice = %Voice + var ices_touched:int = 0: set(value): ices_touched = value @@ -23,7 +26,6 @@ var ices_touched:int = 0: func _ready() -> void: state_chart.set_expression_property(&"player", self) - func _unhandled_input(event: InputEvent) -> void: if event.is_action_pressed(&"ui_accept"): state_chart.send_event(&"jump_pressed") @@ -59,6 +61,8 @@ func _process_gravity(delta: float) -> void: #region State One-Shots func _do_jump() -> void: + voice.stream = load("res://assets/audio/vox/capri_jump.ogg") + voice.play() velocity.y = -jump_force position.y -= 1.0 diff --git a/objects/player/player.tscn b/objects/player/player.tscn index 7bfc170..58cc914 100644 --- a/objects/player/player.tscn +++ b/objects/player/player.tscn @@ -51,9 +51,9 @@ collision_layer = 16 collision_mask = 3 floor_snap_length = 3.0 script = ExtResource("1_jgave") -gravity = 400.0 -run_speed = 76.0 -jump_force = 150.0 +gravity = 450.0 +run_speed = 100.0 +jump_force = 180.0 state_chart = NodePath("StateChart") graphics = NodePath("Graphics") @@ -191,6 +191,10 @@ to = NodePath("../../../Grounded") guard = SubResource("Resource_g8pxc") delay_in_seconds = "0.0" +[node name="Voice" type="AudioStreamPlayer" parent="."] +unique_name_in_owner = true +bus = &"Capri" + [connection signal="state_entered" from="StateChart/Root/Grounded/Standing" to="." method="_stop_moving"] [connection signal="state_entered" from="StateChart/Root/Grounded/Standing" to="Graphics/Sprite/Idle" method="play"] [connection signal="state_entered" from="StateChart/Root/Grounded/Sliding" to="Graphics/Sprite/Idle" method="play"] diff --git a/objects/rotoboy/roto_boy.tscn b/objects/rotoboy/roto_boy.tscn index 64e61fb..ee9e5e6 100644 --- a/objects/rotoboy/roto_boy.tscn +++ b/objects/rotoboy/roto_boy.tscn @@ -68,7 +68,6 @@ script = ExtResource("1_7ck2q") texture = ExtResource("2_3s2uc") target = NodePath("../RotatingPiece/SnakeEndLeft") segments = 2 -head_segment = true tail_segment = false auto_density = true pixels_per_segment = 6.0 @@ -78,7 +77,6 @@ script = ExtResource("1_7ck2q") texture = ExtResource("2_3s2uc") target = NodePath("../RotatingPiece/SnakeEndRight") segments = 2 -head_segment = true tail_segment = false auto_density = true pixels_per_segment = 6.0 diff --git a/objects/spikes/spi91B3.tmp b/objects/spikes/spi91B3.tmp new file mode 100644 index 0000000..ecac160 --- /dev/null +++ b/objects/spikes/spi91B3.tmp @@ -0,0 +1,67 @@ +[gd_scene load_steps=7 format=3 uid="uid://cnqmbq84hbnvj"] + +[ext_resource type="Texture2D" uid="uid://cmjre2dn67avi" path="res://assets/textures/spikes/spikes.png" id="1_hxbnl"] +[ext_resource type="Script" path="res://objects/spikes/spikes.gd" id="1_sx6gd"] + +[sub_resource type="Animation" id="Animation_iol55"] +resource_name = "spike" +length = 0.2 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0333333, 0.0666667, 0.1, 0.133333, 0.166667, 0.2), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 1, 3, 4, 3] +} + +[sub_resource type="Animation" id="Animation_owgdn"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_7km18"] +_data = { +"RESET": SubResource("Animation_owgdn"), +"spike": SubResource("Animation_iol55") +} + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1d2d3"] +size = Vector2(12, 12) + +[node name="Spikes" type="Node2D"] +script = ExtResource("1_sx6gd") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_hxbnl") +hframes = 5 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_7km18") +} +autoplay = "spike" + +[node name="Area2D" type="Area2D" parent="."] +collision_mask = 16 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(0, 1) +shape = SubResource("RectangleShape2D_1d2d3") + +[connection signal="body_shape_entered" from="Area2D" to="." method="_on_area_2d_body_shape_entered"] diff --git a/objects/spikes/spiE7D0.tmp b/objects/spikes/spiE7D0.tmp new file mode 100644 index 0000000..ecac160 --- /dev/null +++ b/objects/spikes/spiE7D0.tmp @@ -0,0 +1,67 @@ +[gd_scene load_steps=7 format=3 uid="uid://cnqmbq84hbnvj"] + +[ext_resource type="Texture2D" uid="uid://cmjre2dn67avi" path="res://assets/textures/spikes/spikes.png" id="1_hxbnl"] +[ext_resource type="Script" path="res://objects/spikes/spikes.gd" id="1_sx6gd"] + +[sub_resource type="Animation" id="Animation_iol55"] +resource_name = "spike" +length = 0.2 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0333333, 0.0666667, 0.1, 0.133333, 0.166667, 0.2), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 1, 3, 4, 3] +} + +[sub_resource type="Animation" id="Animation_owgdn"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_7km18"] +_data = { +"RESET": SubResource("Animation_owgdn"), +"spike": SubResource("Animation_iol55") +} + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1d2d3"] +size = Vector2(12, 12) + +[node name="Spikes" type="Node2D"] +script = ExtResource("1_sx6gd") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_hxbnl") +hframes = 5 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_7km18") +} +autoplay = "spike" + +[node name="Area2D" type="Area2D" parent="."] +collision_mask = 16 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(0, 1) +shape = SubResource("RectangleShape2D_1d2d3") + +[connection signal="body_shape_entered" from="Area2D" to="." method="_on_area_2d_body_shape_entered"] diff --git a/objects/spikes/spikes.gd b/objects/spikes/spikes.gd new file mode 100644 index 0000000..452252e --- /dev/null +++ b/objects/spikes/spikes.gd @@ -0,0 +1,18 @@ +extends Node2D + + +# 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 _on_area_2d_body_shape_entered(body_rid: RID, body: Node2D, body_shape_index: int, local_shape_index: int) -> void: + if body is Player: + body.position = body.start_position + body.voice.stream = load("res://assets/audio/vox/capri_die.ogg") + body.voice.play() diff --git a/objects/spikes/spikes.tscn b/objects/spikes/spikes.tscn new file mode 100644 index 0000000..ecac160 --- /dev/null +++ b/objects/spikes/spikes.tscn @@ -0,0 +1,67 @@ +[gd_scene load_steps=7 format=3 uid="uid://cnqmbq84hbnvj"] + +[ext_resource type="Texture2D" uid="uid://cmjre2dn67avi" path="res://assets/textures/spikes/spikes.png" id="1_hxbnl"] +[ext_resource type="Script" path="res://objects/spikes/spikes.gd" id="1_sx6gd"] + +[sub_resource type="Animation" id="Animation_iol55"] +resource_name = "spike" +length = 0.2 +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0, 0.0333333, 0.0666667, 0.1, 0.133333, 0.166667, 0.2), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1), +"update": 1, +"values": [0, 1, 2, 1, 3, 4, 3] +} + +[sub_resource type="Animation" id="Animation_owgdn"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("Sprite2D:frame") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [0] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_7km18"] +_data = { +"RESET": SubResource("Animation_owgdn"), +"spike": SubResource("Animation_iol55") +} + +[sub_resource type="RectangleShape2D" id="RectangleShape2D_1d2d3"] +size = Vector2(12, 12) + +[node name="Spikes" type="Node2D"] +script = ExtResource("1_sx6gd") + +[node name="Sprite2D" type="Sprite2D" parent="."] +texture = ExtResource("1_hxbnl") +hframes = 5 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_7km18") +} +autoplay = "spike" + +[node name="Area2D" type="Area2D" parent="."] +collision_mask = 16 + +[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"] +position = Vector2(0, 1) +shape = SubResource("RectangleShape2D_1d2d3") + +[connection signal="body_shape_entered" from="Area2D" to="." method="_on_area_2d_body_shape_entered"] diff --git a/objects/spring/spring.gd b/objects/spring/spring.gd index 83e4139..fc38b67 100644 --- a/objects/spring/spring.gd +++ b/objects/spring/spring.gd @@ -19,4 +19,5 @@ func _on_area_2d_body_entered(body: Node2D) -> void: else: body.velocity.y = (body.jump_force * 1.5) * sign(-body.velocity.y) body.velocity.x += body.graphics.scale.x * 20.0 + %AudioStreamPlayer.play() %AnimationPlayer.play("bounce") diff --git a/objects/spring/spring.tscn b/objects/spring/spring.tscn index 1d73a9b..26d576d 100644 --- a/objects/spring/spring.tscn +++ b/objects/spring/spring.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=7 format=3 uid="uid://68lav5rke5ag"] +[gd_scene load_steps=8 format=3 uid="uid://68lav5rke5ag"] [ext_resource type="Script" path="res://objects/spring/spring.gd" id="1_05bif"] [ext_resource type="Texture2D" uid="uid://bobpl8pwm216q" path="res://assets/textures/spring/spring.png" id="1_s1olr"] +[ext_resource type="AudioStream" uid="uid://b8q3dww80nicd" path="res://assets/audio/sfx/jump.wav" id="3_wq8v8"] [sub_resource type="Animation" id="Animation_pa4d8"] length = 0.001 @@ -64,5 +65,11 @@ collision_mask = 16 position = Vector2(0, -5.5) shape = SubResource("RectangleShape2D_c7407") +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."] +unique_name_in_owner = true +stream = ExtResource("3_wq8v8") +volume_db = -14.0 +bus = &"Capri" + [connection signal="area_entered" from="Area2D" to="." method="_on_area_2d_area_entered"] [connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"] diff --git a/project.godot b/project.godot index c727868..0908775 100644 --- a/project.godot +++ b/project.godot @@ -11,14 +11,13 @@ config_version=5 [application] config/name="Capri" -run/main_scene="res://maps/level1.tscn" +run/main_scene="res://maps/tutorial.tscn" config/features=PackedStringArray("4.3", "GL Compatibility") config/icon="res://icon.svg" [autoload] SceneManager="*res://autoloads/scene_manager.tscn" -TestFilter="*res://autoloads/test_filter.tscn" [display] @@ -27,7 +26,7 @@ window/size/viewport_height=216 [editor_plugins] -enabled=PackedStringArray("res://addons/godot_state_charts/plugin.cfg") +enabled=PackedStringArray("res://addons/YouCanDoIt/plugin.cfg", "res://addons/godot_state_charts/plugin.cfg") [file_customization]