In this post we will explore some basic techniques in XNA for 2D collision detection. Our goal is to provide a solution to the two following scenarios: Detect the collision of two sprites Detect the collision of a sprite with specific areas in the scenery (eg detect when a car hits the boundaries of the road when viewed from the top) A sprite in XNA is usually realized by a DrawableGameComponent class (see previous posts 1 , 2 , 3 ). Therefore sprite collision detection is merely a DrawableGameComponent collision
Διαβάστε περισσότερα »
In the previous post , we have talked about decentralizing our XNA application by taking advantage of the GameComponent and DrawableGameComponent classes. In this post, we will explore two things: The way to decouple the GameComponents' interfaces from the main game logic by using "Game Services". The way to create "Scenes". Scenes in games are those displays that occur before the game starts with th game menu, the help screen, etc etc. Let's start with Game Services . In the project of the
Διαβάστε περισσότερα »