What are the things that effects the game performance

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?

A lot of movable actors.

I made some procedural corn and wheat fields with a movable actor and I definitely have frame rate issues in and around these fields.

Make sure items that are intended to be static are indeed set to static. My experience is that sometimes UE makes the default moveable.

Seems that if I am building a BP asset with multiple static meshes that the default is moveable.

will check that out

it didn’t work…i set everything that is not moving to static(even the lights and it looks so bad now) and still no change in fps

Hi there,

Are you using too many “Event Tick” on those actors?

A few factors that affect performance:

  • Materials with high shader complexity
  • Meshes’ Level of Detail (LODs) not properly setup
  • High resolution textures
  • Level Streaming not properly setup (if applicable)
  • Dynamic Shadows

Keep in mind that playing in editor has a bit lower performance than the final package game. You want to compare both.

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

that is the size of the map

and it has 161 actors (and that’s just half of the final map)

and no the fps is the same for anywhere in the level even outside the maze

gonna try this out

that’s it dude! ty so much now it’s a solid 60 in the editor play too :heart:

1 Like

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.

Unreal Insights

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!

Reddit: Timelines

1 Like

ofc it helps! ty so much!

Wait! So what fixed your issue? Removing all collisions? Interpolated movement? Something else???

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

1 Like

but now the problem became how can i make those spikes collision with only the character and not the ground …do any1 happen to have an idea?

Could you do one Box Collision for all of the spikes? If so, this is what I do…

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.

Thoughts?

u mean that i should make the spikes no collision but create a box around them that has collision blocksalldynamic?