From 88fa8793969acba7557a030a523ea7ce28203ef7 Mon Sep 17 00:00:00 2001 From: XTRA Date: Fri, 11 Oct 2024 16:31:12 +0300 Subject: [PATCH] Finish work on intro --- assets/line.wav | Bin 0 -> 4317 bytes assets/line.wav.import | 24 ++++++++++ entities/{test.tscn => Intro.tscn} | 68 ++++++++++------------------- entities/kaleido_scope.tscn | 21 ++++++--- scripts/auto_scale.gd | 2 - scripts/intro.gd | 48 ++++++++++++++++++++ scripts/manager.gd | 4 +- 7 files changed, 111 insertions(+), 56 deletions(-) create mode 100644 assets/line.wav create mode 100644 assets/line.wav.import rename entities/{test.tscn => Intro.tscn} (56%) create mode 100644 scripts/intro.gd diff --git a/assets/line.wav b/assets/line.wav new file mode 100644 index 0000000000000000000000000000000000000000..cb06c816d927232f0192b597c3260d6e1e9b173c GIT binary patch literal 4317 zcmb`J*H#o+6o&C`F6R;EEoM!UAVEMBkf4AfIS2@nBqKRW6i`4#0Y#8t0#v|=PcZK@ z|G)P>Rn_WT%v!TqbT!>gb=CgP_wSP$9~=Ak&tYMikr^??m36=1Y1j$;L~n%2?}@OV z!V2^1@^Cc;CMPE*#>dCU#%|pj9UU1N86F-Q8XO!L80hcs>+9|9>FMe2?&`XEv$M0aqocjO zt*x!KwWX!Gxw)z7#*N0thK7dv`ntN>+S=>aYig>itFK+Fs;aE4tf;tpwY38^z`(!wDadv zQ&Uq?l9Q9qojZFrDJkj9nZ(4zgoOC`_|vE3;^JasV`8GCqfecRii(PijEIN`4?l?t zk8srDfeqAB4BJI=1GaqQR{jmR79-cK=!PA-X~%BS!CQ6owziGlzT!I~r~?NolvF6H zAgds(Agv%SpO*leQeYr9ro@13I0PA(0UDVB8mM&yr~zA(Vgt8&kDCt;Hk=6pW~7n9s^d_ARZN>rOPstIL2588O%v zKo-JGl-m;LL^|h@hy;_M(zdDuK9Ff$Wda~yClGQ%iBV1|IOQOTRjQSE<-~$nPA$0Q zUVNE{75nKT0tf|`QN zK@Sq5(8AC#ArIk|f$~ZDsE~{rjTVkbN6SYhBzYkt4H#mQ#1NE3X3Pv)8iy0PI4}}* z%sLJ!qT!q(8ydt}g<(ZHoL9s{jWDw?w1#OC0C8}E5c3a+FufMRhyx50Y#ERcgKG)` zdXNO>jiG=d#=?hz$zwDiis3LG1_ZW{h#@g1stm&|K*g{i;uvxS!oH(^qDxyMM!3t_oQYsi|MrD<_ zK{*&*^$iV;*vwIomR2f48pJ_Oga<_#9HJ^Cqm+fVOia=j3PUQuLTLa75yTAQe2{go zUH959eV4|2ou>gZ+qLtuGkmhUmMFjNU0FVF>2m^s& z6a<5C=;=jb_4NaVumB99AvnN8fCv#F(a^UAE`8QDE@9((Ei2vDx~}#SZMb$^TP}ma zbzPUfE`D48nn(yGNhQrCjV2#~`rwpMDV!KOO*}n39v%`0#bj|{JZUV`m}?9+EfSKV zL{|74Z{kzZbF6wSdoFzRT^rBkkJdu~DgXx{0X2XJGyy6=27v$y#(`GQ3!tDHl*23j z$>Liqd`gP{A;q!F;;NS7X{DGjQj8fXez_KVEyc^y;xMq1t_NH1;)s!i;?21t11sFQ zUqZt@kcd}kRiHRt0>yR)ixQ#ul6*@3Q%)u4*6)+=mkZMC8{fpYVTs_77mRVm<%> literal 0 HcmV?d00001 diff --git a/assets/line.wav.import b/assets/line.wav.import new file mode 100644 index 0000000..ccb2018 --- /dev/null +++ b/assets/line.wav.import @@ -0,0 +1,24 @@ +[remap] + +importer="wav" +type="AudioStreamWAV" +uid="uid://cqxegg4cbnh2g" +path="res://.godot/imported/line.wav-2436911f20ad973896190845e5033a40.sample" + +[deps] + +source_file="res://assets/line.wav" +dest_files=["res://.godot/imported/line.wav-2436911f20ad973896190845e5033a40.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/entities/test.tscn b/entities/Intro.tscn similarity index 56% rename from entities/test.tscn rename to entities/Intro.tscn index 64ce151..b6ddd85 100644 --- a/entities/test.tscn +++ b/entities/Intro.tscn @@ -1,46 +1,7 @@ [gd_scene load_steps=7 format=3 uid="uid://dfvl3luba7j4"] -[ext_resource type="FontFile" uid="uid://b55n3f2bh16v5" path="res://assets/fonts/Linebeam.ttf" id="2_04cpk"] - -[sub_resource type="GDScript" id="GDScript_axp0a"] -resource_name = "Test" -script/source = "extends Control - -var lines: Array[String] = [ -\"[code]piix4_smbus 00|00:0||0:14.0: SMBus Host Controller at 0xb00, revision 0[/code]\\n\", -\"[code]piix4_smbus 00||00:0|_0:14.0: Using register 0x02 for SMBus port selection[/code]\\n\", -\"[code]i2c: Successfully instantiated SPD at 0x50[/code]\\n\", -\"[code]i2c: Successfully instantiated SPD at 0x51[/code]\\n\", -\"[code]i2c: Successfully instantiated SPD at 0x52[/code]\\n\", -\"[code]cryptd: max_cpu_qlen set to 1000[/code]\\n\", -\"[code]null: receiving encrypted message. Decrypting![/code]\\n\", -\"[code]null: Listen! The only way we can stop the AI now is to [error][/code]\\n\", -\"[code]null: you're our only hope! There's an executable attached, use it to [error][/code]\\n\", -\"[code]null: receiving remote attachment, saving to ~/antidote.bin[/code]\\n\", -\"[code]piix4_smbus 0000:00:14.0: Auxiliary SMBus Host Controller at 0xb20[/code]\\n\", -\"[code]sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver[/code]\\n\", -\"[code]sp5100-tco sp5100-tco: Using 0xfeb00000 for watchdog MMIO address[/code]\\n\", -\"[code]LOADING DEMO[pulse freq=1.0 color=#ffffff40 ease=-2.0]...[/pulse][/code]\\n\", -\"[code]-------------------------------------[/code]\\n\", -\"[code]| AltParty '24 |[/code]\\n\", -\"[code]-------------------------------------[/code]\\n\", -\"\\n\", -\"[code]Minihakkerit 2024[/code]\\n\", -\"[code]Programming & Build tools: XTRA[/code]\\n\", -\"[code]Programming & 3D: GorkaMorka[/code]\\n\", -\"[code]Music & Planning: AUGI[/code]\\n\", -\"[code]Spooling up firewall[pulse freq=1.0 color=#ffffff40 ease=-2.0]........[/pulse][/code]\", -\"[code] Done![/code]\\n\", -\"[code]Entry symbol 0x00007f5653fbcdb9 detected! Attaching[pulse freq=1.0 color=#ffffff40 ease=-2.0]...[/pulse][/code]\", -] - -func _ready() -> void: - $AnimationPlayer.play(\"terminal\"); - -func next_line() -> void: - $Terminal.append_text(lines[0]); - lines.remove_at(0); -" +[ext_resource type="Script" path="res://scripts/intro.gd" id="1_ps5xe"] +[ext_resource type="FontFile" uid="uid://b55n3f2bh16v5" path="res://assets/fonts/Linebeam.ttf" id="2_8yl5p"] [sub_resource type="Animation" id="Animation_dirfa"] length = 0.001 @@ -60,8 +21,8 @@ tracks/0/path = NodePath(".") tracks/0/interp = 1 tracks/0/loop_wrap = true tracks/0/keys = { -"times": PackedFloat32Array(0.533333, 1.16667, 2, 2.06667, 2.1, 2.33333, 2.46667, 2.53333, 2.63333, 2.73333, 2.91327, 2.94791, 3.10277, 5, 7, 7.03333, 7.06667, 7.07814, 7.07933, 7.08075, 7.08422, 7.08726, 7.75495, 9.34944, 9.40845), -"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), +"times": PackedFloat32Array(0.533333, 1.16667, 2, 2.06667, 2.1, 2.33333, 2.46667, 2.53333, 2.63333, 2.73333, 2.91327, 2.94791, 3.10277, 5, 7, 7.03333, 7.06667, 7.07814, 7.07933, 7.08075, 7.08422, 7.08726, 7.73333, 8.13333, 8.23333, 8.3, 8.36667, 9.34944, 9.40845, 9.76667), +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), "values": [{ "args": [], "method": &"next_line" @@ -137,6 +98,21 @@ tracks/0/keys = { }, { "args": [], "method": &"next_line" +}, { +"args": [], +"method": &"next_line" +}, { +"args": [], +"method": &"next_line" +}, { +"args": [], +"method": &"next_line" +}, { +"args": [], +"method": &"next_line" +}, { +"args": [], +"method": &"next_line" }] } @@ -147,14 +123,14 @@ _data = { "terminal": SubResource("Animation_6cb10") } -[node name="Test" type="Control"] +[node name="Intro" type="Control"] layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -script = SubResource("GDScript_axp0a") +script = ExtResource("1_ps5xe") [node name="ColorRect" type="ColorRect" parent="."] layout_mode = 1 @@ -186,7 +162,7 @@ offset_right = -28.0 offset_bottom = -20.0 grow_horizontal = 2 grow_vertical = 2 -theme_override_fonts/mono_font = ExtResource("2_04cpk") +theme_override_fonts/mono_font = ExtResource("2_8yl5p") theme_override_font_sizes/mono_font_size = 35 theme_override_font_sizes/normal_font_size = 24 bbcode_enabled = true diff --git a/entities/kaleido_scope.tscn b/entities/kaleido_scope.tscn index 3847cf5..0cf6a75 100644 --- a/entities/kaleido_scope.tscn +++ b/entities/kaleido_scope.tscn @@ -37,29 +37,38 @@ func _ready() -> void: match shader_name: \"pixelate\": + if OS.is_debug_build(): + print(\"pixelate\"); shaders.remove_at(shaders.find(shader, 0)); - print(\"pixelate\") material.set_shader_parameter(\"x_pixel_size\", randi_range(1, 5)); material.set_shader_parameter(\"y_pixel_size\", randi_range(1, 5)); \"cromatic-abberation\": - print(\"cromatic-abberation\") #Tiiän et täs on typo FFS, en rupee renamaa tiedostoo + if OS.is_debug_build(): + print(\"cromatic-abberation\") #Tiiän et täs on typo FFS, en rupee renamaa tiedostoo material.set_shader_parameter(\"chaos\", randf_range(10.0, 32.0)); material.set_shader_parameter(\"radius\", randf_range(0.3, 1.0)); material.set_shader_parameter(\"attenuation\", randf_range(2.0, 5.0)); \"kaleidoscope\": + if OS.is_debug_build(): + print(\"kaleidoscope\") shaders.remove_at(shaders.find(shader, 0)); - print(\"kaleidoscope\") + var segments: int = randi_range(3, 5); + while segments == 4: + print(\"Segments is 4, rerolling\") + segments = randi_range(3, 5); material.set_shader_parameter(\"segments\", float(randi_range(3, 5))); \"pixelsort\": + if OS.is_debug_build(): + print(\"pixelsort\") shaders.remove_at(shaders.find(shader, 0)); - print(\"pixelsort\") - material.set_shader_parameter(\"sort\", randf_range(0.1, 2.6)); + material.set_shader_parameter(\"sort\", randf_range(0.1, 1.0)); _: - print(\"something else\") + if OS.is_debug_build(): + print(\"something else\") pass materials.push_back(material); diff --git a/scripts/auto_scale.gd b/scripts/auto_scale.gd index 6c0b277..babb1b3 100644 --- a/scripts/auto_scale.gd +++ b/scripts/auto_scale.gd @@ -10,6 +10,4 @@ func _ready() -> void: func resize() -> void: - print("changed") - print(get_tree().get_root().get_viewport().size) (get_parent() as SubViewport).size = get_tree().get_root().get_viewport().size; diff --git a/scripts/intro.gd b/scripts/intro.gd new file mode 100644 index 0000000..98f10da --- /dev/null +++ b/scripts/intro.gd @@ -0,0 +1,48 @@ +extends Control + +var line_sound: AudioStream = preload("res://assets/line.wav"); + +var lines: Array[String] = [ +"[code]piix4_smbus 00|00:0||0:14.0: SMBus Host Controller at 0xb00, revision 0[/code]\n", +"[code]piix4_smbus 00||00:0|_0:14.0: Using register 0x02 for SMBus port selection[/code]\n", +"[code]i2c: Successfully instantiated SPD at 0x50[/code]\n", +"[code]i2c: Successfully instantiated SPD at 0x51[/code]\n", +"[code]i2c: Successfully instantiated SPD at 0x52[/code]\n", +"[code]cryptd: max_cpu_qlen set to 1000[/code]\n", +"[code]null: receiving encrypted message. Decrypting![/code]\n", +"[code]null: Listen! The only way we can stop the AI now is to [error][/code]\n", +"[code]null: you're our only hope! There's an executable attached, use it to [error][/code]\n", +"[code]null: receiving remote attachment, saving to ~/antidote.bin[/code]\n", +"[code]piix4_smbus 0000:00:14.0: Auxiliary SMBus Host Controller at 0xb20[/code]\n", +"[code]sp5100_tco: SP5100/SB800 TCO WatchDog Timer Driver[/code]\n", +"[code]sp5100-tco sp5100-tco: Using 0xfeb00000 for watchdog MMIO address[/code]\n", +"[code]LOADING DEMO[pulse freq=1.0 color=#ffffff40 ease=-2.0]...[/pulse][/code]\n", +"[code]-------------------------------------[/code]\n", +"[code]| AltParty '24 |[/code]\n", +"[code]-------------------------------------[/code]\n", +"\n", +"[code]Minihakkerit 2024[/code]\n", +"[code]Programming & Build tools: XTRA[/code]\n", +"[code]Programming & 3D: GorkaMorka[/code]\n", +"[code]Music & Planning: AUGI[/code]\n", +"[code]Spooling up firewall[pulse freq=1.0 color=#ffffff40 ease=-2.0]........[/pulse][/code]", +"[code] Done![/code]\n", +"[code]Hacking mainframe using secure nmap[pulse freq=1.0 color=#ffffff40 ease=-2.0]...[/pulse][/code]", +"[code] Done![/code]\n", +"[code]Fuel Cells at 50%.[/code]\n", +"[code]ECCOM operational.[/code]\n", +"[code]All systems online.[/code]\n", +"[code]Entry symbol 0x00007f5653fbcdb9 detected! Attaching[pulse freq=1.0 color=#ffffff40 ease=-2.0]...[/pulse][/code]", +] + +func _ready() -> void: + $AnimationPlayer.play("terminal"); + +func next_line() -> void: + var player: AudioStreamPlayer2D = AudioStreamPlayer2D.new(); + player.connect("finished", func() -> void: player.queue_free()); + player.stream = line_sound; + add_child(player); + player.play(); + $Terminal.append_text(lines[0]); + lines.remove_at(0); diff --git a/scripts/manager.gd b/scripts/manager.gd index daed05d..8d0bf34 100644 --- a/scripts/manager.gd +++ b/scripts/manager.gd @@ -1,6 +1,6 @@ extends Manager -var scene1: PackedScene = preload("res://entities/test.tscn"); +var intro: PackedScene = preload("res://entities/Intro.tscn"); var scene2: PackedScene = preload("res://entities/kaleido_scope.tscn"); var scene3: PackedScene = preload("res://entities/balls.tscn"); var credits_scene: PackedScene = preload("res://entities/credits.tscn"); @@ -9,7 +9,7 @@ var credits_scene: PackedScene = preload("res://entities/credits.tscn"); # Called when the node enters the scene tree for the first time. func _ready() -> void: Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN); - register_scene(scene1); + register_scene(intro); register_scene(scene2); register_scene(scene3); register_scene(credits_scene);