Fixed some volume related issues, separated options into its own menu with tabs, added a visualised collision actor (dual pass graphics required), added a player model, started shooting mechanics

This commit is contained in:
Halbear 2026-07-10 01:01:13 +01:00
parent f3aee6cb84
commit 59c5486299
24 changed files with 1538 additions and 1356 deletions

File diff suppressed because it is too large Load diff

View file

@ -1,159 +1,163 @@
190:07:2026 16:47:19.460 INFO:
190:07:2026 23:47:04.680 INFO:
Launching New Terrain4J Powered Software!
190:07:2026 16:47:19.469 DEBUG: File [terrain4j.properties] read
190:07:2026 16:47:19.476 DEBUG:
190:07:2026 23:47:04.684 DEBUG: File [terrain4j.properties] read
190:07:2026 23:47:04.688 DEBUG:
successfully loaded configuration:
{compatibility_mode=false, ShaderRecompiling=true, cap_main_to_tickrate=true, LoadingScreenLocation=resources/EngineResources/Texture/Terrain4JTitleImage.png, z_near_plane=10000.0f, display_width=640, anti_alias_mode=0, main_thread_tickrate=120, Software_Icon=ProgramIcon.png, MaxAllowedVulkanCrashes=10, throttle_on_unfocus=false, vsync=false, cap_fast_to_tickrate=true, Software_Icon_Path=/WindowResources/Icon/, RequestedImages=3, throttle_accuracy=4000000, DualPassRendering=false, field_of_view=60.0f, ShadowMapSize=2048, PhysicalDeviceName=, fast_thread_tickrate=240, vkValidated=true, cap_master_to_tickrate=true, AlphaToCoverage=false, display_height=480, Renderer=1, Software_Title=Terrain4J Game Engine, z_far_plane=0.1f, frame_accuracy=0, master_tick_rate=240, Debug_Shaders=false, DefaultTexturePath=resources/EngineResources/Texture/NoTexture.png}
190:07:2026 16:47:19.584 DEBUG: Loading Models From [resources/models/cube/Cube.json]
190:07:2026 16:47:19.695 DEBUG: Loaded Model Data: [ModelData[ID=Cube, Meshes=[MeshData[ID=mesh_0, MaterialID=Cube-mat-1, OffsetVertex=0, VertexSize=1344, OffsetIndex=0, IndexSize=144]], VertexPath=resources/models/cube/Cube.vtx, IndexPath=resources/models/cube/Cube.idx]]
190:07:2026 16:47:19.695 DEBUG: Loading Materials From [resources/models/cube/Cube_mat.json]
190:07:2026 16:47:19.721 DEBUG: Loaded Material Data: [[MaterialData[ID=Cube-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Cube-mat-1, TexturePath=resources\models\cube\cubetexture.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Cube-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 16:47:19.721 DEBUG: Loading Models From [resources/models/VisualCollision/CollisionCube.json]
190:07:2026 16:47:19.722 DEBUG: Loaded Model Data: [ModelData[ID=CollisionCube, Meshes=[MeshData[ID=mesh_0, MaterialID=CollisionCube-mat-1, OffsetVertex=0, VertexSize=1344, OffsetIndex=0, IndexSize=144]], VertexPath=resources/models/VisualCollision/CollisionCube.vtx, IndexPath=resources/models/VisualCollision/CollisionCube.idx]]
190:07:2026 16:47:19.724 DEBUG: Loading Materials From [resources/models/VisualCollision/CollisionCube_mat.json]
190:07:2026 16:47:19.726 DEBUG: Loaded Material Data: [[MaterialData[ID=CollisionCube-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=CollisionCube-mat-1, TexturePath=resources\models\VisualCollision\CollisionCubeTexture.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=CollisionCube-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 16:47:19.726 DEBUG: Loading Models From [resources/models/melona/melona.json]
190:07:2026 16:47:19.727 DEBUG: Loaded Model Data: [ModelData[ID=melona, Meshes=[MeshData[ID=m_6d7d0384-980c-6574-37d9-8a8b11a5fdda_0, MaterialID=melona-mat-1, OffsetVertex=0, VertexSize=24192, OffsetIndex=0, IndexSize=2640], MeshData[ID=none_1, MaterialID=melona-mat-2, OffsetVertex=24192, VertexSize=672, OffsetIndex=2640, IndexSize=96]], VertexPath=resources/models/melona/melona.vtx, IndexPath=resources/models/melona/melona.idx]]
190:07:2026 16:47:19.727 DEBUG: Loading Materials From [resources/models/melona/melona_mat.json]
190:07:2026 16:47:19.728 DEBUG: Loaded Material Data: [[MaterialData[ID=melona-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=melona-mat-1, TexturePath=resources\models\melona\Melonamodel.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=melona-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 16:47:19.729 DEBUG: Loading Models From [resources/models/musket/musket.json]
190:07:2026 16:47:19.730 DEBUG: Loaded Model Data: [ModelData[ID=musket, Meshes=[MeshData[ID=cube_0, MaterialID=musket-mat-1, OffsetVertex=0, VertexSize=25088, OffsetIndex=0, IndexSize=2880]], VertexPath=resources/models/musket/musket.vtx, IndexPath=resources/models/musket/musket.idx]]
190:07:2026 16:47:19.730 DEBUG: Loading Materials From [resources/models/musket/musket_mat.json]
190:07:2026 16:47:19.732 DEBUG: Loaded Material Data: [[MaterialData[ID=musket-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=musket-mat-1, TexturePath=resources\models\musket\Musket.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=musket-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 16:47:19.732 DEBUG: Loading Models From [resources/models/Revolver/Revolver.json]
190:07:2026 16:47:19.733 DEBUG: Loaded Model Data: [ModelData[ID=Revolver, Meshes=[MeshData[ID=cube_0, MaterialID=Revolver-mat-1, OffsetVertex=0, VertexSize=21280, OffsetIndex=0, IndexSize=2304]], VertexPath=resources/models/Revolver/Revolver.vtx, IndexPath=resources/models/Revolver/Revolver.idx]]
190:07:2026 16:47:19.733 DEBUG: Loading Materials From [resources/models/Revolver/Revolver_mat.json]
190:07:2026 16:47:19.735 DEBUG: Loaded Material Data: [[MaterialData[ID=Revolver-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Revolver-mat-1, TexturePath=resources\models\Revolver\Revolver.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Revolver-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 16:47:19.743 INFO: Spawning static cube actor [MelonaSpawned0] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.788 INFO: Spawning static cube actor [MelonaSpawned1] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.789 INFO: Spawning static cube actor [MelonaSpawned2] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.789 INFO: Spawning static cube actor [MelonaSpawned3] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.790 INFO: Spawning static cube actor [MelonaSpawned4] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.790 INFO: Spawning static cube actor [MelonaSpawned5] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.790 INFO: Spawning static cube actor [MelonaSpawned6] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.791 INFO: Spawning static cube actor [MelonaSpawned7] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.791 INFO: Spawning static cube actor [MelonaSpawned8] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.791 INFO: Spawning static cube actor [MelonaSpawned9] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.791 INFO: Spawning static cube actor [MelonaSpawned10] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.792 INFO: Spawning static cube actor [MelonaSpawned11] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.792 INFO: Spawning static cube actor [MelonaSpawned12] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.792 INFO: Spawning static cube actor [MelonaSpawned13] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.792 INFO: Spawning static cube actor [MelonaSpawned14] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.793 INFO: Spawning static cube actor [MelonaSpawned15] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.793 INFO: Spawning static cube actor [MelonaSpawned16] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.793 INFO: Spawning static cube actor [MelonaSpawned17] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.794 INFO: Spawning static cube actor [MelonaSpawned18] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.794 INFO: Spawning static cube actor [MelonaSpawned19] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.794 INFO: Spawning static cube actor [MelonaSpawned20] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.795 INFO: Spawning static cube actor [MelonaSpawned21] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.795 INFO: Spawning static cube actor [MelonaSpawned22] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.796 INFO: Spawning static cube actor [MelonaSpawned23] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.796 INFO: Spawning static cube actor [MelonaSpawned24] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.796 INFO: Spawning static cube actor [MelonaSpawned25] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.796 INFO: Spawning static cube actor [MelonaSpawned26] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.797 INFO: Spawning static cube actor [MelonaSpawned27] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.797 INFO: Spawning static cube actor [MelonaSpawned28] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.797 INFO: Spawning static cube actor [MelonaSpawned29] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.797 INFO: Spawning static cube actor [MelonaSpawned30] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.797 INFO: Spawning static cube actor [MelonaSpawned31] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.798 INFO: Spawning static cube actor [MelonaSpawned32] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.798 INFO: Spawning static cube actor [MelonaSpawned33] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.798 INFO: Spawning static cube actor [MelonaSpawned34] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.798 INFO: Spawning static cube actor [MelonaSpawned35] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.798 INFO: Spawning static cube actor [MelonaSpawned36] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.799 INFO: Spawning static cube actor [MelonaSpawned37] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.799 INFO: Spawning static cube actor [MelonaSpawned38] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.799 INFO: Spawning static cube actor [MelonaSpawned39] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.799 INFO: Spawning static cube actor [MelonaSpawned40] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.799 INFO: Spawning static cube actor [MelonaSpawned41] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.799 INFO: Spawning static cube actor [MelonaSpawned42] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned43] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned44] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned45] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned46] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned47] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned48] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned49] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned50] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.800 INFO: Spawning static cube actor [MelonaSpawned51] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.801 INFO: Spawning static cube actor [MelonaSpawned52] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.801 INFO: Spawning static cube actor [MelonaSpawned53] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.801 INFO: Spawning static cube actor [MelonaSpawned54] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.801 INFO: Spawning static cube actor [MelonaSpawned55] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.801 INFO: Spawning static cube actor [MelonaSpawned56] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.802 INFO: Spawning static cube actor [MelonaSpawned57] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.802 INFO: Spawning static cube actor [MelonaSpawned58] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.802 INFO: Spawning static cube actor [MelonaSpawned59] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.802 INFO: Spawning static cube actor [MelonaSpawned60] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.802 INFO: Spawning static cube actor [MelonaSpawned61] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.802 INFO: Spawning static cube actor [MelonaSpawned62] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.803 INFO: Spawning static cube actor [MelonaSpawned63] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.803 INFO: Spawning static cube actor [MelonaSpawned64] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.803 INFO: Spawning static cube actor [MelonaSpawned65] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.803 INFO: Spawning static cube actor [MelonaSpawned66] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.803 INFO: Spawning static cube actor [MelonaSpawned67] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned68] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned69] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned70] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned71] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned72] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned73] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned74] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.804 INFO: Spawning static cube actor [MelonaSpawned75] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned76] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned77] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned78] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned79] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned80] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned81] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned82] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.805 INFO: Spawning static cube actor [MelonaSpawned83] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.806 INFO: Spawning static cube actor [MelonaSpawned84] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.806 INFO: Spawning static cube actor [MelonaSpawned85] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.806 INFO: Spawning static cube actor [MelonaSpawned86] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.806 INFO: Spawning static cube actor [MelonaSpawned87] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.806 INFO: Spawning static cube actor [MelonaSpawned88] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.807 INFO: Spawning static cube actor [MelonaSpawned89] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.807 INFO: Spawning static cube actor [MelonaSpawned90] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.807 INFO: Spawning static cube actor [MelonaSpawned91] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.807 INFO: Spawning static cube actor [MelonaSpawned92] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.807 INFO: Spawning static cube actor [MelonaSpawned93] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.808 INFO: Spawning static cube actor [MelonaSpawned94] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.808 INFO: Spawning static cube actor [MelonaSpawned95] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.808 INFO: Spawning static cube actor [MelonaSpawned96] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.808 INFO: Spawning static cube actor [MelonaSpawned97] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.808 INFO: Spawning static cube actor [MelonaSpawned98] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.808 INFO: Spawning static cube actor [MelonaSpawned99] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.808 INFO: Spawning static cube actor [MelonaSpawned100] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.810 INFO: Spawning static cube actor [MelonaSpawned101] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.810 INFO: Spawning static cube actor [MelonaSpawned102] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.810 INFO: Spawning static cube actor [MelonaSpawned103] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.811 INFO: Spawning static cube actor [MelonaSpawned104] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.812 INFO: Spawning static cube actor [MelonaSpawned105] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.812 INFO: Spawning static cube actor [MelonaSpawned106] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.812 INFO: Spawning static cube actor [MelonaSpawned107] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.812 INFO: Spawning static cube actor [MelonaSpawned108] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.812 INFO: Spawning static cube actor [MelonaSpawned109] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.812 INFO: Spawning static cube actor [MelonaSpawned110] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.812 INFO: Spawning static cube actor [MelonaSpawned111] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.813 INFO: Spawning static cube actor [MelonaSpawned112] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.813 INFO: Spawning static cube actor [MelonaSpawned113] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.813 INFO: Spawning static cube actor [MelonaSpawned114] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.813 INFO: Spawning static cube actor [MelonaSpawned115] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.813 INFO: Spawning static cube actor [MelonaSpawned116] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.814 INFO: Spawning static cube actor [MelonaSpawned117] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.814 INFO: Spawning static cube actor [MelonaSpawned118] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.814 INFO: Spawning static cube actor [MelonaSpawned119] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.814 INFO: Spawning static cube actor [MelonaSpawned120] with model ID [Cube], with cached ID of [Cube]
190:07:2026 16:47:19.816 DEBUG: Starting Main Thread
190:07:2026 16:47:19.817 DEBUG: Starting Fast Thread
190:07:2026 16:47:19.817 DEBUG: Starting Render Thread
190:07:2026 16:47:19.824 INFO: Launched Terrain4J Engine
190:07:2026 16:47:19.825 DEBUG: Primary Thread Started
190:07:2026 16:47:19.825 INFO: Terrain4J dedicated server running without GLFW/Vulkan/OpenAL
190:07:2026 16:47:19.825 DEBUG: Main Thread Started
190:07:2026 16:47:19.825 DEBUG: Render Thread Started
190:07:2026 16:47:19.825 DEBUG: Fast Thread Started
190:07:2026 23:47:04.739 DEBUG: Loading Models From [resources/models/cube/Cube.json]
190:07:2026 23:47:04.789 DEBUG: Loaded Model Data: [ModelData[ID=Cube, Meshes=[MeshData[ID=mesh_0, MaterialID=Cube-mat-1, OffsetVertex=0, VertexSize=1344, OffsetIndex=0, IndexSize=144]], VertexPath=resources/models/cube/Cube.vtx, IndexPath=resources/models/cube/Cube.idx]]
190:07:2026 23:47:04.789 DEBUG: Loading Materials From [resources/models/cube/Cube_mat.json]
190:07:2026 23:47:04.800 DEBUG: Loaded Material Data: [[MaterialData[ID=Cube-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Cube-mat-1, TexturePath=resources\models\cube\cubetexture.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Cube-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 23:47:04.800 DEBUG: Loading Models From [resources/models/VisualCollision/CollisionCube.json]
190:07:2026 23:47:04.800 DEBUG: Loaded Model Data: [ModelData[ID=CollisionCube, Meshes=[MeshData[ID=mesh_0, MaterialID=CollisionCube-mat-1, OffsetVertex=0, VertexSize=1344, OffsetIndex=0, IndexSize=144]], VertexPath=resources/models/VisualCollision/CollisionCube.vtx, IndexPath=resources/models/VisualCollision/CollisionCube.idx]]
190:07:2026 23:47:04.801 DEBUG: Loading Materials From [resources/models/VisualCollision/CollisionCube_mat.json]
190:07:2026 23:47:04.803 DEBUG: Loaded Material Data: [[MaterialData[ID=CollisionCube-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=CollisionCube-mat-1, TexturePath=resources\models\VisualCollision\CollisionCubeTexture.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=CollisionCube-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 23:47:04.803 DEBUG: Loading Models From [resources/models/melona/melona.json]
190:07:2026 23:47:04.803 DEBUG: Loaded Model Data: [ModelData[ID=melona, Meshes=[MeshData[ID=m_6d7d0384-980c-6574-37d9-8a8b11a5fdda_0, MaterialID=melona-mat-1, OffsetVertex=0, VertexSize=24192, OffsetIndex=0, IndexSize=2640], MeshData[ID=none_1, MaterialID=melona-mat-2, OffsetVertex=24192, VertexSize=672, OffsetIndex=2640, IndexSize=96]], VertexPath=resources/models/melona/melona.vtx, IndexPath=resources/models/melona/melona.idx]]
190:07:2026 23:47:04.803 DEBUG: Loading Materials From [resources/models/melona/melona_mat.json]
190:07:2026 23:47:04.804 DEBUG: Loaded Material Data: [[MaterialData[ID=melona-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=melona-mat-1, TexturePath=resources\models\melona\Melonamodel.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=melona-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 23:47:04.804 DEBUG: Loading Models From [resources/models/musket/musket.json]
190:07:2026 23:47:04.805 DEBUG: Loaded Model Data: [ModelData[ID=musket, Meshes=[MeshData[ID=cube_0, MaterialID=musket-mat-1, OffsetVertex=0, VertexSize=25088, OffsetIndex=0, IndexSize=2880]], VertexPath=resources/models/musket/musket.vtx, IndexPath=resources/models/musket/musket.idx]]
190:07:2026 23:47:04.805 DEBUG: Loading Materials From [resources/models/musket/musket_mat.json]
190:07:2026 23:47:04.806 DEBUG: Loaded Material Data: [[MaterialData[ID=musket-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=musket-mat-1, TexturePath=resources\models\musket\Musket.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=musket-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 23:47:04.806 DEBUG: Loading Models From [resources/models/Revolver/Revolver.json]
190:07:2026 23:47:04.806 DEBUG: Loaded Model Data: [ModelData[ID=Revolver, Meshes=[MeshData[ID=cube_0, MaterialID=Revolver-mat-1, OffsetVertex=0, VertexSize=21280, OffsetIndex=0, IndexSize=2304]], VertexPath=resources/models/Revolver/Revolver.vtx, IndexPath=resources/models/Revolver/Revolver.idx]]
190:07:2026 23:47:04.806 DEBUG: Loading Materials From [resources/models/Revolver/Revolver_mat.json]
190:07:2026 23:47:04.808 DEBUG: Loaded Material Data: [[MaterialData[ID=Revolver-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Revolver-mat-1, TexturePath=resources\models\Revolver\Revolver.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Revolver-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 23:47:04.808 DEBUG: Loading Models From [resources/models/Flintlock/Flintlock.json]
190:07:2026 23:47:04.809 DEBUG: Loaded Model Data: [ModelData[ID=Flintlock, Meshes=[MeshData[ID=cube_0, MaterialID=Flintlock-mat-1, OffsetVertex=0, VertexSize=19936, OffsetIndex=0, IndexSize=2160]], VertexPath=resources/models/Flintlock/Flintlock.vtx, IndexPath=resources/models/Flintlock/Flintlock.idx]]
190:07:2026 23:47:04.809 DEBUG: Loading Materials From [resources/models/Flintlock/Flintlock_mat.json]
190:07:2026 23:47:04.810 DEBUG: Loaded Material Data: [[MaterialData[ID=Flintlock-mat-0, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Flintlock-mat-1, TexturePath=resources\models\Flintlock\Flintlock.png, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0], MaterialData[ID=Flintlock-mat-2, TexturePath=, NormalTexturePath=, MetalRoughnessMap=, DiffuseColour=( 6.000E-1 6.000E-1 6.000E-1 1.000E+0), Roughness=0.0, Metallic=0.0]]]
190:07:2026 23:47:04.814 INFO: Spawning static cube actor [MelonaSpawned0] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.835 INFO: Spawning static cube actor [MelonaSpawned1] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.835 INFO: Spawning static cube actor [MelonaSpawned2] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.835 INFO: Spawning static cube actor [MelonaSpawned3] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.835 INFO: Spawning static cube actor [MelonaSpawned4] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.835 INFO: Spawning static cube actor [MelonaSpawned5] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.835 INFO: Spawning static cube actor [MelonaSpawned6] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.836 INFO: Spawning static cube actor [MelonaSpawned7] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.836 INFO: Spawning static cube actor [MelonaSpawned8] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.836 INFO: Spawning static cube actor [MelonaSpawned9] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.836 INFO: Spawning static cube actor [MelonaSpawned10] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.836 INFO: Spawning static cube actor [MelonaSpawned11] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned12] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned13] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned14] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned15] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned16] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned17] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned18] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.837 INFO: Spawning static cube actor [MelonaSpawned19] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned20] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned21] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned22] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned23] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned24] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned25] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned26] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned27] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned28] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned29] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned30] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.838 INFO: Spawning static cube actor [MelonaSpawned31] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.839 INFO: Spawning static cube actor [MelonaSpawned32] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.839 INFO: Spawning static cube actor [MelonaSpawned33] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.839 INFO: Spawning static cube actor [MelonaSpawned34] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.839 INFO: Spawning static cube actor [MelonaSpawned35] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.839 INFO: Spawning static cube actor [MelonaSpawned36] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.839 INFO: Spawning static cube actor [MelonaSpawned37] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.839 INFO: Spawning static cube actor [MelonaSpawned38] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned39] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned40] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned41] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned42] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned43] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned44] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned45] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned46] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned47] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned48] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned49] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned50] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned51] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned52] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.840 INFO: Spawning static cube actor [MelonaSpawned53] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned54] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned55] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned56] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned57] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned58] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned59] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned60] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned61] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned62] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned63] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned64] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned65] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.841 INFO: Spawning static cube actor [MelonaSpawned66] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.842 INFO: Spawning static cube actor [MelonaSpawned67] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.842 INFO: Spawning static cube actor [MelonaSpawned68] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.842 INFO: Spawning static cube actor [MelonaSpawned69] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.842 INFO: Spawning static cube actor [MelonaSpawned70] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.842 INFO: Spawning static cube actor [MelonaSpawned71] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.842 INFO: Spawning static cube actor [MelonaSpawned72] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.842 INFO: Spawning static cube actor [MelonaSpawned73] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned74] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned75] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned76] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned77] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned78] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned79] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned80] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned81] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned82] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned83] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned84] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned85] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned86] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.843 INFO: Spawning static cube actor [MelonaSpawned87] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned88] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned89] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned90] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned91] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned92] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned93] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned94] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned95] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned96] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned97] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned98] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.844 INFO: Spawning static cube actor [MelonaSpawned99] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned100] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned101] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned102] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned103] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned104] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned105] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned106] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned107] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned108] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned109] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.845 INFO: Spawning static cube actor [MelonaSpawned110] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned111] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned112] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned113] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned114] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned115] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned116] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned117] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned118] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned119] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.846 INFO: Spawning static cube actor [MelonaSpawned120] with model ID [Cube], with cached ID of [Cube]
190:07:2026 23:47:04.849 DEBUG: Starting Main Thread
190:07:2026 23:47:04.850 DEBUG: Starting Fast Thread
190:07:2026 23:47:04.850 DEBUG: Starting Render Thread
190:07:2026 23:47:04.942 INFO: Launched Terrain4J Engine
190:07:2026 23:47:04.942 DEBUG: Primary Thread Started
190:07:2026 23:47:04.942 INFO: Terrain4J dedicated server running without GLFW/Vulkan/OpenAL
190:07:2026 23:47:04.942 DEBUG: Main Thread Started
190:07:2026 23:47:04.942 DEBUG: Render Thread Started
190:07:2026 23:47:04.942 DEBUG: Fast Thread Started

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

File diff suppressed because one or more lines are too long

View file

@ -2,14 +2,14 @@
mtllib Cube.mtl
o mesh
v 0.5 0.75 0.5
v 0.5 0.75 -0.5
v 0.5 -0.25 0.5
v 0.5 -0.25 -0.5
v -0.5 0.75 0.5
v -0.5 0.75 -0.5
v -0.5 -0.25 0.5
v -0.5 -0.25 -0.5
v 0.5 1 0.5
v 0.5 1 -0.5
v 0.5 0 0.5
v 0.5 0 -0.5
v -0.5 1 0.5
v -0.5 1 -0.5
v -0.5 0 0.5
v -0.5 0 -0.5
vt 0.25 1
vt 0 1
vt 0 0.75

Binary file not shown.

View file

@ -6,10 +6,12 @@ import net.halbear.Terrain4J.EngineCore.Main.PrimaryRuntime;
import org.tinylog.Logger;
import org.tinylog.configuration.Configuration;
import java.util.UUID;
//Halbear was here
public class Init {
public static void main(String[] args){
Configuration.set("writer.file", "ClientLog.t4jlog");
Configuration.set("writer.file", "ClientLog" + UUID.randomUUID() +".t4jlog");
Logger.info("\nLaunching New Terrain4J Powered Software!");
var GameEngine = new PrimaryRuntime(EngineConfig.getInstance().GetSoftwareName(), new GameCore());
Logger.info("Launched Terrain4J Engine");

View file

@ -12,6 +12,8 @@ import org.tinylog.Logger;
import java.io.File;
import static net.halbear.Terrain4J.EngineCore.Main.Scene.GUIs.StartMenu.GameStarted;
import static net.halbear.Terrain4J.EngineCore.Main.Scene.GUIs.StartMenu.ShowSettings;
import static org.lwjgl.glfw.Callbacks.glfwFreeCallbacks;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.glfw.GLFWVulkan.glfwVulkanSupported;
@ -24,6 +26,9 @@ public class Window {
private int width;
private boolean displayFPS = false;
public boolean CursorLocked = false;
public boolean ForceCursorUnlock = false;
public Window(String title){
if (!glfwInit()) {
@ -40,11 +45,16 @@ public class Window {
height = vidMode.height();//Globals.getInstance().getHeight();
glfwDefaultWindowHints();
glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
glfwWindowHint(GLFW_MAXIMIZED, GLFW_FALSE);
glfwWindowHint(GLFW_ALPHA_BITS, 0);
glfwWindowHint(GLFW_TRANSPARENT_FRAMEBUFFER, GLFW_FALSE);
handle = glfwCreateWindow(width, height, title, MemoryUtil.NULL, MemoryUtil.NULL);
if (glfwRawMouseMotionSupported()) {
glfwSetInputMode(handle, GLFW_RAW_MOUSE_MOTION, GLFW_TRUE);
}
LockCursor();
if (handle == MemoryUtil.NULL) {
//throw new RuntimeException("Failed to create the GLFW window");
}
@ -93,6 +103,16 @@ public class Window {
else glfwSwapInterval(0);
mouseInput = new MouseListener(handle);
}
public void LockCursor(){
CursorLocked = true;
glfwSetInputMode(handle, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
}
public void UnlockCursor(){
CursorLocked = false;
glfwSetInputMode(handle, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
}
public void cleanup() {
glfwFreeCallbacks(handle);
glfwDestroyWindow(handle);
@ -111,6 +131,8 @@ public class Window {
return mouseInput;
}
public void pollEvents() {
if((!GameStarted || ShowSettings || ForceCursorUnlock) && CursorLocked) UnlockCursor();
else if (GameStarted && !ShowSettings && !CursorLocked) LockCursor();
if (keyboardInput.keySinglePress(GLFW_KEY_V)) {
SetVsync();
}

View file

@ -80,6 +80,11 @@ public class EngineConfig {
public boolean RenderCollisionMesh = true;
public float PhysicsSpeed = 1.0f;
public float MusicVolume = 1.0f;
public float SoundVolume = 1.0f;
public float WeaponVolume = 1.0f;
public float AmbientVolume = 1.0f;
public float PhysicsSpeed(){return PhysicsSpeed;}
public void SetPhysicsSpeed(float NewSpeed){PhysicsSpeed =NewSpeed;}

View file

@ -3,14 +3,54 @@ package net.halbear.Terrain4J.EngineCore.Main;
import net.halbear.Terrain4J.EngineCore.Audio.AudioManager;
import net.halbear.Terrain4J.EngineCore.Audio.AudioSource;
import net.halbear.Terrain4J.EngineCore.Audio.SoundBuffer;
import net.halbear.Terrain4J.EngineCore.Logic.EngineConfig;
import org.joml.Vector3f;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
public class AudioInstance {
public static final Map<String, AudioInstance> AudioInstances = new HashMap<>();
public static void ApplyUniversalVolume(){
AudioInstances.forEach((name,instance)->{
switch (instance.audioType){
case SFX:
instance.SetVolume(EngineConfig.getInstance().SoundVolume);
break;
case WEAPONS:
instance.SetVolume(EngineConfig.getInstance().WeaponVolume);
break;
case MUSIC:
instance.SetVolume(EngineConfig.getInstance().MusicVolume);
break;
case AMBIENT:
instance.SetVolume(EngineConfig.getInstance().AmbientVolume);
break;
default:
}
});
}
public enum AudioType{
SFX,
WEAPONS,
MUSIC,
AMBIENT
}
private String SourcePath;
private String BUFFER_ID = "AUDIO_INSTANCE_BUFFER";
private String SOURCE_ID = "AUDIO_INSTANCE_SOURCE";
private String InstanceName = "";
private AudioSource audioSource;
public AudioType audioType = AudioType.MUSIC;
public AudioInstance SetAudioType(AudioType type){
audioType = type;
return this;
}
public AudioInstance(String AudioSourcePath, String InstanceName, AudioManager manager, boolean loop){
SourcePath = AudioSourcePath;
@ -22,6 +62,7 @@ public class AudioInstance {
this.audioSource = new AudioSource(loop,true);
audioSource.SetBuffer(buffer.GetBufferID());
manager.AddSoundSource(SOURCE_ID,audioSource);
AudioInstances.put(InstanceName,this);
}
public AudioInstance(String AudioSourcePath,String InstanceName, AudioManager manager, float X, float Y, float Z, boolean loop){
SourcePath = AudioSourcePath;

View file

@ -25,6 +25,7 @@ import net.halbear.Terrain4J.EngineCore.Logic.Rendering.ModelLoader;
import net.halbear.Terrain4J.EngineCore.Main.Scene.*;
import net.halbear.Terrain4J.EngineCore.Main.Scene.GUIs.Gimbal;
import net.halbear.Terrain4J.EngineCore.Main.Scene.GUIs.LoadingScreen;
import net.halbear.Terrain4J.EngineCore.Main.Scene.GUIs.SettingsMenu;
import net.halbear.Terrain4J.EngineCore.Main.Scene.GUIs.StartMenu;
import net.halbear.Terrain4J.EngineCore.Profiling.CPUMonitor;
import net.halbear.Terrain4J.EngineCore.Profiling.GPUProfiler;
@ -67,9 +68,11 @@ public class GameCore implements GameLogic {
private String CubeModelID = "Cube";
private ModelData MusketData;
private ModelData RevolverData;
private ModelData FlintlockData;
public ILight SkyLight;
private LoadingScreen loadingScreen;
public final StartMenu startMenu = new StartMenu();
public final SettingsMenu Settings = new SettingsMenu();
public boolean StartMenuActive = true;
public List<IMoveableActorComponent> ActorEditorComponents = new ArrayList<>();
private Vector2f DeltaPos = new Vector2f(0,0);
@ -102,45 +105,28 @@ public class GameCore implements GameLogic {
List<MaterialData> MusketMat = ModelLoader.LoadMaterials("resources/models/musket/musket_mat.json");
RevolverData = ModelLoader.LoadModel("resources/models/Revolver/Revolver.json");
List<MaterialData> RevolverMat = ModelLoader.LoadMaterials("resources/models/Revolver/Revolver_mat.json");
Item MusketItem = new Item(MusketData.ID(), 1.0f, 8);
Item RevolverItem = new Item(RevolverData.ID(), 2.0f, 6);
FlintlockData = ModelLoader.LoadModel("resources/models/Flintlock/Flintlock.json");
List<MaterialData> FlintlockMat = ModelLoader.LoadMaterials("resources/models/Flintlock/Flintlock_mat.json");
Item MusketItem = new Item(MusketData.ID(), 1.0f, 1, 10.0f);
Item RevolverItem = new Item(RevolverData.ID(), 4.0f, 6, 10.0f);
Item FlintLock = new Item(FlintlockData.ID(), 1.0f, 2, 10.0f);
scene.MusketItem = MusketItem;
scene.RevolverItem = RevolverItem;
scene.FlintLockItem = FlintLock;
boolean createOfflinePlayer = !PrimaryRuntime.Server && !ClientConnectionThread.Connected;
if(createOfflinePlayer) {
var Musket = new PlayerActor("DebugCamera","Player_Musket", MusketData.ID(), new Vector3f(0,5f,-5f)).SetCameraOffset(new Vector3f(0,1.0f,0));
Musket.SetPositionOffset(new Vector3f(0.5f,1.0f,-1.25f));
Musket.SetRotation(0,(float)Math.toRadians(180),0);
Musket.CreatePhysicsController( ConvexMesh.Box(0.5f,0.75f,0.5f),200f);
PlayerActorID = "Player_Musket";
scene.Musket = Musket;
scene.CreatePlayerController(scene.Musket);
RigidPhysicsController physicsController = (RigidPhysicsController) Musket.GetPhysicsController();
RigidBody.RigidBodyRegister.get(physicsController.RigidBodyID).LockRotation();
var Revolver = new PlayerActor("NULL","Player_Revolver", RevolverData.ID(), new Vector3f(0,5f,-5f)).SetCameraOffset(new Vector3f(0,1.0f,0));
Revolver.SetPositionOffset(new Vector3f(0.5f,1.0f,-1.25f));
Revolver.SetRotation(0,(float)Math.toRadians(180),0);
Revolver.CreatePhysicsController( ConvexMesh.Box(0.5f,0.75f,0.5f),200f);
scene.Revolver = Revolver;
PlayerActorID = "Player_Revolver";
physicsController = (RigidPhysicsController) Revolver.GetPhysicsController();
RigidBody.RigidBodyRegister.get(physicsController.RigidBodyID).LockRotation();
scene.AddActor(Musket);
scene.AddActor(Revolver);
materials.addAll(RevolverMat);
}
materials.addAll(MelonaMat);
materials.addAll(CollisionVisualisationMat);
materials.addAll(MelonaMaterial);
materials.addAll(MusketMat);
materials.addAll(RevolverMat);
materials.addAll(FlintlockMat);
models.add(MelonaData);
models.add(CollisionVisualisationData);
models.add(Melona);
models.add(MusketData);
models.add(RevolverData);
models.add(FlintlockData);
Camera camera = scene.GetCamera();
camera.SetPosition(0,0,0);
camera.SetRotation(0,0,0);
@ -180,6 +166,9 @@ public class GameCore implements GameLogic {
SpawnNewStaticActor(engineInstance, new Vector3f(x * 4f, -4 * (float) Math.random(), y * 4f), new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));
}
}
for(int i = 0; i < 20; i++){
SpawnNewActor(engineInstance, new Vector3f(-5 + (float)Math.random() * 10,10 + (float)Math.random() * 10, -5 + (float)Math.random() * 10), new Vector3f(0, 0, 0), new Vector3f(1, 1, 1));
}
}
return new InitData(models,materials,guiTextures);
}
@ -232,11 +221,11 @@ public class GameCore implements GameLogic {
actorID,
MusketData.ID(),
new Vector3f(0, 8f, 0)
).SetCameraOffset(new Vector3f(0, 1.0f, 0));
).SetCameraOffset(new Vector3f(0, 1.85f, 0));
player.SetPositionOffset(new Vector3f(0.5f, 1.0f, -1.25f));
player.SetPositionOffset(new Vector3f(0.5f, 1.25f, -1.25f));
player.SetRotation(0, (float)Math.toRadians(180), 0);
player.CreatePhysicsController(ConvexMesh.Box(0.5f, 0.75f, 0.5f), 200f);
player.CreatePhysicsController(ConvexMesh.Box(0.6f, 1.0f, 0.6f), 200f);
player.SetServerSynced(true);
RigidPhysicsController physicsController = (RigidPhysicsController) player.GetPhysicsController();
@ -430,7 +419,8 @@ public class GameCore implements GameLogic {
loadingScreen.RenderGUI(engineInstance, frameTimeNS, this);
} else if (StartMenuActive) {
startMenu.RenderGUI(engineInstance, frameTimeNS, this);
if (startMenu.GameStarted) {
Settings.RenderGUI(engineInstance, frameTimeNS, this);
if (startMenu.GameStarted && !StartMenu.ShowSettings) {
StartMenuActive = false;
}
} else {
@ -459,6 +449,7 @@ public class GameCore implements GameLogic {
VisualisedCollisionActor.CollisionVisuals.get(i).Update();
}
for(int i = 0; i < ActorElement.ElementNames.size(); i++){
if( ActorElement.ActorElementRegistry.get(ActorElement.ElementNames.get(i)) == null) continue;
ActorElement.ActorElementRegistry.get(ActorElement.ElementNames.get(i)).UpdateModelMatrix();
}
}

View file

@ -11,6 +11,7 @@ import net.halbear.Terrain4J.EngineCore.Vulkan.Rendering.VkModel.ModelData;
import org.joml.Matrix4f;
import org.joml.Quaternionf;
import org.joml.Vector3f;
import org.tinylog.Logger;
import java.io.IOException;
import java.util.ArrayList;
@ -25,6 +26,8 @@ public class Actor{
T4JLegacyCollision
}
public float Health = 100f;
public static final Map<String, Actor> Actors = new HashMap<>();
public static final List<String> ActorNames = new ArrayList<>();
protected final String ID;
@ -273,7 +276,11 @@ public class Actor{
public String GetID(){return ID;}
public String GetModelID(){return ModelID;}
public void SetModelID(String ModelID) { this.ModelID = ModelID; }
public void SetModelID(String ModelID) {
String OldID = this.ModelID;
this.ModelID = ModelID;
Logger.debug("ModelID of Actor has been Changed from [{}] to [{}]",OldID,this.ModelID);
}
public Matrix4f GetModelMatrix(){return ModelMatrix;}
public Vector3f GetPosition(){ return Position;}
public Quaternionf GetRotation(){return Rotation;}

View file

@ -79,7 +79,7 @@ public class Camera {
public void SetRotation(float x, float y, float z){Rotation.set(x,y,z);Recalculate();}
public void AddRotation(float x, float y, float z){Rotation.add(x,y,z);Recalculate(); }
public void AddRotation(float x, float y, float z){Rotation.set((float) ((Rotation.x + x)%(2*Math.PI)),(float) ((Rotation.y + y)%(2*Math.PI)),(float) ((Rotation.z + z)%(2*Math.PI)));Recalculate(); }
public void AddRotX(float x){Rotation.x += x; Recalculate();}
public void AddRotY(float y){Rotation.y += y; Recalculate();}
public void AddRotZ(float z){Rotation.z += z; Recalculate();}

View file

@ -0,0 +1,237 @@
package net.halbear.Terrain4J.EngineCore.Main.Scene.GUIs;
import imgui.ImGui;
import imgui.ImGuiViewport;
import imgui.flag.ImGuiCol;
import imgui.flag.ImGuiCond;
import imgui.flag.ImGuiStyleVar;
import imgui.flag.ImGuiWindowFlags;
import net.halbear.Terrain4J.EngineCore.Logic.EngineConfig;
import net.halbear.Terrain4J.EngineCore.Logic.EngineInstance;
import net.halbear.Terrain4J.EngineCore.Main.AudioInstance;
import net.halbear.Terrain4J.EngineCore.Main.GameCore;
import net.halbear.Terrain4J.EngineCore.Main.PrimaryRuntime;
import net.halbear.Terrain4J.EngineCore.Main.Scene.GUIOverlay;
import net.halbear.Terrain4J.EngineCore.Main.Scene.Scene;
import net.halbear.Terrain4J.EngineCore.Vulkan.Structure.DisplayToScreen.DeferredSceneRender;
import net.halbear.Terrain4J.EngineCore.Vulkan.Structure.DisplayToScreen.ForwardSceneRender;
import org.tinylog.Logger;
public class SettingsMenu implements GUIOverlay {
public int[] Music = new int[]{100};
public int[] SFX = new int[]{100};
public int[] Weapons = new int[]{100};
public int[] Ambient = new int[]{100};
@Override
public void RenderGUI(EngineInstance engineInstance, long frameTimeNS, GameCore parent) {
if (!StartMenu.ShowSettings) return;
ImGuiViewport viewport = ImGui.getMainViewport();
int menuFlags = ImGuiWindowFlags.NoDecoration
| ImGuiWindowFlags.AlwaysAutoResize
| ImGuiWindowFlags.NoSavedSettings
| ImGuiWindowFlags.NoFocusOnAppearing
| ImGuiWindowFlags.NoNav
| ImGuiWindowFlags.NoMove;
float CenterX = viewport.getWorkPosX() + viewport.getWorkSizeX() / 2.0f;
float CenterY = viewport.getWorkPosY() + viewport.getWorkSizeY() / 2.0f;
ImGui.setNextWindowPos(viewport.getWorkPosX(), viewport.getWorkPosY(), ImGuiCond.Always);
ImGui.setNextWindowSize(viewport.getWorkSizeX(), viewport.getWorkSizeY());
ImGui.pushStyleColor(ImGuiCol.WindowBg, 0.08f, 0.08f, 0.1f, 1.0f);
ImGui.pushStyleVar(ImGuiStyleVar.WindowPadding, 40f, 30f);
ImGui.pushStyleVar(ImGuiStyleVar.ItemSpacing, 10f, 16f);
ImGui.pushStyleVar(ImGuiStyleVar.WindowRounding, 8f);
ImGui.begin("Start Menu", menuFlags);
ImGui.setWindowFontScale(4.0f);
if (ImGui.button("Return")) {
StartMenu.ShowSettings = false;
if(StartMenu.GameStarted){
Scene scene = (Scene) engineInstance.scene();
parent.SwitchBGM(engineInstance, scene, "resources/EngineResources/audio/music/CHILL_REGGAE_2_StealthGroover.ogg");
}
}
ImGui.sameLine();
if (ImGui.button("Main Menu")) {
StartMenu.ShowSettings = false;
StartMenu.GameStarted = false;
}
ImGui.sameLine();
ImGui.text("Settings");
ImGui.setWindowFontScale(3f);
ImGui.spacing();
if (ImGui.beginTabBar("Settings")) {
if (ImGui.beginTabItem("Audio")) {
ImGui.setWindowFontScale(4.0f);
ImGui.text("Audio Settings");
ImGui.setWindowFontScale(3f);
if (ImGui.sliderInt("Music Volume", Music, 0, 100)) {
EngineConfig.getInstance().MusicVolume = Music[0] / 100.0f;
AudioInstance.ApplyUniversalVolume();
}
if (ImGui.sliderInt("SFX Volume", SFX, 0, 100)) {
EngineConfig.getInstance().SoundVolume = SFX[0] / 100.0f;
AudioInstance.ApplyUniversalVolume();
}
if (ImGui.sliderInt("Weapon Volume", Weapons, 0, 100)) {
EngineConfig.getInstance().WeaponVolume = Weapons[0] / 100.0f;
AudioInstance.ApplyUniversalVolume();
}
if (ImGui.sliderInt("Ambient Volume", Ambient, 0, 100)) {
EngineConfig.getInstance().AmbientVolume = Ambient[0] / 100.0f;
AudioInstance.ApplyUniversalVolume();
}
if (ImGui.button("Mute")) {
EngineConfig.getInstance().MusicVolume = 0;
EngineConfig.getInstance().SoundVolume = 0;
EngineConfig.getInstance().WeaponVolume = 0;
EngineConfig.getInstance().AmbientVolume = 0;
Music[0] = 0;
SFX[0] = 0;
Weapons[0] = 0;
Ambient[0] = 0;
AudioInstance.ApplyUniversalVolume();
}
ImGui.sameLine();
if (ImGui.button("50% Volume")) {
EngineConfig.getInstance().MusicVolume = 0.5f;
EngineConfig.getInstance().SoundVolume = 0.5f;
EngineConfig.getInstance().WeaponVolume = 0.5f;
EngineConfig.getInstance().AmbientVolume = 0.5f;
Music[0] = 50;
SFX[0] = 50;
Weapons[0] = 50;
Ambient[0] = 50;
AudioInstance.ApplyUniversalVolume();
}
ImGui.sameLine();
if (ImGui.button("Max Volume")) {
EngineConfig.getInstance().MusicVolume = 1f;
EngineConfig.getInstance().SoundVolume = 1f;
EngineConfig.getInstance().WeaponVolume = 1f;
EngineConfig.getInstance().AmbientVolume = 1f;
Music[0] = 100;
SFX[0] = 100;
Weapons[0] = 100;
Ambient[0] = 100;
AudioInstance.ApplyUniversalVolume();
}
ImGui.endTabItem();
}
if (ImGui.beginTabItem("Graphics")) {
ImGui.setWindowFontScale(4.0f);
ImGui.text("Graphics Settings");
ImGui.setWindowFontScale(3f);
ImGui.text("Presets:");
if(ImGui.button("Lowest")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = (0);
ForwardSceneRender.SetDualPassRendering(false);
DeferredSceneRender.SetDualPassRendering(false);
EngineConfig.getInstance().SetAlphaToCoverage(false);
PrimaryRuntime.GetRenderThread().GetRenderer().GetSceneRender().RebuildPipelines(PrimaryRuntime.GetRenderThread().GetRenderer().GetVulkanContext());
}
ImGui.sameLine();
if(ImGui.button("Medium")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = (1);
ForwardSceneRender.SetDualPassRendering(true);
DeferredSceneRender.SetDualPassRendering(true);
EngineConfig.getInstance().SetAlphaToCoverage(true);
PrimaryRuntime.GetRenderThread().GetRenderer().GetSceneRender().RebuildPipelines(PrimaryRuntime.GetRenderThread().GetRenderer().GetVulkanContext());
}
ImGui.sameLine();
if(ImGui.button("Highest")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = (4);
ForwardSceneRender.SetDualPassRendering(true);
DeferredSceneRender.SetDualPassRendering(true);
EngineConfig.getInstance().SetAlphaToCoverage(false);
PrimaryRuntime.GetRenderThread().GetRenderer().GetSceneRender().RebuildPipelines(PrimaryRuntime.GetRenderThread().GetRenderer().GetVulkanContext());
}
ImGui.text("anti aliasing:");
if(ImGui.button("No AA")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = (0);
}
ImGui.sameLine();
if(ImGui.button("FXAA")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = (1);
}
ImGui.sameLine();
if(ImGui.button("MSAAx2")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = (2);
}
ImGui.sameLine();
if(ImGui.button("MSAAx4")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = (3);
}
ImGui.sameLine();
if(ImGui.button("MSAAx8")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 2000;
parent.NextAAMode = 4;
}
ImGui.text("pipeline:");
if(ImGui.button("Single Pass")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 500;
ForwardSceneRender.SetDualPassRendering(false);
DeferredSceneRender.SetDualPassRendering(false);
}
ImGui.sameLine();
if(ImGui.button("dual Pass")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 500;
ForwardSceneRender.SetDualPassRendering(true);
DeferredSceneRender.SetDualPassRendering(true);
}
ImGui.text("pipeline lighting method:");
if(ImGui.button("No Lighting")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 500;
EngineConfig.getInstance().SetRenderer(EngineConfig.Renderer.Forward);
//PrimaryRuntime.GetRenderThread().RefreshRenderer();
}
ImGui.sameLine();
if(ImGui.button("Deferred Lighting")){
Logger.debug("Enabling Deferred Rendering");
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 500;
EngineConfig.getInstance().SetRenderer(EngineConfig.Renderer.Deferred);
// PrimaryRuntime.GetRenderThread().RefreshRenderer();
}
ImGui.text("Translucency rendering method:");
if(ImGui.button("Alpha Blending (translucency)")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 500;
EngineConfig.getInstance().SetAlphaToCoverage(false);
PrimaryRuntime.GetRenderThread().GetRenderer().GetSceneRender().RebuildPipelines(PrimaryRuntime.GetRenderThread().GetRenderer().GetVulkanContext());
}
ImGui.sameLine();
if(ImGui.button("Alpha To Coverage (Dithering)")){
parent.ChangeGraphicsSettings = true;
parent.CoolDown = 500;
EngineConfig.getInstance().SetAlphaToCoverage(true);
PrimaryRuntime.GetRenderThread().GetRenderer().GetSceneRender().RebuildPipelines(PrimaryRuntime.GetRenderThread().GetRenderer().GetVulkanContext());
}
ImGui.endTabItem();
}
ImGui.endTabBar();
}
ImGui.end();
ImGui.popStyleVar(3);
ImGui.popStyleColor();
}
}

View file

@ -22,8 +22,8 @@ import org.joml.Vector3f;
import org.tinylog.Logger;
public class StartMenu implements GUIOverlay {
public boolean GameStarted = false;
public boolean ShowSettings = false;
public static boolean GameStarted = false;
public static boolean ShowSettings = false;
public float Volume = 1.0f;
private void ApplyVolume(EngineInstance engineInstance) {
@ -35,7 +35,7 @@ public class StartMenu implements GUIOverlay {
}
@Override
public void RenderGUI(EngineInstance engineInstance, long frameTimeNS, GameCore parent) {
if (GameStarted) return;
if (GameStarted || ShowSettings) return;
ImGuiViewport viewport = ImGui.getMainViewport();
int menuFlags = ImGuiWindowFlags.NoDecoration
| ImGuiWindowFlags.AlwaysAutoResize
@ -70,39 +70,11 @@ public class StartMenu implements GUIOverlay {
if (ImGui.button("Play", buttonWidth, buttonHeight)) {
GameStarted = true;
Scene scene = (Scene) engineInstance.scene();
parent.SwitchBGM(engineInstance, scene, "resources/EngineResources/audio/music/theshiteventhefar.ogg");
parent.SwitchBGM(engineInstance, scene, "resources/EngineResources/audio/music/CHILL_REGGAE_2_StealthGroover.ogg");
}
ImGui.setCursorPosX(buttonX);
if (ImGui.button("Settings", buttonWidth, buttonHeight)) {
ShowSettings = !ShowSettings;
}
if (ShowSettings) {
ImGui.spacing();
ImGui.setCursorPosX(buttonX);
ImGui.text("Volume: " + Math.round(Volume * 100) + "%");
ImGui.setCursorPosX(buttonX);
if (ImGui.button("-", 40f, 40f)) {
Volume = Math.max(0f, Volume - 0.1f);
ApplyVolume(engineInstance);
}
ImGui.sameLine();
if (ImGui.button("+", 40f, 40f)) {
Volume = Math.min(1f, Volume + 0.1f);
ApplyVolume(engineInstance);
}
ImGui.sameLine();
if (ImGui.button("Mute", 100f, 40f)) {
Scene scene = (Scene) engineInstance.scene();
AudioInstance bgm = scene.audioInstances.get("BGM");
bgm.Pause();
}
ImGui.sameLine();
if (ImGui.button("Unmute", 130f, 40f)) {
Scene scene = (Scene) engineInstance.scene();
AudioInstance bgm = scene.audioInstances.get("BGM");
bgm.Play();
}
ShowSettings = true;
}
ImGui.setCursorPosX(buttonX);
if (ImGui.button("Quit", buttonWidth, buttonHeight)) {

View file

@ -1,5 +1,5 @@
package net.halbear.Terrain4J.EngineCore.Main.Scene;
public record Item(String ModelID, float FireRate, int MagazineCapacity) {
public record Item(String ModelID, float FireRate, int MagazineCapacity, float Damage) {
}

View file

@ -26,7 +26,10 @@ public class PlayerActor extends Actor{
PlayerCam = Camera.CameraRegistry.get(AttachedCameraID);
super(ID, ModelID, Position);
if(!Objects.equals(ClientConnectionThread.OwnedActorID, ID) && !RenderThread.Headless && !PrimaryRuntime.Server){
PrimaryRuntime.GetEngineInstance().scene().AddActor(new ActorElement("PlayerModel" + ID, MelonaModelID, ID,new Vector3f(0,0,0)));
ActorElement newMelona = new ActorElement("PlayerModel" + ID, MelonaModelID, ID,new Vector3f(0,0,0));
newMelona.SetScale(1.3f);
newMelona.SetPositionOffset(0,-0.85f,0);
PrimaryRuntime.GetEngineInstance().scene().AddActor(newMelona);
}
}

View file

@ -22,9 +22,11 @@ import net.halbear.Terrain4J.EngineCore.Vulkan.Rendering.Projection.Project3D;
import net.halbear.Terrain4J.EngineCore.Main.Scene.Item;
import org.joml.Vector2f;
import org.joml.Vector3f;
import org.tinylog.Logger;
import java.util.*;
import static net.halbear.Terrain4J.EngineCore.Threads.ClientConnectionThread.UpdateEntityModelID;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_A;
import static org.lwjgl.glfw.GLFW.GLFW_KEY_D;
@ -36,6 +38,7 @@ import static org.lwjgl.glfw.GLFW.GLFW_KEY_W;
public class Scene implements IScene {
public static long LastGunFire = 0;
private static final float MOUSE_SENSITIVITY = 0.1f;
private static final float MOVEMENT_SPEED = 0.025f;
private final Map<String, Actor> Actors;
@ -65,6 +68,8 @@ public class Scene implements IScene {
public PlayerActor Revolver;
public Item MusketItem;
public Item RevolverItem;
public Item CurrentItem;
public Item FlintLockItem;
public List<String> ActiveGUIs = new ArrayList<>();
public Map<String, GUIOverlay> GUIReg = new HashMap<>();
@ -239,7 +244,7 @@ public class Scene implements IScene {
public void SetCurrentWeapon(PlayerActor Weapon) {this.CurrentWeapon = Weapon; }
public int GUI_MODE = 0;
public int GUI_MODE = 1;
@Override
public void Input(EngineInstance engineInstance, long FrameDiffNanoSeconds,PlayerActor playerActor, float MOVEMENT_SPEED, GameCore parent) {
@ -256,42 +261,44 @@ public class Scene implements IScene {
if(input.keyPressed(GLFW_KEY_ENTER)) {
parent.SpawnNewActor(engineInstance, new Vector3f( (float)(5 * Math.random()),20 + (float)(10 * Math.random()), (float)(5 * Math.random())),new Vector3f(-1f + (float)(2 * Math.random()),-1f + (float)(2 * Math.random()),-1f + (float)(2 * Math.random())),new Vector3f((float)Math.random(),(float)Math.random(),(float)Math.random()));
}
if(!ClientConnectionThread.Connected) {
if (input.keySinglePress(GLFW_KEY_R) && CurrentWeapon != Revolver) {
scene.RemoveActor(Musket);
scene.AddActor(Revolver);
playerController.SwitchActor(Revolver);
CurrentWeapon = Revolver;
playerActor = Revolver;
parent.SetPlayerActorID(Revolver.GetID());
Musket.AttachedCameraID = "NULL";
Revolver.AttachedCameraID = "DebugCamera";
Revolver.SetModelID(MusketItem.ModelID());
if(!RenderThread.Headless && !PrimaryRuntime.Server && playerActor!= null) {
if (input.keySinglePress(GLFW_KEY_M)) {
playerActor.SetModelID(MusketItem.ModelID());
UpdateEntityModelID(playerActor.ID, MusketItem.ModelID());
CurrentItem= MusketItem;
}
if (input.keySinglePress(GLFW_KEY_M) && CurrentWeapon != Musket) {
scene.RemoveActor(Revolver);
scene.AddActor(Musket);
playerController.SwitchActor(Musket);
CurrentWeapon = Musket;
playerActor = Musket;
parent.SetPlayerActorID(Musket.GetID());
Musket.AttachedCameraID = "DebugCamera";
Revolver.AttachedCameraID = "NULL";
Musket.SetModelID(RevolverItem.ModelID());
if (input.keySinglePress(GLFW_KEY_R)) {
playerActor.SetModelID(RevolverItem.ModelID());
UpdateEntityModelID(playerActor.ID, RevolverItem.ModelID());
CurrentItem= RevolverItem;
}
if (input.keySinglePress(GLFW_KEY_F)) {
playerActor.SetModelID(FlintLockItem.ModelID());
UpdateEntityModelID(playerActor.ID, FlintLockItem.ModelID());
CurrentItem= FlintLockItem;
}
}
if (input.keySinglePress(GLFW_KEY_ESCAPE)) {
parent.StartMenuActive = true;
parent.startMenu.GameStarted = false;
parent.startMenu.GameStarted = true;
StartMenu.ShowSettings = true;
parent.SwitchBGM(engineInstance, this, "resources/EngineResources/audio/music/MENUMUSIC_RetroFutureClean.ogg");
}
MouseListener mouseListener = window.getMouseInput();
if (mouseListener.isRightButtonPressed()) {
CurrentWeapon.SetPositionOffset(new Vector3f(0f,1.0f,-1.25f));
CurrentWeapon.SetPositionOffset(new Vector3f(0f,1.15f,-1.25f));
} else {
CurrentWeapon.SetPositionOffset(new Vector3f(0.5f,1.0f,-1.25f));
CurrentWeapon.SetPositionOffset(new Vector3f(0.5f,1.15f,-1.25f));
}
if(mouseListener.isRightButtonPressed()) {
if (CurrentItem != null&& playerActor != null) {
long NewTime = System.nanoTime();
float FireRate = 1000f/CurrentItem.FireRate();
if (NewTime - LastGunFire > 1_000_000f * FireRate ){
LastGunFire = NewTime;
ClientConnectionThread.FireWeapon(playerActor.ID, CurrentItem.Damage());
}
}
}
if(input.keyPressed(GLFW_KEY_1)) {
Gimbal.universalType = Gimbal.GimbalType.Move;
@ -369,10 +376,10 @@ public class Scene implements IScene {
}
LastMousePos.x = CurrentMousePos.x;
LastMousePos.y = CurrentMousePos.y;
if(MouseInput.isRightButtonPressed()){
// if(MouseInput.isRightButtonPressed()){
camera.AddRotation((float)Math.toRadians(-deltaPos.y * Multiplier),(float)Math.toRadians(-deltaPos.x * Multiplier),0);
}
// }
engineInstance.audioManager().UpdateListenerPosition(camera);
}
}

View file

@ -28,7 +28,7 @@ public class VisualisedCollisionActor extends Actor{
if(mesh != null) {
SetScale(new Vector3f(mesh.hxhyhz).mul(2.01f));
SetPosition(new Vector3f(mesh.Position.x,mesh.Position.y,mesh.Position.z));
SetPositionOffset(new Vector3f(0,-mesh.hxhyhz.y/3f,0));
SetPositionOffset(new Vector3f(0,( mesh.GetWorldAABB().minY - mesh.GetWorldAABB().maxY)/2f,0));
SetRotation(mesh.Orientation);
}
}

View file

@ -20,6 +20,8 @@ public class Packet {
public static final byte PACKET_POSSESS_ACTOR = 8;
public static final byte PACKET_DESTROY_ACTOR = 9;
public static final byte PACKET_CLIENT_INPUT = 10;
public static final byte PACKET_UPDATE_MODEL_ID = 11;
public static final byte PACKET_FIRE_WEAPON = 12;
public byte PacketTypeByte; //0 Location 1 Rotation 2 LinearVelocity 3 AngularVelocity 4 CombinedActorDownload 5 Ping 6 PosRotVelAngularVel 7 AssignUUID
public byte TargetType; //0 Actor
public byte[] Data;

View file

@ -15,6 +15,7 @@ import org.tinylog.Logger;
import java.io.*;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.concurrent.ConcurrentLinkedQueue;
@ -232,6 +233,14 @@ public class ClientConnectionThread implements Runnable{
scene.RemoveActor(actorToDestroy);
}
break;
case 11:
Logger.debug("Rebound packet received for actor [{}]", packet.TargetID);
stringdata = Packet.DecodeAsString(packet.Data);
Actor actorToChangeModelID = Actor.Actors.get(packet.TargetID);
if(actorToChangeModelID != null) {
actorToChangeModelID.SetModelID(stringdata);
}
break;
}
}
}
@ -258,6 +267,23 @@ public class ClientConnectionThread implements Runnable{
}
}
public static void FireWeapon(String ActorID, float Damage){
Packet packet = new Packet(Packet.PACKET_FIRE_WEAPON);
packet.SetTargetType((byte) 0);
packet.SetData(ByteBuffer.allocate(4).putFloat(Damage).array());
packet.SetID(ActorID);
OutGoingPacketQueue.add(packet);
}
public static void UpdateEntityModelID(String ActorID, String ModelID){
Packet packet = new Packet(Packet.PACKET_UPDATE_MODEL_ID);
packet.SetTargetType((byte) 0);
packet.SetData(ModelID.getBytes(StandardCharsets.UTF_8));
packet.SetID(ActorID);
OutGoingPacketQueue.add(packet);
Logger.debug("Sent model ID update packet for actor [{}]", ActorID);
}
public static void SendEntityUpdatePacket(Actor actor){
Packet newOutgoingPacket = new Packet((byte)6);
newOutgoingPacket.SetTargetType((byte) 0);
@ -299,6 +325,9 @@ public class ClientConnectionThread implements Runnable{
public static void WritePacket(Packet outPacket, DataOutputStream Outgoing) throws IOException {
if(Outgoing == null ) return;
if(outPacket.PacketTypeByte == Packet.PACKET_UPDATE_MODEL_ID){
Logger.debug("Sending model ID update packet for actor [{}]", outPacket.TargetID);
}
byte[] DataToSend = Packet.GetOutgoingData(outPacket);
Outgoing.write(DataToSend);
}

View file

@ -193,6 +193,13 @@ public class ServerConnectionThread implements Runnable{
// Example future data:
// forward/back/left/right/jump/yaw/pitch/sequenceNumber
break;
case Packet.PACKET_UPDATE_MODEL_ID:
if(!packet.TargetID.equals(ConnectedClients.get(packet.ClientID).OwnedActorID)) {
return;
}
Packet ReboundPacket = CreateUpdateModelIDPacket(packet.TargetID, Packet.DecodeAsString(packet.Data));
Server.OutGoingPacketQueue.add(ReboundPacket);
break;
}
}
@ -201,134 +208,6 @@ public class ServerConnectionThread implements Runnable{
}
public static void DecodePackets(EngineInstance engineInstance, GameCore gameCore, IScene scene,List<Packet> IncomingPacketQueue){
if(!IncomingPacketQueue.isEmpty()){
ListIterator<Packet> iter = IncomingPacketQueue.listIterator();
while(iter.hasNext()){
Packet packet = iter.next();
Actor Target = Actor.Actors.get(packet.TargetID);
Vector3f vector3f = new Vector3f();
String stringdata = "";
Quaternionf quaternionfdata = new Quaternionf();
Packet.DecodedMovementPacket MovementUpdate;
if(packet.PacketTypeByte >= 0 && packet.PacketTypeByte < 4 && packet.PacketTypeByte != 1){
vector3f = Packet.DecodeAsVector3f(packet.Data);
}
if(Target == null
&& packet.PacketTypeByte != Packet.PACKET_CREATE_ACTOR
&& packet.PacketTypeByte != Packet.PACKET_PING
&& packet.PacketTypeByte != Packet.PACKET_POSSESS_ACTOR) {
iter.remove();
continue;
}
switch (packet.PacketTypeByte){
case 0:
Target.SetNewPosition(vector3f);
break;
case 1:
quaternionfdata = Packet.DecodeAsQuaternation(packet.Data);
Target.SetNewRotation(quaternionfdata);
break;
case 2:
Target.SetNewVelocity(vector3f);
break;
case 3:
Target.SetNewAngularVelocity(vector3f);
break;
case 4: //"ACtorType:ModelID:x:y:z:rx:ry:rz:sx:sy:sz:hx:hy:hz:MassKG:vx:vy:vz:avx:avy:avz:posOffx:posOffy:posOffz:camOffx:camOffy:camOffz"
stringdata = Packet.DecodeAsString(packet.Data);
String[] Split = stringdata.split(":");
Vector3f Position = new Vector3f(
Float.parseFloat(Split[2]),
Float.parseFloat(Split[3]),
Float.parseFloat(Split[4])
);
Quaternionf Rotation = new Quaternionf(
Float.parseFloat(Split[5]),
Float.parseFloat(Split[6]),
Float.parseFloat(Split[7]),
Float.parseFloat(Split[8])
);
Vector3f Scale = new Vector3f(
Float.parseFloat(Split[9]),
Float.parseFloat(Split[10]),
Float.parseFloat(Split[11])
);
Vector3f CollisionBox = new Vector3f(
Float.parseFloat(Split[12]),
Float.parseFloat(Split[13]),
Float.parseFloat(Split[14])
);
float MassKG = Float.parseFloat(Split[15]);
Vector3f Velocity = new Vector3f(
Float.parseFloat(Split[16]),
Float.parseFloat(Split[17]),
Float.parseFloat(Split[18])
);
Vector3f AngularVelocity = new Vector3f(
Float.parseFloat(Split[19]),
Float.parseFloat(Split[20]),
Float.parseFloat(Split[21])
);
Vector3f PositionOffset = new Vector3f(
Float.parseFloat(Split[22]),
Float.parseFloat(Split[23]),
Float.parseFloat(Split[24])
);
Vector3f CameraOffset = new Vector3f(
Float.parseFloat(Split[25]),
Float.parseFloat(Split[26]),
Float.parseFloat(Split[27])
);
String actorType = Split[0];
String modelID = Split[1];
if(actorType.equals("PlayerActor")) {
Target = new PlayerActor("NULL", packet.TargetID, modelID, Position).SetCameraOffset(CameraOffset);
Target.SetPositionOffset(PositionOffset);
} else {
Target = new Actor(packet.TargetID, modelID, Position);
}
Target.SetNewRotation(Rotation);
Target.SetScale(Scale);
Target.CreatePhysicsController(ConvexMesh.Box(CollisionBox.x, CollisionBox.y, CollisionBox.z), MassKG);
Target.SetServerSynced(MassKG > 0.0f || actorType.equals("PlayerActor"));
Target.SetNewRotation(Rotation);
RigidPhysicsController physicsController = (RigidPhysicsController) Target.GetPhysicsController();
RigidBody.RigidBodyRegister.get(physicsController.RigidBodyID).LinearVelocity.set(Velocity);
RigidBody.RigidBodyRegister.get(physicsController.RigidBodyID).AngularVelocity.set(AngularVelocity);
if(actorType.equals("PlayerActor")){
RigidBody.RigidBodyRegister.get(physicsController.RigidBodyID).LockRotation();
}
scene.AddActor(Target);
break;
case 6:
if(!packet.TargetID.equals(ConnectedClients.get(packet.ClientID).OwnedActorID)) {
return;
}
MovementUpdate = Packet.DecodeAsMovementUpdate(packet.Data);
Target.SetNewRotation(MovementUpdate.Rotation);
Target.SetNewPosition(MovementUpdate.Position);
Target.SetNewVelocity(MovementUpdate.LinearVelocity);
Target.SetNewAngularVelocity(MovementUpdate.AngularVelocity);
break;
}
iter.remove();
}
}
}
public static Packet CreateActorPacket(Actor actor){
Packet newOutgoingPacket = new Packet(Packet.PACKET_CREATE_ACTOR);
@ -387,6 +266,14 @@ public class ServerConnectionThread implements Runnable{
if(newOutgoingPacket != null)Server.OutGoingPacketQueue.add(newOutgoingPacket);
}
public static Packet CreateUpdateModelIDPacket(String actorID, String NewModelID){
Packet packet = new Packet(Packet.PACKET_UPDATE_MODEL_ID);
packet.SetTargetType((byte) 0);
packet.SetData(NewModelID.getBytes(StandardCharsets.UTF_8));
packet.SetID(actorID);
return packet;
}
public static Packet CreateDestroyActorPacket(String actorID){
Packet packet = new Packet(Packet.PACKET_DESTROY_ACTOR);
packet.SetTargetType((byte) 0);

View file

@ -5,8 +5,10 @@ import net.halbear.Terrain4J.EngineCore.Logic.EngineInstance;
import net.halbear.Terrain4J.EngineCore.Logic.Rendering.VulkanContext;
import net.halbear.Terrain4J.EngineCore.Main.PrimaryRuntime;
import net.halbear.Terrain4J.EngineCore.Main.Scene.Actor;
import net.halbear.Terrain4J.EngineCore.Main.Scene.ActorElement;
import net.halbear.Terrain4J.EngineCore.Main.Scene.IScene;
import net.halbear.Terrain4J.EngineCore.Main.Scene.Scene;
import net.halbear.Terrain4J.EngineCore.Threads.ClientConnectionThread;
import net.halbear.Terrain4J.EngineCore.Vulkan.Rendering.DeferredRendering.MultiRenderTargetAttachments;
import net.halbear.Terrain4J.EngineCore.Vulkan.Rendering.Pipeline.DefaultPipeline;
import net.halbear.Terrain4J.EngineCore.Vulkan.Rendering.Pipeline.Images.*;
@ -22,6 +24,7 @@ import net.halbear.Terrain4J.EngineCore.Vulkan.Structure.SwapChain.SwapChain;
import net.halbear.Terrain4J.EngineCore.Vulkan.Util.VulkanBuffer;
import net.halbear.Terrain4J.EngineCore.Vulkan.Util.VulkanUtils;
import org.joml.Matrix4f;
import org.joml.Vector3f;
import org.lwjgl.system.MemoryStack;
import org.lwjgl.system.MemoryUtil;
import org.lwjgl.util.shaderc.Shaderc;
@ -33,6 +36,7 @@ import java.nio.LongBuffer;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import static org.lwjgl.vulkan.VK13.*;
@ -406,6 +410,7 @@ public class ForwardSceneRender implements SceneRenderer {//dynamic rendering
if(i < Actors.size()) {
var Actor = Actors.get(i);
if(Actor != null) {
if(Actor instanceof ActorElement &&( !((ActorElement) Actor).RenderOnTopOfPlayer && Objects.equals(((ActorElement) Actor).GetParentID(), ClientConnectionThread.OwnedActorID) || new Vector3f().set(Actor.GetPosition()).sub(instance.scene().GetCamera().GetPosition()).absolute().lengthSquared() < 4f)) continue;
VulkanModel model = modelsCache.GetModel(Actor.GetModelID());
List<VulkanMesh> VkMeshList = model.GetVkMeshList();
int MeshCount = VkMeshList.size();