From ff5e9214e671af7a7c7c238207e5d6086eba2936 Mon Sep 17 00:00:00 2001 From: mikatomik Date: Tue, 19 Jul 2022 07:24:13 -0400 Subject: Add generic testing map Initial version of shipyard map implemented for testing. Base_char mesh and goo-gun meshes property "use in baked light" set to true during experiment with GI probes for global illumination. Label added to view model to display in-game FPS. Main camera "far" property turned up to 500 so the whole map can be drawn. General purpose liquid shader added for use as water in shipyard_map. World default environment updated for visual quality. Shader_Compiler.gd implemented to combat stuttering when compiling shaders on the fly. This may be obsolete with the release of Godot 3.5 that introduced async compilation. Signed-off-by: mikatomik --- assets/view_model/ViewModel.gd | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'assets/view_model/ViewModel.gd') diff --git a/assets/view_model/ViewModel.gd b/assets/view_model/ViewModel.gd index 1c29a0e..cb85117 100644 --- a/assets/view_model/ViewModel.gd +++ b/assets/view_model/ViewModel.gd @@ -11,6 +11,7 @@ var snap = Vector3.DOWN onready var character = $BaseCharacter onready var anchor = $Anchor onready var spring_arm = $Anchor/SpringArm +onready var fps_label = $fps_label func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) @@ -20,6 +21,9 @@ func _process(_delta): # independently. Recouple their translations here so that the camera follows the model through # space. anchor.translation = character.translation + + # Update fps counter in HUD + fps_label.text = "FPS: " + str(Engine.get_frames_per_second()) func _physics_process(delta): # Intended movement direction with the rotational angle adjusted by the camera's aim direction -- cgit v1.2.3