Its get laggy very quick, that happens to me when I put a lot of things inside the units nodes, or having heavy shit running i every process function tick.
Yeah I only did a little bit of performance optimization, so it definitely starts to slow down after 50 fish or so are on screen. Each fish has several raycasts and areas to update every physics frame, so it starts to become a lot of processing. I've seen some people divide the area up into tiles to help reduce the number of nodes being compared at a time, but I didn't bother doing anything that elaborate.
← Return to demo
Comments
Log in with itch.io to leave a comment.
Nice work! The music fits perfectly.
Its get laggy very quick, that happens to me when I put a lot of things inside the units nodes, or having heavy shit running i every process function tick.
Thanks, I appreciate it!
Yeah I only did a little bit of performance optimization, so it definitely starts to slow down after 50 fish or so are on screen. Each fish has several raycasts and areas to update every physics frame, so it starts to become a lot of processing. I've seen some people divide the area up into tiles to help reduce the number of nodes being compared at a time, but I didn't bother doing anything that elaborate.