diff --git a/Dialogue.tscn b/Dialogue.tscn index f16c436..f341bf7 100644 --- a/Dialogue.tscn +++ b/Dialogue.tscn @@ -5,7 +5,6 @@ [node name="Dialogue" type="TextureRect" unique_id=733911232] visible = false -layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/Slideshower.tscn b/Slideshower.tscn index 749f57e..efa0e48 100644 --- a/Slideshower.tscn +++ b/Slideshower.tscn @@ -1,5 +1,11 @@ [gd_scene format=3 uid="uid://rcq5arl8mdes"] +[ext_resource type="Script" uid="uid://bdv4qahk8mumv" path="res://slideshower.gd" id="1_7e6iu"] +[ext_resource type="Texture2D" uid="uid://pwn1pdrp6ruh" path="res://art/keyart_thumb.png" id="2_puxm7"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_puxm7"] +bg_color = Color(0.8203125, 0.8203125, 0.8203125, 1) + [node name="Slideshower" type="Control" unique_id=776393005] layout_mode = 3 anchors_preset = 15 @@ -7,14 +13,65 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("1_7e6iu") -[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1628447815] -layout_mode = 0 -offset_right = 1282.0 -offset_bottom = 715.0 +[node name="VSplitContainer" type="VSplitContainer" parent="." unique_id=35480294] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = 3.0 +offset_top = 4.0 +grow_horizontal = 2 +grow_vertical = 2 +split_offsets = PackedInt32Array(642) +split_offset = 642 -[node name="Sprite2D" type="Sprite2D" parent="VBoxContainer" unique_id=1957522201] - -[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer" unique_id=1168262970] +[node name="ImageFrame" type="Panel" parent="VSplitContainer" unique_id=1582351824] layout_mode = 2 -text = "Test" + +[node name="SlideImage" type="TextureRect" parent="VSplitContainer/ImageFrame" unique_id=720362532] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("2_puxm7") +expand_mode = 1 +stretch_mode = 5 + +[node name="TextFrame" type="Panel" parent="VSplitContainer" unique_id=1381001186] +layout_mode = 2 +theme_override_styles/panel = SubResource("StyleBoxFlat_puxm7") + +[node name="SlideText" type="RichTextLabel" parent="VSplitContainer/TextFrame" unique_id=1168262970] +layout_mode = 1 +anchors_preset = -1 +anchor_right = 0.86 +anchor_bottom = 1.0 +offset_right = 11.780029 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_colors/default_color = Color(0, 0, 0, 1) +theme_override_font_sizes/normal_font_size = 21 +theme_override_font_sizes/bold_font_size = 21 +theme_override_font_sizes/bold_italics_font_size = 21 +theme_override_font_sizes/italics_font_size = 21 +theme_override_font_sizes/mono_font_size = 21 +text = "The Pharaoh's Jetpack!" + +[node name="ContinueButton" type="Button" parent="VSplitContainer/TextFrame" unique_id=1558725691] +layout_mode = 1 +anchors_preset = -1 +anchor_top = 0.097 +anchor_right = 1.0 +anchor_bottom = 0.79 +offset_left = 1133.0 +offset_top = -0.013999939 +offset_right = -14.0 +offset_bottom = 0.020000458 +grow_horizontal = 2 +text = "Continue [E]" + +[connection signal="pressed" from="VSplitContainer/TextFrame/ContinueButton" to="." method="_on_continue_button_pressed"] diff --git a/art/slides/Activate.png b/art/slides/Activate.png new file mode 100644 index 0000000..d1cb8c0 Binary files /dev/null and b/art/slides/Activate.png differ diff --git a/art/slides/Activate.png.import b/art/slides/Activate.png.import new file mode 100644 index 0000000..c291c5e --- /dev/null +++ b/art/slides/Activate.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d1njkrglsofqk" +path="res://.godot/imported/Activate.png-5a9b65792bff5759f1905879cea1ebaa.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/Activate.png" +dest_files=["res://.godot/imported/Activate.png-5a9b65792bff5759f1905879cea1ebaa.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/art/slides/Daydreaming.png b/art/slides/Daydreaming.png new file mode 100644 index 0000000..03f5e0b Binary files /dev/null and b/art/slides/Daydreaming.png differ diff --git a/art/slides/Daydreaming.png.import b/art/slides/Daydreaming.png.import new file mode 100644 index 0000000..25353db --- /dev/null +++ b/art/slides/Daydreaming.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dkhnrtsstc3gs" +path="res://.godot/imported/Daydreaming.png-653e4d4bd093a39da88f576e50d6c4f0.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/Daydreaming.png" +dest_files=["res://.godot/imported/Daydreaming.png-653e4d4bd093a39da88f576e50d6c4f0.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/art/slides/Glow.png b/art/slides/Glow.png new file mode 100644 index 0000000..500900d Binary files /dev/null and b/art/slides/Glow.png differ diff --git a/art/slides/Glow.png.import b/art/slides/Glow.png.import new file mode 100644 index 0000000..4069d24 --- /dev/null +++ b/art/slides/Glow.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://2mb7loqx4035" +path="res://.godot/imported/Glow.png-7fece8dff73930115c57f2c0ae3578d8.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/Glow.png" +dest_files=["res://.godot/imported/Glow.png-7fece8dff73930115c57f2c0ae3578d8.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/art/slides/Goatcaphagus.png b/art/slides/Goatcaphagus.png new file mode 100644 index 0000000..e0a40d9 Binary files /dev/null and b/art/slides/Goatcaphagus.png differ diff --git a/art/slides/Goatcaphagus.png.import b/art/slides/Goatcaphagus.png.import new file mode 100644 index 0000000..830adf4 --- /dev/null +++ b/art/slides/Goatcaphagus.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c5kfj40gjnltf" +path="res://.godot/imported/Goatcaphagus.png-d86b36347399a0816eebbbd8281279fc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/Goatcaphagus.png" +dest_files=["res://.godot/imported/Goatcaphagus.png-d86b36347399a0816eebbbd8281279fc.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/art/slides/Journey.png b/art/slides/Journey.png new file mode 100644 index 0000000..cb9e9cd Binary files /dev/null and b/art/slides/Journey.png differ diff --git a/art/slides/Journey.png.import b/art/slides/Journey.png.import new file mode 100644 index 0000000..f0c404a --- /dev/null +++ b/art/slides/Journey.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://3jk04ddh4tme" +path="res://.godot/imported/Journey.png-73c5508ef5224e4becee36594c39a18b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/Journey.png" +dest_files=["res://.godot/imported/Journey.png-73c5508ef5224e4becee36594c39a18b.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/art/slides/Opensofar.png b/art/slides/Opensofar.png new file mode 100644 index 0000000..d792daf Binary files /dev/null and b/art/slides/Opensofar.png differ diff --git a/art/slides/Opensofar.png.import b/art/slides/Opensofar.png.import new file mode 100644 index 0000000..4839ece --- /dev/null +++ b/art/slides/Opensofar.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dd6rkyvutqrxb" +path="res://.godot/imported/Opensofar.png-a0b612c8052ea0cd9e0750c52238989d.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/Opensofar.png" +dest_files=["res://.godot/imported/Opensofar.png-a0b612c8052ea0cd9e0750c52238989d.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/art/slides/PossessedbyOC.png b/art/slides/PossessedbyOC.png new file mode 100644 index 0000000..ac0cf01 Binary files /dev/null and b/art/slides/PossessedbyOC.png differ diff --git a/art/slides/PossessedbyOC.png.import b/art/slides/PossessedbyOC.png.import new file mode 100644 index 0000000..47dde84 --- /dev/null +++ b/art/slides/PossessedbyOC.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bh6teffdplxy7" +path="res://.godot/imported/PossessedbyOC.png-96605a3f22a6b73e1293b2d1be720757.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/PossessedbyOC.png" +dest_files=["res://.godot/imported/PossessedbyOC.png-96605a3f22a6b73e1293b2d1be720757.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/art/slides/Power_source.png b/art/slides/Power_source.png new file mode 100644 index 0000000..7c179b6 Binary files /dev/null and b/art/slides/Power_source.png differ diff --git a/art/slides/Power_source.png.import b/art/slides/Power_source.png.import new file mode 100644 index 0000000..7460f15 --- /dev/null +++ b/art/slides/Power_source.png.import @@ -0,0 +1,43 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c2e5dbfb16dhq" +path="res://.godot/imported/Power_source.png-669b9d6c712b93bed5f0d8805876b0d5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://art/slides/Power_source.png" +dest_files=["res://.godot/imported/Power_source.png-669b9d6c712b93bed5f0d8805876b0d5.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/high_quality_mode=0 +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 +mipmaps/preserve_alpha_test_coverage=false +mipmaps/alpha_test_threshold=0.5 +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 diff --git a/icon.svg.import b/icon.svg.import index ff4a2c7..3ccb140 100644 --- a/icon.svg.import +++ b/icon.svg.import @@ -17,7 +17,6 @@ dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.cte compress/mode=0 compress/high_quality=false -compress/high_quality_mode=0 compress/lossy_quality=0.7 compress/uastc_level=0 compress/rdo_quality_loss=0.0 @@ -26,8 +25,6 @@ compress/normal_map=0 compress/channel_pack=0 mipmaps/generate=false mipmaps/limit=-1 -mipmaps/preserve_alpha_test_coverage=false -mipmaps/alpha_test_threshold=0.5 roughness/mode=0 roughness/src_normal="" process/channel_remap/red=0 diff --git a/intro.gd b/intro.gd new file mode 100644 index 0000000..5f13fbc --- /dev/null +++ b/intro.gd @@ -0,0 +1,25 @@ +extends Control + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + $Slideshower.play_slideshow([ + { "image": "Daydreaming", + "text": "Ever since he was a wee lad, Mr. Rhombini had always had one dream - to fly around in a blinged up jetpack." }, + { "image": "res://art/keyart_thumb.png", + "text": "The internet has been abuzz with talks of a legendary Pharaoh's jetpack. Mr. Rhombini's day has come." }, + { "image": "Journey", + "text": "Under the cover of night, Mr. Rhombini sneaks into the famous pharaoh's pyramid. This night, of all nights, it seems to glow with strange energy." }, + { "image": "Goatcaphagus", + "text": "Mr. Rhombini stumbles upon an unusual sarcophagus, a blend of ancient craftsmanship and advanced technology. The antenna have been disconnected." }, + { "image": "Activate", + "text": "Mr. Rhombini excitedly connects the antenna. The sarcophagus begins to hum." }, + { "image": "Opensofar", + "text": "The sarcophagus swings open to reveal, not a dead body, but an old computer. The computer begins to boot up, but an error message is visible on the main screen." }, + { "image": "PossessedbyOC", + "text": "However, Mr. Rhombini's attention is instantly grabbed by the other object inside the open sarcophagus." }, + { "image": "Glow", + "text": "The Pharaoh's jetpack! Mr. Rhombini wastes no time in putting it on." } + ]) + +func _on_slideshower_finished_playing() -> void: + get_tree().change_scene_to_file("res://world.tscn") diff --git a/intro.gd.uid b/intro.gd.uid new file mode 100644 index 0000000..b17e146 --- /dev/null +++ b/intro.gd.uid @@ -0,0 +1 @@ +uid://bo6557y41ps7i diff --git a/intro.tscn b/intro.tscn index da9c41c..8968b9f 100644 --- a/intro.tscn +++ b/intro.tscn @@ -1,5 +1,6 @@ [gd_scene format=3 uid="uid://p65fagt04vv8"] +[ext_resource type="Script" uid="uid://bo6557y41ps7i" path="res://intro.gd" id="1_ayt76"] [ext_resource type="PackedScene" uid="uid://rcq5arl8mdes" path="res://Slideshower.tscn" id="1_s2ta7"] [node name="Intro" type="Control" unique_id=1423273784] @@ -9,6 +10,9 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("1_ayt76") [node name="Slideshower" parent="." unique_id=776393005 instance=ExtResource("1_s2ta7")] layout_mode = 1 + +[connection signal="finished_playing" from="Slideshower" to="." method="_on_slideshower_finished_playing"] diff --git a/project.godot b/project.godot index 7fb6889..0b0b882 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="JumpRope" -run/main_scene="uid://iivvrut0lfsr" +run/main_scene="uid://p65fagt04vv8" config/features=PackedStringArray("4.8", "Forward Plus") boot_splash/image="uid://dhue32shjdpt8" config/icon="res://icon.svg" diff --git a/slideshower.gd b/slideshower.gd new file mode 100644 index 0000000..d7743be --- /dev/null +++ b/slideshower.gd @@ -0,0 +1,48 @@ +class_name Slideshower +extends Control + +signal finished_playing + +var slides = [] +var slide = 0 + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + +func play_slideshow(new_slides) -> void: + slides = new_slides + play_slide(0) + +func play_slide(index) -> bool: + if index < 0 or index >= len(slides): + return false + + slide = index + var image_path: String = slides[index].image + if not image_path.begins_with("res://"): + image_path = "res://art/slides/%s.png" % image_path + + $VSplitContainer/TextFrame/SlideText.text = slides[index].text + $VSplitContainer/ImageFrame/SlideImage.texture = load(image_path) + return true + +func next_slide() -> bool: + var success = play_slide(slide + 1) + if not success: + finished_playing.emit() + return success + +func prev_slide() -> bool: + return play_slide(slide - 1) + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + if Input.is_action_just_released("interact") or Input.is_action_just_released("jump") or Input.is_action_just_released("move_right"): + next_slide() + + if Input.is_action_just_released("move_left"): + prev_slide() + +func _on_continue_button_pressed() -> void: + next_slide() diff --git a/slideshower.gd.uid b/slideshower.gd.uid new file mode 100644 index 0000000..20bfe2a --- /dev/null +++ b/slideshower.gd.uid @@ -0,0 +1 @@ +uid://bdv4qahk8mumv