Compare commits

..

No commits in common. "main" and "stairs-map" have entirely different histories.

51 changed files with 1077 additions and 4937 deletions

Binary file not shown.

View File

@ -1,34 +0,0 @@
[remap]
importer="font_data_dynamic"
type="FontFile"
uid="uid://246jxnbu62q3"
path="res://.godot/imported/LilitaOne-Regular.ttf-7e2161443d37c26d9a127c9b42e001ae.fontdata"
[deps]
source_file="res://font/LilitaOne-Regular.ttf"
dest_files=["res://.godot/imported/LilitaOne-Regular.ttf-7e2161443d37c26d9a127c9b42e001ae.fontdata"]
[params]
Rendering=null
antialiasing=1
generate_mipmaps=false
disable_embedded_bitmaps=true
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={}

View File

@ -1,94 +0,0 @@
Copyright (c) 2011 Juan Montoreano (juan@remolacha.biz),
with Reserved Font Name Lilita
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
https://openfontlicense.org
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -6,4 +6,3 @@
albedo_texture = ExtResource("1_adacw")
metallic_specular = 0.0
texture_filter = 2
disable_receive_shadows = true

View File

@ -1,13 +0,0 @@
[gd_resource type="ShaderMaterial" load_steps=2 format=3 uid="uid://bfxaaqdjgwv8b"]
[ext_resource type="Shader" path="res://materials/building_block.gdshader" id="1_dis1h"]
[resource]
render_priority = 1
shader = ExtResource("1_dis1h")
shader_parameter/albedo = Color(0.276387, 0.574926, 0.813629, 0.54902)
shader_parameter/roughness = 0.533
shader_parameter/specular = 0.45
shader_parameter/metallic = null
shader_parameter/uv1_scale = Vector3(1, 1, 1)
shader_parameter/uv1_offset = null

View File

@ -6,4 +6,3 @@
albedo_texture = ExtResource("1_u5p53")
metallic_specular = 0.0
texture_filter = 2
disable_receive_shadows = true

View File

@ -14,4 +14,3 @@ normal_texture = ExtResource("3_d1hb3")
ao_enabled = true
ao_texture = ExtResource("2_lytc3")
texture_filter = 2
disable_receive_shadows = true

View File

@ -6,4 +6,3 @@
albedo_texture = ExtResource("1_hsryr")
metallic_specular = 0.0
texture_filter = 2
disable_receive_shadows = true

View File

@ -14,4 +14,3 @@ normal_texture = ExtResource("4_db6g0")
ao_enabled = true
ao_texture = ExtResource("2_3732n")
texture_filter = 5
disable_receive_shadows = true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dv6fmvhxa0yyr"
path="res://.godot/imported/stairs.png-8852e0dd27c2e0c5b61937bcfdf2d9df.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://materials/stairs.png"
dest_files=["res://.godot/imported/stairs.png-8852e0dd27c2e0c5b61937bcfdf2d9df.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=true
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

View File

@ -1,7 +1,7 @@
[gd_resource type="StandardMaterial3D" load_steps=5 format=3 uid="uid://cobb5bm4y7nk7"]
[ext_resource type="Texture2D" uid="uid://tlaksepmx4fm" path="res://materials/steel/steel_albedo.jpg" id="1_y0jhp"]
[ext_resource type="Texture2D" uid="uid://tx3pf0iblqgo" path="res://materials/steel_fence/steel_fence_metallic.jpg" id="3_hddmm"]
[ext_resource type="Texture2D" uid="uid://tx3pf0iblqgo" path="res://materials/steel/steel_metallic.jpg" id="3_hddmm"]
[ext_resource type="Texture2D" uid="uid://b76hh5upcpvrm" path="res://materials/steel_fence/steel_fence_normal.jpg" id="4_v1udo"]
[ext_resource type="Texture2D" uid="uid://bdqwdrblis6aw" path="res://materials/steel_fence/steel_fence_roughness.jpg" id="5_1ofxx"]
@ -13,4 +13,3 @@ roughness_texture = ExtResource("5_1ofxx")
normal_enabled = true
normal_texture = ExtResource("4_v1udo")
texture_filter = 2
disable_receive_shadows = true

View File

@ -1,7 +1,7 @@
[gd_resource type="StandardMaterial3D" load_steps=5 format=3 uid="uid://dgf570wtqn17j"]
[ext_resource type="Texture2D" uid="uid://b4reodnhta7sr" path="res://materials/steel_fence/steel_fence_albedo.png" id="1_lupfc"]
[ext_resource type="Texture2D" uid="uid://tx3pf0iblqgo" path="res://materials/steel_fence/steel_fence_metallic.jpg" id="3_rree2"]
[ext_resource type="Texture2D" uid="uid://tx3pf0iblqgo" path="res://materials/steel/steel_metallic.jpg" id="3_rree2"]
[ext_resource type="Texture2D" uid="uid://b76hh5upcpvrm" path="res://materials/steel_fence/steel_fence_normal.jpg" id="4_6o2u3"]
[ext_resource type="Texture2D" uid="uid://bdqwdrblis6aw" path="res://materials/steel_fence/steel_fence_roughness.jpg" id="5_7avjb"]
@ -14,4 +14,3 @@ roughness_texture = ExtResource("5_7avjb")
normal_enabled = true
normal_texture = ExtResource("4_6o2u3")
texture_filter = 5
disable_receive_shadows = true

View File

@ -14,4 +14,3 @@ normal_texture = ExtResource("4_r7yms")
ao_enabled = true
ao_texture = ExtResource("2_byjax")
texture_filter = 5
disable_receive_shadows = true

View File

@ -14,4 +14,3 @@ normal_texture = ExtResource("4_p2ds3")
ao_enabled = true
ao_texture = ExtResource("2_nln00")
texture_filter = 5
disable_receive_shadows = true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 KiB

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d2p5wswquw0la"
path="res://.godot/imported/tower.png-af8481b47367d8ad6b6790723593a987.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://materials/tower.png"
dest_files=["res://.godot/imported/tower.png-af8481b47367d8ad6b6790723593a987.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=true
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

View File

@ -7,4 +7,3 @@ albedo_texture = ExtResource("1_4040b")
metallic_specular = 0.36
roughness = 0.63
texture_filter = 2
disable_receive_shadows = true

View File

@ -14,4 +14,3 @@ normal_texture = ExtResource("4_pmu04")
ao_enabled = true
ao_texture = ExtResource("2_x5ntf")
texture_filter = 5
disable_receive_shadows = true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 KiB

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cfc4cc586c38e"
path="res://.godot/imported/cover.png-d93e27766f34d9ead04c7355b82975c1.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://misc/cover.png"
dest_files=["res://.godot/imported/cover.png-d93e27766f34d9ead04c7355b82975c1.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=true
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

View File

@ -1,7 +0,0 @@
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://dpn05x2ipj8ah"]
[ext_resource type="FontFile" uid="uid://246jxnbu62q3" path="res://font/LilitaOne-Regular.ttf" id="1_7cjyy"]
[resource]
Label/constants/outline_size = 2
Label/fonts/font = ExtResource("1_7cjyy")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 KiB

View File

@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://mylp6a08fsjq"
path="res://.godot/imported/icon.png-9c21e69c4eccbea186fe74b71b99d6cb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://misc/icon.png"
dest_files=["res://.godot/imported/icon.png-9c21e69c4eccbea186fe74b71b99d6cb.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=true
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

BIN
models/grappling_hook.blend Normal file

Binary file not shown.

View File

@ -0,0 +1,51 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://8nth3l65bb7r"
path="res://.godot/imported/grappling_hook.blend-2e604f48b288f3a507a2e743fac7348f.scn"
[deps]
source_file="res://models/grappling_hook.blend"
dest_files=["res://.godot/imported/grappling_hook.blend-2e604f48b288f3a507a2e743fac7348f.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
_subresources={}
blender/nodes/visible=0
blender/nodes/active_collection_only=false
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true

View File

@ -10,11 +10,10 @@ config_version=5
[application]
config/name="Miniature Maker"
run/main_scene="res://scenes/entrypoint_scene.tscn"
config/name="gmtk24"
run/main_scene="res://scenes/demo/demo.tscn"
config/features=PackedStringArray("4.3", "C#", "Forward Plus")
boot_splash/image="res://misc/cover.png"
config/icon="res://misc/icon.png"
config/icon="res://misc/icon.svg"
[autoload]
@ -22,7 +21,10 @@ UserSettings="*res://scripts/UserSettings.cs"
[display]
window/size/viewport_width=1920
window/size/viewport_height=1080
window/stretch/mode="canvas_items"
window/stretch/scale=2.0
[dotnet]
@ -36,10 +38,6 @@ enabled=PackedStringArray("res://addons/func_godot/plugin.cfg")
import/blender/enabled=false
[gui]
theme/custom="res://misc/global_theme.tres"
[importer_defaults]
texture={
@ -138,41 +136,11 @@ release_block={
"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":2,"position":Vector2(224, 40),"global_position":Vector2(238, 110),"factor":1.0,"button_index":2,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
place_block={
"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":1,"position":Vector2(202, 14),"global_position":Vector2(216, 84),"factor":1.0,"button_index":1,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
rotate_block_right={
"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":8,"position":Vector2(256, 16),"global_position":Vector2(270, 86),"factor":1.0,"button_index":4,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
rotate_block_left={
"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":16,"position":Vector2(312, 24),"global_position":Vector2(326, 94),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
toggle_noclip={
"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":0,"physical_keycode":4194334,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
]
}
zoom_orbit_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":8,"position":Vector2(310, 20),"global_position":Vector2(324, 90),"factor":1.0,"button_index":4,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
zoom_orbit_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":16,"position":Vector2(336, 24),"global_position":Vector2(350, 94),"factor":1.0,"button_index":5,"canceled":false,"pressed":true,"double_click":false,"script":null)
]
}
toggle_table={
"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":0,"physical_keycode":69,"key_label":0,"unicode":101,"location":0,"echo":false,"script":null)
]
}
[internationalization]

View File

@ -11,13 +11,13 @@
[ext_resource type="PackedScene" uid="uid://c670g1qg5gaug" path="res://scenes/interface/pause_menu.tscn" id="11_lav3p"]
[sub_resource type="ViewportTexture" id="ViewportTexture_cqsgk"]
viewport_path = NodePath("BlueprintRenderingViewport")
viewport_path = NodePath("SubViewport")
[sub_resource type="Gradient" id="Gradient_w67xe"]
[sub_resource type="FastNoiseLite" id="FastNoiseLite_inyay"]
noise_type = 3
frequency = 0.009
frequency = 0.0785
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_fhswu"]
color_ramp = SubResource("Gradient_w67xe")
@ -27,8 +27,8 @@ noise = SubResource("FastNoiseLite_inyay")
resource_local_to_scene = true
render_priority = 0
shader = ExtResource("9_v0ymc")
shader_parameter/FloatParameter = 0.01
shader_parameter/ColorParameter2 = Color(0.176471, 0, 0.964706, 0)
shader_parameter/FloatParameter = 0.002
shader_parameter/ColorParameter2 = Color(0.176471, 0, 0.964706, 0.615686)
shader_parameter/ColorParameter = Color(1, 1, 1, 1)
shader_parameter/Texture2DParameter = SubResource("ViewportTexture_cqsgk")
shader_parameter/Texture2DParameter2 = SubResource("NoiseTexture2D_fhswu")
@ -74,32 +74,29 @@ size = Vector3(87.9724, 96.1174, 91.8458)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0415039, 58.3319, 0.0198975)
size = Vector3(43.3174, 26.5295, 43.4319)
[node name="Player" parent="." node_paths=PackedStringArray("Table") instance=ExtResource("10_3xiy2")]
[node name="Player" parent="." instance=ExtResource("10_3xiy2")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.332064, 1.5426, 3.65156)
Table = NodePath("../table")
[node name="table" parent="." node_paths=PackedStringArray("Hud", "TrenchbroomMap") instance=ExtResource("11_7trvw")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 2.83695, 0, -4.36558)
Hud = NodePath("../HUD")
[node name="table" parent="." node_paths=PackedStringArray("TrenchbroomMap") instance=ExtResource("11_7trvw")]
transform = Transform3D(-0.0123217, 0, 0.999924, 0, 1, 0, -0.999924, 0, -0.0123217, 2.83695, 0, -4.36558)
TrenchbroomMap = NodePath("../DemoMap")
RelativeScale = 0.004
[node name="BlueprintDrawing" type="CSGBox3D" parent="table"]
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -0.0030241, 1.1074, -0.000483751)
size = Vector3(0.36, 0.001, 0.36)
material = SubResource("ShaderMaterial_u26td")
RelativeScale = 0.005
[node name="HUD" parent="." node_paths=PackedStringArray("Player") instance=ExtResource("7_g7tfv")]
Player = NodePath("../Player")
[node name="PauseMenu" parent="." node_paths=PackedStringArray("Table") instance=ExtResource("11_lav3p")]
Table = NodePath("../table")
[node name="PauseMenu" parent="." instance=ExtResource("11_lav3p")]
[node name="BlueprintRenderingViewport" type="SubViewport" parent="."]
[node name="SubViewport" type="SubViewport" parent="."]
msaa_3d = 3
[node name="BlueprintOrthoCam" type="Camera3D" parent="BlueprintRenderingViewport"]
[node name="BlueprintOrthoCam" type="Camera3D" parent="SubViewport"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -1, 0)
projection = 1
size = 90.0
far = 2.0
[node name="MockupBlueprint" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.85436, 1.1089, -4.37586)
size = Vector3(1, 0.01, 1)
material = SubResource("ShaderMaterial_u26td")

View File

@ -1,29 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://c5ksyousvxx7x"]
[ext_resource type="PackedScene" uid="uid://dv81sy34l8ice" path="res://scenes/stairs/stairs.tscn" id="1_00r22"]
[ext_resource type="Script" path="res://scripts/SceneSwitcher.cs" id="1_ps0jf"]
[ext_resource type="PackedScene" uid="uid://bqtfwxneu1eqw" path="res://scenes/main_menu.tscn" id="2_mxfpj"]
[ext_resource type="PackedScene" uid="uid://8po7ftboqq4k" path="res://scenes/demo/demo.tscn" id="2_rf0rf"]
[node name="EntrypointScene" type="Node" node_paths=PackedStringArray("LoadingScreen")]
process_mode = 3
script = ExtResource("1_ps0jf")
AddedLoadingScreenSeconds = 0.3
LoadingScreen = NodePath("LoadingScreen")
MainMenu = ExtResource("2_mxfpj")
DemoScene = ExtResource("2_rf0rf")
StairsScene = ExtResource("1_00r22")
[node name="LoadingScreen" type="CenterContainer" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = 4.0
offset_right = 4.0
grow_horizontal = 2
grow_vertical = 2
[node name="Label" type="Label" parent="LoadingScreen"]
layout_mode = 2
theme_override_font_sizes/font_size = 36
text = "Loading..."

View File

@ -0,0 +1,31 @@
[gd_scene load_steps=4 format=3 uid="uid://7povmsfyrjf4"]
[ext_resource type="PackedScene" uid="uid://8nth3l65bb7r" path="res://models/grappling_hook.blend" id="1_nljl0"]
[sub_resource type="CSharpScript" id="CSharpScript_4q8vt"]
script/source = "using Godot;
namespace Gmtk24 {
public partial class GrapplingHook : RigidBody3D {
public void OnCollisionEntered(Node node) {
Freeze = true;
}
}
}
"
[sub_resource type="BoxShape3D" id="BoxShape3D_rp2xw"]
size = Vector3(0.872498, 0.875122, 0.902222)
[node name="GrapplingHook" type="RigidBody3D"]
contact_monitor = true
max_contacts_reported = 1
script = SubResource("CSharpScript_4q8vt")
[node name="grappling_hook" parent="." instance=ExtResource("1_nljl0")]
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(0.707107, 0.707107, 0, -0.707107, 0.707107, 0, 0, 0, 1, 0.00187739, -0.0024816, -0.348884)
shape = SubResource("BoxShape3D_rp2xw")
[connection signal="body_entered" from="." to="." method="OnCollisionEntered"]

View File

@ -15,8 +15,6 @@ sky_material = SubResource("ProceduralSkyMaterial_2n8bf")
background_mode = 2
sky = SubResource("Sky_jvem5")
tonemap_mode = 2
ssao_enabled = true
ssao_radius = 0.05
[node name="HazyEnv" type="Node3D"]
@ -24,7 +22,6 @@ ssao_radius = 0.05
transform = Transform3D(0.914416, 0.167281, -0.368593, 0.265225, 0.44028, 0.857793, 0.305777, -0.88214, 0.358232, 0, 2, 0)
light_angular_distance = 0.5
light_bake_mode = 1
shadow_enabled = true
[node name="Env" type="WorldEnvironment" parent="."]
environment = SubResource("Environment_exkg8")

View File

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://scripts/Hud.cs" id="1_hvqpl"]
[node name="HUD" type="Control" node_paths=PackedStringArray("HoverText", "CameraHeightContainer", "CameraHeightSlider", "CornerPrompt")]
[node name="HUD" type="Control" node_paths=PackedStringArray("HoverText")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@ -11,10 +11,26 @@ grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
script = ExtResource("1_hvqpl")
HoverText = NodePath("CenterContainer2/HoverText")
CameraHeightContainer = NodePath("CameraHeightContainer")
CameraHeightSlider = NodePath("CameraHeightContainer/CameraHeightSlider")
CornerPrompt = NodePath("TableRecallPrompt")
HoverText = NodePath("HoverText")
[node name="HoverText" type="RichTextLabel" parent="."]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -94.0
offset_top = -163.0
offset_right = 95.0
grow_horizontal = 2
grow_vertical = 0
theme_override_font_sizes/normal_font_size = 32
bbcode_enabled = true
text = "[Hover Text]"
fit_content = true
scroll_active = false
autowrap_mode = 0
[node name="CenterContainer" type="CenterContainer" parent="."]
layout_mode = 1
@ -33,48 +49,3 @@ mouse_filter = 1
custom_minimum_size = Vector2(2, 16)
layout_mode = 2
mouse_filter = 1
[node name="CameraHeightContainer" type="VBoxContainer" parent="."]
visible = false
layout_mode = 1
anchors_preset = 2
anchor_top = 1.0
anchor_bottom = 1.0
offset_top = -227.0
offset_right = 67.0
grow_vertical = 0
[node name="CameraHeightSlider" type="VSlider" parent="CameraHeightContainer"]
custom_minimum_size = Vector2(70, 200)
layout_mode = 2
step = 0.1
[node name="CameraHeightLabel" type="Label" parent="CameraHeightContainer"]
layout_mode = 2
text = "Height
"
horizontal_alignment = 1
[node name="CenterContainer2" type="CenterContainer" parent="."]
layout_mode = 1
anchors_preset = 12
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = -134.0
grow_horizontal = 2
grow_vertical = 0
mouse_filter = 2
[node name="HoverText" type="Label" parent="CenterContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 24
horizontal_alignment = 1
[node name="TableRecallPrompt" type="Label" parent="."]
layout_mode = 1
offset_left = 34.0
offset_top = 22.0
offset_right = 314.0
offset_bottom = 67.0
theme_override_font_sizes/font_size = 24

View File

@ -8,7 +8,7 @@ bg_color = Color(0.2, 0.2, 0.2, 0.921569)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_q40bd"]
bg_color = Color(0.25, 0.25, 0.25, 0.909804)
[node name="PauseMenu" type="Control" node_paths=PackedStringArray("InitialFocusTarget", "VolumeSlider", "CameraSensitivityX", "CameraSensitivityY", "CameraInvertX", "CameraInvertY", "TableOrbitSpeedX", "TableOrbitSpeedY", "TableOrbitInvertX", "TableOrbitInvertY", "MsaaOptions", "RenderScaleOptions", "UpscalingOptions", "WindowModeOptions")]
[node name="PauseMenu" type="Control" node_paths=PackedStringArray("InitialFocusTarget", "VolumeSlider", "CameraSensitivityX", "CameraSensitivityY", "CameraInvertX", "CameraInvertY")]
process_mode = 3
layout_mode = 3
anchors_preset = 15
@ -18,19 +18,11 @@ grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_p5jo3")
InitialFocusTarget = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/ContinueButton")
VolumeSlider = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/General settings/Grid/VolumeSlider")
CameraSensitivityX = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid/CameraXSlider")
CameraSensitivityY = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid/CameraYSlider")
CameraInvertX = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid/CameraXInvCheck")
CameraInvertY = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid/CameraYInvCheck")
TableOrbitSpeedX = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid/RotateSpeedSlider")
TableOrbitSpeedY = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid/TiltSpeedSlider")
TableOrbitInvertX = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid/InvertRotateCheck")
TableOrbitInvertY = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid/InvertTiltCheck")
MsaaOptions = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid/MsaaOptions")
RenderScaleOptions = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid/RenderScaleOptions")
UpscalingOptions = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid/UpscaleOptions")
WindowModeOptions = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid/FullscreenOptions")
VolumeSlider = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options/VolumeSlider")
CameraSensitivityX = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options/CameraXSlider")
CameraSensitivityY = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options/CameraYSlider")
CameraInvertX = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options/CameraXInvCheck")
CameraInvertY = NodePath("CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options/CameraYInvCheck")
[node name="CenterContainer" type="CenterContainer" parent="."]
process_mode = 2
@ -69,31 +61,17 @@ layout_mode = 2
focus_neighbor_top = NodePath("../QuitButton")
text = "Continue"
[node name="TabContainer" type="TabContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons"]
custom_minimum_size = Vector2(340, 200)
layout_mode = 2
theme_override_font_sizes/font_size = 11
current_tab = 0
[node name="General settings" type="MarginContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
metadata/_tab_index = 0
[node name="Grid" type="GridContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/General settings"]
[node name="Options" type="GridContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons"]
layout_mode = 2
theme_override_constants/h_separation = 14
theme_override_constants/v_separation = 9
columns = 2
[node name="VolumeLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/General settings/Grid"]
[node name="VolumeLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
text = "Volume"
[node name="VolumeSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/General settings/Grid"]
[node name="VolumeSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
custom_minimum_size = Vector2(100, 0)
layout_mode = 2
size_flags_horizontal = 3
@ -101,202 +79,46 @@ size_flags_vertical = 1
max_value = 1.0
step = 0.05
[node name="Camera" type="MarginContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
metadata/_tab_index = 1
[node name="Grid" type="GridContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera"]
layout_mode = 2
theme_override_constants/h_separation = 14
theme_override_constants/v_separation = 9
columns = 2
[node name="CameraXLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraXLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
text = "Camera yaw speed"
[node name="CameraXSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraXSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
max_value = 10.0
step = 0.25
[node name="CameraXInvLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraXInvLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
text = "Camera invert yaw"
[node name="CameraXInvCheck" type="CheckButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraXInvCheck" type="CheckButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
size_flags_horizontal = 3
action_mode = 0
[node name="CameraYLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraYLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
text = "Camera pitch speed"
[node name="CameraYSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraYSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
max_value = 10.0
step = 0.25
[node name="CameraYInvLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraYInvLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
text = "Camera invert pitch"
[node name="CameraYInvCheck" type="CheckButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Camera/Grid"]
[node name="CameraYInvCheck" type="CheckButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/Options"]
layout_mode = 2
size_flags_horizontal = 3
action_mode = 0
[node name="Building" type="MarginContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
metadata/_tab_index = 2
[node name="Grid" type="GridContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building"]
layout_mode = 2
theme_override_constants/h_separation = 14
theme_override_constants/v_separation = 9
columns = 2
[node name="RotateSpeedLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
text = "Rotation speed"
[node name="RotateSpeedSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
max_value = 6.0
step = 0.25
[node name="InvertRotateLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
text = "Invert rotation"
[node name="InvertRotateCheck" type="CheckButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
size_flags_horizontal = 3
action_mode = 0
[node name="TiltSpeedLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
text = "Tilt speed"
[node name="TiltSpeedSlider" type="HSlider" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
max_value = 6.0
step = 0.25
[node name="InvertTiltLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
text = "Invert tilt"
[node name="InvertTiltCheck" type="CheckButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Building/Grid"]
layout_mode = 2
size_flags_horizontal = 3
action_mode = 0
[node name="Graphics" type="MarginContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer"]
visible = false
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 10
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 10
metadata/_tab_index = 3
[node name="Grid" type="GridContainer" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics"]
layout_mode = 2
theme_override_constants/h_separation = 14
theme_override_constants/v_separation = 9
columns = 2
[node name="FullscreenLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
text = "Display mode"
[node name="FullscreenOptions" type="OptionButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
selected = 0
item_count = 3
popup/item_0/text = "Windowed"
popup/item_1/text = "Fullscreen"
popup/item_1/id = 1
popup/item_2/text = "Exclusive fullscreen"
popup/item_2/id = 2
[node name="MsaaLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
text = "MSAA"
[node name="MsaaOptions" type="OptionButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
selected = 2
item_count = 4
popup/item_0/text = "Disabled"
popup/item_1/text = "2 samples"
popup/item_1/id = 1
popup/item_2/text = "4 samples"
popup/item_2/id = 2
popup/item_3/text = "8 samples"
popup/item_3/id = 3
[node name="RenderScaleLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
text = "Render scale
"
[node name="RenderScaleOptions" type="OptionButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
selected = 3
item_count = 6
popup/item_0/text = "25%"
popup/item_0/id = 25
popup/item_1/text = "50%"
popup/item_1/id = 50
popup/item_2/text = "75%"
popup/item_2/id = 75
popup/item_3/text = "100%"
popup/item_3/id = 100
popup/item_4/text = "150%"
popup/item_4/id = 150
popup/item_5/text = "200%"
popup/item_5/id = 200
[node name="UpscaleLabel" type="Label" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
text = "Upscaling"
[node name="UpscaleOptions" type="OptionButton" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons/TabContainer/Graphics/Grid"]
layout_mode = 2
disabled = true
selected = 0
item_count = 3
popup/item_0/text = "Linear"
popup/item_1/text = "FSR 1.0"
popup/item_1/id = 1
popup/item_2/text = "FSR 2.2"
popup/item_2/id = 2
[node name="QuitButton" type="Button" parent="CenterContainer/HBoxContainer/OptionsAndButtonsContainer/MarginContainer/Options and buttons"]
layout_mode = 2
focus_neighbor_bottom = NodePath("../ContinueButton")
text = "Back to main menu"
text = "Quit"
[node name="CreditsContainer" type="PanelContainer" parent="CenterContainer/HBoxContainer"]
custom_minimum_size = Vector2(300, 0)

View File

@ -1,108 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://bqtfwxneu1eqw"]
[ext_resource type="Script" path="res://scripts/MainMenu.cs" id="1_8obly"]
[ext_resource type="Texture2D" uid="uid://d2p5wswquw0la" path="res://materials/tower.png" id="1_h16yv"]
[ext_resource type="Texture2D" uid="uid://dv6fmvhxa0yyr" path="res://materials/stairs.png" id="2_6auxm"]
[node name="MainMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_8obly")
[node name="Panel" type="Panel" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="GameNameLabel" type="Label" parent="Panel"]
layout_mode = 1
anchors_preset = 10
anchor_right = 1.0
offset_top = 100.0
offset_bottom = 188.0
grow_horizontal = 2
theme_override_font_sizes/font_size = 64
text = "Miniature Maker"
horizontal_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="Panel"]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -602.0
offset_top = -300.0
offset_right = 602.0
offset_bottom = 300.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="BoxContainer2" type="BoxContainer" parent="Panel/HBoxContainer"]
custom_minimum_size = Vector2(300, 300)
layout_mode = 2
alignment = 1
vertical = true
metadata/_edit_lock_ = true
[node name="TextureRect" type="TextureRect" parent="Panel/HBoxContainer/BoxContainer2"]
layout_mode = 2
texture = ExtResource("1_h16yv")
expand_mode = 5
stretch_mode = 5
metadata/_edit_lock_ = true
[node name="TowerButton" type="Button" parent="Panel/HBoxContainer/BoxContainer2"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Tower"
metadata/_edit_lock_ = true
[node name="BoxContainer" type="BoxContainer" parent="Panel/HBoxContainer"]
custom_minimum_size = Vector2(300, 300)
layout_mode = 2
alignment = 1
vertical = true
metadata/_edit_lock_ = true
[node name="TextureRect" type="TextureRect" parent="Panel/HBoxContainer/BoxContainer"]
layout_mode = 2
texture = ExtResource("2_6auxm")
expand_mode = 5
stretch_mode = 5
metadata/_edit_lock_ = true
[node name="StairsButton" type="Button" parent="Panel/HBoxContainer/BoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 32
text = "Stairs"
metadata/_edit_lock_ = true
[node name="QuitButton" type="Button" parent="Panel"]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -100.0
offset_top = -180.0
offset_right = 100.0
offset_bottom = -127.0
grow_horizontal = 2
grow_vertical = 0
theme_override_font_sizes/font_size = 32
text = "Quit"
[connection signal="pressed" from="Panel/HBoxContainer/BoxContainer2/TowerButton" to="." method="Tower"]
[connection signal="pressed" from="Panel/HBoxContainer/BoxContainer/StairsButton" to="." method="Stairs"]
[connection signal="pressed" from="Panel/QuitButton" to="." method="Quit"]

Binary file not shown.

View File

@ -23,4 +23,4 @@ compress/channel_pack=1
mipmaps/generate=false
mipmaps/limit=-1
slices/horizontal=1
slices/vertical=2
slices/vertical=1

Binary file not shown.

View File

@ -28,7 +28,7 @@ resource_local_to_scene = true
render_priority = 0
shader = ExtResource("9_j6rdw")
shader_parameter/FloatParameter = 0.002
shader_parameter/ColorParameter2 = Color(0, 0, 1, 0)
shader_parameter/ColorParameter2 = Color(0, 0, 1, 0.54902)
shader_parameter/ColorParameter = Color(1, 1, 1, 1)
shader_parameter/Texture2DParameter = SubResource("ViewportTexture_5jiut")
shader_parameter/Texture2DParameter2 = SubResource("NoiseTexture2D_g0wnn")
@ -44,37 +44,33 @@ light_data = ExtResource("2_36ysp")
[node name="HazyEnv" parent="." instance=ExtResource("3_gdvn0")]
[node name="Player" parent="." node_paths=PackedStringArray("Table") instance=ExtResource("8_6btor")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -205.512, -4.76837e-07, 45.9007)
[node name="Player" parent="." instance=ExtResource("8_6btor")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -58.6119, 24, 3.65156)
MaxVolumeWindHeight = 60.0
Table = NodePath("../table")
[node name="table" parent="." node_paths=PackedStringArray("Hud", "TrenchbroomMap") instance=ExtResource("10_hcwch")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -205.16, -0.00674486, 42.2491)
Hud = NodePath("../HUD")
[node name="table" parent="." node_paths=PackedStringArray("TrenchbroomMap") instance=ExtResource("10_hcwch")]
transform = Transform3D(-0.0123217, 0, 0.999924, 0, 1, 0, -0.999924, 0, -0.0123217, -58.2601, 24.0011, 0)
TrenchbroomMap = NodePath("../StairsMap")
RelativeScale = 0.002
[node name="BlueprintDrawing" type="CSGBox3D" parent="table"]
transform = Transform3D(-2.79397e-09, 0, -1.00001, 0, 1, 0, 1.00001, 0, -2.79397e-09, -0.0370032, 1.1081, 4.57764e-05)
size = Vector3(1.04, 0.001, 0.52)
material = SubResource("ShaderMaterial_ltak5")
[node name="StairsMap" parent="." instance=ExtResource("4_87fvr")]
[node name="HUD" parent="." node_paths=PackedStringArray("Player") instance=ExtResource("8_i25qr")]
Player = NodePath("../Player")
[node name="PauseMenu" parent="." node_paths=PackedStringArray("Table") instance=ExtResource("9_cfhxe")]
Table = NodePath("../table")
[node name="PauseMenu" parent="." instance=ExtResource("9_cfhxe")]
[node name="MockupBlueprint" type="CSGBox3D" parent="."]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -58.2595, 25.1109, 0.0273296)
size = Vector3(1, 0.01, 2)
material = SubResource("ShaderMaterial_ltak5")
[node name="SubViewport" type="SubViewport" parent="."]
msaa_3d = 3
size = Vector2i(512, 1024)
size = Vector2i(1024, 512)
[node name="BlueprintOrthoCam" type="Camera3D" parent="SubViewport"]
transform = Transform3D(-4.37114e-08, -1, 0, -4.37114e-08, 1.91069e-15, -1, 1, -4.37114e-08, -4.37114e-08, 59.259, -1, 0)
keep_aspect = 0
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 59.259, -1, 0)
projection = 1
size = 270.0
size = 300.0
far = 2.0

File diff suppressed because one or more lines are too long

View File

@ -1,11 +1,10 @@
[gd_scene load_steps=14 format=3 uid="uid://d02cqylu3xwos"]
[gd_scene load_steps=10 format=3 uid="uid://d02cqylu3xwos"]
[ext_resource type="PackedScene" uid="uid://diwlyi146eroa" path="res://models/table.fbx" id="1_1soa3"]
[ext_resource type="Script" path="res://scripts/Table.cs" id="1_cb7s1"]
[ext_resource type="Material" uid="uid://bq5oqyuwekryv" path="res://materials/building_block.tres" id="2_1s35y"]
[ext_resource type="Material" uid="uid://pu02smf107o8" path="res://materials/building_block_hover.tres" id="3_m64id"]
[ext_resource type="Script" path="res://scripts/Orbit.cs" id="4_nyqjn"]
[ext_resource type="Material" uid="uid://bfxaaqdjgwv8b" path="res://materials/building_block_ghost.tres" id="4_twdnh"]
[sub_resource type="BoxShape3D" id="BoxShape3D_iiew7"]
size = Vector3(1.26587, 1.10037, 2.3989)
@ -17,32 +16,19 @@ size = Vector3(5, 5, 5)
size = Vector3(5, 5, 5)
[sub_resource type="BoxShape3D" id="BoxShape3D_3kmm7"]
size = Vector3(5, 0.2, 5)
size = Vector3(1.3, 0.2, 2.4)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sxhnw"]
transparency = 1
albedo_color = Color(1, 0.364706, 1, 0.219608)
[sub_resource type="PlaneMesh" id="PlaneMesh_8p75w"]
material = SubResource("StandardMaterial3D_sxhnw")
size = Vector2(5, 5)
[sub_resource type="BoxShape3D" id="BoxShape3D_1n3ll"]
size = Vector3(5, 0.001, 5)
[node name="table" type="RigidBody3D" node_paths=PackedStringArray("SpawnPoint", "Orbit", "Plane")]
[node name="table" type="RigidBody3D" node_paths=PackedStringArray("SpawnPoint", "Orbit")]
collision_layer = 7
collision_mask = 7
lock_rotation = true
freeze = true
script = ExtResource("1_cb7s1")
SpawnPoint = NodePath("SpawnPoint")
BlockMask = 10
BlockMaterial = ExtResource("2_1s35y")
BlockHoverMaterial = ExtResource("3_m64id")
BlockGhostMaterial = ExtResource("4_twdnh")
SpawnPoint = NodePath("SpawnPoint")
BlockMask = 10
Orbit = NodePath("Orbit")
Plane = NodePath("Plane")
InteractName = "build"
[node name="table" parent="." instance=ExtResource("1_1soa3")]
@ -78,14 +64,9 @@ shape = SubResource("BoxShape3D_5k7xn")
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 6, 0)
shape = SubResource("BoxShape3D_3kmm7")
[node name="Floor" type="CollisionShape3D" parent="TableWalls"]
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.992982, 0)
shape = SubResource("BoxShape3D_3kmm7")
[node name="Orbit" type="Node3D" parent="." node_paths=PackedStringArray("Camera", "Hand")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.12311, 0)
script = ExtResource("4_nyqjn")
MaxCameraDistance = 2.0
Camera = NodePath("OrbitCamera")
Hand = NodePath("OrbitCamera/OrbitHand")
@ -95,17 +76,4 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1)
[node name="OrbitHand" type="Node3D" parent="Orbit/OrbitCamera"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.3, -0.1, -0.26)
[node name="Plane" type="StaticBody3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.37762, 0)
visible = false
collision_layer = 16
collision_mask = 16
[node name="MeshInstance3D" type="MeshInstance3D" parent="Plane"]
mesh = SubResource("PlaneMesh_8p75w")
skeleton = NodePath("../..")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Plane"]
shape = SubResource("BoxShape3D_1n3ll")
[connection signal="Interacted" from="." to="." method="Interact"]

View File

@ -10,14 +10,11 @@ namespace Gmtk24 {
public ShaderMaterial Material;
public ShaderMaterial HoverMaterial;
public float RelativeScale;
public uint PhysicalModeLayer;
public uint NonPhysicalModeLayer = 0;
public uint PlacedLayer = 0b10000;
public BlockMode Mode = BlockMode.Physical;
public BlockMode Mode { private set; get; } = BlockMode.Physical;
public MeshInstance3D MeshInstance { private set; get; }
private MeshInstance3D MeshInstance;
private ShaderMaterial[] NormalMaterialArr;
private ShaderMaterial[] HoverMaterialArr;
@ -26,7 +23,6 @@ namespace Gmtk24 {
Name = "BuildingBlock";
FreezeMode = FreezeModeEnum.Kinematic;
CanSleep = false;
InteractName = "Pick Up";
}
public override void _Ready() {
@ -84,29 +80,25 @@ namespace Gmtk24 {
}
public void SetMode(BlockMode mode) {
GD.Print(mode);
Mode = mode;
SetMaterial(false);
UpdatePhysics();
}
private void UpdatePhysics() {
if (Mode == BlockMode.Physical || Mode == BlockMode.Dragged) {
if (Mode != BlockMode.NonPhysical) {
CollisionLayer = PhysicalModeLayer;
CollisionMask = PhysicalModeLayer | PlacedLayer;
CollisionMask = PhysicalModeLayer;
if (Mode == BlockMode.Dragged) {
FreezeMode = FreezeModeEnum.Kinematic;
Freeze = true;
} else {
Freeze = false;
}
} else if (Mode == BlockMode.NonPhysical || Mode == BlockMode.Placed) {
if (Mode == BlockMode.Placed) {
CollisionLayer = PlacedLayer;
CollisionMask = PlacedLayer;
} else {
CollisionLayer = NonPhysicalModeLayer;
CollisionMask = NonPhysicalModeLayer;
}
CollisionLayer = 0;
CollisionMask = 0;
FreezeMode = FreezeModeEnum.Static;
Freeze = true;
}
@ -131,29 +123,6 @@ namespace Gmtk24 {
EmitSignal(SignalName.PickUp, this);
}
// Only works for Ghost blocks, which are always on Collision Layer 6
// (nothing else should ever be on that layer.)
public Vector3 OffsetFrom(Vector3 Normal, uint mask = 0b100000) {
var origin = ((-Normal) * 10f) + GlobalPosition;
var normal = (Normal * 10f) + GlobalPosition;
var ray = new PhysicsRayQueryParameters3D {
From = origin,
To = normal,
CollideWithBodies = true,
CollisionMask = mask,
HitBackFaces = false,
HitFromInside = false,
};
var newRes = GetWorld3D().DirectSpaceState.IntersectRay(ray);
if (newRes.ContainsKey("position")) {
var GlobalPos = (Vector3)newRes["position"];
var Offset = GlobalPos - GlobalPosition;
return -Offset;
}
return Vector3.Zero;
}
public struct BaseBlock {
public Mesh Mesh;
public Array<CollisionShape3D> Colliders;
@ -171,7 +140,6 @@ namespace Gmtk24 {
Physical,
Dragged,
NonPhysical,
Placed,
}
}
}

View File

@ -1,6 +1,4 @@
using Godot;
using Godot.Collections;
using System.Linq;
using System.Text;
namespace Gmtk24 {
@ -8,20 +6,10 @@ namespace Gmtk24 {
[Export]
public Player Player;
[Export]
public Label HoverText;
[Export]
public bool InteractionPaused = false;
[Export]
public Container CameraHeightContainer;
[Export]
public Slider CameraHeightSlider;
[Export]
public Label CornerPrompt;
public RichTextLabel HoverText;
private Interactible Hovered;
private Dictionary<string, string> ButtonNames = new();
public override void _Process(double delta) {
if (Player == null)
return;
@ -36,7 +24,6 @@ namespace Gmtk24 {
}
if (!InteractionPaused) {
if (collider is Interactible interactible) {
if (interactible != Hovered) {
Hovered?.SetHovered(false);
@ -45,63 +32,23 @@ namespace Gmtk24 {
Hovered = interactible;
HoverText.Text = $"{FormButtonNames("interact")}: {interactible.InteractName}";
} else {
Hovered?.SetHovered(false);
Hovered = null;
HoverText.Text = "";
}
} else {
Hovered?.SetHovered(false);
Hovered = null;
if (Player.Table.Orbit.HeldBlock != null) {
var release = FormButtonNames("release_block");
var place = FormButtonNames("place_block");
var rotate_right = FormButtonNames("rotate_block_right");
var rotate_left = FormButtonNames("rotate_block_left");
HoverText.Text = $"{place}: Place Block\n{release}: Throw Block\nRotate Block: ({rotate_right}/{rotate_left})";
} else {
HoverText.Text = "";
}
StringBuilder Builder = new StringBuilder();
foreach (var e in InputMap.ActionGetEvents("interact")) {
Builder.Append($"{e.AsText().Replace("(Physical)", "")}: {interactible.InteractName}");
}
if (!Player.Table.Orbit.IsEnabled) {
var names = FormButtonNames("toggle_table");
if (Player.Table.IsEnabled)
CornerPrompt.Text = $"{names}: {"Dismiss Table"}";
else
CornerPrompt.Text = $"{names}: {"Summon Table"}";
HoverText.Text = Builder.ToString();
} else {
if (Player.Table.Orbit.HeldBlock == null) {
var zoom_out = FormButtonNames("zoom_orbit_out");
var zoom_in = FormButtonNames("zoom_orbit_out");
var drag = FormButtonNames("drag_orbit");
CornerPrompt.Text = $"Zoom: {zoom_in}/{zoom_out}\nDrag: {drag}";
} else {
CornerPrompt.Text = "";
}
Hovered?.SetHovered(false);
Hovered = null;
HoverText.Text = "";
}
}
public override void _UnhandledInput(InputEvent @event) {
if (@event.IsAction("interact") && Hovered != null) {
Hovered.HandleInput(@event);
GetViewport().SetInputAsHandled();
}
}
private string FormButtonNames(string actionName) {
if (!ButtonNames.ContainsKey(actionName)) {
ButtonNames.Add(actionName, InputMap.ActionGetEvents(actionName)
.Select(e => e.AsText().Replace(" (Physical)", ""))
.Aggregate((a, b) => $"{a}, {b}"));
}
return ButtonNames[actionName];
}
public void ResetPromptCache() {
ButtonNames.Clear();
}
}
}
}

View File

@ -1,19 +0,0 @@
using Gmtk24;
using Godot;
using System;
namespace Gmtk24 {
public partial class MainMenu : Control {
public void Tower() {
SceneSwitcher.Singleton.SwitchToScene(SceneSwitcher.Scene.Demo);
}
public void Stairs() {
SceneSwitcher.Singleton.SwitchToScene(SceneSwitcher.Scene.Stairs);
}
public void Quit() {
GetTree().Quit();
}
}
}

View File

@ -3,80 +3,33 @@ using System;
namespace Gmtk24 {
public partial class Orbit : Node3D {
[Signal]
public delegate void BlockReleaseEventHandler(BuildingBlock block, uint blockReleaseTypeUint);
[Signal]
public delegate void DraggingHeldBlockEventHandler(BuildingBlock block);
[ExportCategory("Camera")]
[Export(PropertyHint.Range, "0,10,0.1")]
public float MaxCameraDistance = 1f;
[Export(PropertyHint.Range, "0,10,0.1")]
public float MinCameraDistance = 0.1f;
[Export(PropertyHint.Range, "0,10,0.1")]
public float MinCameraHeight = 1.123f;
[Export(PropertyHint.Range, "0,10,0.1")]
public float MaxCameraHeight = 5f;
[Export(PropertyHint.Range, "0,10,0.1")]
public float CameraZoomTick = 0.1f;
[Export]
public Camera3D Camera;
[ExportCategory("Hand")]
[Export]
public Node3D Hand;
[Export]
public BuildingBlock HeldBlock { private set; get; }
[Export]
public float RotateAmt = (float)(Math.PI / 12);
[Export]
public float DragDistanceTreshold = 150f;
[ExportCategory("Debug")]
[Export]
public bool IsEnabled { private set; get; } = false;
public Hud Hud;
private float CurrentZoom = 1f;
private float CurrentHeight = 0;
private float CurrentYaw = 0;
private float CurrentPitch = 0;
private RandomNumberGenerator RNG = new RandomNumberGenerator();
private bool PlacingBlock = false;
private Vector2 PlacingMouse = Vector2.Zero;
private bool Dragging = false;
// Called when the node enters the scene tree for the first time.
public override void _Ready() {
CurrentPitch = -(float)Math.PI * 0.25f;
CurrentYaw = (float)Math.PI * 0.5f;
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta) {
if (Hud != null) {
var diff = MaxCameraHeight - MinCameraHeight;
CurrentHeight = (float)(Hud.CameraHeightSlider.Value / Hud.CameraHeightSlider.MaxValue * diff + MinCameraHeight);
}
Position = Vector3.Up * CurrentHeight;
Camera.Position = new Vector3(0, 0, CurrentZoom);
Quaternion = new Quaternion(Vector3.Up, CurrentYaw) * new Quaternion(Vector3.Right, CurrentPitch);
if (HeldBlock != null) {
if (HeldBlock != null)
HeldBlock.Position = HeldBlock.Position.Lerp(Vector3.Zero, 0.2f);
if (PlacingBlock) {
var distance = Camera.GetViewport().GetMousePosition().DistanceSquaredTo(PlacingMouse);
if (distance >= DragDistanceTreshold && !Dragging) {
Dragging = true;
EmitSignal(SignalName.DraggingHeldBlock, HeldBlock);
}
} else {
Dragging = false;
}
}
}
public void SetEnabled(bool enabled) {
@ -86,25 +39,19 @@ namespace Gmtk24 {
Input.MouseMode = Input.MouseModeEnum.Visible;
else
Input.MouseMode = Input.MouseModeEnum.Captured;
Hud.CameraHeightContainer.Visible = enabled;
}
public override void _UnhandledInput(InputEvent @event) {
if (!IsEnabled)
return;
if (@event.IsAction("toggle_pause_menu") && HeldBlock == null) {
SetEnabled(false);
GetViewport().SetInputAsHandled();
}
if (@event.IsActionPressed("drag_orbit"))
Input.MouseMode = Input.MouseModeEnum.Captured;
if (@event.IsActionReleased("drag_orbit"))
Input.MouseMode = Input.MouseModeEnum.Visible;
if (Input.IsActionPressed("drag_orbit") && @event is InputEventMouseMotion mouseMotion) {
var cameraSensitivity = UserSettings.Singleton.GetOrbitSpeedMultipliers();
var cameraSensitivity = UserSettings.Singleton.GetCameraSpeedMultipliers();
var mouseMultiplier = 0.0003f;
CurrentYaw -= mouseMotion.ScreenRelative.X * mouseMultiplier * cameraSensitivity.X;
CurrentPitch -= mouseMotion.ScreenRelative.Y * mouseMultiplier * cameraSensitivity.Y;
@ -112,34 +59,20 @@ namespace Gmtk24 {
CurrentPitch = Mathf.Clamp(CurrentPitch, -Mathf.Pi * 0.49f, 0);
}
if (HeldBlock != null) {
if (@event.IsActionPressed("release_block")) {
EmitSignal(SignalName.BlockRelease, HeldBlock, (uint)BlockReleaseType.Throw);
HeldBlock = null;
}
if (@event.IsAction("place_block")) {
if (@event.IsPressed()) {
PlacingBlock = true;
PlacingMouse = Camera.GetViewport().GetMousePosition();
} else if (PlacingBlock) {
EmitSignal(SignalName.BlockRelease, HeldBlock, (uint)BlockReleaseType.Place);
HeldBlock = null;
}
}
HeldBlock.SetMode(BuildingBlock.BlockMode.Physical);
HeldBlock.Reparent(GetParent());
var normal = Camera.ProjectRayNormal(Camera.GetViewport().GetMousePosition());
var direction = normal * 10;
if (@event.IsActionPressed("rotate_block_right")) {
HeldBlock.RotateY(RotateAmt);
}
if (@event.IsActionPressed("rotate_block_left")) {
HeldBlock.RotateY(-RotateAmt);
}
} else {
if (@event.IsActionPressed("zoom_orbit_out")) {
CurrentZoom = Math.Clamp(CurrentZoom - CameraZoomTick, MinCameraDistance, MaxCameraDistance);
}
if (@event.IsActionPressed("zoom_orbit_in")) {
CurrentZoom = Math.Clamp(CurrentZoom + CameraZoomTick, MinCameraDistance, MaxCameraDistance);
var res = Util.RaycastFromMouse(Camera, 0b1111);
if (res is RaycastResult results) {
GD.Print(results.Position);
direction = (results.Position - HeldBlock.GlobalPosition + Vector3.Up * 0.5f) * 3;
}
HeldBlock.ApplyImpulse(direction);
HeldBlock = null;
}
}
@ -147,24 +80,11 @@ namespace Gmtk24 {
if (HeldBlock != null)
return false; // TODO
PlacingBlock = false;
HeldBlock = block;
bool wasPlaced = HeldBlock.Mode == BuildingBlock.BlockMode.Placed;
var oldLocalRot = HeldBlock.Quaternion;
HeldBlock.SetMode(BuildingBlock.BlockMode.NonPhysical);
HeldBlock.Reparent(Hand, true);
if (!wasPlaced)
HeldBlock.Quaternion = new Quaternion(Vector3.Up, RotateAmt * RNG.RandiRange(0, 100));
else
HeldBlock.Quaternion = oldLocalRot;
HeldBlock.Rotation = Vector3.Zero;
return true;
}
}
public enum BlockReleaseType {
Throw = 0,
Place = 1,
}
}

View File

@ -4,10 +4,9 @@ namespace Gmtk24 {
public partial class PauseMenu : Control {
[Export]
public Control InitialFocusTarget;
[ExportCategory("Setting controls (general)")]
[ExportCategory("Setting controls")]
[Export]
public Range VolumeSlider;
[ExportCategory("Setting controls (camera)")]
[Export]
public Range CameraSensitivityX;
[Export]
@ -16,34 +15,12 @@ namespace Gmtk24 {
public BaseButton CameraInvertX;
[Export]
public BaseButton CameraInvertY;
[ExportCategory("Setting controls (building)")]
[Export]
public Range TableOrbitSpeedX;
[Export]
public Range TableOrbitSpeedY;
[Export]
public BaseButton TableOrbitInvertX;
[Export]
public BaseButton TableOrbitInvertY;
[ExportCategory("Setting controls (graphics)")]
[Export]
public OptionButton MsaaOptions;
[Export]
public OptionButton RenderScaleOptions;
[Export]
public OptionButton UpscalingOptions;
[Export]
public OptionButton WindowModeOptions;
[Export]
public Table Table;
private bool Opened = false;
public override void _Ready() {
VolumeSlider.Value = UserSettings.Singleton.Volume;
VolumeSlider.ValueChanged += (value) => UserSettings.Singleton.SetVolume((float)value);
CameraSensitivityX.Value = UserSettings.Singleton.CameraSensitivityX;
CameraSensitivityX.ValueChanged += (value) => UserSettings.Singleton.CameraSensitivityX = (float)value;
CameraSensitivityY.Value = UserSettings.Singleton.CameraSensitivityY;
@ -53,71 +30,11 @@ namespace Gmtk24 {
CameraInvertY.ButtonPressed = UserSettings.Singleton.CameraInvertY;
CameraInvertY.Toggled += (on) => UserSettings.Singleton.CameraInvertY = on;
TableOrbitSpeedX.Value = UserSettings.Singleton.TableOrbitSpeedX;
TableOrbitSpeedX.ValueChanged += (value) => UserSettings.Singleton.TableOrbitSpeedX = (float)value;
TableOrbitSpeedY.Value = UserSettings.Singleton.TableOrbitSpeedY;
TableOrbitSpeedY.ValueChanged += (value) => UserSettings.Singleton.TableOrbitSpeedY = (float)value;
TableOrbitInvertX.ButtonPressed = UserSettings.Singleton.TableOrbitInvertX;
TableOrbitInvertX.Toggled += (on) => UserSettings.Singleton.TableOrbitInvertX = on;
TableOrbitInvertY.ButtonPressed = UserSettings.Singleton.TableOrbitInvertY;
TableOrbitInvertY.Toggled += (on) => UserSettings.Singleton.TableOrbitInvertY = on;
Viewport vp = GetViewport();
MsaaOptions.Selected = (int)vp.Msaa3D;
MsaaOptions.ItemSelected += (index) => {
vp.Msaa3D = (Viewport.Msaa)index;
GD.Print("Set MSAA to: ", vp.Msaa3D);
};
RenderScaleOptions.Selected = -1;
for (int i = 0; i < RenderScaleOptions.ItemCount; i++) {
if ((int)(vp.Scaling3DScale * 100) == RenderScaleOptions.GetItemId(i)) {
RenderScaleOptions.Selected = i;
break;
}
}
RenderScaleOptions.ItemSelected += (index) => {
vp.Scaling3DScale = RenderScaleOptions.GetItemId((int)index) / 100f;
UpscalingOptions.Disabled = vp.Scaling3DScale > 1;
GD.Print("Set scale to: ", vp.Scaling3DScale);
};
UpscalingOptions.Selected = (int)vp.Scaling3DMode;
UpscalingOptions.ItemSelected += (index) => {
vp.Scaling3DMode = (Viewport.Scaling3DModeEnum)index;
GD.Print("Set scaling mode to: ", vp.Scaling3DMode);
};
DisplayServer.WindowMode mode = DisplayServer.WindowGetMode();
WindowModeOptions.Selected = 0;
if (mode == DisplayServer.WindowMode.Fullscreen) {
WindowModeOptions.Selected = 1;
} else if (mode == DisplayServer.WindowMode.ExclusiveFullscreen) {
WindowModeOptions.Selected = 2;
}
WindowModeOptions.ItemSelected += (index) => {
DisplayServer.WindowMode currentMode = DisplayServer.WindowGetMode();
DisplayServer.WindowMode windowedMode = DisplayServer.WindowMode.Windowed;
if (currentMode != DisplayServer.WindowMode.Fullscreen
&& currentMode != DisplayServer.WindowMode.ExclusiveFullscreen) {
// Not fullscreen: set the windowed mode to the current one to preserve maximizing status
windowedMode = currentMode;
}
if (index == 0) {
DisplayServer.WindowSetMode(windowedMode);
} else if (index == 1) {
DisplayServer.WindowSetMode(DisplayServer.WindowMode.Fullscreen);
} else if (index == 2) {
DisplayServer.WindowSetMode(DisplayServer.WindowMode.ExclusiveFullscreen);
}
};
Close();
Open();
}
public override void _Input(InputEvent @event) {
if (@event.IsActionPressed("toggle_pause_menu") && (!Table.Orbit?.IsEnabled ?? true)) {
if (@event.IsActionPressed("toggle_pause_menu")) {
if (Opened) {
Close();
} else {
@ -144,7 +61,7 @@ namespace Gmtk24 {
}
public void Quit() {
SceneSwitcher.Singleton.SwitchToScene(SceneSwitcher.Scene.MainMenu);
GetTree().Quit();
}
}
}

View File

@ -29,9 +29,6 @@ namespace Gmtk24 {
public AudioStreamPlayer3D FootstepPlayer;
[Export]
public float FootstepNoiseInterval = 0.25f;
[ExportCategory("World")]
[Export]
public Table Table;
private float CurrentYaw = 0;
private float CurrentPitch = 0;
@ -65,16 +62,6 @@ namespace Gmtk24 {
}
GetViewport().SetInputAsHandled();
}
if (@event.IsActionPressed("toggle_table") && !Table.Orbit.IsEnabled) {
if (Table.IsEnabled)
Table.DisableTable();
else {
var forward = Eye.Basis * Vector3.Forward;
forward.Y = 0;
Table.SpawnTable(Position + forward.Normalized() * 2, Position);
}
}
}
public override void _Process(double delta) {

View File

@ -1,112 +0,0 @@
using System.Threading;
using Godot;
namespace Gmtk24 {
public partial class SceneSwitcher : Node {
public enum Scene {
MainMenu,
Demo,
Stairs,
}
/// <summary>This is the entrypoint of the godot project, and never gets
/// unloaded. Set when the entrypoint scene is loaded.</summary>
public static SceneSwitcher Singleton { get; private set; }
[Export]
public float AddedLoadingScreenSeconds = 0.5f;
[Export]
public Control LoadingScreen;
[Export]
public PackedScene MainMenu;
[Export]
public PackedScene DemoScene;
[Export]
public PackedScene StairsScene;
private PackedScene NextScene = null;
private Node InstantiatedScene = null;
private bool SceneLoaded = false;
/// <summary>The instantiation is deferred a bit to let the loading
/// screen actually render in case the loading takes more than a few
/// milliseconds.</summary>
private float SceneLoadCooldown = 0;
public override void _Ready() {
Singleton = this;
SwitchToScene(Scene.MainMenu);
}
public override void _UnhandledInput(InputEvent @event) {
if (@event is InputEventKey keyEv && keyEv.Pressed && keyEv.CtrlPressed) {
if (keyEv.Keycode == Key.F1) {
SwitchToScene(Scene.Demo);
GetViewport().SetInputAsHandled();
}
if (keyEv.Keycode == Key.F2) {
SwitchToScene(Scene.Stairs);
GetViewport().SetInputAsHandled();
}
}
}
public override void _Process(double delta) {
if (!SceneLoaded) {
SceneLoadCooldown -= (float)delta;
if (SceneLoadCooldown <= 0 && NextScene != null) {
LoadNextScene();
NextScene = null;
SceneLoaded = true;
LoadingScreen.Visible = false;
}
}
}
public void SwitchToScene(Scene newScene) {
PackedScene sceneToInstantiate = null;
switch (newScene) {
case Scene.MainMenu:
sceneToInstantiate = MainMenu;
break;
case Scene.Demo:
sceneToInstantiate = DemoScene;
break;
case Scene.Stairs:
sceneToInstantiate = StairsScene;
break;
}
if (sceneToInstantiate == null) {
GD.PrintErr("Tried to switch scenes to Scene." + newScene + " but it hasn't been set up in the entrypoint scene!");
return;
}
NextScene = sceneToInstantiate;
if (IsInstanceValid(InstantiatedScene)) {
RemoveChild(InstantiatedScene);
InstantiatedScene.QueueFree();
}
LoadingScreen.Visible = true;
SceneLoadCooldown = AddedLoadingScreenSeconds;
SceneLoaded = false;
}
private void LoadNextScene() {
if (NextScene == null) {
GD.PrintErr("LoadNextScene called but NextScene is null!");
return;
}
InstantiatedScene = NextScene.Instantiate();
if (InstantiatedScene.ProcessMode == ProcessModeEnum.Inherit) {
InstantiatedScene.ProcessMode = ProcessModeEnum.Pausable;
}
AddChild(InstantiatedScene);
MoveChild(InstantiatedScene, 0);
GetTree().Paused = false;
}
}
}

View File

@ -1,61 +1,32 @@
using Godot;
using System;
using System.Linq;
namespace Gmtk24 {
public partial class Table : Interactible {
[Export]
public Hud Hud;
[Export(PropertyHint.NodeType, "FuncGodotMap")]
public Node3D TrenchbroomMap;
[ExportCategory("Spawn Options")]
[Export]
public float RelativeScale = 0.05f;
[Export]
public Node3D SpawnPoint;
[Export(PropertyHint.LayersAvoidance)]
public uint BlockMask;
[Export(PropertyHint.LayersAvoidance)]
public uint GhostOnlyMask = 0b100000;
[Export(PropertyHint.LayersAvoidance)]
public uint PlaneOnlyLayer = 0b1000000;
[ExportCategory("Block Materials")]
[Export]
public ShaderMaterial BlockMaterial;
[Export]
public ShaderMaterial BlockHoverMaterial;
[Export]
public ShaderMaterial BlockGhostMaterial;
public Node3D SpawnPoint;
[Export(PropertyHint.LayersAvoidance)]
public uint BlockMask;
[ExportCategory("Scene Items")]
[Export]
public Orbit Orbit;
[Export]
public StaticBody3D Plane;
public BuildingBlock GhostBlock;
private Vector3 GhostBlockNormal;
public bool IsEnabled { get => Visible == true; }
// Called when the node enters the scene tree for the first time.
public override void _Ready() {
Orbit.Hud = Hud;
Vector3 SpawnPos = Vector3.Zero;
if (SpawnPoint != null)
SpawnPos = SpawnPoint.GlobalPosition - GlobalPosition;
SpawnBlocks(SpawnPos);
Orbit.BlockRelease += OnBlockRelease;
Orbit.DraggingHeldBlock += OnBlockDrag;
Plane.CollisionLayer = PlaneOnlyLayer;
Plane.CollisionMask = PlaneOnlyLayer;
DisablePlane();
}
public void SpawnBlocks(Vector3 position) {
@ -82,112 +53,12 @@ namespace Gmtk24 {
}
public void Interact(InputEvent _) {
if (IsEnabled)
Orbit.SetEnabled(true);
}
public override void _Process(double delta) {
GhostBlockNormal = Vector3.Up;
if (GhostBlock != null) {
var res = Util.RaycastFromMouse(Orbit.Camera, 0b10100 | PlaneOnlyLayer);
if (res is RaycastResult results) {
Vector3 LocalPos = results.Position - GlobalPosition;
GhostBlockNormal = results.Normal;
Vector3 offset = GhostBlock.OffsetFrom(results.Normal, GhostOnlyMask);
LocalPos += offset;
GhostBlock.Position = LocalPos * Basis;
}
if (Orbit.HeldBlock != null)
GhostBlock.Rotation = Orbit.HeldBlock.Rotation;
}
}
public void OnBlockPickup(BuildingBlock block) {
Orbit.HoldBlock(block);
Vector3 LocalPos = Vector3.Zero;
GhostBlock = new BuildingBlock() {
Base = block.Base,
Material = BlockGhostMaterial,
PhysicalModeLayer = 0,
NonPhysicalModeLayer = GhostOnlyMask,
RelativeScale = RelativeScale,
Position = LocalPos,
Mode = BuildingBlock.BlockMode.NonPhysical,
};
AddChild(GhostBlock);
Hud.InteractionPaused = true;
}
public void OnBlockRelease(BuildingBlock block, uint typeUint) {
Hud.InteractionPaused = false;
BlockReleaseType type = (BlockReleaseType)typeUint;
DisablePlane();
block.Reparent(this);
switch (type) {
case BlockReleaseType.Throw: {
block.SetMode(BuildingBlock.BlockMode.Physical);
var normal = Orbit.Camera.ProjectRayNormal(Orbit.Camera.GetViewport().GetMousePosition());
var direction = normal * 10;
var res = Util.RaycastFromMouse(Orbit.Camera, 0b1111);
if (res is RaycastResult results) {
direction = (results.Position - block.GlobalPosition + Vector3.Up * 0.5f) * 3;
}
block.ApplyImpulse(direction);
break;
}
case BlockReleaseType.Place: {
block.SetMode(BuildingBlock.BlockMode.Placed);
block.Transform = GhostBlock.Transform;
break;
}
default: break;
}
if (GhostBlock != null) {
GhostBlock.QueueFree();
GhostBlock = null;
}
}
private void OnBlockDrag(BuildingBlock _) {
var offset = GhostBlock.OffsetFrom(GhostBlockNormal);
EnablePlane(GhostBlock.Position - offset, new Quaternion(Vector3.Up, 0));
}
private void EnablePlane(Vector3 pos, Quaternion rot) {
Plane.Visible = true;
Plane.ProcessMode = ProcessModeEnum.Pausable;
Plane.Position = pos;
Plane.Quaternion = rot;
}
private void DisablePlane() {
Plane.Visible = false;
Plane.ProcessMode = ProcessModeEnum.Disabled;
}
public void DisableTable() {
Visible = false;
ProcessMode = ProcessModeEnum.Disabled;
}
public void SpawnTable(Vector3 position, Vector3 lookAt) {
if (IsEnabled)
return;
Visible = true;
ProcessMode = ProcessModeEnum.Pausable;
Position = position;
LookAt(lookAt);
Rotate(Vector3.Up, (float)Math.PI / 2);
}
}
}

View File

@ -7,17 +7,11 @@ namespace Gmtk24 {
public static UserSettings Singleton { get; private set; }
public float Volume { get; private set; }
public float CameraSensitivityX = 2f;
public float CameraSensitivityY = 2f;
public bool CameraInvertX = false;
public bool CameraInvertY = false;
public float TableOrbitSpeedX = 1f;
public float TableOrbitSpeedY = 1f;
public bool TableOrbitInvertX = false;
public bool TableOrbitInvertY = false;
public override void _Ready() {
SetVolume(0.2f);
Singleton = this;
@ -29,12 +23,6 @@ namespace Gmtk24 {
return new Vector2(x, y);
}
public Vector2 GetOrbitSpeedMultipliers() {
var x = TableOrbitSpeedX * (TableOrbitInvertX ? -1 : 1);
var y = TableOrbitSpeedY * (TableOrbitInvertY ? -1 : 1);
return new Vector2(x, y);
}
public void SetVolume(float volume) {
AudioServer.SetBusVolumeDb(0, volume == 0 ? -80 : Mathf.LinearToDb(volume));
Volume = volume;

View File

@ -3,7 +3,7 @@ using Godot;
namespace Gmtk24 {
public static class Util {
public static RaycastResult? RaycastFromMouse(Camera3D camera, uint mask = 0b11000) {
public static RaycastResult? RaycastFromMouse(Camera3D camera, uint mask = 0b1000) {
var viewport = camera.GetViewport();
var origin = camera.ProjectRayOrigin(viewport.GetMousePosition());
var normal = camera.ProjectRayNormal(viewport.GetMousePosition()) * 10000;

File diff suppressed because it is too large Load Diff