Render Optimisation Help

For questions about using Classic.

Post » Wed Apr 18, 2012 5:19 pm

Hi! i'm working on a RTS project and i'd reached a critical point where, render need to be improve for good FPS rate, well i was reading by there, something about theme, but i've a question.

I'm applying the technic of destroying not needed sprites out of screen, thats improve a bit FPS rate, my question is, GPU renders invisible sprites?, because there is some sprites out of screen i dont need to render 'em, but i need them exist still, so i can't destroy them.

so, turn invisible sprites, saves render?

thanks a lot, coming soon i'll post my first pre-beta of DEEP SPACE my RTS space project, this is intended to be an auto explained tutorial for RTS, reactive AI, Missions System, TechTree System and more...

^_^Yaottabyte2012-04-18 17:20:17
B
4
S
1
G
1
Posts: 69
Reputation: 863

Post » Wed Apr 18, 2012 5:29 pm

Making a sprite invisible does mean the graphics card will skip rendering it, but it will try to render it if the object is visible but has an opacity of 0.

There's also the CPU use to consider, because an invisible object will still have events run on it. Even if all events and behaviors are disabled, there's a small amount of overhead having an object in the layout. For reference, my computer can manage 100,000 objects at 60fps, but that's with no behaviors or events at all.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397

Post » Wed Apr 18, 2012 5:53 pm

ok thanks! well i'm asking because for my RTS i need all resources of machine an thats numbers you said, puts me on alert, i was testing the RTS and FPS drops when sprite count growings up, so render issue must be fixed...

thanks a lot Arima! thats tips will be useful... ^_^
B
4
S
1
G
1
Posts: 69
Reputation: 863

Post » Wed Apr 18, 2012 7:09 pm

I should also mention - when something is off screen the graphics card automatically skips drawing it, so you don't have to do any work there. Remember also that rendering isn't the only thing that can hit the frame rate, events can too, especially CPU intensive stuff like collision checks. As an example of an optimization you can make, if you are doing collision checks, you might want to try using bounding box collisions if possible instead of per pixel because they're much, much faster.
Moderator
B
87
S
32
G
33
Posts: 3,005
Reputation: 27,397


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests