Am I getting too concerned over object count?

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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).

  • 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.

  • 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.

    I'm about to start on my big single layout type game too so, fun & joy ahead!

  • 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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)