I want to have a large (openworld?) game with lots of enemies. But I cant figure out how to make it so that they don't draw and waste cpu power when not in view of camera. Is there a way i can do this?
Develop games in your browser. Powerful, performant & highly capable.
Do as following:
Spawner is basically a marker to place enemies that will show only when they are about to appear on screen.A simple 2x2 pixel width is enough to do so.
Thank you so much alextro, i went from lagging at 50 enemies to being able to hold over 2,000 and have it run fine (until i go into that area, of course.)
Glad to know that your game performance run at better speed now.