CarrotKutay / Colosseum

Experimental Game Development
1 stars 0 forks source link

Performance Issue: Turning System (Physics based Movement) #13

Closed CarrotKutay closed 4 years ago

CarrotKutay commented 4 years ago

Problem:

There seems to be a performance issue within the physics based movement system (more specific -> on inclusion of the turn input system). Performance drops are as heavy as from a stable 60 fps performance down to 25 fps.

Possible Reason:

Problem 1. : Repetitive Calls GetComponent / SetComponent on main thread

Repetitive calls to get components from entity for input values, every time an input event is fired.

Possible Solution:

Solution to Problem 1:

Outsourced Calls and created jobs to update components which store input values. A steady performance of 60+ fps can be seen.

CarrotKutay commented 4 years ago

found (one) possible reason and solution