diff --git a/graphics/lore/verdant_hills.png b/graphics/lore/verdant_hills.png new file mode 100644 index 0000000..9622b34 Binary files /dev/null and b/graphics/lore/verdant_hills.png differ diff --git a/graphics/lore/verdant_hills.png.import b/graphics/lore/verdant_hills.png.import new file mode 100644 index 0000000..f369df6 --- /dev/null +++ b/graphics/lore/verdant_hills.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/verdant_hills.png-c370ff8554ff6b9616cb89947e2207df.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://graphics/lore/verdant_hills.png" +dest_files=[ "res://.import/verdant_hills.png-c370ff8554ff6b9616cb89947e2207df.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/maps/hills.tscn b/maps/hills.tscn index 4ba3acb..3d7f4eb 100644 --- a/maps/hills.tscn +++ b/maps/hills.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=23 format=2] +[gd_scene load_steps=27 format=2] [ext_resource path="res://objects/environment/ladder/ladder.tscn" type="PackedScene" id=1] [ext_resource path="res://objects/hud/hud.tscn" type="PackedScene" id=2] @@ -21,6 +21,10 @@ [ext_resource path="res://maps/map.gd" type="Script" id=19] [ext_resource path="res://audio/music/rumble_loop.mp3" type="AudioStream" id=20] [ext_resource path="res://tilesets/t_ladders.tres" type="TileSet" id=21] +[ext_resource path="res://objects/lore/bioslime.tscn" type="PackedScene" id=22] +[ext_resource path="res://objects/lore/catbat.tscn" type="PackedScene" id=23] +[ext_resource path="res://objects/lore/eviscerator.tscn" type="PackedScene" id=24] +[ext_resource path="res://objects/lore/verdant_hills.tscn" type="PackedScene" id=25] [sub_resource type="RectangleShape2D" id=1] extents = Vector2( 8, 128 ) @@ -31,6 +35,7 @@ script = ExtResource( 19 ) target_time_any = 70 target_time_100 = 180 music = ExtResource( 20 ) +lore_entries = [ ExtResource( 25 ), ExtResource( 24 ), ExtResource( 22 ), ExtResource( 23 ) ] [node name="CanvasLayer" type="CanvasLayer" parent="."] layer = -2 diff --git a/maps/map.gd b/maps/map.gd index 892ceea..36aba9f 100644 --- a/maps/map.gd +++ b/maps/map.gd @@ -2,6 +2,7 @@ extends Node2D export var target_time_any = 0 export var target_time_100 = 0 export (AudioStream) var music +export (Array, PackedScene) var lore_entries = null #Bonuses var time_bonus = true @@ -20,7 +21,11 @@ func _physics_process(delta): if Debug.entry == false && Game.can_pause: #Pause if Input.is_action_just_pressed("pause") && !get_tree().paused: - get_parent().add_child(Game.pause_screen.instance()) + var pause = Game.pause_screen.instance() + if lore_entries != null && !lore_entries.empty(): + var entry = lore_entries[randi() % lore_entries.size()] + pause.lore_entry = entry + get_parent().add_child(pause) # restart level if Input.is_action_just_pressed("restart"): Game.call_deferred("restart_level") diff --git a/objects/hud/pause_screen.gd b/objects/hud/pause_screen.gd index 1fbe33d..f919d27 100644 --- a/objects/hud/pause_screen.gd +++ b/objects/hud/pause_screen.gd @@ -1,11 +1,18 @@ extends CanvasLayer +var lore_entry: PackedScene = null + onready var options_screen = $OptionsScreen +onready var lore_container = $LoreContainer # Called when the node enters the scene tree for the first time. func _ready(): get_tree().paused = true $Body/Resume.grab_focus() + #Random lore + if lore_entry != null: + var lore = lore_entry.instance() + lore_container.add_child(lore) func _physics_process(delta): #Resume with pause button diff --git a/objects/hud/pause_screen.tscn b/objects/hud/pause_screen.tscn index 21da41e..8204145 100644 --- a/objects/hud/pause_screen.tscn +++ b/objects/hud/pause_screen.tscn @@ -10,14 +10,14 @@ [node name="PauseScreen" type="CanvasLayer"] pause_mode = 2 -layer = 100 +layer = 110 script = ExtResource( 4 ) [node name="Border" type="NinePatchRect" parent="."] margin_left = 64.0 -margin_top = 69.0 +margin_top = 25.0 margin_right = 192.0 -margin_bottom = 123.0 +margin_bottom = 79.0 texture = ExtResource( 8 ) patch_margin_left = 3 patch_margin_top = 3 @@ -27,18 +27,18 @@ patch_margin_bottom = 3 [node name="ColorRect" type="ColorRect" parent="."] pause_mode = 2 margin_left = 67.0 -margin_top = 72.0 +margin_top = 28.0 margin_right = 189.0 -margin_bottom = 120.0 +margin_bottom = 76.0 color = Color( 0.239216, 0.239216, 0.443137, 1 ) [node name="Paused" type="Label" parent="."] pause_mode = 2 material = ExtResource( 6 ) margin_left = 64.0 -margin_top = 56.0 +margin_top = 12.0 margin_right = 192.0 -margin_bottom = 70.0 +margin_bottom = 26.0 theme = ExtResource( 5 ) text = "PAUSED!" align = 1 @@ -46,9 +46,9 @@ align = 1 [node name="Body" type="Label" parent="."] pause_mode = 2 margin_left = 64.0 -margin_top = 74.0 +margin_top = 30.0 margin_right = 192.0 -margin_bottom = 120.0 +margin_bottom = 76.0 theme = ExtResource( 2 ) text = "RESUME RESTART @@ -97,6 +97,14 @@ texture_focused = ExtResource( 3 ) [node name="OptionsScreen" parent="." instance=ExtResource( 7 )] visible = false +[node name="LoreContainer" type="MarginContainer" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +margin_left = 8.0 +margin_top = 84.0 +margin_right = -8.0 +margin_bottom = -14.0 + [connection signal="pressed" from="Body/Resume" to="." method="_on_Resume_pressed"] [connection signal="pressed" from="Body/Restart" to="." method="_on_Restart_pressed"] [connection signal="pressed" from="Body/Settings" to="." method="_on_Settings_pressed"] diff --git a/objects/lore/bioslime.tscn b/objects/lore/bioslime.tscn new file mode 100644 index 0000000..f4afe43 --- /dev/null +++ b/objects/lore/bioslime.tscn @@ -0,0 +1,34 @@ +[gd_scene load_steps=7 format=2] + +[ext_resource path="res://shaders/recolor_border.shader" type="Shader" id=1] +[ext_resource path="res://graphics/enemy/pal_slime_purple.png" type="Texture" id=2] +[ext_resource path="res://objects/lore/lore.tscn" type="PackedScene" id=3] +[ext_resource path="res://graphics/enemy/slime.png" type="Texture" id=4] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 1 ) +shader_param/border_color = Color( 0, 0, 0, 1 ) +shader_param/border_corners = false +shader_param/palette = ExtResource( 2 ) + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 4 ) +region = Rect2( 0, 0, 13, 12 ) + +[node name="Lore" instance=ExtResource( 3 )] + +[node name="TextureRect" parent="Panel" index="0"] +material = SubResource( 1 ) +texture = SubResource( 2 ) + +[node name="Control" parent="." index="1"] +margin_top = 55.0 +margin_right = 256.0 +margin_bottom = 136.0 + +[node name="Label" parent="Control" index="0"] +margin_top = 3.0 +margin_right = 215.0 +margin_bottom = 78.0 +text = "BioSLime: +A monster made from discarded biological materials for making chimeras. it is the chicken nugget of the chimera world" diff --git a/objects/lore/catbat.tscn b/objects/lore/catbat.tscn new file mode 100644 index 0000000..6293c61 --- /dev/null +++ b/objects/lore/catbat.tscn @@ -0,0 +1,32 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=1] +[ext_resource path="res://graphics/enemy/bat.png" type="Texture" id=2] +[ext_resource path="res://objects/lore/lore.tscn" type="PackedScene" id=3] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 1 ) +shader_param/border_color = Color( 0, 0, 0, 1 ) +shader_param/border_corners = false + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 2 ) +region = Rect2( 18, 0, 18, 10 ) + +[node name="Lore" instance=ExtResource( 3 )] + +[node name="TextureRect" parent="Panel" index="0"] +material = SubResource( 1 ) +texture = SubResource( 2 ) + +[node name="Control" parent="." index="1"] +margin_top = 68.0 +margin_right = 256.0 +margin_bottom = 123.0 + +[node name="Label" parent="Control" index="0"] +margin_top = 3.0 +margin_right = 215.0 +margin_bottom = 52.0 +text = "CATBAT: +A Chimera created from vampire bat and panther materials given an artificial soul" diff --git a/objects/lore/cave.tscn b/objects/lore/cave.tscn new file mode 100644 index 0000000..07671e9 --- /dev/null +++ b/objects/lore/cave.tscn @@ -0,0 +1,16 @@ +[gd_scene load_steps=2 format=2] + +[ext_resource path="res://objects/lore/lore.tscn" type="PackedScene" id=1] + +[node name="Lore" instance=ExtResource( 1 )] + +[node name="Control" parent="." index="1"] +margin_top = 75.0 +margin_right = 256.0 +margin_bottom = 117.0 + +[node name="Label" parent="Control" index="0"] +margin_top = 3.0 +margin_right = 215.0 +margin_bottom = 39.0 +text = "Blue ray caverns is used as a mine by a corporation that wants to create rust and grime" diff --git a/objects/lore/eviscerator.tscn b/objects/lore/eviscerator.tscn new file mode 100644 index 0000000..fe8ca41 --- /dev/null +++ b/objects/lore/eviscerator.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=6 format=2] + +[ext_resource path="res://shaders/1px_border.gdshader" type="Shader" id=1] +[ext_resource path="res://graphics/enemy/snake.png" type="Texture" id=2] +[ext_resource path="res://objects/lore/lore.tscn" type="PackedScene" id=3] + +[sub_resource type="ShaderMaterial" id=1] +shader = ExtResource( 1 ) +shader_param/border_color = Color( 0, 0, 0, 1 ) +shader_param/border_corners = false + +[sub_resource type="AtlasTexture" id=2] +atlas = ExtResource( 2 ) +region = Rect2( 0, 0, 13, 16 ) + +[node name="Lore" instance=ExtResource( 3 )] + +[node name="TextureRect" parent="Panel" index="0"] +material = SubResource( 1 ) +texture = SubResource( 2 ) + +[node name="Control" parent="." index="1"] +margin_top = 55.0 +margin_bottom = 136.0 + +[node name="Label" parent="Control" index="0"] +margin_top = 3.0 +margin_bottom = 78.0 +text = "Eviscerator: +A chimera created by snake and alligator parts, stitched together and turned into a monster.monsters like these have no compassion." diff --git a/objects/lore/lore.tscn b/objects/lore/lore.tscn index 629762a..b5dbf1b 100644 --- a/objects/lore/lore.tscn +++ b/objects/lore/lore.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=3 format=2] [ext_resource path="res://ui/theme.tres" type="Theme" id=1] +[ext_resource path="res://ui/2ndpuberty_scholar.fnt" type="BitmapFont" id=2] [node name="Lore" type="HBoxContainer"] anchor_right = 1.0 @@ -9,23 +10,23 @@ theme = ExtResource( 1 ) custom_constants/separation = 0 [node name="Panel" type="PanelContainer" parent="."] -margin_top = 76.0 -margin_right = 40.0 -margin_bottom = 116.0 -rect_min_size = Vector2( 40, 40 ) +margin_top = 77.0 +margin_right = 38.0 +margin_bottom = 115.0 +rect_min_size = Vector2( 38, 38 ) size_flags_horizontal = 4 size_flags_vertical = 4 [node name="TextureRect" type="TextureRect" parent="Panel"] margin_left = 3.0 margin_top = 3.0 -margin_right = 37.0 -margin_bottom = 37.0 +margin_right = 35.0 +margin_bottom = 35.0 expand = true stretch_mode = 4 [node name="Control" type="PanelContainer" parent="."] -margin_left = 40.0 +margin_left = 38.0 margin_top = 76.0 margin_right = 256.0 margin_bottom = 116.0 @@ -36,10 +37,11 @@ size_flags_vertical = 6 [node name="Label" type="Label" parent="Control"] margin_left = 3.0 -margin_top = 11.0 -margin_right = 213.0 -margin_bottom = 28.0 -text = "Test Text +margin_top = 8.0 +margin_right = 215.0 +margin_bottom = 31.0 +custom_fonts/font = ExtResource( 2 ) +text = "Test text " align = 1 autowrap = true diff --git a/objects/lore/verdant_hills.tscn b/objects/lore/verdant_hills.tscn new file mode 100644 index 0000000..bbd39c5 --- /dev/null +++ b/objects/lore/verdant_hills.tscn @@ -0,0 +1,19 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://objects/lore/lore.tscn" type="PackedScene" id=1] +[ext_resource path="res://graphics/lore/verdant_hills.png" type="Texture" id=2] + +[node name="Lore" instance=ExtResource( 1 )] + +[node name="TextureRect" parent="Panel" index="0"] +texture = ExtResource( 2 ) + +[node name="Control" parent="." index="1"] +margin_top = 55.0 +margin_bottom = 136.0 + +[node name="Label" parent="Control" index="0"] +margin_top = 3.0 +margin_bottom = 78.0 +text = "Verdant hills: +Sg made their home here because it was a peaceful and beautiful place, but that all changed when it was attacked by chimeras."