SOLVED Optimization: objects and instances (question)

Hello!

Are there any difference for game if I have (for example) 10 objects or 10 instanses of one object? For memory/performance/etc.

I have found 2 ways to make a cutscene, and first is to create a new object for every cutscene, second is to create different instances of one object (it uses scripts in instance's creation code).
First way is more conviniet for me, but I wonder about its consequences.
 
Last edited:

samspade

Member
Short answer no. Objects, that is the thing you create in the editor, have no impact on performance. The instances you create of an object in your game might. But 10 instances are 10 instances. What matters is the code in those instances. If the code is the same, then whether they are instances of the same object or instances of different objects won't matter.
 
Short answer no. Objects, that is the thing you create in the editor, have no impact on performance. The instances you create of an object in your game might. But 10 instances are 10 instances. What matters is the code in those instances. If the code is the same, then whether they are instances of the same object or instances of different objects won't matter.
Thank you very much!
 

Nocturne

Friendly Tyrant
Forum Staff
Admin
Moderator
In this case I'd say really it's a question of whatever is easier for you. First of all, a cut scene isn't going to be very intensive in terms of performance and objects have zero impact on performance, only instances and you'll be creating the same amount of them anyway so their impact will be identical whether it's one object 10 times, or 10 objects 1 time. Regardless of what you do, and in questions of memory, an object really doesn't use that much... so, yeah, I'd say in this case just go with whatever organisation works better for you and is easiest to maintain.
 
In this case I'd say really it's a question of whatever is easier for you. First of all, a cut scene isn't going to be very intensive in terms of performance and objects have zero impact on performance, only instances and you'll be creating the same amount of them anyway so their impact will be identical whether it's one object 10 times, or 10 objects 1 time. Regardless of what you do, and in questions of memory, an object really doesn't use that much... so, yeah, I'd say in this case just go with whatever organisation works better for you and is easiest to maintain.
Thank you very much for answering
 
Top