CSandman Posted Monday at 11:40 PM Posted Monday at 11:40 PM 20250728_190219.trim.zip I've attached an MP4 video file of the problem I am having. This occurred in the 0.9.9 version as well as the latest beta build 2894. I created my own map and was trying to play it when the screen would freeze and then the mouse would move outside of the window for awhile. Then it would work for a little bit, but when I try to "fight" a bunch of the mutants it freezes as well. I don't know if the window is losing focus or what. Any help here would be great. I've attached my very early map as well so you can test. I also uploaded a hardware info screenshot. myStart_v7.zip 1 Quote
Josh Posted Tuesday at 01:16 AM Posted Tuesday at 01:16 AM I don't immediately see anything wrong with anything here. I will do more testing... Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Solution Josh Posted Tuesday at 04:55 PM Solution Posted Tuesday at 04:55 PM The problem is the navigation mesh. You are overloading this system with two things: The default tile resolution is 32 x 32 (1024 voxels). Yours is set to 120 x 120, which is 14 times more. You have many floors stacked up on top of each other, further increasing the cost of calculating each tile by 10x. Shooting a bullet seems to trigger a navmesh rebuild. I can prevent the bullet from triggering a navmesh rebuild by inserting this code around line 130 of bullet.lua: -- Bullet hole decal self.decal:SetPosition(pickinfo.position, true) local scale = self.decal.scale scale = scale / TransformVector(1, 0, 0, nil, pickinfo.entity):Length() if pickinfo.entity:GetMass() > 0 then self.decal:SetParent(pickinfo.entity) end self.decal:SetScale(scale) self.decal:SetHidden(false) self.decal:AlignToVector(pickinfo.normal) self.decal:Turn(0.0, 0.0, Random(360.0)) self.decal:SetNavObstacle(false) Bullet.lua If your navmesh does not rebuild at all and remains static, then it will be okay for this level, but the demands you are putting on it are too much for dynamic navmesh rebuilding. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Josh Posted Tuesday at 05:00 PM Posted Tuesday at 05:00 PM I am also adding NavMesh:Staticize to the Lua API. After the next build, you will be able to do this: scene = LoadScene(filename) for n = 1, #scene.navmeshes do scene.navmeshes[n]:Staticize() end This will prevent the navmesh from ever being rebuilt, and is suitable for static scenes. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
CSandman Posted Tuesday at 10:41 PM Author Posted Tuesday at 10:41 PM Thank you for the help. I'm just starting out with the engine and trying to figure everything out, so that info is useful. Thanks again. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.