diff options
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/microgames/fishin/Kibbby.png | bin | 0 -> 9264 bytes | |||
-rw-r--r-- | scenes/microgames/fishin/Kibbby.png.import | 34 | ||||
-rw-r--r-- | scenes/microgames/fishin/Kibbby.xcf | bin | 0 -> 90677 bytes | |||
-rw-r--r-- | scenes/microgames/fishin/Kibbby2.xcf | bin | 0 -> 53157 bytes | |||
-rw-r--r-- | scenes/microgames/fishin/KibbbyHappy.png | bin | 0 -> 9082 bytes | |||
-rw-r--r-- | scenes/microgames/fishin/KibbbyHappy.png.import | 34 | ||||
-rw-r--r-- | scenes/microgames/fishin/KibbbyPulling.png | bin | 0 -> 13551 bytes | |||
-rw-r--r-- | scenes/microgames/fishin/KibbbyPulling.png.import | 34 | ||||
-rw-r--r-- | scenes/microgames/fishin/KibbbySad.png | bin | 0 -> 9267 bytes | |||
-rw-r--r-- | scenes/microgames/fishin/KibbbySad.png.import | 34 | ||||
-rw-r--r-- | scenes/microgames/fishin/fishin.gd | 113 | ||||
-rw-r--r-- | scenes/microgames/fishin/node_2d.tscn | 130 | ||||
-rw-r--r-- | scenes/stockticker/Stock Ticker.tscn | 52 | ||||
-rw-r--r-- | scenes/stockticker/stonks.gd | 5 |
14 files changed, 414 insertions, 22 deletions
diff --git a/scenes/microgames/fishin/Kibbby.png b/scenes/microgames/fishin/Kibbby.png Binary files differnew file mode 100644 index 0000000..2631003 --- /dev/null +++ b/scenes/microgames/fishin/Kibbby.png diff --git a/scenes/microgames/fishin/Kibbby.png.import b/scenes/microgames/fishin/Kibbby.png.import new file mode 100644 index 0000000..d58c2cb --- /dev/null +++ b/scenes/microgames/fishin/Kibbby.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://crpp1qfyk4tv7" +path="res://.godot/imported/Kibbby.png-a5e7e28c8f175ffac07cfcdb8f612803.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/microgames/fishin/Kibbby.png" +dest_files=["res://.godot/imported/Kibbby.png-a5e7e28c8f175ffac07cfcdb8f612803.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/scenes/microgames/fishin/Kibbby.xcf b/scenes/microgames/fishin/Kibbby.xcf Binary files differnew file mode 100644 index 0000000..c080cc2 --- /dev/null +++ b/scenes/microgames/fishin/Kibbby.xcf diff --git a/scenes/microgames/fishin/Kibbby2.xcf b/scenes/microgames/fishin/Kibbby2.xcf Binary files differnew file mode 100644 index 0000000..9aaf4dc --- /dev/null +++ b/scenes/microgames/fishin/Kibbby2.xcf diff --git a/scenes/microgames/fishin/KibbbyHappy.png b/scenes/microgames/fishin/KibbbyHappy.png Binary files differnew file mode 100644 index 0000000..b9756cd --- /dev/null +++ b/scenes/microgames/fishin/KibbbyHappy.png diff --git a/scenes/microgames/fishin/KibbbyHappy.png.import b/scenes/microgames/fishin/KibbbyHappy.png.import new file mode 100644 index 0000000..071e612 --- /dev/null +++ b/scenes/microgames/fishin/KibbbyHappy.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dcvie7ynwdfui" +path="res://.godot/imported/KibbbyHappy.png-2f6e79d205df1bdf038b3aa13617c533.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/microgames/fishin/KibbbyHappy.png" +dest_files=["res://.godot/imported/KibbbyHappy.png-2f6e79d205df1bdf038b3aa13617c533.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/scenes/microgames/fishin/KibbbyPulling.png b/scenes/microgames/fishin/KibbbyPulling.png Binary files differnew file mode 100644 index 0000000..a6bc22b --- /dev/null +++ b/scenes/microgames/fishin/KibbbyPulling.png diff --git a/scenes/microgames/fishin/KibbbyPulling.png.import b/scenes/microgames/fishin/KibbbyPulling.png.import new file mode 100644 index 0000000..dc61ec1 --- /dev/null +++ b/scenes/microgames/fishin/KibbbyPulling.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://br3jiit0v6jes" +path="res://.godot/imported/KibbbyPulling.png-351fdd0a725255d7bbe5dd2e3b228f38.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/microgames/fishin/KibbbyPulling.png" +dest_files=["res://.godot/imported/KibbbyPulling.png-351fdd0a725255d7bbe5dd2e3b228f38.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/scenes/microgames/fishin/KibbbySad.png b/scenes/microgames/fishin/KibbbySad.png Binary files differnew file mode 100644 index 0000000..091f77b --- /dev/null +++ b/scenes/microgames/fishin/KibbbySad.png diff --git a/scenes/microgames/fishin/KibbbySad.png.import b/scenes/microgames/fishin/KibbbySad.png.import new file mode 100644 index 0000000..2fedff6 --- /dev/null +++ b/scenes/microgames/fishin/KibbbySad.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://d4kyih3ivlqqc" +path="res://.godot/imported/KibbbySad.png-583f604f245d5791b483e626ccda4f31.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://scenes/microgames/fishin/KibbbySad.png" +dest_files=["res://.godot/imported/KibbbySad.png-583f604f245d5791b483e626ccda4f31.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/scenes/microgames/fishin/fishin.gd b/scenes/microgames/fishin/fishin.gd new file mode 100644 index 0000000..44b60db --- /dev/null +++ b/scenes/microgames/fishin/fishin.gd @@ -0,0 +1,113 @@ +extends MicrogameWindow + +const IN_GAME_WAIT_TIME = 10 + +var pulling: Sprite2D +var mash: Label +var you: Sprite2D +var sad: Sprite2D +var happy: Sprite2D +var mouse: Sprite2D +var shake: ShakePivot +var shake2: ShakePivot +var shake3: ShakePivot +var start_game_timer: Timer +var in_game_timer: Timer +var succfail_timer: Timer + +var in_minigame = false +var num_clicks = 0 + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pulling = $ShakePivot/pulling + you = $"you!" + mash = $ShakePivot2/MASH + mouse = $ShakePivot3/Mouse + shake = $ShakePivot + shake2 = $ShakePivot2 + shake3 = $ShakePivot3 + sad = $SAD + happy = $Happy + start_game_timer = $StartGame + in_game_timer = $InGame + succfail_timer = $SuccessFail + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + + +func _on_texture_button_button_up() -> void: + shake.shake() + shake2.shake() + shake3.shake() + + if in_minigame: + num_clicks -= 1 + + # YOU WIN + if num_clicks == 0: + in_minigame = false + + # hide non-happy cats + pulling.visible = false + mash.visible = false + mouse.visible = false + sad.visible = false + you.visible = false + + # show happy cat + happy.visible = true + + in_game_timer.stop() + in_game_timer.wait_time = IN_GAME_WAIT_TIME + succfail_timer.start() + + +func _on_start_game_timeout() -> void: + if randf() < 0.1: + start_game_timer.stop() + in_game_timer.start() + + in_minigame = true + + # hide passive cats + you.visible = false + sad.visible = false + happy.visible = false + + # show active cat + pulling.visible = true + mash.visible = true + mouse.visible = true + + num_clicks = randi_range(5,21) + num_clicks = 21 + + +# YOU LOSE +func _on_in_game_timeout() -> void: + in_minigame = false + + # hide non-sad cats + you.visible = false + happy.visible = false + pulling.visible = false + mash.visible = false + mouse.visible = false + + # show sad cat + sad.visible = true + + in_game_timer.stop() + succfail_timer.start() + + +func _on_success_fail_timeout() -> void: + sad.visible = false + happy.visible = false + you.visible = true + succfail_timer.stop() + start_game_timer.start() diff --git a/scenes/microgames/fishin/node_2d.tscn b/scenes/microgames/fishin/node_2d.tscn new file mode 100644 index 0000000..969ec34 --- /dev/null +++ b/scenes/microgames/fishin/node_2d.tscn @@ -0,0 +1,130 @@ +[gd_scene load_steps=14 format=3 uid="uid://c4s4pigu4pr48"] + +[ext_resource type="Texture2D" uid="uid://voruypgyi77e" path="res://scenes/stockticker/UI-Background-Colour.png" id="1_cxqat"] +[ext_resource type="Script" path="res://scenes/microgames/fishin/fishin.gd" id="1_srw8b"] +[ext_resource type="Texture2D" uid="uid://crpp1qfyk4tv7" path="res://scenes/microgames/fishin/Kibbby.png" id="2_atppo"] +[ext_resource type="Texture2D" uid="uid://br3jiit0v6jes" path="res://scenes/microgames/fishin/KibbbyPulling.png" id="3_don82"] +[ext_resource type="Theme" uid="uid://ve18rbkeiwti" path="res://UI/text.tres" id="5_7qce4"] +[ext_resource type="Texture2D" uid="uid://is20ioxt1vtm" path="res://UI/MousePrompt.png" id="6_7ls0g"] +[ext_resource type="Texture2D" uid="uid://us0sonuda24u" path="res://UI/MousePrompt2.png" id="7_qpcgm"] +[ext_resource type="Script" path="res://libs/shake_pivot.gd" id="7_vnrfy"] +[ext_resource type="Texture2D" uid="uid://d4kyih3ivlqqc" path="res://scenes/microgames/fishin/KibbbySad.png" id="9_blola"] +[ext_resource type="Texture2D" uid="uid://dcvie7ynwdfui" path="res://scenes/microgames/fishin/KibbbyHappy.png" id="10_1il5r"] + +[sub_resource type="Animation" id="Animation_bep6n"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("ShakePivot3/Mouse:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [null] +} + +[sub_resource type="Animation" id="Animation_fxbt5"] +resource_name = "mash" +loop_mode = 1 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("ShakePivot3/Mouse:texture") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0.0333334, 0.466667), +"transitions": PackedFloat32Array(1, 1), +"update": 1, +"values": [ExtResource("6_7ls0g"), ExtResource("7_qpcgm")] +} + +[sub_resource type="AnimationLibrary" id="AnimationLibrary_7e725"] +_data = { +"RESET": SubResource("Animation_bep6n"), +"mash": SubResource("Animation_fxbt5") +} + +[node name="Node2D2" type="Window"] +position = Vector2i(0, 36) +size = Vector2i(930, 560) +unresizable = true +script = ExtResource("1_srw8b") + +[node name="background" type="Sprite2D" parent="."] +modulate = Color(0.42, 0.700333, 1, 1) +position = Vector2(649.75, 362.25) +scale = Vector2(1300.5, 725.5) +texture = ExtResource("1_cxqat") + +[node name="you!" type="Sprite2D" parent="."] +position = Vector2(535, 300) +texture = ExtResource("2_atppo") + +[node name="TextureButton" type="TextureButton" parent="."] +offset_right = 1298.0 +offset_bottom = 728.0 + +[node name="AnimationPlayer" type="AnimationPlayer" parent="."] +libraries = { +"": SubResource("AnimationLibrary_7e725") +} +autoplay = "mash" +speed_scale = 8.0 + +[node name="ShakePivot" type="Node2D" parent="."] +script = ExtResource("7_vnrfy") + +[node name="pulling" type="Sprite2D" parent="ShakePivot"] +visible = false +position = Vector2(535, 300) +texture = ExtResource("3_don82") + +[node name="ShakePivot2" type="Node2D" parent="."] +script = ExtResource("7_vnrfy") + +[node name="MASH" type="Label" parent="ShakePivot2"] +visible = false +offset_left = 150.0 +offset_top = 358.0 +offset_right = 570.0 +offset_bottom = 598.0 +theme = ExtResource("5_7qce4") +theme_override_colors/font_color = Color(1, 0, 0, 1) +theme_override_font_sizes/font_size = 60 +text = "MASH!!!" + +[node name="ShakePivot3" type="Node2D" parent="."] +script = ExtResource("7_vnrfy") + +[node name="Mouse" type="Sprite2D" parent="ShakePivot3"] +visible = false +position = Vector2(412, 532) +scale = Vector2(0.216276, 0.249769) + +[node name="StartGame" type="Timer" parent="."] +autostart = true + +[node name="InGame" type="Timer" parent="."] +wait_time = 3.0 + +[node name="SAD" type="Sprite2D" parent="."] +visible = false +position = Vector2(535, 300) +texture = ExtResource("9_blola") + +[node name="Happy" type="Sprite2D" parent="."] +visible = false +position = Vector2(535, 300) +texture = ExtResource("10_1il5r") + +[node name="SuccessFail" type="Timer" parent="."] +wait_time = 3.0 + +[connection signal="button_up" from="TextureButton" to="." method="_on_texture_button_button_up"] +[connection signal="timeout" from="StartGame" to="." method="_on_start_game_timeout"] +[connection signal="timeout" from="InGame" to="." method="_on_in_game_timeout"] +[connection signal="timeout" from="SuccessFail" to="." method="_on_success_fail_timeout"] diff --git a/scenes/stockticker/Stock Ticker.tscn b/scenes/stockticker/Stock Ticker.tscn index 6c0e1fb..f2b2ec6 100644 --- a/scenes/stockticker/Stock Ticker.tscn +++ b/scenes/stockticker/Stock Ticker.tscn @@ -1,15 +1,17 @@ -[gd_scene load_steps=11 format=3 uid="uid://g2veoq55y14i"] +[gd_scene load_steps=13 format=3 uid="uid://g2veoq55y14i"] [ext_resource type="Script" path="res://scenes/stockticker/transactions.gd" id="1_1gmdn"] [ext_resource type="Texture2D" uid="uid://voruypgyi77e" path="res://scenes/stockticker/UI-Background-Colour.png" id="1_wbfee"] [ext_resource type="Script" path="res://scenes/stockticker/stonks.gd" id="2_pan4m"] [ext_resource type="Theme" uid="uid://ve18rbkeiwti" path="res://UI/text.tres" id="3_dv3dr"] +[ext_resource type="Script" path="res://libs/shake_pivot.gd" id="4_ofsrv"] [ext_resource type="Texture2D" uid="uid://vie3nmimge1t" path="res://scenes/stockticker/BuyButton.png" id="5_mpf30"] [ext_resource type="Texture2D" uid="uid://dvidbk3clx6dn" path="res://scenes/stockticker/BuyButtonPressed.png" id="6_styy2"] [ext_resource type="Texture2D" uid="uid://dw8wpd47me7wu" path="res://scenes/stockticker/SellButton.png" id="7_h6hir"] [ext_resource type="Texture2D" uid="uid://b773rtpy6rtx5" path="res://scenes/stockticker/SellButtonPressed.png" id="8_essj7"] [ext_resource type="Theme" path="res://UI/darksouls.tres" id="8_yqn4n"] [ext_resource type="Texture2D" uid="uid://dpp7abs35p6i5" path="res://scenes/stockticker/fishe/gar.png" id="9_bv8iw"] +[ext_resource type="AudioStream" uid="uid://cy3ahp7fec1y2" path="res://funny_sounds/Metal pipe falling sound effect(loud).mp3" id="10_rkl57"] [node name="Node2D" type="Node2D"] script = ExtResource("1_1gmdn") @@ -23,9 +25,34 @@ texture = ExtResource("1_wbfee") [node name="Timer" type="Timer" parent="."] autostart = true +[node name="Sprite2D" type="Sprite2D" parent="."] +position = Vector2(1036, 555) +scale = Vector2(0.671875, 0.622) +texture = ExtResource("9_bv8iw") + +[node name="Label" type="Label" parent="."] +offset_left = 823.0 +offset_top = 588.0 +offset_right = 1082.0 +offset_bottom = 785.0 +theme = ExtResource("3_dv3dr") +theme_override_colors/font_color = Color(0, 0, 0, 1) +theme_override_font_sizes/font_size = 82 +text = "GAR" + [node name="Stonks" type="Node2D" parent="."] script = ExtResource("2_pan4m") +[node name="ShakePivot" type="Node2D" parent="Stonks"] +script = ExtResource("4_ofsrv") +NOISE_SHAKE_STRENGTH = 30.0 +SHAKE_DECAY_RATE = 5.0 + +[node name="StonkWindow" type="Sprite2D" parent="Stonks/ShakePivot"] +position = Vector2(582, 205) +scale = Vector2(1062.25, 337) +texture = ExtResource("1_wbfee") + [node name="SellButton" type="TextureButton" parent="Stonks"] offset_left = 439.0 offset_top = 565.0 @@ -34,11 +61,6 @@ offset_bottom = 694.0 texture_normal = ExtResource("7_h6hir") texture_pressed = ExtResource("8_essj7") -[node name="StonkWindow" type="Sprite2D" parent="Stonks"] -position = Vector2(582, 205) -scale = Vector2(1062.25, 337) -texture = ExtResource("1_wbfee") - [node name="TopLine" type="Line2D" parent="Stonks"] points = PackedVector2Array(50, 60, 1000, 60) width = 1.0 @@ -119,6 +141,9 @@ theme = ExtResource("3_dv3dr") text = "Shares Held:" +[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="Stonks"] +stream = ExtResource("10_rkl57") + [node name="DarkSoulsTextBox" type="Sprite2D" parent="Stonks"] visible = false self_modulate = Color(0, 0, 0, 0.721569) @@ -136,21 +161,6 @@ theme = ExtResource("8_yqn4n") text = "Stock Bankrupt" horizontal_alignment = 1 -[node name="Sprite2D" type="Sprite2D" parent="."] -position = Vector2(1036, 555) -scale = Vector2(0.671875, 0.622) -texture = ExtResource("9_bv8iw") - -[node name="Label" type="Label" parent="."] -offset_left = 823.0 -offset_top = 588.0 -offset_right = 1082.0 -offset_bottom = 785.0 -theme = ExtResource("3_dv3dr") -theme_override_colors/font_color = Color(0, 0, 0, 1) -theme_override_font_sizes/font_size = 82 -text = "GAR" - [connection signal="timeout" from="Timer" to="Stonks" method="_on_timer_timeout"] [connection signal="buy" from="Stonks" to="." method="_on_stonks_buy"] [connection signal="sell" from="Stonks" to="." method="_on_stonks_sell"] diff --git a/scenes/stockticker/stonks.gd b/scenes/stockticker/stonks.gd index 1279382..5cb0ab4 100644 --- a/scenes/stockticker/stonks.gd +++ b/scenes/stockticker/stonks.gd @@ -20,7 +20,7 @@ var darksouls_text: Label var price_history = [] var base_pos_mult = 0.5 # no size limit -var base_neg_mult = 0.5 # probably keep this below 1 +var base_neg_mult = 100.5 # probably keep this below 1 var hype_mult = 1.0 var hype_decr = 0.1 @@ -71,6 +71,7 @@ func draw_stonks(minval: Big, maxval: Big) -> void: var pos = Vector2(x_pos, y_pos) stonks.add_point(pos, index) index += 1 + func get_min_price() -> Big: var minval = Big.new(-1) @@ -135,6 +136,8 @@ func _on_timer_timeout() -> void: new_price = Big.new(0) shares = 0 shares_label.text = "Shares\nHeld:%d" % shares + $AudioStreamPlayer.play() + $ShakePivot.shake() if len(price_history) >= MAX_PRICES: price_history.pop_front() |