So im making a simple RPG using c# and xna. For collision, i am using a text file that contains data about whether a tile is passable or not. I iterate through them and create rectangles based on the position of the 'bad' tile in the text file. I then used these rectangles for collision detectiong. Now, I can easily check whether or not the player is collision with these 'bad' tiles by using the 'Intersection()' method of the Rectangle type. What I am struggling with however, is what do I do once the collision is detected. So far, I …

Member Avatar
Member Avatar
+0 forum 1

So im posting this here and not under game development because this is more of a problem solving question, not directly game related. Im making a simple RPG using xna. Im currently working on collision detection, however running into difficulty. I can successfully check for a collision between the player and a 'bad' tile, however I am stumped as to what the engine should do to prevent the player from passing throguth it! Currently, I am getting the players based on an enum 'Direction', which is set whenever one of the 4 arrow keys are pressed. I am then creating …

Member Avatar
Member Avatar
+0 forum 1

The End.