Collision detection is the determination of whether or not two or more entities make contact with each other during gameplay.

learn more… | top users | synonyms (2)

2
votes
2answers
1k views

Projectiles in tile mapped turn-based tactics game?

I am planning to make a Laser Squad clone and I think I have most of the aspects covered. But the major headache is the projectiles shot/thrown. The easy way would be to figure out the probability of ...
1
vote
1answer
1k views

Multiple Sprites using foreach Collison Detection in XNA (C#)

Back again from my last question. Now I was curious I use a foreach statement to use the same shot class. How would I go about doing collison detection. I used the tutorial here on how to shoot a ...
1
vote
2answers
2k views

Voronoi regions of a (convex) polygon

I'm looking to add circle-polygon collisions to my Separating Axis Theorem collision detection. The metanet software tutorial (http://www.metanetsoftware.com/technique/tutorialA.html#section3) on ...
7
votes
1answer
2k views

Tile-based 2D collision detection problems

I'm trying to follow this tutorial http://www.tonypa.pri.ee/tbw/tut05.html to implement real-time collisions in a tile-based world. I find the center coordinates of my entities thanks to these ...
121
votes
9answers
25k views

How was collision detection handled in The Legend of Zelda: A Link to the Past?

I would like to know how the collision detection was done in The Legend of Zelda: A Link To The Past. The game is 16x16 tile based, so how did they do the tiles where only a quarter or half of the ...
3
votes
1answer
629 views

Breakout clone, how to handle/design for collision detection/physics between objects?

I'm working on a breakout clone, and I wish to create some realistic physics effects for collision - angles on the paddle should allow the ball to bounce, as well as doing curve balls etc. I could use ...
3
votes
3answers
2k views

Collision detection of convex shapes on voxel terrain

I have some standard convex shapes (cubes, capsules) on a voxel terrain. It is very easy to detect single vertex collisions. However, it becomes computationally expensive when many vertices are ...
8
votes
2answers
5k views

2D object-aligned bounding-box intersection test

I have two object-aligned bounding boxes (i.e. not axis aligned, they rotate with the object). I'd like to know if two object-aligned boxes overlap. (Edit: note - I'm using an axis-aligned bounding ...
14
votes
2answers
4k views

How to find if circle and concave polygon intersect?

I have a polygon (sometimes convex, but often concave), and a bunch of circles with different radius. How can I find out if a circle is intersecting/overlapping with the polygon? If it makes it ...
4
votes
4answers
1k views

Pong Collision Help in C# w/ XNA

Edit: My goal is to have it function like this: Ball hits 1st Quarter = rebounds higher (aka Y++) Ball hits 2nd Quarter = rebounds higher (using random value) Ball hits 3rd Quarter = rebounds lower ...
7
votes
5answers
2k views

How to determine which cells in a grid intersect with a given triangle?

I'm currently writing a 2D AI simulation, but I'm not completely certain how to check whether the position of an agent is within the field of view of another. Currently, my world partitioning is ...
4
votes
2answers
413 views

How to detect and collide two elastic line segments?

There are 4 moving physical nodes in 3D space. They are paired with two elastic line segments / strings (1 <-> 2; 3 <-> 4). Part I: How to detect the collision of two segments? Part II: On the ...
3
votes
1answer
885 views

problem with frustum AABB culling in DirectX

I am currently working on a project with a few friends, and I am trying to get frustum culling working. Every single tutorial or article I go to shows that my math is correct and that this should be ...
2
votes
1answer
260 views

Collision filtering by object, team

I am looking for a good method to determine which objects will be considered for collision with other objects. My current idea is that each object has the following properties: alwaysCollidesWith = ...
1
vote
3answers
3k views

How to detect which edges of a rectange touch when they collide in iOS

I'm creating a basic "game" in iOS 4.1. The premise is simple, there is a green rectangle ("disk") that moves/bounces around the screen, and red rectangle ("bump") that is stationary. The user can ...
5
votes
1answer
840 views

How to calculate new direction after sprite collision

The scenario as you can see in the picture. A ball will be hitting a surface and I want to fairly correctly get the new angle after the collision.. I expect to know the X,Y coordinates of the lines ...
4
votes
3answers
1k views

Point line collision reaction

I am trying to program point line segment collision detection and reaction. I am doing this for fun and to learn. The point moves (it has a velocity, and can be controlled by the user), whilst the ...
4
votes
4answers
6k views

How to find out if two circles intersect each other

I want to find the intersecting of 2 circles with radius r1 and r2 (simple solutions preferred).
7
votes
2answers
640 views

Collision Systems Implementation

Just curious what might be a good way to implement a decent collision system. As a class inherited by a base Entity class? Currently I'm stuck and could just use a couple better ideas than my own. ...
5
votes
3answers
583 views

What causes player box/world geometry glitches in old games?

I'm looking to understand and find the terminology for what causes - or allows - players to interfere with geometry in old games. Famously, ID's Quake3 gave birth to a whole community of people ...
1
vote
3answers
2k views

Collision Detection for 2D

I am working on a simple game, where I need to do a collision detection of two Texture2D. The code I have written is: bool perPixelCollission = false; Texture2D texture1 = ...
2
votes
3answers
2k views

Easiest way to compute closest point between two triangular meshes

What is the easiest (not most efficient or fastest) algorithm to find the closest points between two triangular meshes? What are the easiest early out algorithms in the broad phase? What kind of broad ...
3
votes
1answer
2k views

BoundingFrustum Performance Issues

I have noticed that BoundingFrustum.Intersects() is a rather slow check in XNA. I am doing only 256 checks per frame and it eats up arround 50-60% of availible time when running at 60fps. This is kind ...
15
votes
1answer
7k views

Quad tree vs Grid based collision detection

I'm making a 4 player co-op r-type game, and I'm about to implement the collision detection code. I've read a lot of articles and stuff about how to handle collision detection, but I'm having a hard ...
4
votes
1answer
2k views

Farseer and 2D Action sidescroller game

I'm thinking about using Farseer inside my game (I'm not good in physics), which isn't a bad idea. However something happened while I was thinking about that, I found this tutorial: ...
6
votes
3answers
6k views

2D Side Scrolling game and “walk over ground” collision detection

The question is not hard, I'm writing a game engine for 2D side scrolling games, however I'm thinking to my 2D side scrolling game and I always come up with the problem of "how should I do collision ...
3
votes
1answer
263 views

Name of the model in memory that you use for map collision detection?

I'm trying to remember the English name for a memory model of a map built exclusively for handling collision detection. I think this is especially frequent in tile-based platform games. I believe the ...
14
votes
5answers
6k views

Collision Resolution

I know quite well how to check for collisions, but I don't know how to handle the collision in a good way. Simplified, if two objects collide I use some calculations to change the velocity direction. ...
7
votes
4answers
1k views

Implementing 2D CSG (for collision shapes)?

Are there any simple (or well documented) algorithms for basic CSG operations on 2D polygons? I'm looking for a way to 'add' a number of overlapping 2D collision shapes. These may be convex or ...
6
votes
2answers
2k views

How can I implement rectangle collision response?

I am working on a game in JavaScript and my current implementation of collision uses the shortest distance to push the intersecting object away, which isn't always correct. I've made this diagram of ...
4
votes
2answers
360 views

Collision Detection Delegate Scheme

Hey guys! My physics engine is coming along quite nicely (thanks for asking!) and I'm ready to start working on some even more advanced junk. Case in point, I'm trying to set up my collision engine so ...
17
votes
3answers
745 views

Building a Plattformer - How to determine if a player is allowed to jump?

I'm building a simple Plattformer Jump n' Run Style game. I do not use tiles - instead i've geometrical shapes for my level entities (and the player is one too). I finished my collision detection code ...
5
votes
2answers
674 views

3D Particle-Geometry collision

I am programming a particle engine for a 3D game written in XNA. I was wondering if somebody could point me in the right direction or perhaps give me some pointers in making the particles collide with ...
1
vote
1answer
741 views

2D collision and getting closer to objects

Just curious what to do from here. So I am done with my tile editor program and currently have it set up so that my background (which is one large image) is mapped in XML to 32x32 tiles (again, a ...
7
votes
3answers
529 views

How to detect collisions between sprite and a user generated shape of some sort?

How to detect a collision between a sprite and a user generated shape of some sort. For example. There are some objects on the screen. The user takes their finger and draws an circle shape around a ...
5
votes
2answers
733 views

Tiles and a walkable path

My game a sidescrolling platformer. I've created my own Tile app which in the end export an xml file detailing what each 32x32 space (in the entire image) contains (environment, platform, etc.). I get ...
7
votes
1answer
520 views

How to represent a game character in code?

In a previous game I wrote I had a game character class. This class tracked the location, velocity, and a set of states. Except the states were tied very close to the animation. Each state would have ...
9
votes
3answers
2k views

FPS Collision detection and movement

How is collision detection and movement typically handled in a FPS, particularly handling slight changes in ground height such as stairs (both on incline and decline)?
7
votes
3answers
695 views

Your recommendation for path construction from a single background image?

So I currently have my background as a single PNG and some obstacles (like blocks as part of that PNG). In order to create a path, I currently store pixels above a unique green color (my hill) and use ...
19
votes
4answers
4k views

Should collision detection be done server-side or cooperatively between client/server?

I am working on an online game that will have very heavy collision detection processing. Player models will collide with other players, mobs, structures, terrain, and solid objects that only exist ...
3
votes
2answers
340 views

What are the technologies that makes physics engines so good for raycasting?

again. This question is strictly related to this one so, what is the technology that makes physics engines suitable for raycasting? It is a particular data structure? Has it to do with the engine's ...
4
votes
3answers
3k views

Why do we use physics engines for collision testing or raycasting?

There is a thing I don't understand about game engines: why it is so common to use physics engines to do raycasting or collision testing? Say that you have a 3D scene loaded in your scene manager ...
5
votes
3answers
2k views

Implementing a 2D Platformer Game Engine

Any ideas where I can find info about making 2D jump & run games? I need some general ideas, so I wouldn't reinvent wheel (at least where game design is concerned). Another point is that I am ...
5
votes
1answer
1k views

2D collision-detection middleware

(This question was split off from http://gamedev.stackexchange.com/questions/3345/) Are there any recommendable middleware available for 2D collision detection? I believe I've heard that Box2D could ...
4
votes
1answer
2k views

New Vector Calculation for Elastic Collision of Circle and Fixed Rectangle

I am writing a fairly simple breakout-style game for Android phones. I have successfully detected the collisions between the ball(s) and bricks. The problem that I am having is in calculating the new ...
7
votes
3answers
906 views

3D collision-detection middleware

(I've split this question into two. For 2D, see: http://gamedev.stackexchange.com/questions/3431/) Are there any recommendable middleware available for 3D collision detection? I believe I've heard ...
12
votes
5answers
4k views

2D Level design/editing/saving questions

I thought about making a simple 2D Sidescroller game like SuperMario. Then i wondered about how to save, load or create the levels for the game. The first thing i thought of was drawing a simple ...
9
votes
4answers
950 views

What's the most efficient way to find the intersection point of a missile and a bitmap terrain?

Following up on my earlier question about finding the slope of a 2D bitmap terrain I now need to know the best way of finding the point on the 2D terrain that the missile hit. Obviously, I can see if ...
6
votes
4answers
2k views

How do I calculate the angle of the slope at a point on a 2D bitmap terrain?

I have an arbitrary destructible bitmap terrain like the one in "Worms". It's easy to work out if a character or missile intersects the terrain, but how do I work out the angle of the slope at the ...
-5
votes
2answers
338 views

my hitTest() doesnt work at times?

i have a code segment in which i use hitTest() a couple of times. and at a particular section the hitTest stops working. it doesnt test the collision of body a and body b i tried using ...