Am I getting too concerned over object count?

Discussion and feedback on Construct 2

Post » Tue Jul 08, 2014 11:59 pm

I've always been trying to keep object count low, even though my game is going to be for PC.

But then, I was following an old tutorial on procedural generation, and it had a little over 12,000 objects! I thought maybe since that was construct classic that it was different, but I quickly created a similar set up in my existing RPG type of game which has over 1,000 events, and it still played fine with 10,000 objects at 60fps and under 15 cpu usage. There were only 3 heroes on screen and 2 enemies, and this is turn based so there's only so much going on at once.

Anyway, the point is how big of deal is object count really? Especially on PC games. My computer is decent, so I don't want to get carried away and find out that it runs like crap on anything less. Of course, I could always test on my old laptop.
B
81
S
30
G
35
Posts: 340
Reputation: 23,046

Post » Wed Jul 09, 2014 12:38 am

Object count on pcs is less important than what you're doing with those objects. Sprites by themselves with no events or behaviors have almost no performance impact at all, but if you have tens of thousands of objects and do a bunch of collision checks, or have them all onscreen at once, those scenarios could start to cause performance problems on the logic or rendering sides (the latter could hit the pixel fill rate of the graphics card).
Moderator
B
95
S
34
G
33
Posts: 3,007
Reputation: 27,876

Post » Wed Jul 09, 2014 12:51 am

That's good to know. I don't know how many objects will end up in the final map since I have yet to determine how big the levels will be.

I am using pathfinding though, and I may give the heroes the ability to destroy a wall section. Each "wall" block will be counted as a pathfinding obstacle, and that will be roughly half the map. The turn based nature of the game should keep this under control, though I figure I'll need to be careful with how I set up the events and conditions and maybe do a distance check before a collision check and whatnot.
B
81
S
30
G
35
Posts: 340
Reputation: 23,046

Post » Wed Jul 09, 2014 1:06 am

If you destroy pathfind obstacles, you have to regenerate the pathfind map again, if its a huge map, its going to destroy performance on weaker PCs. I guess you can squeeze it in during the turn calculations. :D

I'm about to start on my big single layout type game too so, fun & joy ahead!
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,616

Post » Wed Jul 09, 2014 1:16 am

I have it set up so that the hero you have selected will regenerate the pathfinding map when you click to move him, so they do it one at a time on mouse clicked.

The enemies don't move or pathfind until their turn is active. I don't see any regenerate pathfinding events for them at all, so maybe they don't need to since they don't pathfind until their turn is active, and the tiles will have already been destroyed by then. It seemed to work in my test. They walked through where the solid object used to be.
B
81
S
30
G
35
Posts: 340
Reputation: 23,046


Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 9 guests