George Hennen
Member
I need help optimizing.
How would i make this not poop my game?
How would i make this not poop my game?
idk howIs your game lagging? Its taking about 1/4 of a frame to process (assuming 60fps target) so it should be smooth.
I suppose make sure you aren't using precise collisions. Lastly you are checking for collisions regardless of movement. Take a little extra time and make some checks so it only checks for collisions if something has moved and store the result for later use.
i am just working my way down the list. I would love as much help as possible.Are you not more worried about distance_to_object taking up 69% of a step?
That aside, you may be able to store instance's positions in a grid and checking its contents for such checks. That applies only if your game is laid out on a grid, of course.