The determination of whether or not two or more entities make contact with each other during gameplay.

learn more… | top users | synonyms (2)

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
892 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
935 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
337 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 ...
2
votes
2answers
2k views

XNA 2D Collision Detection with Rectangles: Helper Objects?

Per this excellent question, and excellent answers, I am attempting to write a breakout clone. Regarding the collision detection against the walls, does XNA provide a set of helper methods/objects to ...
3
votes
4answers
540 views

Authoring Hitboxes

What sort of tools/processes are used for setting up hitboxes and make them move/resize/appear/disappear to match the character animations? I'm working in 2d, so attaching collision volumes to the ...
8
votes
3answers
316 views

Connecting physics simulations with different coordinate-systems

I want objects to move between two physics simulations through a "window" and collide with those from both simulations in case they intersect the window plane. The coordinate systems of the ...
23
votes
8answers
1k views

Is there a simple way to stop enemies standing in the same spot?

So: top-down game, my enemies chase the player, when they get within a certain distance they stand still and fire. If they're all coming from the same direction they all end up standing in the same ...
-5
votes
2answers
326 views

doubts in circle circle collisions [duplicate]

Possible Duplicate: two balls stick together in a pool game? i have problems in circle circle collisions in a pool ball game.. the game has problems like the circles (or balls) stick ...
-5
votes
2answers
414 views

two balls stick together in a pool game? [closed]

when multiple collisions occur between balls..sometimes they stick together..mostly in cases of either of the balls having high velocity..can somebody explain pls
1
vote
2answers
380 views

How to allow character to keep moving after it hits a wall

I am developing an iPhone game. There is a fountain that the user should not be able to walk through. Now, this question is about checking circle-point collision or anything like that. I am checking ...
12
votes
6answers
3k views

How do I handle Isometric collision detection?

I would like to make an isometric run-jump style platformer. The player should be able to jump on top of platforms above the floor, hit the side of objects etc. I'll be using a 2D game engine so I ...
3
votes
1answer
603 views

Collision and response between sprites?

What is an easy way to have sprites collide and react to the collision? E.g. if I'm writing a game in XNA or with Canvas 2D and need to write the code myself very simply.
29
votes
9answers
26k views

What is the fastest way to work out 2D bounding box intersection?

Assume that each Box object has the properties x, y, width, height and have their origin at their center, and that neither the objects nor the bounding boxes rotate.
22
votes
6answers
3k views

What is a good algorithm to detect collision between moving spheres?

If (for the purpose of collision detection) 3D objects are represented in a game by spheres, what is a good algorithm to detect a collision between spheres? If each object has a position as of the ...
8
votes
4answers
4k views

Cocos2D collision detection against a random shape

I would like to brainstorm a few ways of handling how to detect a collision between a sprite and a user generated shape of some sort. For example. There are 3 objects on the screen. The user takes ...