level pt1
This commit is contained in:
parent
e14289807b
commit
ebdb9c7074
13 changed files with 5138 additions and 1 deletions
21
levels/base_level.tscn
Normal file
21
levels/base_level.tscn
Normal file
File diff suppressed because one or more lines are too long
20
levels/floor_gen.gd
Normal file
20
levels/floor_gen.gd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
@tool
|
||||
extends Path3D
|
||||
|
||||
@export_tool_button("Generate Terrain")
|
||||
var gen_button := _generate
|
||||
|
||||
func _ready() -> void:
|
||||
curve_changed.connect(_generate)
|
||||
|
||||
func _generate() -> void:
|
||||
var points = PackedVector2Array()
|
||||
|
||||
# we assume there's no curves.
|
||||
# if there are curves, we gotta start using the baked points.
|
||||
if curve:
|
||||
for idx in curve.point_count:
|
||||
var p := curve.sample(idx, 0)
|
||||
points.push_back(Vector2(p.x, p.z))
|
||||
|
||||
%Floor.polygon = points
|
||||
1
levels/floor_gen.gd.uid
Normal file
1
levels/floor_gen.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://bmel2u0n7yo6m
|
||||
4983
levels/level_0.tscn
Normal file
4983
levels/level_0.tscn
Normal file
File diff suppressed because it is too large
Load diff
BIN
levels/rrt-map.png
Normal file
BIN
levels/rrt-map.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
41
levels/rrt-map.png.import
Normal file
41
levels/rrt-map.png.import
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bhleneuu7ne5j"
|
||||
path.s3tc="res://.godot/imported/rrt-map.png-5523381b4591ad42d06d6785b860986f.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://levels/rrt-map.png"
|
||||
dest_files=["res://.godot/imported/rrt-map.png-5523381b4591ad42d06d6785b860986f.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
||||
BIN
levels/rrt-map.png~
Normal file
BIN
levels/rrt-map.png~
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
|
|
@ -52,7 +52,8 @@ func exp_lerp(a: Variant, b: Variant, decay: float, dt: float) -> Variant:
|
|||
func _process_movement(delta: float) -> void:
|
||||
var input = Input.get_vector("move_left", "move_right", "move_up", "move_down")
|
||||
input.normalized()
|
||||
var desired_velocity = Vector3(input.x, 0., input.y) * MOVE_SPEED
|
||||
var mul := 5. if DebugMenu.high_speed_hack else 1.
|
||||
var desired_velocity = Vector3(input.x, 0., input.y) * MOVE_SPEED * mul
|
||||
velocity = exp_lerp(velocity, desired_velocity, 20, delta)
|
||||
move_and_slide()
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ config/icon="res://icon.svg"
|
|||
[autoload]
|
||||
|
||||
SignalBus="*uid://cj4jk5xvv2n3l"
|
||||
DebugMenu="*uid://bm0f0u35a8t7h"
|
||||
|
||||
[editor_plugins]
|
||||
|
||||
|
|
@ -64,6 +65,11 @@ swap_weapons={
|
|||
"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":32,"key_label":0,"unicode":32,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
debug_menu={
|
||||
"deadzone": 0.2,
|
||||
"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":96,"key_label":0,"unicode":96,"location":0,"echo":false,"script":null)
|
||||
]
|
||||
}
|
||||
|
||||
[layer_names]
|
||||
|
||||
|
|
|
|||
15
ui/debug_menu/debug_menu.gd
Normal file
15
ui/debug_menu/debug_menu.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends CanvasLayer
|
||||
|
||||
var high_speed_hack := false
|
||||
|
||||
func _ready() -> void:
|
||||
hide()
|
||||
|
||||
func _process(_delta: float) -> void:
|
||||
if Input.is_action_just_pressed("debug_menu"):
|
||||
visible = not visible
|
||||
|
||||
|
||||
func _on_high_speed_button_pressed() -> void:
|
||||
high_speed_hack = not high_speed_hack
|
||||
|
||||
1
ui/debug_menu/debug_menu.gd.uid
Normal file
1
ui/debug_menu/debug_menu.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cffpgkxjvj0vn
|
||||
48
ui/debug_menu/debug_menu.tscn
Normal file
48
ui/debug_menu/debug_menu.tscn
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
[gd_scene format=3 uid="uid://bm0f0u35a8t7h"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cffpgkxjvj0vn" path="res://ui/debug_menu/debug_menu.gd" id="1_2lwgs"]
|
||||
|
||||
[node name="DebugMenu" type="CanvasLayer" unique_id=558790664]
|
||||
script = ExtResource("1_2lwgs")
|
||||
|
||||
[node name="PanelContainer" type="PanelContainer" parent="." unique_id=64138653]
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -346.0
|
||||
offset_top = -220.5
|
||||
offset_right = 346.0
|
||||
offset_bottom = 220.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="MarginContainer" type="MarginContainer" parent="PanelContainer" unique_id=946193884]
|
||||
layout_mode = 2
|
||||
theme_override_constants/margin_left = 20
|
||||
theme_override_constants/margin_top = 20
|
||||
theme_override_constants/margin_right = 20
|
||||
theme_override_constants/margin_bottom = 40
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/MarginContainer" unique_id=914874001]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=1614857937]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
theme_override_font_sizes/font_size = 64
|
||||
text = "Debug Menu"
|
||||
|
||||
[node name="Control" type="Control" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=793406043]
|
||||
layout_mode = 2
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="HighSpeedButton" type="Button" parent="PanelContainer/MarginContainer/VBoxContainer" unique_id=561205823]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
theme_override_font_sizes/font_size = 30
|
||||
text = "High Speed"
|
||||
|
||||
[connection signal="pressed" from="PanelContainer/MarginContainer/VBoxContainer/HighSpeedButton" to="." method="_on_high_speed_button_pressed"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue