Tagged Questions
0
votes
1answer
50 views
Implementing Frame of reference for physics calculations
How would I alter physical calculations to account for frame of reference of a physical body?
Currently I have a world that is a collection of rigid body objects that act on each other. There is no ...
1
vote
1answer
123 views
Object Detection
I'm building a collision system for my 2D game, broadphasing (sweep and prone + pair detection) works. But I don't know how to separate pickup objects, tiles and the player from each other.
My ...
2
votes
3answers
363 views
Pong collision detection
I am making Pong... again. Anyway, the collision detection. In the past, I had gotten it working, but it used a bunch of globals, and other nasty things. This time, I am trying it where I have a ...
1
vote
1answer
291 views
UML Class Diagrams for 2D platformer Games? [closed]
I have to develop a small arcade game in C++ for a college assignment using a 2D Game Engine my teacher coded. What would be the best way to make a UML class diagram for it? It's very basic stuff but ...
-1
votes
1answer
84 views
GameTimer too fast, Objects staying intersected and rand not returning value inbetweem min and max [closed]
So I'm developing a game called PongBreakout in c++ using a game engine i got from uni (when i was there..)
I've got a few problems with my game that i'm struggling to fix and need some help to figure ...
0
votes
0answers
263 views
How to do collision detection in 3D using bounding boxes?
I am using c++ in visual studio 2010 with opengl. I am trying to make a programme that has 2 boxes that are able to be stacked on top of each other but I am having some trouble with the collision ...
2
votes
1answer
113 views
Collision Resolution: How to avoid Interpenetration/Tunneling Caused by Prior Collision Handling? [duplicate]
My game processes world collisions followed by entity collisions. The problem here is that entities can break through walls the next frame when world checks are run again as a result of the prior ...
1
vote
2answers
252 views
AABB-AABB sliding collision response
I have many objects with AABBs and a player surrounded in an AABB. If I represent my player with a point everything works smooth with detection and wall sliding as a response (for example what wall ...
1
vote
0answers
95 views
Sketchy results from ray-plane intersection code
I've set up a demo with simple first-person controls using C++ and OpenGL, and it seems to work reasonably well. My goal is this: when the player looks at a plane and clicks the left mouse button, ...
0
votes
2answers
495 views
Collision detection - Smooth wall sliding, no bounce effect
I'm working on a basic collision detection system that provides point - OBB collision detection. I have around 200 cubes in my environment and I check (for now) each of them in turn and see if it ...
1
vote
2answers
298 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 ...
2
votes
2answers
248 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
1answer
163 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 ...
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 ...
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 ...
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
338 views
High CPU usage on Pong clone
I just made my first game, a clone of Pong, using OpenGL and C++. But its using ~50% of the CPU, which I guess is very high for a game like this. How can I improve that? Can you please look up my code ...
5
votes
1answer
1k views
Fast, accurate 2d collision
I'm working on a 2d topdown shooter, and now need to go beyond my basic rectangle bounding box collision system.
I have large levels with many different sprites, all of which are different shapes and ...
1
vote
1answer
244 views
2D SAT Collision Detection not working when using certain polygons (With example)
My SAT algorithm falsely reports that collision is occurring when using certain polygons. I believe this happens when using a polygon that does not contain a right angle. Here is a simple diagram of ...
0
votes
1answer
143 views
Checking collision of bullets and Asteroids
I'm trying to detect collision between two list of bullets and asteroids. The code works fine, but when the bullet intersects with an asteroid, and that bullet passes through another asteroid, the ...
0
votes
0answers
108 views
Incorrectly says that 2 rectangles collide: whats going wrong?
I am using and expanding a function that detects whether two 2d rotated rectangles collide. The function is from here.
My Problem: The function incorrectly detects a collision between the following ...
1
vote
0answers
62 views
obb vs obb and resolve/response for 2d space game [duplicate]
Possible Duplicate:
OBB vs OBB Collision Detection
How can i detect if an rotated obb intersects another
rotated obb and resolve it so both obb objects dont go further into each other.
I ...
3
votes
2answers
620 views
Circle-Rectangle collision resolution
I have a non axis aligned rectangle, like a car, in my game. I have to check and resolve the collision between the rectangle and circle, which is stationary.
I have found lots of ways to determine ...
3
votes
3answers
2k views
Simple 2D Collision Detection Algorithm Library
I'm building a simple OpenGL game and I was looking for some simple collision detection library for objects like squares, triangles and circles. Any suggestions?
PS: Preferably a library that is very ...
2
votes
3answers
181 views
Collision organization problems
I just started playing around with c++ and some SFML. I'm going to create a 2D game with top view to test my ability and I came across a very big problem: collision detection and physics. So I see at ...
-1
votes
1answer
237 views
Collision Detection Failing at faster Speed?
I am new to programming so thought I would make a Pac-Man clone to teach myself. I am doing it in C++ using SFML. Anyway, I use a bunch of collision tests. Everything works great.. but if I am going ...
-1
votes
4answers
757 views
Collision detection between many objects
I'm working in a 2d environment and have hundreds of objects, brute force collision checking would be out of the question, but would my method below work?
For example, lets say I have a ...
0
votes
1answer
81 views
What Do I Pass for inputGeometryTransform Parameter of ID2D1Geometry::CompareWithGeometry?
I have a list of ID2D1Geometry objects and I'm trying to use CompareWithGeometry to detect collisions in Direct2D; unfortunately, I'm not getting the results I need. I suspect I am improperly using ...
2
votes
1answer
264 views
When is it the right time to start teaching collision detection?
I and a friend of mine started a game development club in our school two months ago and everything is going well for now. We are following McKesson's tutorials which I find comprehensive and ...
3
votes
2answers
478 views
What has the most efficient intersection test against an AABB tree - OBB, Cylinder or Capsule?
I'm currently trying to find collisions in 3D between a tighter volume than an AABB and a tree of AABB volumes. I just need to know whether they are intersecting, no closest distance or collision ...
0
votes
0answers
125 views
adding contacts in “cyclone”
I am trying to adapt the Cyclone physics engine ( http://procyclone.com/, source code: https://github.com/idmillington/cyclone-physics/) to work with my game, and for my game I think that it would be ...
0
votes
1answer
1k views
GameObject and Components
I am creating a relatively simple game engine in C++ and Qt. I am using Irrlicht for graphics, and as of now, I will not be using any physics or audio libraries. For time's sake, I am using ...
0
votes
1answer
197 views
Change of direction after Collision
I am having a pickup image which is moving at random direction and have to change the direction after collision with some tiles, which are a rectangle. I've my own algorithm for detecting the ...
3
votes
3answers
1k views
Implementing Separating Axis Theorem (SAT) and Minimum Translation Vector (MTV)
I was following codezealot's tutorial on SAT and MTV and trying to implement it myself but I've come a cropper when it comes to getting the correct MTV. Here is my example: (Cue pretty pictures...)
...
1
vote
1answer
387 views
Check for bodies within a specific circle in Box2D
I'm trying to find positions to insert new bodies into my world. For that, I'd like to have a "free" spot where this body wouldn't overlap with anything else. So my plan was to sample "random" ...
0
votes
1answer
186 views
Incorrect results for frustum cull
Previously, I had a problem with my frustum culling producing too optimistic results- that is, including many objects that were not in the view volume. Now I have refactored that code and produced a ...
3
votes
2answers
190 views
Unsure how to decide ray intersection interval
I'm coding an intersection algorithm with AABB, as found here. However, I'm absolutely unsure what to pass in as t0 and t1. The paper states that it's a ray intersection interval, but the only ...
1
vote
0answers
172 views
Debugging Minimum Translation Vector
I implemented the minimum translation vector from codezealot's tutorial on SAT (Separating Axis Theorem) but I'm having an issue I can't quite figure out. Here's the example I have:
As you can see ...
-1
votes
1answer
116 views
Modifying SAT Code To Obtain Penertration Vector [duplicate]
Possible Duplicate:
SAT, How Do I Find The Penetration Vector?
Hi how could I modify my SAT code and visual debug it to find the penetration vector of the two Entities so I can separate ...
8
votes
4answers
977 views
Collision rectangle response
I'm having difficulties getting a moveable rectangle to collide with more than one rectangle.
I'm using SFML and it has a handy function called intersects which takes 2 rectangles and returns the ...
3
votes
3answers
307 views
How do I approach this collision model?
This is the game level prototype I have already implemented. It has few objects per room to allow me to finally add some collision detection/response code into it.
VIDEO
As you can probably see, ...
4
votes
1answer
584 views
AABB - AABB Collision, which face do I hit?
To allow my objects to slide when they collide, I need to :
Know which face of the AABB they collide with.
Calculate the normal to that face.
Return the normal and calculate the impulse that to ...
2
votes
1answer
949 views
AABB - AABB Collision response (sliding)
Here is the situation:
I have a room with objects inside
Each object has it's own AABB
Here is what I do:
I check for collision between objects by checking AABB-AABB intersections
Here is ...
2
votes
4answers
316 views
How to detect what portion of a rectangle a point is in?
Say I have a rectangle and a point inside the rectangle. If the rectangle was split up diagonally, how could I tell which portion the point is in?
Here is a cute little mspaint diagram, where the ...
1
vote
2answers
377 views
SAT, How Do I Find The Penetration Vector?
I've just successfully implemented Separating Axis Theorem (SAT) in my game but I was wondering how do I find the penetration vector? I heard it can be useful for collision response. e.g. The harder ...
5
votes
3answers
3k views
OBB vs OBB Collision Detection
Say you have two Bounding Box Objects each of them storing the current vertices of the box in a vector with all the vertices of the object rotated and translated relative to a common axis.
Here is an ...
1
vote
1answer
321 views
Why does my 2d collision and movement not work properly?
I'm trying to write(in c++ using sdl) a mario like game as in a tile based world with by pixel movement for the character and I've run into some problems I cannot seem to find the source of:
1.The ...
5
votes
1answer
2k views
How do I calculate collision response between a sphere and a plane?
I'm trying to create a simple 3D game and need to constrain the player within the limits of the game world. When the player hits the sides of the world I want the player's ship to bounce off slightly.
...
0
votes
1answer
163 views
Effort of impementing interpolation in networked Asteroids
Questions:
When we draw with interpolation, where should the collision detection code be?
Is it worth implementing interpolation in the following situation?
This is for Scrolling Asteroids. I have my ...
1
vote
1answer
627 views
most efficient Bounding Sphere vs Ray collision algorithms
Is there a known 'most efficient' algorithm for Sphere vs Ray collision detection?
I recently stumbled accross Arvo's AABB vs Sphere collision algorithm, and I am wondering if there is a similarly ...
