From 7a0ea55ff109106abb35174561f6aabe323efe76 Mon Sep 17 00:00:00 2001 From: Henry Date: Mon, 29 Dec 2025 14:00:03 +0000 Subject: [PATCH] Created Parallax2D background nodes from existing starfield background. --- main.tscn | 6 ++- parallax/background stars.png | Bin 0 -> 606 bytes parallax/background stars.png.import | 40 +++++++++++++++ parallax/foreground stars.png | Bin 0 -> 1800 bytes parallax/foreground stars.png.import | 40 +++++++++++++++ parallax/foreground stars_b.png | Bin 0 -> 595 bytes parallax/foreground stars_b.png.import | 40 +++++++++++++++ parallax/midground stars.png | Bin 0 -> 585 bytes parallax/midground stars.png.import | 40 +++++++++++++++ parallax_starfield.tscn | 66 +++++++++++++++++++++++++ 10 files changed, 231 insertions(+), 1 deletion(-) create mode 100644 parallax/background stars.png create mode 100644 parallax/background stars.png.import create mode 100644 parallax/foreground stars.png create mode 100644 parallax/foreground stars.png.import create mode 100644 parallax/foreground stars_b.png create mode 100644 parallax/foreground stars_b.png.import create mode 100644 parallax/midground stars.png create mode 100644 parallax/midground stars.png.import create mode 100644 parallax_starfield.tscn diff --git a/main.tscn b/main.tscn index 0f56aad..a845595 100644 --- a/main.tscn +++ b/main.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=13 format=3 uid="uid://cc2dnhuv4qx7m"] +[gd_scene load_steps=14 format=3 uid="uid://cc2dnhuv4qx7m"] [ext_resource type="Script" uid="uid://c51huloycn5as" path="res://main.gd" id="1_h2yge"] [ext_resource type="Texture2D" uid="uid://jj8b7vqj3ihx" path="res://Mini Pixel Pack 3/Space_BG (2 frames) (64 x 64).png" id="1_ig7tw"] +[ext_resource type="PackedScene" uid="uid://tlcdxoupi2lb" path="res://parallax_starfield.tscn" id="2_5vw27"] [ext_resource type="PackedScene" uid="uid://s6wf3egdqtmh" path="res://ui.tscn" id="4_1bvp3"] [ext_resource type="Texture2D" uid="uid://db2v7dea5wi4" path="res://title - no border.png" id="4_7mycd"] [ext_resource type="Shader" uid="uid://x02irwg8ynvp" path="res://pixel_highlight.gdshader" id="4_272bh"] @@ -60,7 +61,10 @@ shader_parameter/pixelate_line = 0 [node name="Main" type="Node2D"] script = ExtResource("1_h2yge") +[node name="Parallax Starfield" parent="." instance=ExtResource("2_5vw27")] + [node name="background" type="Sprite2D" parent="."] +visible = false z_index = -4 texture_repeat = 2 material = SubResource("ShaderMaterial_5vw27") diff --git a/parallax/background stars.png b/parallax/background stars.png new file mode 100644 index 0000000000000000000000000000000000000000..88cf45920ae26370428684a999a62c8054a894f5 GIT binary patch literal 606 zcmV-k0-^nhP)n>TNM zsrm7GZzS0&TSbYDUkm;Mw#r&5A|-3K#D?iPZ{E~M=G@LbpZmS{obEjrT+xh{HS2tk z%@vHucu1L>Ur-ueannf?K|HEv>Lb(BVXE5aJvDZ`?XzoDKliUS#}lRoHI2fNQy;dU*p#)Z#>dkwju@SUy49DcDm=Ct~OyM^^0S_SW6pOVR<>; zY-U9(-^YH5JCU26k=P~PiAjWULMTi!#wY;>7?L?aAAb5}MU{MCDSwK*2cdENXQ2%UM@7>U_4aF_X`Z}_#;xW`d!DX(J zpFf1)hv-`s&3gc?8*qMA(PF!Bu?ZcIx@xE;saD*TOv2kKw9JF&2AUR~o|X4Gd4TA; zeAPAV?L&{8Z(aHUk>qFjn6LsD00009a7bBm000XU000XU0RWnu7ytkOgh@m}RCt{2 z+_4RVKnw-YD^sJakSfDar(zjaU0Guy<-%h``0000000000 s0B|Ti**QGf8vp=+|D>lK-!bj_2lS*HW@uSs;{X5v07*qoM6N<$f|xr2zyJUM literal 0 HcmV?d00001 diff --git a/parallax/background stars.png.import b/parallax/background stars.png.import new file mode 100644 index 0000000..aa8a6ad --- /dev/null +++ b/parallax/background stars.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bn5iw6fm88p2i" +path="res://.godot/imported/background stars.png-844e616782bec8464721a90faeb774cb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://parallax/background stars.png" +dest_files=["res://.godot/imported/background stars.png-844e616782bec8464721a90faeb774cb.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 diff --git a/parallax/foreground stars.png b/parallax/foreground stars.png new file mode 100644 index 0000000000000000000000000000000000000000..6aeb5e0383d92ac631479072196555d7e6f031a2 GIT binary patch literal 1800 zcmeAS@N?(olHy`uVBq!ia0vp^*+8tw!3HGn)r0~mmN}Ur5hW46K32*3xq68y`AMmI z6}bgKc?Jd>`-+0Z0VfjnEKjFOT9D}DX)@^Za$W4-*MbbUihOG|wNBYh(y zU7!lx;>x^|#0uTKVr7sK5Hnm-i<65o3raHc^Atd4CMM;Vme?vO0p%5-hL>cfAxzIJ zhI$_u5c(h)eM3D1ePrdS6`44cgJdw27i8p@lNSx_8OS&*t9lvvnXXk*T{Itv*pj>f~yOV;atFxJ*rJ0$oksibtV6<5Q^=773x+InWRT&u=nd%xE z=^9yv7#dj_n^+lIM1k!CD+FeQl*E!mJW4?+S-}RV*w@#}BeS?9zo-%{1WDe(sf7?8 zgqxEIPS*+w;MlcFOa=wEtx`czeoAR_Y6{q1pm7k{;{3Fd^2DN4$8=!C+A2AwrDX!6 zrBcCI&p;0nHE^Zn8L2>HuzE!w>Kc7e?t(eTMjyk$Hedxv*%7D@A_mOn!16*LUSI$@ z@FFKQ4_M9=0SlCSGHhB542%t#zzDzycm@WIiKP?IYr6!B9Jgl^RL;`T(TS4^%jlVP z%uSNh)H8WX{A~05x|KgaR^_YQ)QWcP?2YIC$F%KKl%|qu_O>H!FD>)$UGaE!=bY{Q z-+RB$d1osgbFpWd>Fb&aXGMEXRCvss9UmYSS9sY|*wJQH+AHPDmlIdrdTwi4w&(5U z>`?pf>rIafFJm+9J#=_ho=A&&%i-0mcb~~VEYn?kto3|LHSf*^ALgz-E>pMB^67`| zXWdMUxYn5^s($TG-XGyD9hq2Zc`ql;Rr~(&x=!nfv*%8{p?a^=v!&2U!^h~D1|yrq zBufYRx?icTQ)}Wi>$~w zodf>oM83a!VFT|`-P6CUHm!MNc*X8u>bgnu?OPtSzlat+Tg|Xmx}YxfV$$w{jhwRm zyRufOt_-^~)#uP{%`In|pR>&pn>%mncgxC#7rSb%n!b7K+&?Ej_7~&CC+R6=R{^FJ@q_tr|Caw{p~?Gm}eTJ`e|d-*@?Pn9)Zb8FF_d*Ao1dpUjU zHjUR}sqZ(+*q*v~{`=gvZ@-(Lp14$<`+UJN{;Gwg-dCzuZ4md^x?<%aCQw}k0Y7UQ Xxtz_}*K~F9fdo8V{an^LB{Ts5wqkcB literal 0 HcmV?d00001 diff --git a/parallax/foreground stars.png.import b/parallax/foreground stars.png.import new file mode 100644 index 0000000..8f9b53a --- /dev/null +++ b/parallax/foreground stars.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dpkeiihfos28m" +path="res://.godot/imported/foreground stars.png-ac6421cf56a60f87749797466fb3036c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://parallax/foreground stars.png" +dest_files=["res://.godot/imported/foreground stars.png-ac6421cf56a60f87749797466fb3036c.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 diff --git a/parallax/foreground stars_b.png b/parallax/foreground stars_b.png new file mode 100644 index 0000000000000000000000000000000000000000..c38b9cf6ec211dbd36f81d7f1dae2c78ff634ffc GIT binary patch literal 595 zcmV-Z0<8UsP)n>TNM zsrm7GZzS0&TSbYDUkm;Mw#r&5A|-3K#D?iPZ{E~M=G@LbpZmS{obEjrT+xh{HS2tk z%@vHucu1L>Ur-ueannf?K|HEv>Lb(BVXE5aJvDZ`?XzoDKliUS#}lRoHI2fNQy;dU*p#)Z#>dkwju@SUy49DcDm=Ct~OyM^^0S_SW6pOVR<>; zY-U9(-^YH5JCU26k=P~PiAjWULMTi!#wY;>7?L?aAAb5}MU{MCDSwK*2cdENXQ2%UM@7>U_4aF_X`Z}_#;xW`d!DX(J zpFf1)hv-`s&3gc?8*qMA(PF!Bu?ZcIx@xE;saD*TOv2kKw9JF&2AUR~o|X4Gd4TA; zeAPAV?L&{8Z(aHUk>qFjn6LsD00009a7bBm000XU000XU0RWnu7ytkOc}YY;R9J=W z*0BwMAP`333l&jEupzNw0Xk=(x3RHj8WwUG9OG<^v9lE7`>HER{=5W{i|c|4+K{7V ztjZbJ1n>TNM zsrm7GZzS0&TSbYDUkm;Mw#r&5A|-3K#D?iPZ{E~M=G@LbpZmS{obEjrT+xh{HS2tk z%@vHucu1L>Ur-ueannf?K|HEv>Lb(BVXE5aJvDZ`?XzoDKliUS#}lRoHI2fNQy;dU*p#)Z#>dkwju@SUy49DcDm=Ct~OyM^^0S_SW6pOVR<>; zY-U9(-^YH5JCU26k=P~PiAjWULMTi!#wY;>7?L?aAAb5}MU{MCDSwK*2cdENXQ2%UM@7>U_4aF_X`Z}_#;xW`d!DX(J zpFf1)hv-`s&3gc?8*qMA(PF!Bu?ZcIx@xE;saD*TOv2kKw9JF&2AUR~o|X4Gd4TA; zeAPAV?L&{8Z(aHUk>qFjn6LsD00009a7bBm000XU000XU0RWnu7ytkOZ%IT!RA_h>mn6w{R`}SE?X27{ z!Zi~N000000002qTc+Jpy~Q%^^}LNGTqD5%;IGX&x=w+i=do{?bJSzKb`SUSdIx&} XaH$vY9Oi%+00000NkvXXu0mjf>j?mr literal 0 HcmV?d00001 diff --git a/parallax/midground stars.png.import b/parallax/midground stars.png.import new file mode 100644 index 0000000..2acf07c --- /dev/null +++ b/parallax/midground stars.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c855276xbf7g6" +path="res://.godot/imported/midground stars.png-6f7b61cb3d46b7ae23c01472332a96f4.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://parallax/midground stars.png" +dest_files=["res://.godot/imported/midground stars.png-6f7b61cb3d46b7ae23c01472332a96f4.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 diff --git a/parallax_starfield.tscn b/parallax_starfield.tscn new file mode 100644 index 0000000..fa61075 --- /dev/null +++ b/parallax_starfield.tscn @@ -0,0 +1,66 @@ +[gd_scene load_steps=5 format=3 uid="uid://tlcdxoupi2lb"] + +[ext_resource type="Texture2D" uid="uid://dpkeiihfos28m" path="res://parallax/foreground stars.png" id="1_1f8kc"] +[ext_resource type="Texture2D" uid="uid://4n7q1wsq13ub" path="res://parallax/foreground stars_b.png" id="2_mewf1"] +[ext_resource type="Texture2D" uid="uid://c855276xbf7g6" path="res://parallax/midground stars.png" id="2_xwl8n"] +[ext_resource type="Texture2D" uid="uid://bn5iw6fm88p2i" path="res://parallax/background stars.png" id="3_mewf1"] + +[node name="Parallax Starfield" type="Node2D"] + +[node name="Foreground Stars" type="Parallax2D" parent="."] +scroll_scale = Vector2(1.5, 1) +scroll_offset = Vector2(52, 11) +repeat_size = Vector2(0, 128) +autoscroll = Vector2(0, 9) +repeat_times = 5 + +[node name="Sprite2D" type="Sprite2D" parent="Foreground Stars"] +modulate = Color(0.6524728, 0.65247285, 0.6524728, 1) +texture_repeat = 2 +position = Vector2(89, 133) +texture = ExtResource("1_1f8kc") +region_enabled = true +region_rect = Rect2(0, 0, 128, 32) + +[node name="Foreground Stars_b" type="Parallax2D" parent="."] +repeat_size = Vector2(0, 320) +autoscroll = Vector2(0, 7) +repeat_times = 5 + +[node name="Sprite2D" type="Sprite2D" parent="Foreground Stars_b"] +modulate = Color(0.71867925, 0.71867925, 0.71867925, 1) +texture_repeat = 2 +position = Vector2(151, 59) +texture = ExtResource("2_mewf1") +region_enabled = true +region_rect = Rect2(0, 0, 128, 32) + +[node name="Midground Stars" type="Parallax2D" parent="."] +scroll_scale = Vector2(0.75, 1) +repeat_size = Vector2(0, 320) +autoscroll = Vector2(0, 5) + +[node name="Sprite2D" type="Sprite2D" parent="Midground Stars"] +texture_repeat = 2 +position = Vector2(120, 160) +texture = ExtResource("2_xwl8n") +region_enabled = true +region_rect = Rect2(0, 0, 240, 320) + +[node name="Background Stars" type="Parallax2D" parent="."] +scroll_scale = Vector2(-1, 1) +repeat_size = Vector2(0, 320) +autoscroll = Vector2(0, 2) + +[node name="Sprite2D" type="Sprite2D" parent="Background Stars"] +texture_repeat = 2 +position = Vector2(120, 160) +texture = ExtResource("3_mewf1") +region_enabled = true +region_rect = Rect2(0, 0, 240, 320) + +[node name="ColorRect" type="ColorRect" parent="."] +z_index = -5 +offset_right = 239.0 +offset_bottom = 323.0 +color = Color(0, 0, 0, 1)