-
Notifications
You must be signed in to change notification settings - Fork 258
Add Champ mini game 2 #1805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add Champ mini game 2 #1805
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_animated_water_rock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions
40
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_animated_water_rock.png.import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [remap] | ||
|
|
||
| importer="texture" | ||
| type="CompressedTexture2D" | ||
| uid="uid://d3qxea7lmaxhp" | ||
| path="res://.godot/imported/champ_animated_water_rock.png-0256f0c8cf3162c5d5be8529a50a469d.ctex" | ||
| metadata={ | ||
| "vram_texture": false | ||
| } | ||
|
|
||
| [deps] | ||
|
|
||
| source_file="res://scenes/quests/story_quests/champ/3_sequence_puzzle/champ_animated_water_rock.png" | ||
| dest_files=["res://.godot/imported/champ_animated_water_rock.png-0256f0c8cf3162c5d5be8529a50a469d.ctex"] | ||
|
|
||
| [params] | ||
|
|
||
| compress/mode=0 | ||
| compress/high_quality=false | ||
| compress/lossy_quality=0.7 | ||
| compress/uastc_level=0 | ||
| compress/rdo_quality_loss=0.0 | ||
| 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/channel_remap/red=0 | ||
| process/channel_remap/green=1 | ||
| process/channel_remap/blue=2 | ||
| process/channel_remap/alpha=3 | ||
| 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 |
3 changes: 3 additions & 0 deletions
3
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_dry_rock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions
40
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_dry_rock.png.import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [remap] | ||
|
|
||
| importer="texture" | ||
| type="CompressedTexture2D" | ||
| uid="uid://chc11kiie54o6" | ||
| path="res://.godot/imported/champ_dry_rock.png-170728dfbfe34f94752d34fd5ad921c1.ctex" | ||
| metadata={ | ||
| "vram_texture": false | ||
| } | ||
|
|
||
| [deps] | ||
|
|
||
| source_file="res://scenes/quests/story_quests/champ/3_sequence_puzzle/champ_dry_rock.png" | ||
| dest_files=["res://.godot/imported/champ_dry_rock.png-170728dfbfe34f94752d34fd5ad921c1.ctex"] | ||
|
|
||
| [params] | ||
|
|
||
| compress/mode=0 | ||
| compress/high_quality=false | ||
| compress/lossy_quality=0.7 | ||
| compress/uastc_level=0 | ||
| compress/rdo_quality_loss=0.0 | ||
| 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/channel_remap/red=0 | ||
| process/channel_remap/green=1 | ||
| process/channel_remap/blue=2 | ||
| process/channel_remap/alpha=3 | ||
| 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 |
37 changes: 37 additions & 0 deletions
37
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.gd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # SPDX-FileCopyrightText: The Threadbare Authors | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| extends Node2D | ||
| @onready var rock: AnimatedSprite2D = $AnimatedSprite2D | ||
| @onready var area_2d: Area2D = $AnimatedSprite2D/Area2D | ||
|
|
||
| ## Boolean value representing if the rock is under water | ||
| @export var submerged: bool = true: | ||
| set = set_submerged | ||
|
|
||
| ## Signal indicating the player is standing on a submerged rock (indicating an incorrect response) | ||
| signal water_entered | ||
|
|
||
| func set_submerged(is_submerged: bool) -> void: | ||
| submerged = is_submerged | ||
| if not is_node_ready(): | ||
| return | ||
| area_2d.monitoring = submerged | ||
| if submerged: | ||
| rock.play("waves") | ||
| else: | ||
| rock.play("default") | ||
|
|
||
|
|
||
| func _ready() -> void: | ||
| set_submerged(submerged) | ||
|
|
||
|
|
||
| ## Function to tell champ sequence puzzle script the player guessed wrong and must be moved back | ||
| func _on_area_2d_body_entered(_body: Node2D) -> void: | ||
| await get_tree().create_timer(1.5).timeout | ||
| water_entered.emit() | ||
|
|
||
|
|
||
| ## Toggles the water level of the rock, updating the animation and knocking the player back if necessary. | ||
| func toggle_water_level() -> void: | ||
| submerged = not submerged |
1 change: 1 addition & 0 deletions
1
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.gd.uid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| uid://b24js5tweor6b |
3 changes: 3 additions & 0 deletions
3
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions
40
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.png.import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [remap] | ||
|
|
||
| importer="texture" | ||
| type="CompressedTexture2D" | ||
| uid="uid://db2kpntsbft16" | ||
| path="res://.godot/imported/champ_long_rock.png-4e7efd73018a0b158028559ac812d009.ctex" | ||
| metadata={ | ||
| "vram_texture": false | ||
| } | ||
|
|
||
| [deps] | ||
|
|
||
| source_file="res://scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.png" | ||
| dest_files=["res://.godot/imported/champ_long_rock.png-4e7efd73018a0b158028559ac812d009.ctex"] | ||
|
|
||
| [params] | ||
|
|
||
| compress/mode=0 | ||
| compress/high_quality=false | ||
| compress/lossy_quality=0.7 | ||
| compress/uastc_level=0 | ||
| compress/rdo_quality_loss=0.0 | ||
| 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/channel_remap/red=0 | ||
| process/channel_remap/green=1 | ||
| process/channel_remap/blue=2 | ||
| process/channel_remap/alpha=3 | ||
| 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 |
88 changes: 88 additions & 0 deletions
88
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.tscn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,88 @@ | ||
| [gd_scene load_steps=11 format=3 uid="uid://dtqm8i2abjnu7"] | ||
|
|
||
| [ext_resource type="Script" uid="uid://b24js5tweor6b" path="res://scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.gd" id="1_f6rm8"] | ||
| [ext_resource type="Texture2D" uid="uid://sl3l0pem5gkf" path="res://scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_water_rock.png" id="2_rwx2y"] | ||
| [ext_resource type="Texture2D" uid="uid://db2kpntsbft16" path="res://scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_rock.png" id="3_rwx2y"] | ||
|
|
||
| [sub_resource type="AtlasTexture" id="AtlasTexture_jmn26"] | ||
| atlas = ExtResource("3_rwx2y") | ||
| region = Rect2(0, 0, 288, 96) | ||
|
|
||
| [sub_resource type="AtlasTexture" id="AtlasTexture_f6rm8"] | ||
| atlas = ExtResource("2_rwx2y") | ||
| region = Rect2(0, 0, 288, 96) | ||
|
|
||
| [sub_resource type="AtlasTexture" id="AtlasTexture_rwx2y"] | ||
| atlas = ExtResource("2_rwx2y") | ||
| region = Rect2(0, 96, 288, 96) | ||
|
|
||
| [sub_resource type="AtlasTexture" id="AtlasTexture_oln2r"] | ||
| atlas = ExtResource("2_rwx2y") | ||
| region = Rect2(0, 192, 288, 96) | ||
|
|
||
| [sub_resource type="AtlasTexture" id="AtlasTexture_kqnxv"] | ||
| atlas = ExtResource("2_rwx2y") | ||
| region = Rect2(0, 288, 288, 96) | ||
|
|
||
| [sub_resource type="SpriteFrames" id="SpriteFrames_jmn26"] | ||
| animations = [{ | ||
| "frames": [{ | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_jmn26") | ||
| }, { | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_jmn26") | ||
| }, { | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_jmn26") | ||
| }, { | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_jmn26") | ||
| }], | ||
| "loop": true, | ||
| "name": &"default", | ||
| "speed": 5.0 | ||
| }, { | ||
| "frames": [{ | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_f6rm8") | ||
| }, { | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_rwx2y") | ||
| }, { | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_oln2r") | ||
| }, { | ||
| "duration": 1.0, | ||
| "texture": SubResource("AtlasTexture_kqnxv") | ||
| }], | ||
| "loop": true, | ||
| "name": &"waves", | ||
| "speed": 8.0 | ||
| }] | ||
|
|
||
| [sub_resource type="RectangleShape2D" id="RectangleShape2D_oln2r"] | ||
| size = Vector2(286, 110.000015) | ||
|
|
||
| [node name="ChampLongRock" type="Node2D"] | ||
| script = ExtResource("1_f6rm8") | ||
|
|
||
| [node name="Sprite2D" type="Sprite2D" parent="."] | ||
| visible = false | ||
| rotation = 1.5707964 | ||
| texture = ExtResource("2_rwx2y") | ||
|
|
||
| [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."] | ||
| rotation = 1.5707964 | ||
| sprite_frames = SubResource("SpriteFrames_jmn26") | ||
| autoplay = "waves" | ||
|
|
||
| [node name="Area2D" type="Area2D" parent="AnimatedSprite2D"] | ||
| rotation = 1.5707964 | ||
|
|
||
| [node name="CollisionShape2D" type="CollisionShape2D" parent="AnimatedSprite2D/Area2D"] | ||
| position = Vector2(1.9999999, -1.9999986) | ||
| rotation = 1.5707964 | ||
| shape = SubResource("RectangleShape2D_oln2r") | ||
|
|
||
| [connection signal="body_entered" from="AnimatedSprite2D/Area2D" to="." method="_on_area_2d_body_entered"] | ||
3 changes: 3 additions & 0 deletions
3
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_water_rock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions
40
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_water_rock.png.import
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| [remap] | ||
|
|
||
| importer="texture" | ||
| type="CompressedTexture2D" | ||
| uid="uid://sl3l0pem5gkf" | ||
| path="res://.godot/imported/champ_long_water_rock.png-ebf8fbeac5a428d55883aa3c3d9e898c.ctex" | ||
| metadata={ | ||
| "vram_texture": false | ||
| } | ||
|
|
||
| [deps] | ||
|
|
||
| source_file="res://scenes/quests/story_quests/champ/3_sequence_puzzle/champ_long_water_rock.png" | ||
| dest_files=["res://.godot/imported/champ_long_water_rock.png-ebf8fbeac5a428d55883aa3c3d9e898c.ctex"] | ||
|
|
||
| [params] | ||
|
|
||
| compress/mode=0 | ||
| compress/high_quality=false | ||
| compress/lossy_quality=0.7 | ||
| compress/uastc_level=0 | ||
| compress/rdo_quality_loss=0.0 | ||
| 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/channel_remap/red=0 | ||
| process/channel_remap/green=1 | ||
| process/channel_remap/blue=2 | ||
| process/channel_remap/alpha=3 | ||
| 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 |
4 changes: 2 additions & 2 deletions
4
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_object.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 6 additions & 6 deletions
12
scenes/quests/story_quests/champ/3_sequence_puzzle/champ_sequence_puzzle.dialogue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,12 @@ | ||
| # SPDX-FileCopyrightText: The Threadbare Authors | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| ~ start | ||
| This scene includes objects that the player must tap in a particular sequence, and signs with clues on them. | ||
| Select a "SequencePuzzleStep" node and change the array in the "Sequence" field. | ||
| The first melody is set to yellow, green, blue. This means that you should tap those objects in that order. | ||
| Can you guess the second sequence without looking at the Inspector? | ||
| With no success throwing bait towards the air bubbles, Evan decides he must venture further northeast along the shore of Lake Champlain. | ||
| He comes across a bay, where the only way to stay on track is to cross the water directly. | ||
| There are some stepping stones submerged beneath the lake's surface. Evan must be careful to choose the right ones and avoid falling in! | ||
| => END | ||
| ~ well_done | ||
| Well done! You can add more steps to the puzzle. Just remember to add them to the "SequencePuzzle" node, and add a new hint sign for each one. | ||
| Using what you've learned so far, what kind of challenge can you create here? Have fun! | ||
| At last! Evan has made it to the far side of the shore. | ||
| He takes the second token of thread as a good sign that Champ is getting closer! | ||
| Determined now, he heads towards the Causeway. | ||
| => END |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this hidden Sprite2D is unused and can be removed.