I’m working on a maze game with moving obstacles and the map is not extra large but also not small
the problem is when i play the level to try things out the fps drops to 40-30 while in the editing mode it’s solid 60 and very smooth. so i would like to know what are the things effecting the fps ?
is it the coding? because i use a lot of timelines to move the obstacles so is that the reason? and if so how can i fix that? and also in my head i think that event tick is performance consuming so i try to avoid it as much as i can so is that true?
edit: when i lower the scalability graphics of the game it does not effect the fps (the graphics become really bad and still the same fps so i think it’s the cpu right?
ok… …more shots in the dark… …how big is you map? For example, I broke my game level into 8x8 sections of 1008x1008 of which each section gets level streamed in and out based on the player locations. Also, more complicated areas on the game map get level streamed in and out also based on the player locations.
Another question… …how many actor are on this map?
Finally, are there certain areas of the map that the frame rate is fine; however, other areas of the map have bad frame rates?
-not event tick but im using a loop timeline to make them rotate and translate
-all the materials im using is from the starter content
-unfortunately im still new to ue so i have no idea what are those things u r talking about but yet i think they are graphic related and i tried lowering the graphic and making the light static and still the same fps
Another thing to note is the Unreal Insights tool, if available, you can look at a timeline of all of the functions being called. This is an easy utility to use once learned that can really highlight areas in your code/blueprints that are the culprit.
Timelines may also be the major issue since they have significant overhead compared to just interpolating a vector from and to your desired location. Hope this helps!
i had a spike trap that keeps going up and down from under ground so when it was collision enabled it kept checking collision with the ground and that caused the lag
Are you saying that even this causes so many overlap events that the frame rate is affected (or) maybe each spike has its own overlap event and the collection of spikes and their overlap events is causing frame rate issues?
Another idea would be to keep whatever collision box tall enough such that it always is overlapping with the ground which would prevent “On Component Begin Overlap” from ever triggering, or at least it would trigger once on level loading possibly…
my mistake… i just found out that it’s not the ground it’s the collision state it self ( i made all the spikes on air so that they wont hit the ground and yet the fps dropped so it’s the collision check in general that causes the lag not just when it hits the ground as i though)
Proposal… . …create a BP actor, move the spikes and their layout into that BP, turn off collision checking for all of the spikes, create a single collision box around the spikes, write collision code only for that box around the spikes and move this BP actor up and down.