Sign in to follow this  
ChurchSkiz

[XNA] using components?

Recommended Posts

Starting a new game in XNA after a break and noticed that a lot of people are using components in XNA now. I am looking into their usage and to me it looks like a class with a skeleton update, initialize, and draw function. All my other XNA games just used classes with their own update and draw functions that I called during the update and draw routines from the main loop. Should I start using components or is my previous method acceptable? What are the pros and cons of using the component structure vs. creating classes from scratch? With this project my focus is really on creating a good design flow as my previous games were all pretty suboptimal (using switch statements and such for different game states).

Share this post


Link to post
Share on other sites
"Different strokes for different folks."

I think either way is fine, so long as you have an organized, structured way of doing things. As you mentioned, components do provide a nice template to get you up and running. The other advantage as mentioned by WilyCoder is that you can use a component as a service very easily.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this