MarkusR Posted January 8, 2015 Share Posted January 8, 2015 hello, i got 15-20 frames if u have 5 zombies in front !? my questions is why? my card can render millions of polys per frame, so seems this is a script issue? where is the do nothing loop? or black polyhole i used sync(false) i expect much more of frames per second. crysis 3 runs fine on my maschine. 1 PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
DerRidda Posted January 8, 2015 Share Posted January 8, 2015 I personally found that the Leadwerks editor greatly diminishes my performance when running the games from there but that's on Linux. What performance do you see when you run it straight from the executable while the editor isn't running? Link to comment Share on other sites More sharing options...
Josh Posted January 8, 2015 Share Posted January 8, 2015 Are you running in debug or release mode? You can display the framerate in release mode by pressing F11. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
nick.ace Posted January 8, 2015 Share Posted January 8, 2015 I usually stay out of the betas, but I'm curious about certain fixes and want to make sure they work correctly, but this beta has caused all sorts of performance issues for me. @MarkusR I've been having similar issues, maybe it's due to the character controller though? I noticed my games got a lot slower and I just have 3-4 character controllers right now. I noticed that another map without a character controller didn't really slowdown. @DerRidda For me the performance while the editor isn't running is about the same (sometimes it dives randomly when the editor is running though). The last update at around 10 PM for some reason slowed down my entire editor for some reason so now I can barely edit anything on my big 2k map (although maybe I should restart my computer). But I'm pretty sure Josh just updated the FPSPlayer.lua script, so maybe I need to restart . Anyway, I initially commented that my project slowed down to about half speed (about 20-25 fps from 30-40 fps, my game's pretty heavy), and actually I don't really notice a difference with the latest update. I can't really share my project, but it seems that others are maybe having similar issues? Anyway, just tossing out stats and stuff to maybe help isolate the issue! Link to comment Share on other sites More sharing options...
MarkusR Posted January 8, 2015 Author Share Posted January 8, 2015 i already had changed the app lua that i can see benchmark out put with f11, this was release mode, means used the right play button. my wip map in debug mode have 1 frame per second. without beta the zombies was slow too. runs the physicupdate same speed with framerate/worldupdate? @nick.ace ok i will test this with character controller too @dariddar thats a good idea compare without editor on screen. PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
MarkusR Posted January 8, 2015 Author Share Posted January 8, 2015 test today, i remove the player skript and place a camera inside. the zombies not hunt anything, and its fast ~60fps PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Josh Posted January 8, 2015 Share Posted January 8, 2015 I accidentally uploaded the debug build last night. I don't know if this would have any effect on the running game, but it would have made the editor much slower, and cause it to not run on machine that didn't have VC++ installed. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
MarkusR Posted January 8, 2015 Author Share Posted January 8, 2015 i believe the slow down comes from this row/part (in monsterai.lua) at mode chase if self.entity:Follow(self.target.entity,self.speed,self.maxaccel) then for test i use if 1==1 then / if 1==0 then u can easy remark a block. edit: why not wrote at window tittle bar "Leadwerks Editor (debug build)" at #if debug + " (Beta Version)" at #if beta PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Josh Posted January 8, 2015 Share Posted January 8, 2015 The script already displays "Debug Mode" on the screen in red. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
MarkusR Posted January 8, 2015 Author Share Posted January 8, 2015 i understand u had upload the engine as debug build, therefor i suggest the title bar text. the fps is still slow at play release, just used the last update for a minute. PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
Josh Posted January 8, 2015 Share Posted January 8, 2015 Oh I see. Well, it would be even better not to make the mistake in the first place, instead of trying to add features to correct for my mistakes. My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
TattieBoJangle Posted January 8, 2015 Share Posted January 8, 2015 my fps has always been low with the zombies anymore than 4 my fps drops below 60fps Asus Extreme v x99, Intel I7, Windows 8.1 64 Bit, SSD, Geforce GTX 980 4GB, 16GB Ripjaw DDR4 Link to comment Share on other sites More sharing options...
MarkusR Posted January 8, 2015 Author Share Posted January 8, 2015 josh, can u rebuild this scene with a player, 5 zombies+ ground+wall and show me a screen with showstats? in my test scene,if the 5 zombies hit the player at a stair the fps go down to 7. maybe a physic collision issue? PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
YouGroove Posted January 8, 2015 Share Posted January 8, 2015 maybe a physic collision issue? Why not the time to calculate the paths ? If you have C++ edition you could use FindPath , than use the points and manually make move the characters using simple physics shapes, it could be faster , and it could help to test if FindPath is fast enought with multiple characters at same time. http://www.leadwerks.com/werkspace/topic/7902-navmesh-findpath/ Also when you use a navmesh system, it can be cheaper to recalculate the path only each seconds, not each frame, this could save processing power. Stop toying and make games Link to comment Share on other sites More sharing options...
nick.ace Posted January 9, 2015 Share Posted January 9, 2015 Why not the time to calculate the paths ? If you have C++ edition you could use FindPath , than use the points and manually make move the characters using simple physics shapes, it could be faster , and it could help to test if FindPath is fast enought with multiple characters at same time. http://www.leadwerks.com/werkspace/topic/7902-navmesh-findpath/ Also when you use a navmesh system, it can be cheaper to recalculate the path only each seconds, not each frame, this could save processing power. Are you sure this is what he is doing though? Are you recalculating the paths each physics loop MarkusR? Link to comment Share on other sites More sharing options...
MarkusR Posted January 9, 2015 Author Share Posted January 9, 2015 i don't know what the reason is. i believe there is a single call to .Follow once if the state change. josh can better see what the engine do at runtime, i can not debug it, i can not see the source code of the engine. @nick, i use indie only. i do not want use a workaround, i think this simple things should work. @yougroove, at first u must know where my cpu power ist lost. PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
YouGroove Posted January 9, 2015 Share Posted January 9, 2015 @yougroove, at first u must know where my cpu power ist lost. The zombies don't have millions of polygons, so your problem comes from navigation or physics , i don't know ? Can you post your code of zombie AI ? Stop toying and make games Link to comment Share on other sites More sharing options...
MarkusR Posted January 9, 2015 Author Share Posted January 9, 2015 @YouGroove its with the MonsterAI.lua and the Zombie DLC. there is saw only a .Follow call once, maybe u see more. i can try what happens without collision. PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
YouGroove Posted January 9, 2015 Share Posted January 9, 2015 there is saw only a .Follow call once, maybe u see more. It's called one time each frame in UpdatePhysics loop. function Script:UpdatePhysics() ... elseif self.mode=="chase" then if self.target.health<=0 then self:SetMode("idle") return end if self:TargetInRange() then self:SetMode("attack") elseif self:DistanceToTarget()<self.attackrange*2 then self.followingtarget=false self.entity:Stop() self:DirectMoveToTarget() else if self.followingtarget==false then if self.entity:Follow(self.target.entity,self.speed,self.maxaccel) then self:SetMode("idle") end end end ... Stop toying and make games Link to comment Share on other sites More sharing options...
MarkusR Posted January 9, 2015 Author Share Posted January 9, 2015 @YouGroove this part i skipped with if 1==0 then it was not the problem. PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
YouGroove Posted January 9, 2015 Share Posted January 9, 2015 this part i skipped with if 1==0 thenit was not the problem. But the Zombie will follow the character, until you call stop, the function calculating the path is called behind the scenes each frame. Or am i wrong ? Stop toying and make games Link to comment Share on other sites More sharing options...
MarkusR Posted January 9, 2015 Author Share Posted January 9, 2015 @YouGroove the part u showed there is self.followingtarget=true before from set mode, i would say it not called every frame because if self.followingtarget==false then and then state goto idle. i guess .Follow is a automatic function that is called once and then the engine do self the moving. i did not test it yet. it seems its not the sound,not the collision, not the animation manager, its not the modell. ... if nots called follow its also slow. arrggg ... i see a problem in function SetMode, it called hisself ... i made a counter in it and draw it on screen. this slow down must belongs the script in any way. PC : Win 10 Pro 64 Bit , 4x cores ~2 GHz , 8 GB RAM , AMD R7 265 2D : Photoline , Zooner Photo Studio 13 , Art Rage Studio 3.5.4 , Ashampoo Snap 7 , ... 3D : Shade 15 Basic , Carrara 8.5 & DAZ Studio 4.8 , Cheetah 3D 6.3.2 , Via Cad 8 Music : Samplitude Music Studio , Music Creator 7 IDE : Leadwerks Engine 3.x , Unity 5.x , (Unreal 4.8.x) , AGK v2.x , Construct 2 , (Clickteam Fusion 2.5) , ShiVa 1.9 , Game Maker Studio , MS Visual Studio .Net , Android Studio , Monkey , ... Link to comment Share on other sites More sharing options...
YouGroove Posted January 9, 2015 Share Posted January 9, 2015 Follow is a automatic function that is called once and then the engine do self the moving. Nothing is automatic, it's code running behind. How can a Zombie follow the player anywhere if he doesn't recalculate and re evaluate the path each frame ? if nots called follow its also slow. arrggg ... Perhaps some plugin for other sound format would play lot more faster. Perhaps you could upload some test map using the crawler model and displaying stats, so we could test it also. Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted January 9, 2015 Share Posted January 9, 2015 You're right, the interpreter was creating an extra camera for testing, resulting in 2x renders! Once again, do not opt into the beta unless you are comfortable using untested software. /disclaimer. Running a new build now, sorry about that. 2 My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts