The determination of whether or not two or more entities make contact with each other during gameplay.
4
votes
2answers
133 views
Collisions on complex map 2D
I'm currently thinking about collision and map system that I want to use in my next game and I'm kind of puzzled. Maps are going to be somewhat complex with lots of irregularities and thus tiling is ...
0
votes
0answers
137 views
Swept sphere to line segment intersection in 2D
How can you determine when a moving sphere intersects a line segment, and the normal of that intersection?
Ideally Javascript, but anything that's tidy, simple and self-contained and easy to port to ...
0
votes
0answers
140 views
Ball-cylinder collision detection with Bullet Physics
I am trying to find out collision detection between specific objects and when they are colliding then want to invoke a specific method.
I have read one this tutorial but I don't understand how to use ...
-1
votes
2answers
162 views
My 2D collision code does not work as expected. How do I fix it?
I have a simple 2D game with a tile-based map. I am new to game development, I followed the LazyFoo tutorials on SDL.
The tiles are in a bmp file, but each tile inside it corresponds to an internal ...
5
votes
2answers
176 views
How do I find actors in an area on a poly-precise basis?
Ok, I've been asking various questions and getting some good answers, but I think I need to rethink my method, so I'll describe the problem.
I have a player who has a big blue box in front of him. ...
1
vote
1answer
190 views
How do I detect multiple sprite collisions when there are >10 sprites?
I making a small program to animate the astar algorithm. If you look at the image, there are lots of yellow cars moving around. Those can collide at any moment, could be just one or all of them could ...
0
votes
1answer
195 views
Sweep and Prune vs Quad Tree
I need some broad phase algorithm for my 2d game (shmup, bullet hell). Does one or another solution have any major advantages?
1
vote
2answers
517 views
Efficient collision detection - tile based HTML5/Javascript game
I'm building a basic RPG game and I'm looking at collisions/pickups etc now.
It's tile based and I'm using HTML5 and Javascript.
I use a 2D array to create my tilemap.
I'm currently using a switch ...
1
vote
0answers
77 views
Collision detection code style [closed]
Not only there are two useful broad-phase algorithms and a lot of useful narrowphase algorithms, there are also multiple code styles.
Arrays vs. calling
Make an array of broadphase checks, then ...
0
votes
1answer
107 views
SFX Played Once per Collision or Hit
I have a question about using Box2D (engine for LibGDX used to make realistic physics). I observed on the code that I've made for the physics here below:
@Override
public boolean touchUp(int screenX, ...
-1
votes
1answer
401 views
HTML5 platformer collision detection problem
I'm working on a 2D platformer game, and I'm having a lot of trouble with collision detection. I've looked trough some tutorials, questions asked here and Stackoverflow, but I guess I'm just too dumb ...
2
votes
1answer
97 views
Collision Detection algorithms with early Collision exit
I'm using collision detection in Monte Carlo simulations and at the moment I'm using GJK which is quite fast. I can't help to think it could be done even faster though. In the simulations, about 70% ...
6
votes
3answers
289 views
Narrow-phase collision detection algorithms
There are three phases of collision detection.
Broadphase: It loops between all objecs that can interact, false positives are allowed, if it would speed up the loop.
Narrowphase: Determines whether ...
2
votes
1answer
341 views
circle - rectangle collision in 2D, most efficient way
Suppose I have a circle intersecting a rectangle, what is ideally the least cpu intensive way between the two?
method A
calculate rectangle boundaries
loop through all points of the circle and, ...
4
votes
2answers
183 views
Space-efficient data structures for broad-phase collision detection
As far as I know, these are three types of data structures that can be used for collision detection broadphase:
Unsorted arrays: Check every object againist every object - O(n^2) time; O(log n) ...
0
votes
1answer
471 views
How can I test if my rotated rectangle intersects a corner?
I have a square, tile-based collision map. To check if one of my (square) entities is colliding, I get the vertices of the 4 corners, and test those 4 points against my collision map. If none of those ...
1
vote
1answer
89 views
Collision planes confusion
I'm following this tutorial by thecplusplusguy and in the linked video he explain that for example for the world basement and walls we need to create the actual rendered (shown to the player) walls ...
5
votes
1answer
283 views
How many and which axes to use for 3D OBB collision with SAT
I've been implementing the SAT based on: http://www.geometrictools.com/Documentation/DynamicCollisionDetection.pdf for 3D collisions
On page 7, in the table, it refers the 15 axis to test so we can ...
5
votes
6answers
245 views
How do I calculate distance from a point to a rectangle?
I have a 2D rectangle with x, y position, height and width, and a randomly positioned point nearby.
Is there a way to check if this point might collide with the rectangle if it is closer than a ...
3
votes
1answer
204 views
Collision resolution - Character walking on ascendent ground
I don't know if the solution to this problem is quite straight-foward but I really don't know how to handle collision resolution on a game where the player walks on an ascendent floor which is not ...
4
votes
1answer
184 views
3d Collision Handling
I have trouble while detecting collisions on my 3D-Game.
I have set-up Rays, to detect collisions (Screenshot) and my main-rountine already analyzes them. But now there's the question what to do ...
0
votes
2answers
267 views
map data structure in pacman
i am trying to make a pacman game in c# using GDI+, i have done some basic work and i have previously replicated games like copter-it and minesweeper. but i am confused about how do i implement the ...
2
votes
2answers
141 views
Typical collision detection
I would like to know how is the typical collision detection of most games. For example, you control a character which can move in 2 dimensional directions (except up and down). Now lets asume he walks ...
1
vote
2answers
315 views
Collision checking problem on a Tiled map
I'm working on a pacman styled dungeon crawler, using the free oryx sprites. I've created the map using Tiled, separating the floor, walls and treasure in three different layers. After importing the ...
1
vote
1answer
303 views
How do 2D physics engines solve the problem of resolving collisions along tiled walls/floors in non-grid-based worlds?
I've been working on implementing my SAT algorithm which has been coming along well, but I've found that I'm at a wall when it comes to its actual use. There are plenty of questions regarding this ...
0
votes
1answer
86 views
enemy behavior with boundary to change direction
I'm doing space shooter kind of game, the logic is to reflect the enemy if it hits the boundary. With my logic, sometimes enemy behaves like flickering instead of changing the velocity. It's like ...
1
vote
1answer
222 views
XNA Per-Polygon Collision Check
I'm working on a project in XNA for WP7 with a low-poly environment, my problem is I need to setup a working per-polygon collision check between 2 or more 3d meshes.
I've checked tons of tutorials ...
1
vote
1answer
113 views
this.BoundingBox.Intersects(Wall[0].BoundingBox) not working properly
I seem to be having this problem a lot, I'm still learning XNA / C# and well, trying to make a classic paddle and ball game. The problem I run into (and after debugging have no answer) is that ...
1
vote
1answer
122 views
How does the SAT collision detection algorithm work
There are a lot of tutorials and sample code available showing how to implement the SAT collision detection algorithm.
But can someone explain, without math or code, what are the general principls ...
1
vote
1answer
151 views
How do I get the axes for SAT collision detection
In SAT collision detection how do I calculate the axes for projection?
1
vote
1answer
128 views
Who should respond to collision: Unit or projectile?
In an RTS if a projectile hits a unit. Who should handle the collision?
If projectile handles the collision, it must be aware of all possible types of units, to know what damage to inflict. For ...
9
votes
2answers
371 views
Boat passing under a bridge in a 2D tile based RTS
I'm writing a 2D tile based RTS. And I want to add a 'pseudo 3D' feature to it - bridges over the rivers.
I havent't start any coding yet, just trying to think how it fits the collision detection ...
3
votes
5answers
525 views
2D Collision detection for Pinball Game
So far in previous games I have used simple 2D collision with boxes then checking at pixel level for a collision.
If making a pinball game in nearly a lot of frames the ball will be in contact with a ...
0
votes
0answers
57 views
Calculating the position of an object with regards to current position using OpenGL like matrices
i have a 1st person camera that collides with walls, i also have a small sphere in front of my camera denoted by the camera position plus the distance ahead. I cannot get the postion of the sphere but ...
-1
votes
1answer
306 views
Making a perfect map (not tile-based)
I would like to make a map system as in the GameMaker and the latest code is here. I've searched a lot in google and all of them resulted in tutorials about tile-maps. As tile maps do not fit for ...
50
votes
8answers
3k views
How to avoid circular dependencies between Player and World?
I'm working on a 2D game where you can move up, down, left and right. I have essentially two game logic objects:
Player: Has a position relative to the world
World: Draws the map and the player
So ...
4
votes
4answers
472 views
Point of contact of 2 OBBs?
I'm working on the physics for my GTA2-like game so I can learn more about game physics.
The collision detection and resolution are working great.
I'm now just unsure how to compute the point of ...
2
votes
1answer
93 views
Finding the normals of an oriented bounding box?
Here is my problem.
I'm working on the physics for my 2D game.
All objects are oriented bounding boxes (OBB) based on the separate axis theorem.
In order to do collision resolution, I need to be ...
1
vote
1answer
213 views
Detecting pixels in a rotated Texture2D in XNA?
I know things similar to this have been posted, but I'm still trying to find a good solution... I'm drawing Texture2D objects on the ground in my game, and for Mouse-Over or targeting methods, I'm ...
7
votes
3answers
403 views
Collision Detection Game Design and Architecture
I've reading some articles about collision detection. My question here is about ideas on the design for it.
Baically I have a C++ game that has a main loop with entities with an update method. Based ...
0
votes
1answer
162 views
Normalizing the direction to check if able to move
i have a a room with 4 walls along the x and z axis respectively. My player who is in first person (therefore the camera) should have collision detection with these walls. I'm relatively new to this ...
0
votes
0answers
270 views
What is the best way to implement collision detection using Bullet physics engine and a track generated from a curve?
I am developing a small racing gam, the track is generated from a curve.
As said above, the track is generated, but not infinite. The track of one level could fit with no problem in memory and will ...
1
vote
1answer
451 views
2D OBB collision detection, resolving collisions?
I currently use OBBs and I have a vehicle that is a rigid body and some buildings.
Here is my update()
private void update()
{
camera.setPosition((vehicle.getPosition().x * camera.getScale()) - ...
3
votes
3answers
152 views
How to choose cell to put entity in in an uniform grid used for broad phase collision detection?
I'm trying to implement the broad phase of my collision detection algorithm. My game is an arcade game with lot of moving entities in an open space with relatively equivalent sizes.
Regarding the ...
3
votes
1answer
148 views
Moving the jBullet collision body to with the player object
I am trying to update the location of the rigid body for a player class, as my player moves around I would like the collision body to also move with the player object (currently represented as a ...
9
votes
2answers
977 views
Faster 2D Collision detection
Recently I've been working on a fast-paced 2d shooter and I came across a mighty problem. Collision detection. Sure, it is working, but it is very slow.
My goal is: Have lots of enemies on screen and ...
-2
votes
1answer
217 views
XNA 2D vehicle wall collisions
I am attempting to implement collisions for my truck game, where the truck can drive around the world and hit walls surrounding the level and various randomly placed walls within the level. I am able ...
2
votes
1answer
94 views
Hit Detection When rotating the camera
This bug/feature has been plaguing me for a while and i want to know the best way to fix it.
I'm testing simple hit detection with a wall, like:
if (Forward button)
if(Inv.w.z < -49 || ...
-2
votes
1answer
271 views
C# XNA 2D Multiple boxes collision detection and movement
Hi,
I've been making simple game where you shoot boxes that are coming towards you.
All game objects are simple rectangles.
Now I have problem with collision detection; how to check where the ...
3
votes
1answer
695 views
How a “Collision System” should be implemented?
My game is written using a entity system approach using Artemis Framework. Right know my collision detection is called from the Movement System but i'm wondering if it's a proper way to do collision ...


