What kind of performance issues does multiple instances of the exact same object have on a game?

Posted by lggmonclar on Game Development See other posts from Game Development or by lggmonclar
Published on 2012-06-23T15:20:42Z Indexed on 2012/06/23 15:23 UTC
Read the original article Hit count: 149

Filed under:
|
|

I'm fairly new to programming, and I've pretty much learned all the things I know on the go, while working on projects. The problem is that there some things that I just don't know where to begin searching.

My question is about performance, and how can multiple instances of the same object affect it -- Specifically, I'm talking about XNA's "GraphicsDevice" class. I have it instanced on four different parts of my game, and in three of those, the object has the exact same values for all the attributes. So, in that case, should I be using the same instance of GraphicsDevice, passing it as a parameter, even if I use it in different classes?

I apologize if the question seems redundant, but like I said, I've taught myself most of what I know, so there are quite a few "holes" in my learning process.

© Game Development or respective owner

Related posts about XNA

Related posts about c#