The determination of whether or not two or more entities make contact with each other during gameplay.
2
votes
3answers
304 views
Oriented Bounding Box - How to?
I've been trying to write my own collision code, less because I want to, more because I want to understand its working.
To do this, i've been working off of the popular collision book i'm sure you've ...
4
votes
2answers
268 views
Whats the physics behind the doodle jump game?
I'd like to know how we can achieve the doodle jump type physics using andengine.
I mean the character is not colliding with the ground blocks when he moves upwards but will collide when he came ...
1
vote
2answers
296 views
Online MMO collision detection for players & walls
Let's assume the following:
I have a server which stores the player's position (float x, float y, float z)
Client sends the server it's updated position ever 250ms or so.
Server has bounding boxes ...
0
votes
1answer
203 views
How do I detect the intersection of a curve with itself?
I'm developing a game in which the player can draw a line. I want to detect if that line intersects with itself. How would I do this?
-1
votes
2answers
132 views
Collisions and camera tilt in XNA C# 3D Game
I am working on a game programming class project and need some help. I cannot find a good tutorial on how to get these 3 frictionless spheres to collide with each-other, the surface and the walls of ...
0
votes
2answers
149 views
3d to 2d Collision
I have a 3d model which rotates around my screen, it's always on the Z axis = 0 where everything of my 2d images are. My 2d images fly out of the center and get bigger to give the view as getting ...
0
votes
0answers
160 views
(XNA - Farseer) Not always colliding and moves seemingly randomly then objects freeze if they do collide
So I'm mixing XNA and Farseer, the first for graphics and the latter for collision and physics. If this is a horrible choice to start out with, tell me that as well.
In any case, I have set up a ...
0
votes
1answer
94 views
AS3 Rect-Rect Collision
Basically, my game has the player's attack hitbox change based on the attack being performed. I tried to make a simple collision test that takes an enemy's coordinates and have it check to see if it's ...
12
votes
3answers
598 views
Resolving a collision with forces
In my 2D physics engine, I can detect AABB vs AABB collisions, and resolve them by finding the shortest penetration vector and adding it to the AABB's position.
Doing this "pushes" the first AABB ...
-1
votes
1answer
128 views
Collision detection tutorials [closed]
I'm supposed to develop a Java game using AWT and Applet libraries. I'm stuck with the concept of "collision detection". If you can help me with any tutorials that explain the concept (how it works) ...
2
votes
2answers
247 views
Collision detection for 2D RTS game in C++
I'm currently working on a real time strategy game in C++, and I need to implement a collision detection algorithm. I need to have a very efficient algorithm because this game will be running on ...
2
votes
0answers
159 views
Collision detection with heightmap based terrain
I am developing a 2D tank game. The terrain is generated by Midpoint Displacement Algorithm, so the terrain is represented by an array:
index ---> height of terrain
[0] ---> 5
[1] ---> ...
1
vote
0answers
60 views
Alternate Collision Detection in XNA 4.0
Is there a better more efficent way for collision detection in XNA 4.0 besides Bounding boxes or circles? Like a way that would automatically wrap around the texture regardless of the textures shape.
1
vote
0answers
39 views
Getting collisions with equal values in Sweep and Prune
When sorting an (incremental and persistent) SAP, you generally move extremas left until you run into a smaller/equal extrema, gathering collisions along the way. However, that results in the ...
6
votes
2answers
230 views
Identifying quad patterns in a two-dimensional array
In the tech demo I'm trying to make, tetrominoe-style blocks will be placed by the player, at which point the game checks to see if they've made a quad with any existing shapes on the board (a 2D ...
1
vote
2answers
154 views
Find the Contact Normal of Rectangle Collision
It seems a lot of people have asked similar questions on this site, and every time it seems like a whole bunch of answers that don't work are given.
Basically, I have two rectangles (AABBs) that ...
1
vote
1answer
191 views
Am I implimenting a sweep and prune broadphase correctly? [closed]
The code that I am using is:
std::vector <PhysicsBody*> physicsChildren; //containing all objects
...
std::sort(physicsChildren.begin(), physicsChildren.end(), sortByLeft);
...
4
votes
1answer
195 views
box2d with lines
I have a very simple platform game builder and I've specified the ceilings, walls and floor as line segments.
A line has a winding, or normal; you can determine the direction that a line should be ...
2
votes
2answers
91 views
Meaning of offset in pygame Mask.overlap methods
I have a situation in which two rectangles collide, and I have to detect how much did they collide so so I can redraw the objects in a way that they are only touching each others edges.
It's a ...
1
vote
2answers
133 views
How to get the height at a position in a triangle
I have a heightmap, and I store the heights in a giant array. However, when I move, it's quite choppy on the Y-axis, so I need a way to get the height at a certain point in a triangle.
I currently ...
0
votes
0answers
103 views
2D Convex Poly - Circle collision, SAT vs Distance to Segment
I'm doing a collision detection class based on SAT
and now I'm not sure how is better to handle circle-poly collision
I can go with SAT by projecting on all poly axis + nearest vertex
or go with ...
1
vote
1answer
136 views
When and where should I calculate collision response with multiplayer physics?
I've troubles wrapping my head around multiplayer physics and collisions on the client side, so far I interpolate the state of my network entities ( position and velocity ) of the other clients based ...
0
votes
1answer
72 views
Find the footprint of an isometric entity
I'm working on making a 2D isometric engine in Java. I'm getting into collision detection and I've hit a bit of a problem.
Characters in-game are not restricted to movement from tile to tile - they ...
-1
votes
1answer
93 views
Rectangle collision handling without sticking together [closed]
I'm trying to implement collisions between two solid objects. I want the objects to stop moving in their current direction when they hit another solid object (hitting a wall). So far, they always ...
0
votes
0answers
210 views
Unity3D: collider performances on mobile iOS devices
I'm experimenting with Unity3D and colliders. Unfortunately I still don't have Unity Pro version and I can't use the profiler.
Consider the following situation:
mobile devices (ios, iphone 3GS).
an ...
0
votes
1answer
109 views
3D models and hit detection
I'm currently trying to create a game that involves the inside of a cube, which i will make in Maya. My question is what is the best way to create a model with hit detection in mind?
For example my ...
1
vote
1answer
87 views
Confusing with an articles wording on Clamping a Vector2
I have been reading an article on Collision Detection and how to resolve it.
http://www.wildbunny.co.uk/blog/2011/04/20/collision-detection-for-dummies/
In the section describing an AABB vs Circle, ...
2
votes
1answer
224 views
Collision detection with XNA and TiledLib
I recently started learning XNA and after getting annoyed with creating individuals rectangles each time I wanted to add something I went with TiledLib so I could more easily create levels using the ...
3
votes
2answers
305 views
2D destructable terrain with collisions in MMO
Task
What I want is to create destructable terrain (like in Worms) and collisions with this terrain (with calculated normals) that will be fast enough to work on server machine.
Basically lets say ...
4
votes
5answers
443 views
Collision detection performance problem
Using python and pygame I've built a collision detection system according to the instructions in this YouTube tutorial.
This is updated 40 times per second and controls movement and collision ...
0
votes
2answers
216 views
GLSL light coloring blocked surfaces
I have created a very simple lighting shader. It currently only supports point lights, but it lights up surfaces that are completely blocked from the light. I know why, but I want to know how I can ...
1
vote
2answers
151 views
Per color collision is really expensive - can my approach be improved?
I've been working on adding a color based collision component which takes a list of colors and checks to see if an object is colliding with any of them. However, the operation seems to be extremely ...
2
votes
3answers
192 views
What is the best way to check lists of objects that collide
I am making a top down shooter in XNA. I have a player, a list of enemies, a list of world objects like crates, trash cans, etc. and the map which has walls. Is there a better way to check for ...
-1
votes
1answer
143 views
Tilemap collision detection strangeness [closed]
I have used this code, or code very similar to it, to detect collisions between rectangle shaped entities and a tilemap for a long time. When I read the code it seems to me that it is impossible for ...
2
votes
1answer
163 views
RK4 integration and Continuous Collision Detection
I'm using this method to detect collision between two AABBs. The algorithm is simple, fast and works great. It uses the relative velocity between the two objects to calculate TOI. This works fine with ...
3
votes
2answers
326 views
XNA 4.0 / C# Collision Response
Okay, this is really starting to annoy me.
First of all, detecting collisions is nice and easy. I have a list of tiles,
and a player. The player and each tile have their own rectangles. (The tiles ...
1
vote
1answer
114 views
Pygame - Change sprite collision Rect
I'm making a platformer in Pygame. One of the sprites I'm using is a flag, and I want to detect if the player collides with the flagpole (just like in Super Mario Bros). The problem is that the image ...
2
votes
1answer
160 views
Min/Max of two vectors?
This seems like a simple question, but i'm having trouble searching the internet for it.
In XNA, during a collision detecting method, I would determin the minimum of some vectors.
// Get the minimum ...
4
votes
3answers
443 views
Boundaries in game development: How do “professionals” do it?
How do professionals do boundaries in a 2D game? The way I do is say I don't want the sprite to move into a certain area:
//Example
if ((playerPosX >= 825) && (playerPosX <= ...
-1
votes
1answer
151 views
simple escape algorithm: enemy escapes when hero approches
I need some clues on a "escape" algorithm.
My scene a 2D rectangle (0,0,1000,1000)
I have enemy sprites on this scene. They are immobile until distance from hero <100.
If distance<100, enemy ...
0
votes
2answers
139 views
Why does this collision detection & resolution code only work for one side?
I am having a bit of trouble with my collision detection. It only works correctly for the right side, meaning, if I enter the tile from any other side, it brings me to the right side.
Here is my ...
1
vote
1answer
90 views
Simple Bounding Sphere Calculations for 2d game
I'm writing a 2d game and have a question regarding the use of bounding spheres.
I'm kind of OK with the math, but I'm confused about one thing.
To work out the distance between the 2 centre points ...
1
vote
1answer
223 views
Collision Detection Tips
I need collision detection for my 3D racing game but it isn't going well right now. I think I understand the concept of testing boxes and generating a response, however implementation part is a ...
6
votes
1answer
163 views
Determining whether two fast moving objects should be submitted for a collision check
I have a basic 2D physics engine running. It's pretty much a particle engine, just uses basic shapes like AABBs and circles, so no rotation is possible. I have CCD implemented that can give accurate ...
4
votes
2answers
537 views
Get collision details from Rectangle.Intersects()
I have a Breakout game in which, at some point, I detect the collision between the ball and the paddle with something like this:
// Ball class
rectangle.Intersects(paddle.Rectangle);
Is there any ...
0
votes
1answer
156 views
Can't detect collision properly using Rectangle.Intersects() [closed]
I'm using a single sprite sheet image as the main texture for my breakout game. The image is this:
My code is a little confusing, since I'm creating two elements from the same Texture using a ...
4
votes
2answers
131 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
134 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
137 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
158 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 ...


