diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..8ad74f7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# Normalize EOL for all files that Git considers text files. +* text=auto eol=lf diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4709183 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Godot 4+ specific ignores +.godot/ diff --git a/data/UI/themes/fonts/futur.ttf b/data/UI/themes/fonts/futur.ttf new file mode 100644 index 0000000..cde2c37 Binary files /dev/null and b/data/UI/themes/fonts/futur.ttf differ diff --git a/data/UI/themes/fonts/futur.ttf.import b/data/UI/themes/fonts/futur.ttf.import new file mode 100644 index 0000000..409f432 --- /dev/null +++ b/data/UI/themes/fonts/futur.ttf.import @@ -0,0 +1,33 @@ +[remap] + +importer="font_data_dynamic" +type="FontFile" +uid="uid://iy224o7xv23a" +path="res://.godot/imported/futur.ttf-5ae77be55f06ad4564ec081965d18aff.fontdata" + +[deps] + +source_file="res://data/UI/themes/fonts/futur.ttf" +dest_files=["res://.godot/imported/futur.ttf-5ae77be55f06ad4564ec081965d18aff.fontdata"] + +[params] + +Rendering=null +antialiasing=1 +generate_mipmaps=false +multichannel_signed_distance_field=false +msdf_pixel_range=8 +msdf_size=48 +allow_system_fallback=true +force_autohinter=false +hinting=1 +subpixel_positioning=1 +oversampling=0.0 +Fallbacks=null +fallbacks=[] +Compress=null +compress=true +preload=[] +language_support={} +script_support={} +opentype_features={} diff --git a/export_presets.cfg b/export_presets.cfg new file mode 100644 index 0000000..6814e1a --- /dev/null +++ b/export_presets.cfg @@ -0,0 +1,49 @@ +[preset.0] + +name="Windows Desktop" +platform="Windows Desktop" +runnable=true +custom_features="" +export_filter="all_resources" +include_filter="" +exclude_filter="" +export_path="./totallynotroblox.exe" +encryption_include_filters="" +encryption_exclude_filters="" +encrypt_pck=false +encrypt_directory=false +script_export_mode=1 +script_encryption_key="" + +[preset.0.options] + +custom_template/debug="" +custom_template/release="" +debug/export_console_script=0 +binary_format/embed_pck=true +texture_format/bptc=false +texture_format/s3tc=true +texture_format/etc=false +texture_format/etc2=false +texture_format/no_bptc_fallbacks=true +binary_format/architecture="x86_64" +codesign/enable=false +codesign/identity_type=0 +codesign/identity="" +codesign/password="" +codesign/timestamp=true +codesign/timestamp_server_url="" +codesign/digest_algorithm=1 +codesign/description="" +codesign/custom_options=PackedStringArray() +application/modify_resources=true +application/icon="" +application/console_wrapper_icon="" +application/icon_interpolation=4 +application/file_version="" +application/product_version="" +application/company_name="" +application/product_name="" +application/file_description="" +application/copyright="" +application/trademarks="" diff --git a/icon.svg b/icon.svg new file mode 100644 index 0000000..adc26df --- /dev/null +++ b/icon.svg @@ -0,0 +1 @@ + diff --git a/icon.svg.import b/icon.svg.import new file mode 100644 index 0000000..9d310aa --- /dev/null +++ b/icon.svg.import @@ -0,0 +1,37 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bvmqi5axq27he" +path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://icon.svg" +dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +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 +svg/scale=1.0 +editor/scale_with_editor_scale=false +editor/convert_colors_with_editor_theme=false diff --git a/models/bloxiann.obj b/models/bloxiann.obj new file mode 100644 index 0000000..a760f00 --- /dev/null +++ b/models/bloxiann.obj @@ -0,0 +1,504 @@ +# Blender v3.4.1 OBJ File: 'bloxiann.blend' +# www.blender.org +mtllib bloxiann.mtl +o Cube +v 0.400000 -1.000000 -0.800000 +v 0.400000 -1.000000 0.800000 +v -0.400000 -1.000000 -0.800000 +v -0.400000 -1.000000 0.800000 +v 0.345857 0.440000 -0.451714 +v 0.400000 0.343088 -0.576152 +v 0.384142 0.411615 -0.533015 +v 0.345857 0.440000 0.451714 +v 0.400000 0.343088 0.576152 +v 0.384142 0.411615 0.533015 +v -0.345857 0.440000 -0.451714 +v -0.400000 0.343088 -0.576152 +v -0.384142 0.411615 -0.533015 +v -0.345857 0.440000 0.451714 +v -0.400000 0.343088 0.576152 +v -0.384142 0.411615 0.533015 +vt 0.375000 0.750000 +vt 0.608175 0.750000 +vt 0.608175 1.000000 +vt 0.375000 1.000000 +vt 0.375000 0.000000 +vt 0.608175 0.000000 +vt 0.608175 0.250000 +vt 0.375000 0.250000 +vt 0.125000 0.500000 +vt 0.375000 0.500000 +vt 0.125000 0.750000 +vt 0.641920 0.524171 +vt 0.858080 0.524171 +vt 0.858080 0.725829 +vt 0.641920 0.725829 +vt 0.608175 0.500000 +vt 0.870044 0.750000 +vt 0.629956 0.750000 +vt 0.625000 0.754956 +vt 0.625000 0.995044 +vt 0.625000 0.743977 +vt 0.625000 0.506024 +vt 0.875000 0.506024 +vt 0.875000 0.743977 +vt 0.625000 0.006024 +vt 0.625000 0.243977 +vt 0.629956 0.500000 +vt 0.870044 0.500000 +vt 0.625000 0.254956 +vt 0.625000 0.495044 +vn 0.0000 0.1644 0.9864 +vn 0.0000 0.3432 0.9393 +vn -1.0000 0.0000 0.0000 +vn -0.9965 0.0840 0.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.9824 -0.1868 +vn 0.0000 0.9824 0.1868 +vn 1.0000 0.0000 0.0000 +vn 0.9965 0.0840 0.0000 +vn 0.0000 0.9441 0.3296 +vn 0.0000 0.5327 0.8463 +vn 0.5956 0.8033 0.0000 +vn 0.9743 0.2255 0.0000 +vn -0.5956 0.8033 0.0000 +vn -0.9743 0.2255 0.0000 +vn 0.0000 0.9441 -0.3296 +vn 0.0000 0.5327 -0.8463 +vn 0.0000 0.3432 -0.9393 +vn 0.0000 0.1644 -0.9864 +usemtl Material +s 1 +f 2/1/1 9/2/2 15/3/2 4/4/1 +f 4/5/3 15/6/4 12/7/4 3/8/3 +f 3/9/5 1/10/5 2/1/5 4/11/5 +f 5/12/6 11/13/6 14/14/7 8/15/7 +f 1/10/8 6/16/9 9/2/9 2/1/8 +f 8/15/7 14/14/7 16/17/10 10/18/10 +f 10/19/11 16/20/11 15/3/2 9/2/2 +f 5/12/12 8/15/12 10/21/12 7/22/12 +f 7/22/13 10/21/13 9/2/9 6/16/9 +f 14/14/14 11/13/14 13/23/14 16/24/14 +f 16/25/15 13/26/15 12/7/4 15/6/4 +f 11/13/6 5/12/6 7/27/16 13/28/16 +f 13/29/17 7/30/17 6/16/18 12/7/18 +f 3/8/19 12/7/18 6/16/18 1/10/19 +o Cube.001 +v -0.400000 -1.000000 -0.829412 +v -0.400000 -0.600000 -0.829412 +v -0.400000 -1.000000 -1.570588 +v 0.400000 -1.000000 -0.829412 +v 0.400000 -0.600000 -0.829412 +v 0.400000 -1.000000 -1.570588 +v -0.400000 -0.600000 -1.192839 +v -0.400000 -0.799868 -1.570588 +v 0.400000 -0.799868 -1.570588 +v 0.400000 -0.600000 -1.192839 +vt 0.375000 0.250000 +vt 0.500083 0.250000 +vt 0.500083 0.500000 +vt 0.375000 0.500000 +vt 0.625000 0.627416 +vt 0.625000 0.750000 +vt 0.375000 0.750000 +vt 0.625000 1.000000 +vt 0.375000 1.000000 +vt 0.125000 0.500000 +vt 0.125000 0.750000 +vt 0.375000 0.000000 +vt 0.625000 0.000000 +vt 0.625000 0.122584 +vt 0.625000 0.250000 +vt 0.625000 0.500000 +vt 0.875000 0.627416 +vt 0.875000 0.750000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.8839 -0.4677 +vn 0.0000 1.0000 0.0000 +usemtl None +s off +f 19/31/20 24/32/20 25/33/20 22/34/20 +f 22/34/21 25/33/21 26/35/21 21/36/21 20/37/21 +f 20/37/22 21/36/22 18/38/22 17/39/22 +f 19/40/23 22/34/23 20/37/23 17/41/23 +f 17/42/24 18/43/24 23/44/24 24/32/24 19/31/24 +f 23/45/25 26/46/25 25/33/25 24/32/25 +f 26/35/26 23/47/26 18/48/26 21/36/26 +o Cube.003 +v -0.400000 -3.000000 0.900000 +v -0.400000 -2.600000 0.900000 +v 0.600000 -3.000000 0.900000 +v -0.400000 -3.000000 0.100000 +v -0.400000 -2.600000 0.100000 +v 0.600000 -3.000000 0.100000 +v 0.090338 -2.600000 0.900000 +v 0.600000 -2.799868 0.900000 +v 0.600000 -2.799868 0.100000 +v 0.090338 -2.600000 0.100000 +vt 0.375000 0.250000 +vt 0.375000 0.500000 +vt 0.500083 0.500000 +vt 0.500083 0.250000 +vt 0.375000 0.750000 +vt 0.625000 0.750000 +vt 0.625000 0.627416 +vt 0.375000 1.000000 +vt 0.625000 1.000000 +vt 0.125000 0.500000 +vt 0.125000 0.750000 +vt 0.375000 0.000000 +vt 0.625000 0.122584 +vt 0.625000 0.000000 +vt 0.625000 0.250000 +vt 0.625000 0.500000 +vt 0.875000 0.750000 +vt 0.875000 0.627416 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +vn 0.0000 -1.0000 0.0000 +vn -0.0000 0.0000 1.0000 +vn 0.3651 0.9310 0.0000 +vn 0.0000 1.0000 0.0000 +usemtl None +s off +f 29/49/27 32/50/27 35/51/27 34/52/27 +f 32/50/28 30/53/28 31/54/28 36/55/28 35/51/28 +f 30/53/29 27/56/29 28/57/29 31/54/29 +f 29/58/30 27/59/30 30/53/30 32/50/30 +f 27/60/31 29/49/31 34/52/31 33/61/31 28/62/31 +f 33/63/32 34/52/32 35/51/32 36/64/32 +f 36/55/33 31/54/33 28/65/33 33/66/33 +o Cube.004 +v -0.400000 -3.000000 -0.095000 +v -0.400000 -2.600000 -0.095000 +v 0.600000 -3.000000 -0.095000 +v -0.400000 -3.000000 -0.905000 +v -0.400000 -2.600000 -0.905000 +v 0.600000 -3.000000 -0.905000 +v 0.090338 -2.600000 -0.095000 +v 0.600000 -2.799868 -0.095000 +v 0.600000 -2.799868 -0.905000 +v 0.090338 -2.600000 -0.905000 +vt 0.375000 0.250000 +vt 0.375000 0.500000 +vt 0.500083 0.500000 +vt 0.500083 0.250000 +vt 0.375000 0.750000 +vt 0.625000 0.750000 +vt 0.625000 0.627416 +vt 0.375000 1.000000 +vt 0.625000 1.000000 +vt 0.125000 0.500000 +vt 0.125000 0.750000 +vt 0.375000 0.000000 +vt 0.625000 0.122584 +vt 0.625000 0.000000 +vt 0.625000 0.250000 +vt 0.625000 0.500000 +vt 0.875000 0.750000 +vt 0.875000 0.627416 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn -1.0000 0.0000 -0.0000 +vn 0.0000 -1.0000 0.0000 +vn -0.0000 -0.0000 1.0000 +vn 0.3651 0.9310 0.0000 +vn 0.0000 1.0000 0.0000 +usemtl None +s off +f 39/67/34 42/68/34 45/69/34 44/70/34 +f 42/68/35 40/71/35 41/72/35 46/73/35 45/69/35 +f 40/71/36 37/74/36 38/75/36 41/72/36 +f 39/76/37 37/77/37 40/71/37 42/68/37 +f 37/78/38 39/67/38 44/70/38 43/79/38 38/80/38 +f 43/81/39 44/70/39 45/69/39 46/82/39 +f 46/73/40 41/72/40 38/83/40 43/84/40 +o Cylinder +v -0.000000 0.440000 -0.331571 +v 0.000000 0.595608 -0.500000 +v -0.000000 0.485577 -0.450668 +v 0.000000 1.440000 -0.331571 +v 0.000000 1.284392 -0.500000 +v 0.000000 1.394423 -0.450668 +v 0.234456 0.440000 -0.234456 +v 0.353553 0.595608 -0.353553 +v 0.318671 0.485577 -0.318671 +v 0.234456 1.440000 -0.234456 +v 0.353553 1.284392 -0.353553 +v 0.318671 1.394423 -0.318671 +v 0.331571 0.440000 -0.000000 +v 0.500000 0.595608 0.000000 +v 0.450668 0.485577 -0.000000 +v 0.331571 1.440000 0.000000 +v 0.500000 1.284392 0.000000 +v 0.450668 1.394423 0.000000 +v 0.234456 0.440000 0.234456 +v 0.353553 0.595608 0.353553 +v 0.318671 0.485577 0.318671 +v 0.234456 1.440000 0.234456 +v 0.353553 1.284392 0.353553 +v 0.318671 1.394423 0.318671 +v 0.000000 0.440000 0.331571 +v 0.000000 0.595608 0.500000 +v 0.000000 0.485577 0.450668 +v -0.000000 1.440000 0.331571 +v 0.000000 1.284392 0.500000 +v -0.000000 1.394423 0.450668 +v -0.234456 0.440000 0.234456 +v -0.353553 0.595608 0.353553 +v -0.318671 0.485577 0.318671 +v -0.234456 1.440000 0.234456 +v -0.353553 1.284392 0.353553 +v -0.318671 1.394423 0.318671 +v -0.331571 0.440000 0.000000 +v -0.500000 0.595608 0.000000 +v -0.450668 0.485577 0.000000 +v -0.331571 1.440000 -0.000000 +v -0.500000 1.284392 0.000000 +v -0.450668 1.394423 -0.000000 +v -0.234456 0.440000 -0.234456 +v -0.353553 0.595608 -0.353553 +v -0.318671 0.485577 -0.318671 +v -0.234456 1.440000 -0.234456 +v -0.353553 1.284392 -0.353553 +v -0.318671 1.394423 -0.318671 +vt 0.125000 0.577804 +vt 0.125000 0.922196 +vt 0.000000 0.922196 +vt 0.000000 0.577804 +vt 0.750000 0.577804 +vt 0.750000 0.922196 +vt 0.625000 0.922196 +vt 0.625000 0.577804 +vt 0.500000 0.922196 +vt 0.500000 0.577804 +vt 0.375000 0.922196 +vt 0.375000 0.577804 +vt 0.250000 0.922196 +vt 0.250000 0.577804 +vt 0.875000 0.577804 +vt 0.875000 0.922196 +vt 0.362539 0.362539 +vt 0.250000 0.409154 +vt 0.137461 0.362539 +vt 0.090846 0.250000 +vt 0.137461 0.137461 +vt 0.250000 0.090846 +vt 0.362539 0.137461 +vt 0.409154 0.250000 +vt 1.000000 0.577804 +vt 1.000000 0.922196 +vt 0.881166 0.500000 +vt 0.993834 0.500000 +vt 0.758372 0.486532 +vt 0.911334 0.423173 +vt 0.862539 0.362539 +vt 0.750000 0.409154 +vt 0.993834 1.000000 +vt 0.881166 1.000000 +vt 0.411334 0.423173 +vt 0.258372 0.486532 +vt 0.756166 0.500000 +vt 0.868834 0.500000 +vt 0.923173 0.411334 +vt 0.986532 0.258372 +vt 0.909154 0.250000 +vt 0.868833 1.000000 +vt 0.756166 1.000000 +vt 0.486532 0.258372 +vt 0.423173 0.411334 +vt 0.631166 0.500000 +vt 0.743833 0.500000 +vt 0.986532 0.241628 +vt 0.923173 0.088666 +vt 0.862539 0.137461 +vt 0.743833 1.000000 +vt 0.631166 1.000000 +vt 0.423173 0.088666 +vt 0.486532 0.241628 +vt 0.506166 0.500000 +vt 0.618834 0.500000 +vt 0.911334 0.076827 +vt 0.758372 0.013468 +vt 0.750000 0.090846 +vt 0.618833 1.000000 +vt 0.506166 1.000000 +vt 0.258372 0.013468 +vt 0.411334 0.076827 +vt 0.381166 0.500000 +vt 0.493834 0.500000 +vt 0.741628 0.013468 +vt 0.588666 0.076827 +vt 0.637461 0.137461 +vt 0.493834 1.000000 +vt 0.381166 1.000000 +vt 0.088666 0.076827 +vt 0.241628 0.013468 +vt 0.256166 0.500000 +vt 0.368834 0.500000 +vt 0.576827 0.088666 +vt 0.513468 0.241628 +vt 0.590846 0.250000 +vt 0.368834 1.000000 +vt 0.256166 1.000000 +vt 0.013468 0.241628 +vt 0.076827 0.088666 +vt 0.131166 0.500000 +vt 0.243834 0.500000 +vt 0.513468 0.258372 +vt 0.576827 0.411334 +vt 0.637461 0.362539 +vt 0.243834 1.000000 +vt 0.131166 1.000000 +vt 0.076827 0.411334 +vt 0.013468 0.258372 +vt 0.006166 0.500000 +vt 0.118834 0.500000 +vt 0.588666 0.423173 +vt 0.741628 0.486532 +vt 0.118834 1.000000 +vt 0.006166 1.000000 +vt 0.241628 0.486532 +vt 0.088666 0.423173 +vn -0.6929 -0.1994 -0.6929 +vn -0.6929 0.1994 -0.6929 +vn 0.0000 0.1994 -0.9799 +vn 0.0000 -0.1994 -0.9799 +vn 0.9799 -0.1994 0.0000 +vn 0.9799 0.1994 0.0000 +vn 0.6929 0.1994 0.6929 +vn 0.6929 -0.1994 0.6929 +vn 0.0000 0.1994 0.9799 +vn 0.0000 -0.1994 0.9799 +vn -0.6929 0.1994 0.6929 +vn -0.6929 -0.1994 0.6929 +vn -0.9799 0.1994 0.0000 +vn -0.9799 -0.1994 0.0000 +vn 0.6929 -0.1994 -0.6929 +vn 0.6929 0.1994 -0.6929 +vn 0.1590 0.9744 -0.1590 +vn 0.0000 0.9744 -0.2248 +vn -0.1590 0.9744 -0.1590 +vn -0.2248 0.9744 -0.0000 +vn -0.1590 0.9744 0.1590 +vn 0.0000 0.9744 0.2248 +vn 0.1590 0.9744 0.1590 +vn 0.2248 0.9744 0.0000 +vn 0.5169 -0.6824 -0.5169 +vn 0.0000 -0.6824 -0.7310 +vn 0.1590 -0.9744 -0.1590 +vn -0.0000 -0.9744 -0.2248 +vn -0.0000 0.6824 -0.7310 +vn 0.5169 0.6824 -0.5169 +vn 0.7310 -0.6824 -0.0000 +vn 0.2248 -0.9744 -0.0000 +vn 0.7310 0.6824 0.0000 +vn 0.5169 -0.6824 0.5169 +vn 0.1590 -0.9744 0.1590 +vn 0.5169 0.6824 0.5169 +vn 0.0000 -0.6824 0.7310 +vn 0.0000 -0.9744 0.2248 +vn 0.0000 0.6824 0.7310 +vn -0.5169 -0.6824 0.5169 +vn -0.1590 -0.9744 0.1590 +vn -0.5169 0.6824 0.5169 +vn -0.7310 -0.6824 0.0000 +vn -0.2248 -0.9744 0.0000 +vn -0.7310 0.6824 -0.0000 +vn -0.5169 -0.6824 -0.5169 +vn -0.1590 -0.9744 -0.1590 +vn -0.5169 0.6824 -0.5169 +usemtl None +s 1 +f 90/85/41 93/86/42 51/87/43 48/88/44 +f 60/89/45 63/90/46 69/91/47 66/92/48 +f 66/92/48 69/91/47 75/93/49 72/94/50 +f 72/94/50 75/93/49 81/95/51 78/96/52 +f 78/96/52 81/95/51 87/97/53 84/98/54 +f 84/98/54 87/97/53 93/86/42 90/85/41 +f 54/99/55 57/100/56 63/90/46 60/89/45 +f 56/101/57 50/102/58 92/103/59 86/104/60 80/105/61 74/106/62 68/107/63 62/108/64 +f 48/109/44 51/110/43 57/100/56 54/99/55 +f 48/109/44 54/99/55 55/111/65 49/112/66 +f 49/113/66 55/114/65 53/115/67 47/116/68 +f 57/100/56 51/110/43 52/117/69 58/118/70 +f 58/119/70 52/120/69 50/102/58 56/101/57 +f 54/99/55 60/89/45 61/121/71 55/122/65 +f 55/123/65 61/124/71 59/125/72 53/115/67 +f 63/90/46 57/100/56 58/126/70 64/127/73 +f 64/128/73 58/129/70 56/101/57 62/108/64 +f 60/89/45 66/92/48 67/130/74 61/131/71 +f 61/132/71 67/133/74 65/134/75 59/125/72 +f 69/91/47 63/90/46 64/135/73 70/136/76 +f 70/137/76 64/138/73 62/108/64 68/107/63 +f 66/92/48 72/94/50 73/139/77 67/140/74 +f 67/141/74 73/142/77 71/143/78 65/134/75 +f 75/93/49 69/91/47 70/144/76 76/145/79 +f 76/146/79 70/147/76 68/107/63 74/106/62 +f 72/94/50 78/96/52 79/148/80 73/149/77 +f 73/150/77 79/151/80 77/152/81 71/143/78 +f 81/95/51 75/93/49 76/153/79 82/154/82 +f 82/155/82 76/156/79 74/106/62 80/105/61 +f 78/96/52 84/98/54 85/157/83 79/158/80 +f 79/159/80 85/160/83 83/161/84 77/152/81 +f 87/97/53 81/95/51 82/162/82 88/163/85 +f 88/164/85 82/165/82 80/105/61 86/104/60 +f 84/98/54 90/85/41 91/166/86 85/167/83 +f 85/168/83 91/169/86 89/170/87 83/161/84 +f 93/86/42 87/97/53 88/171/85 94/172/88 +f 94/173/88 88/174/85 86/104/60 92/103/59 +f 90/85/41 48/88/44 49/175/66 91/176/86 +f 91/177/86 49/178/66 47/116/68 89/170/87 +f 51/87/43 93/86/42 94/179/88 52/180/69 +f 52/181/69 94/182/88 92/103/59 50/102/58 +f 47/116/68 53/115/67 59/125/72 65/134/75 71/143/78 77/152/81 83/161/84 89/170/87 +o Cube.002_Cube.006 +v -0.400000 -1.000000 0.829412 +v -0.400000 -0.600000 0.829412 +v -0.400000 -1.000000 1.570588 +v 0.400000 -1.000000 0.829412 +v 0.400000 -0.600000 0.829412 +v 0.400000 -1.000000 1.570588 +v -0.400000 -0.600000 1.192839 +v -0.400000 -0.799868 1.570588 +v 0.400000 -0.799868 1.570588 +v 0.400000 -0.600000 1.192839 +vt 0.375000 0.250000 +vt 0.375000 0.500000 +vt 0.500083 0.500000 +vt 0.500083 0.250000 +vt 0.375000 0.750000 +vt 0.625000 0.750000 +vt 0.625000 0.627416 +vt 0.375000 1.000000 +vt 0.625000 1.000000 +vt 0.125000 0.500000 +vt 0.125000 0.750000 +vt 0.375000 0.000000 +vt 0.625000 0.122584 +vt 0.625000 0.000000 +vt 0.625000 0.250000 +vt 0.625000 0.500000 +vt 0.875000 0.750000 +vt 0.875000 0.627416 +vn 0.0000 0.0000 1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.8839 0.4677 +vn 0.0000 1.0000 0.0000 +usemtl None +s off +f 97/183/89 100/184/89 103/185/89 102/186/89 +f 100/184/90 98/187/90 99/188/90 104/189/90 103/185/90 +f 98/187/91 95/190/91 96/191/91 99/188/91 +f 97/192/92 95/193/92 98/187/92 100/184/92 +f 95/194/93 97/183/93 102/186/93 101/195/93 96/196/93 +f 101/197/94 102/186/94 103/185/94 104/198/94 +f 104/189/95 99/188/95 96/199/95 101/200/95 diff --git a/models/bloxiann.obj.import b/models/bloxiann.obj.import new file mode 100644 index 0000000..9e9fc50 --- /dev/null +++ b/models/bloxiann.obj.import @@ -0,0 +1,21 @@ +[remap] + +importer="wavefront_obj" +importer_version=1 +type="Mesh" +uid="uid://h1x8i2uhd3p8" +path="res://.godot/imported/bloxiann.obj-51bcc4c3daceed96daa0925c176ce2f4.mesh" + +[deps] + +files=["res://.godot/imported/bloxiann.obj-51bcc4c3daceed96daa0925c176ce2f4.mesh"] + +source_file="res://models/bloxiann.obj" +dest_files=["res://.godot/imported/bloxiann.obj-51bcc4c3daceed96daa0925c176ce2f4.mesh", "res://.godot/imported/bloxiann.obj-51bcc4c3daceed96daa0925c176ce2f4.mesh"] + +[params] + +generate_tangents=true +scale_mesh=Vector3(1, 1, 1) +offset_mesh=Vector3(0, 0, 0) +optimize_mesh=true diff --git a/project.godot b/project.godot new file mode 100644 index 0000000..6001f5d --- /dev/null +++ b/project.godot @@ -0,0 +1,97 @@ +; Engine configuration file. +; It's best edited using the editor UI and not directly, +; since the parameters that go here are not all obvious. +; +; Format: +; [section] ; section goes between [] +; param=value ; assign values to parameters + +config_version=5 + +_global_script_classes=[{ +"base": "CharacterBody3D", +"class": &"Character", +"language": &"GDScript", +"path": "res://src/game/client/gd_client.gd" +}, { +"base": "SpringArm3D", +"class": &"GameCamera", +"language": &"GDScript", +"path": "res://src/game/camera/gd_game_camera.gd" +}] +_global_script_class_icons={ +"Character": "", +"GameCamera": "" +} + +[application] + +config/name="Roblox" +run/main_scene="res://scenes/node_3d.tscn" +config/features=PackedStringArray("4.0", "Forward Plus") +config/icon="res://icon.svg" + +[autoload] + +CursorManager="*res://src/autoloads/managers/gd_cursor_manager.gd" +CoreUiManager="*res://src/autoloads/managers/gd_core_ui_manager.gd" + +[input] + +ui_text_newline={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":true,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194309,"unicode":0,"echo":false,"script":null) +] +} +action_move_camera={ +"deadzone": 0.5, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":2,"pressed":false,"double_click":false,"script":null) +] +} +action_lock_camera={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194325,"physical_keycode":0,"unicode":0,"echo":false,"script":null) +] +} +client_move_fowards={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"unicode":0,"echo":false,"script":null) +] +} +client_move_left={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"unicode":0,"echo":false,"script":null) +] +} +client_move_right={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"unicode":0,"echo":false,"script":null) +] +} +client_move_backwards={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"unicode":0,"echo":false,"script":null) +] +} +action_zoom_in={ +"deadzone": 0.5, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":4,"pressed":false,"double_click":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194437,"unicode":0,"echo":false,"script":null) +] +} +action_zoom_out={ +"deadzone": 0.5, +"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":5,"pressed":false,"double_click":false,"script":null) +, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194435,"unicode":0,"echo":false,"script":null) +] +} +client_action_jump={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"unicode":0,"echo":false,"script":null) +] +} +core_pause={ +"deadzone": 0.5, +"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194305,"unicode":0,"echo":false,"script":null) +] +} diff --git a/scenes/node_3d.tscn b/scenes/node_3d.tscn new file mode 100644 index 0000000..ec797ab --- /dev/null +++ b/scenes/node_3d.tscn @@ -0,0 +1,342 @@ +[gd_scene load_steps=28 format=3 uid="uid://8n8cb677mnss"] + +[ext_resource type="Script" path="res://src/game/camera/gd_game_camera.gd" id="1_2067x"] +[ext_resource type="Script" path="res://src/game/client/gd_client.gd" id="1_ngyf4"] +[ext_resource type="ArrayMesh" uid="uid://h1x8i2uhd3p8" path="res://models/bloxiann.obj" id="2_1cvfg"] +[ext_resource type="Script" path="res://src/game/coreui/gd_bottom_bar.gd" id="3_bvosl"] +[ext_resource type="FontFile" uid="uid://iy224o7xv23a" path="res://data/UI/themes/fonts/futur.ttf" id="4_itmj3"] +[ext_resource type="Script" path="res://src/game/coreui/gd_pause_button.gd" id="6_aoefi"] +[ext_resource type="Script" path="res://src/game/coreui/gd_pause_menu.gd" id="6_ktw6x"] +[ext_resource type="Script" path="res://src/game/coreui/gd_top_pause_bar.gd" id="8_cc8kq"] + +[sub_resource type="PlaneMesh" id="PlaneMesh_v0sif"] +size = Vector2(16, 16) + +[sub_resource type="PlaneMesh" id="PlaneMesh_4na0b"] +size = Vector2(32, 32) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1kqf7"] +albedo_color = Color(0.807843, 0.341176, 0, 1) + +[sub_resource type="PlaneMesh" id="PlaneMesh_pi82d"] +size = Vector2(2, 4) + +[sub_resource type="PlaneMesh" id="PlaneMesh_1w7qb"] +size = Vector2(8, 4) + +[sub_resource type="BoxMesh" id="BoxMesh_ol52s"] +size = Vector3(0.5, 5, 4) + +[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_u6ybw"] + +[sub_resource type="Sky" id="Sky_qk0kp"] +sky_material = SubResource("ProceduralSkyMaterial_u6ybw") + +[sub_resource type="Environment" id="Environment_oll2m"] +background_mode = 2 +sky = SubResource("Sky_qk0kp") + +[sub_resource type="BoxShape3D" id="BoxShape3D_dneli"] +size = Vector3(1, 2, 0.5) + +[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2588t"] +proximity_fade_distance = 2.0 +distance_fade_mode = 2 +distance_fade_max_distance = 1.0 + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_46g5m"] +bg_color = Color(0, 0, 0, 0.690196) +corner_radius_top_left = 8 +corner_radius_top_right = 8 +corner_radius_bottom_right = 8 +corner_radius_bottom_left = 8 +expand_margin_left = 4.0 +expand_margin_right = 4.0 +shadow_color = Color(0, 0, 0, 0.462745) +shadow_size = 5 +shadow_offset = Vector2(0, 4) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3w2sw"] +bg_color = Color(0.529412, 0.529412, 0.529412, 0.690196) +corner_radius_top_left = 8 +corner_radius_top_right = 8 +corner_radius_bottom_right = 8 +corner_radius_bottom_left = 8 +expand_margin_left = 4.0 +expand_margin_right = 4.0 +shadow_color = Color(0, 0, 0, 0.462745) +shadow_size = 5 +shadow_offset = Vector2(0, 4) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_kxtdh"] +bg_color = Color(0.529412, 0.529412, 0.529412, 0.690196) +corner_radius_top_left = 8 +corner_radius_top_right = 8 +corner_radius_bottom_right = 8 +corner_radius_bottom_left = 8 +expand_margin_left = 4.0 +expand_margin_right = 4.0 +shadow_color = Color(0, 0, 0, 0.462745) +shadow_size = 5 +shadow_offset = Vector2(0, 4) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_hp3qq"] +bg_color = Color(0, 0, 0, 0.690196) +corner_radius_top_left = 8 +corner_radius_top_right = 8 +corner_radius_bottom_right = 8 +corner_radius_bottom_left = 8 +shadow_color = Color(0, 0, 0, 0.239216) +shadow_size = 5 +shadow_offset = Vector2(0, 4) + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wuepb"] +bg_color = Color(1, 1, 1, 0.619608) +border_width_left = 1 +border_width_top = 1 +border_width_right = 1 +border_width_bottom = 1 +border_color = Color(0, 0, 0, 1) +corner_radius_top_left = 8 +corner_radius_top_right = 8 +corner_radius_bottom_right = 8 +corner_radius_bottom_left = 8 +shadow_size = 5 +shadow_offset = Vector2(0, 4) + +[sub_resource type="Theme" id="Theme_j5yt5"] +default_font = ExtResource("4_itmj3") +Button/styles/disabled = SubResource("StyleBoxFlat_46g5m") +Button/styles/focus = SubResource("StyleBoxFlat_3w2sw") +Button/styles/hover = SubResource("StyleBoxFlat_46g5m") +Button/styles/normal = SubResource("StyleBoxFlat_46g5m") +Button/styles/pressed = SubResource("StyleBoxFlat_kxtdh") +Panel/styles/panel = SubResource("StyleBoxFlat_hp3qq") +TextEdit/colors/font_color = Color(0.196078, 0.196078, 0.196078, 1) +TextEdit/constants/caret_width = 16 +TextEdit/constants/line_spacing = 9 +TextEdit/styles/normal = SubResource("StyleBoxFlat_wuepb") + +[sub_resource type="InputEventAction" id="InputEventAction_5dnwq"] +action = &"core_pause" + +[sub_resource type="Shortcut" id="Shortcut_isjlj"] +events = [SubResource("InputEventAction_5dnwq")] + +[node name="Node3D" type="Node3D"] + +[node name="CSGMesh3D" type="CSGMesh3D" parent="."] +use_collision = true +mesh = SubResource("PlaneMesh_v0sif") + +[node name="CSGMesh3D2" type="CSGMesh3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -3, 0) +use_collision = true +mesh = SubResource("PlaneMesh_4na0b") + +[node name="CSGMesh3D3" type="CSGMesh3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 17, -2, 0) +use_collision = true +mesh = SubResource("PlaneMesh_4na0b") +material = SubResource("StandardMaterial3D_1kqf7") + +[node name="CSGMesh3D4" type="CSGMesh3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 10, 0, 0) +use_collision = true +mesh = SubResource("PlaneMesh_pi82d") + +[node name="CSGMesh3D5" type="CSGMesh3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 14, 1, 0) +use_collision = true +mesh = SubResource("PlaneMesh_pi82d") + +[node name="CSGMesh3D6" type="CSGMesh3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 18, 2, 0) +use_collision = true +mesh = SubResource("PlaneMesh_pi82d") + +[node name="CSGMesh3D7" type="CSGMesh3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 25, 3, 0) +use_collision = true +mesh = SubResource("PlaneMesh_1w7qb") + +[node name="CSGMesh3D8" type="CSGMesh3D" parent="."] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 25, 5, 0) +use_collision = true +mesh = SubResource("BoxMesh_ol52s") + +[node name="WorldEnvironment" type="WorldEnvironment" parent="."] +environment = SubResource("Environment_oll2m") + +[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] +transform = Transform3D(1, 0, 0, 0, -0.707107, 0.707107, 0, -0.707107, -0.707107, 0, 2, 0) +shadow_enabled = true + +[node name="Character" type="CharacterBody3D" parent="." node_paths=PackedStringArray("camera")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0) +script = ExtResource("1_ngyf4") +camera = NodePath("../GameCamera") + +[node name="CollisionShape3D" type="CollisionShape3D" parent="Character"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) +shape = SubResource("BoxShape3D_dneli") + +[node name="Bloxiann" type="MeshInstance3D" parent="Character"] +transform = Transform3D(6.55671e-08, 0, -0.5, 0, 0.5, 0, 0.5, 0, 6.55671e-08, 0, 1, 0) +material_override = SubResource("StandardMaterial3D_2588t") +mesh = ExtResource("2_1cvfg") +skeleton = NodePath("../..") + +[node name="CameraOffset" type="Node3D" parent="Character"] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0) + +[node name="GameCamera" type="SpringArm3D" parent="." node_paths=PackedStringArray("target")] +transform = Transform3D(0.707107, 0, -0.707107, 0, 1, 0, 0.707107, 0, 0.707107, 0, 1, 0) +spring_length = 7.0 +script = ExtResource("1_2067x") +target = NodePath("../Character/CameraOffset") + +[node name="Camera3D" type="Camera3D" parent="GameCamera"] + +[node name="CanvasLayer" type="CanvasLayer" parent="GameCamera/Camera3D"] + +[node name="CoreUI" type="Control" parent="GameCamera/Camera3D/CanvasLayer"] +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 + +[node name="Theme" type="ReferenceRect" parent="GameCamera/Camera3D/CanvasLayer/CoreUI"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme = SubResource("Theme_j5yt5") + +[node name="VBoxContainer" type="VBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +alignment = 2 + +[node name="Margin" type="MarginContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer"] +custom_minimum_size = Vector2(0, 32) +layout_mode = 2 +mouse_filter = 0 +theme_override_constants/margin_left = 12 +theme_override_constants/margin_top = 12 +theme_override_constants/margin_bottom = 12 + +[node name="BottomBar" type="HBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/Margin"] +custom_minimum_size = Vector2(0, 32) +layout_mode = 2 +script = ExtResource("3_bvosl") + +[node name="Left" type="HBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/Margin/BottomBar"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="PauseButton" type="Button" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/Margin/BottomBar/Left"] +layout_mode = 2 +toggle_mode = true +shortcut = SubResource("Shortcut_isjlj") +text = "Pause" +script = ExtResource("6_aoefi") + +[node name="Center" type="HBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/Margin/BottomBar"] +layout_mode = 2 +size_flags_horizontal = 3 +alignment = 1 + +[node name="TextEdit" type="TextEdit" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/Margin/BottomBar/Center"] +layout_mode = 2 +size_flags_horizontal = 3 +theme_override_constants/line_spacing = 9 +placeholder_text = "Type something..." +wrap_mode = 1 +scroll_smooth = true +minimap_width = 45 + +[node name="Right" type="HBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/Margin/BottomBar"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="PauseMenu" type="Control" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer"] +custom_minimum_size = Vector2(0, 256) +layout_mode = 2 +script = ExtResource("6_ktw6x") + +[node name="MarginContainer" type="MarginContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 4 +theme_override_constants/margin_right = 4 +theme_override_constants/margin_bottom = 4 + +[node name="Panel" type="Panel" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer"] +layout_mode = 2 + +[node name="MarginContainer" type="MarginContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +theme_override_constants/margin_left = 4 +theme_override_constants/margin_top = 4 +theme_override_constants/margin_right = 4 +theme_override_constants/margin_bottom = 4 + +[node name="VBoxContainer" type="VBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer"] +layout_mode = 2 + +[node name="HBoxContainer" type="HBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer"] +custom_minimum_size = Vector2(0, 32) +layout_mode = 2 +script = ExtResource("8_cc8kq") + +[node name="Label" type="Label" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +text = "MENU" + +[node name="HFlowContainer" type="HBoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer"] +layout_mode = 2 +size_flags_vertical = 3 + +[node name="Section" type="BoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HFlowContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Panel" type="Panel" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HFlowContainer/Section"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Section2" type="BoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HFlowContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Panel" type="Panel" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HFlowContainer/Section2"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Section3" type="BoxContainer" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HFlowContainer"] +layout_mode = 2 +size_flags_horizontal = 3 + +[node name="Panel" type="Panel" parent="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HFlowContainer/Section3"] +layout_mode = 2 +size_flags_horizontal = 3 + +[connection signal="gui_input" from="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer" to="GameCamera/Camera3D/CanvasLayer/CoreUI/Theme/VBoxContainer/PauseMenu/MarginContainer/Panel/MarginContainer/VBoxContainer/HBoxContainer" method="_on_gui_input"] diff --git a/src/autoloads/managers/gd_core_ui_manager.gd b/src/autoloads/managers/gd_core_ui_manager.gd new file mode 100644 index 0000000..c981383 --- /dev/null +++ b/src/autoloads/managers/gd_core_ui_manager.gd @@ -0,0 +1,32 @@ +extends Node + +signal bottom_bar_ready +var bottom_bar:Control: + get: return bottom_bar + set(val): + bottom_bar = val + emit_signal("bottom_bar_ready") +var pause_menu:Control + +enum BOTTOM_BAR_DIRECTION { + LEFT, + CENTER, + RIGHT +} + +func add_to_bottom_bar(element:Control, direction:BOTTOM_BAR_DIRECTION): + bottom_bar.get_children()[direction].add_child(element) + +signal pause_visibility_changed +func show_pause_menu(): + emit_signal("pause_visibility_changed", true) + pause_menu.visible = true + var show_tween = get_tree().create_tween().set_ease(Tween.EASE_OUT) + show_tween.tween_property(pause_menu, "custom_minimum_size", Vector2(0, 256), 0.2).set_trans(Tween.TRANS_QUAD) + +func hide_pause_menu(): + emit_signal("pause_visibility_changed", false) + var hide_tween = get_tree().create_tween().set_ease(Tween.EASE_IN) + hide_tween.tween_property(pause_menu, "custom_minimum_size", Vector2(0, 0), 0.2).set_trans(Tween.TRANS_QUAD) + await hide_tween.finished + pause_menu.visible = false diff --git a/src/autoloads/managers/gd_cursor_manager.gd b/src/autoloads/managers/gd_cursor_manager.gd new file mode 100644 index 0000000..8a22758 --- /dev/null +++ b/src/autoloads/managers/gd_cursor_manager.gd @@ -0,0 +1,26 @@ +extends Control + +var cursor_atlas:Texture2D = preload("res://textures/UI/cursor.png") + +enum CURSOR_STATES { + NORMAL, + HAND_OPEN, + HAND_CLOSED, + AIM +} +var current_cursor_state = CURSOR_STATES.HAND_CLOSED + + +func _process(delta): + #if event is InputEventMouseMotion: + queue_redraw() + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _draw(): + draw_texture_rect_region( + cursor_atlas, + Rect2(get_local_mouse_position(), Vector2.ONE * cursor_atlas.get_height()), + Rect2(cursor_atlas.get_height() * current_cursor_state, 0, cursor_atlas.get_height(), cursor_atlas.get_height()), + Color.WHITE + ) + diff --git a/src/game/camera/gd_game_camera.gd b/src/game/camera/gd_game_camera.gd new file mode 100644 index 0000000..30fd951 --- /dev/null +++ b/src/game/camera/gd_game_camera.gd @@ -0,0 +1,97 @@ +extends SpringArm3D +class_name GameCamera + +@export var sensitivity = 0.01 +@export var max_zoom:float = 35 +@export var min_zoom:float = 0 +@export @onready var target:Node3D +@onready var camera = get_viewport().get_camera_3d() + +enum CAMERA_STATES { + IDLE, # 0 + MOVING, # 1 + LOCKED, # 2 + FIRST_PERSON # 3 +} + +signal camera_state_changed +var last_camera_state +var current_camera_state = CAMERA_STATES.IDLE: + get: return current_camera_state + set(val): + last_camera_state = current_camera_state + emit_signal("camera_state_changed", val, current_camera_state) + current_camera_state = val + +func _ready(): + Input.mouse_mode = Input.MOUSE_MODE_HIDDEN + +func _input(event): + if current_camera_state != CAMERA_STATES.IDLE: + if event is InputEventMouseMotion: + move_camera(event.relative * sensitivity) + + if event is InputEvent: + if event.is_action_pressed("action_zoom_in"): + spring_length -= 2 + spring_length = clamp(spring_length, min_zoom, max_zoom) + if event.is_action_pressed("action_zoom_out"): + spring_length += 2 + spring_length = clamp(spring_length, min_zoom, max_zoom) + +func _process(delta): + global_position = target.global_position + + camera.rotation.x = -CoreUiManager.pause_menu.custom_minimum_size.y / (camera.fov * 8) + + match current_camera_state: + CAMERA_STATES.IDLE: + CursorManager.current_cursor_state = CursorManager.CURSOR_STATES.HAND_OPEN + Input.mouse_mode = Input.MOUSE_MODE_HIDDEN + if Input.is_action_just_pressed("action_lock_camera"): + current_camera_state = CAMERA_STATES.LOCKED + + if spring_length == 0: + current_camera_state = CAMERA_STATES.FIRST_PERSON + + if Input.is_action_pressed("action_move_camera"): + current_camera_state = CAMERA_STATES.MOVING + + CAMERA_STATES.MOVING: + CursorManager.current_cursor_state = CursorManager.CURSOR_STATES.HAND_CLOSED + Input.mouse_mode = Input.MOUSE_MODE_HIDDEN + if Input.is_action_just_pressed("action_lock_camera"): + current_camera_state = CAMERA_STATES.LOCKED + + if spring_length == 0: + current_camera_state = CAMERA_STATES.FIRST_PERSON + + if Input.is_action_just_released("action_move_camera"): + current_camera_state = CAMERA_STATES.IDLE + + CAMERA_STATES.LOCKED: + camera.h_offset = 1 + + if spring_length == 0: + current_camera_state = CAMERA_STATES.FIRST_PERSON + + CursorManager.current_cursor_state = CursorManager.CURSOR_STATES.AIM + Input.mouse_mode = Input.MOUSE_MODE_CAPTURED + + if Input.is_action_just_pressed("action_lock_camera") && spring_length > 0: + current_camera_state = CAMERA_STATES.IDLE + camera.h_offset = 0 + + CAMERA_STATES.FIRST_PERSON: + camera.h_offset = 0 + + CursorManager.current_cursor_state = CursorManager.CURSOR_STATES.AIM + Input.mouse_mode = Input.MOUSE_MODE_CAPTURED + + if spring_length > 0: + current_camera_state = last_camera_state + +func move_camera(amount:Vector2) -> void: + rotation.x -= amount.y + rotation.y -= amount.x + rotation.x = clamp(rotation.x, -PI / 2.1, PI / 2.1) diff --git a/src/game/client/gd_client.gd b/src/game/client/gd_client.gd new file mode 100644 index 0000000..c945e2c --- /dev/null +++ b/src/game/client/gd_client.gd @@ -0,0 +1,109 @@ +extends CharacterBody3D +class_name Character + +@export var camera:SpringArm3D + +@export var client_ground_speed = 12 +@export var client_ground_friction = 0.9 +@export var client_air_friction = 0.9 +@export var client_gravity = -16 +@export var client_jump_force = 5 + +enum CLIENT_STATES { + IDLE, + MOVING, + JUMPING, + FALLING +} + +enum ROTATION_METHOD { + FREE, + LOCKED +} + +var current_rotation_method = ROTATION_METHOD.FREE +var current_client_state = CLIENT_STATES.IDLE + +func _ready(): + camera.camera_state_changed.connect(_on_camera_state_change) +func _physics_process(delta): + var input_direction:Vector2 = Vector2(Input.get_axis("client_move_left", "client_move_right"), Input.get_axis("client_move_fowards", "client_move_backwards")) + + var direction = Vector3( + (camera.transform.basis.z.x * input_direction.y) + camera.transform.basis.x.x * input_direction.x, + 0, + (camera.transform.basis.z.z * input_direction.y) + camera.transform.basis.x.z * input_direction.x + ) + + match current_rotation_method: + ROTATION_METHOD.FREE: + if input_direction.length() > 0: + rotation.y = lerp_angle(rotation.y, camera.rotation.y + atan2(input_direction.x, input_direction.y), 0.25) + ROTATION_METHOD.LOCKED: + rotation.y = camera.rotation.y + + match current_client_state: + CLIENT_STATES.IDLE: + + apply_friction(client_ground_friction) + + if input_direction.length() > 0: + current_client_state = CLIENT_STATES.MOVING + + if !is_on_floor(): + current_client_state = CLIENT_STATES.FALLING + + if Input.is_action_just_pressed("client_action_jump"): + jump() + CLIENT_STATES.MOVING: + apply_movement(direction, client_ground_speed, delta) + apply_friction(client_ground_friction) + + move_and_slide() + + if input_direction.length() == 0: + current_client_state = CLIENT_STATES.IDLE + + if !is_on_floor(): + current_client_state = CLIENT_STATES.FALLING + + if Input.is_action_just_pressed("client_action_jump"): + jump() + + CLIENT_STATES.FALLING: + velocity.y += client_gravity * delta + apply_friction(client_air_friction) + apply_movement(direction, client_ground_speed, delta) + move_and_slide() + + if is_on_floor(): + velocity.y = 0 + current_client_state = CLIENT_STATES.MOVING + + CLIENT_STATES.JUMPING: + velocity.y += client_gravity * delta + apply_friction(client_air_friction) + apply_movement(direction, client_ground_speed, delta) + move_and_slide() + + if velocity.y < 0: + current_client_state = CLIENT_STATES.FALLING + +func jump(): + velocity.y += client_jump_force + current_client_state = CLIENT_STATES.JUMPING + +func apply_movement(direction:Vector3, speed:float, delta:float): + velocity += direction.normalized() * speed * delta + move_and_slide() + +func apply_friction(friction): + velocity.x *= friction + velocity.z *= friction + + move_and_slide() + +func _on_camera_state_change(cur, old): + if cur > 1: + current_rotation_method = ROTATION_METHOD.LOCKED + else: current_rotation_method = ROTATION_METHOD.FREE diff --git a/src/game/coreui/gd_bottom_bar.gd b/src/game/coreui/gd_bottom_bar.gd new file mode 100644 index 0000000..312208e --- /dev/null +++ b/src/game/coreui/gd_bottom_bar.gd @@ -0,0 +1,4 @@ +extends HBoxContainer + +func _ready(): + CoreUiManager.bottom_bar = self diff --git a/src/game/coreui/gd_pause_button.gd b/src/game/coreui/gd_pause_button.gd new file mode 100644 index 0000000..f518336 --- /dev/null +++ b/src/game/coreui/gd_pause_button.gd @@ -0,0 +1,16 @@ +extends Button + + +# Called when the node enters the scene tree for the first time. +func _ready(): + toggled.connect(_on_toggle) + CoreUiManager.pause_visibility_changed.connect(_on_hide) + +func _on_toggle(val): + if val: + CoreUiManager.show_pause_menu() + else: CoreUiManager.hide_pause_menu() + +func _on_hide(tog): + if !tog: + button_pressed = false diff --git a/src/game/coreui/gd_pause_menu.gd b/src/game/coreui/gd_pause_menu.gd new file mode 100644 index 0000000..580ae6e --- /dev/null +++ b/src/game/coreui/gd_pause_menu.gd @@ -0,0 +1,7 @@ +extends Control + + +func _ready(): + CoreUiManager.pause_menu = self + custom_minimum_size = Vector2.ZERO + visible = false diff --git a/src/game/coreui/gd_top_pause_bar.gd b/src/game/coreui/gd_top_pause_bar.gd new file mode 100644 index 0000000..23399de --- /dev/null +++ b/src/game/coreui/gd_top_pause_bar.gd @@ -0,0 +1,20 @@ +extends HBoxContainer + +@onready var pause_menu = $"../../../../.." + +var held = false + +func _process(delta): + if held: + pause_menu.custom_minimum_size.y = get_viewport_rect().size.y - get_global_mouse_position().y + if pause_menu.custom_minimum_size.y < 64: + CoreUiManager.hide_pause_menu() + pause_menu.custom_minimum_size.y = clamp(pause_menu.custom_minimum_size.y, 0, get_viewport_rect().size.y - 128) + +func _on_gui_input(event): + if event is InputEventMouseButton: + if event.button_index == MOUSE_BUTTON_LEFT: + if event.pressed: + held = true + else: held = false + #print(get_global_mouse_position().y) diff --git a/textures/UI/cursor.png b/textures/UI/cursor.png new file mode 100644 index 0000000..645f012 Binary files /dev/null and b/textures/UI/cursor.png differ diff --git a/textures/UI/cursor.png.import b/textures/UI/cursor.png.import new file mode 100644 index 0000000..b890260 --- /dev/null +++ b/textures/UI/cursor.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dqwbqsvhibw2x" +path="res://.godot/imported/cursor.png-c22b486749fc5dc38ff5d018a4f167cc.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://textures/UI/cursor.png" +dest_files=["res://.godot/imported/cursor.png-c22b486749fc5dc38ff5d018a4f167cc.ctex"] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/bptc_ldr=0 +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