What is the difference between Component Pattern and the Strategy Pattern in reference to Game Design?
What is the difference between Component Pattern and the Strategy Pattern in reference to
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You are comparing apples and oranges here – actually it might be more correct to say you are comparing an engine and petrol here.
The Component pattern is essentially just saying you should componentise complex systems (in game design you might have the physics, graphics, sound components etc – ie they are all sub-systems.
Strategy is a way of plugging in different implementations, at run time.
So – rather than saying the difference between them it might make more sense to say that the strategy pattern could be used to load the appropriate components at run time – stretching it a bit here but maybe you want to switch to a different rendering algorithm when you hit the water for example.