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
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
358 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
672 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
739 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
524 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
728 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
519 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
692 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 ...
18
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
899 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
940 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
552 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
420 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
4k 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
607 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
8answers
28k 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 ...