How do I not draw enemies outside of camera?

Get help using Construct 2

Post » Mon Jan 19, 2015 8:14 pm

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?
B
10
S
6
Posts: 42
Reputation: 1,050

Post » Mon Jan 19, 2015 9:12 pm

Do as following:
Image

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.
ImageImage
B
111
S
51
G
24
Posts: 787
Reputation: 23,394

Post » Tue Jan 20, 2015 12:19 am

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.)
B
10
S
6
Posts: 42
Reputation: 1,050

Post » Tue Jan 20, 2015 6:55 pm

Glad to know that your game performance run at better speed now.
ImageImage
B
111
S
51
G
24
Posts: 787
Reputation: 23,394


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 61 guests