The determination of whether or not two or more entities make contact with each other during gameplay.
1
vote
1answer
177 views
Fixing a collision detection bug in Slick2D
My game has a bug with collision detection.
If you go against the wall and tap forward/back sometimes the game thinks the speed you travelled at is 0 and the game doesn't know how to get you out of ...
2
votes
1answer
337 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 ...
0
votes
1answer
144 views
jBullet Collision/Physics not working as expected
Below is the code for one of my objects in the game I am creating (yes although this is a cube, I am not making anything remotely like MineCraft), and my issue is I while the cube will display and is ...
1
vote
5answers
429 views
Error in my Separating Axis Theorem collision code [closed]
EDIT 2: Made some more alterations, now the one area i'm still confused on is: how to work out the vector to project on the separation axes? My projectOnto(..) method has some huge gaps now and i know ...
0
votes
2answers
408 views
Collision detection on a 2D hexagonal grid
I'm making a casual grid-based 2D iPhone game using Cocos2D. The grid is a "staggered" hex-like grid consisting of uniformly sized and spaced discs. It looks something like this.
I've stored the grid ...
0
votes
1answer
217 views
How to collide with a 45degree wall in XNA
I want to make a PAC MAN imitation game to start working on AI, and while my first version will feature rectangles with widths or heights of 1 to makes walls for collision detection, I want to ...
5
votes
1answer
483 views
Why doesn't Unity's OnCollisionEnter give me surface normals, and what's the most reliable way to get them?
Unity's on collision event gives you a Collision object that gives you some information about the collision that happened (including a list of ContactPoints with hit normals).
But what you don't get ...
2
votes
1answer
1k views
Collision detection, stop gravity
I just started using Gamemaker Studio and so far it seems fairly intuitive. However, I set a room to "Room is Physics World" and set gravity to 10. I then enabled physics on my player object and ...
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 ...
0
votes
1answer
610 views
Making an efficient collision detection system
I'm very new to game development (just started 3 months ago) and I'm learning through creating a game engine. It's located here. In terms of collision, I know only brute-force detection, in which ...
1
vote
1answer
193 views
Color based collision detection
I am making a game where you fly a ship around some randomly generated planets. Since I am using a for loop to draw over 5000 planets, using the rectangle class or an oval-type class for this is not ...
0
votes
0answers
96 views
Platformer Collision Error [closed]
I am currently working on a relatively simple platform game that has an odd bug.You start the game by falling onto the ground (you spawn a few blocks above the ground), but when you land your feet get ...
5
votes
2answers
101 views
how to keep display tick rate steady when using continuous collision detection?
(I've just found about this forum). I hope it is ok to repost my question again here. I posted this question at stackoverflow, but it looks like I might get better help here.
Here is the question:
...
1
vote
1answer
622 views
Unity Particle System collision detection problem
I'm using Unity 3.5.5f3 wich has the Shuriken particle system.
I've made a blood particle system based on Unity's demos. (Exploding paint [Blood])
The blood is flowing and when it collides with a ...
2
votes
3answers
342 views
How to design 2D collision callback methods?
In a 2D game where you have a lot of possible combination of collision between objects, such as:
object A vs object B => object B vs A;
object A vs object C => object C vs A;
object A vs object D ...
0
votes
2answers
339 views
Circle physics and collision using vectors
This is a problem I've been having, When making a set number of filled circles at random locations on a JPanel and applying a gravity (a negative change in the y), each of the circles collide. I want ...
2
votes
3answers
1k views
Game physics / 2D Collision detection AS3
I know there are some methods you can use like hittestPoint and so on, but I want to see where my movieclip colliedes with another another movieclip. Any other methods I can use?
by any chance does ...
4
votes
2answers
549 views
XNA 2D Rotated Rectangle Collision Response
I am using Rotated Rectangles which collide using the Separating Axis Theorem and they work perfectly fine for collision detection using Intersects and Contains.
However, I am starting to use faster ...
-1
votes
3answers
816 views
XNA how to make wall collision
Hi there i have collision detection but i dont know how to stop object after collision and then move backward for example
any ideas ?
1
vote
2answers
186 views
Randomly spawning bitmaps on cnvas
I need some ideas in order to finish algorithm. I'm randomly placing objects (bitmaps) on canvas without overlapping. Time needed to finish it is my problem. When I need to spawn for example 80% of ...
2
votes
1answer
402 views
Trouble with AABB collision response and physics
I have been racking my brain trying to figure out a problem I am having with physics and basic AABB collision response. I am fairly close as the physics are mostly right. Gravity feels good and ...
2
votes
3answers
316 views
OpenGL Get Rotated X and Y of quad
I am developing a game in 2D using LWJGL library.
So far I have a rotating box. I have done basic Rectangle collision, but it doesn't work for rotated rectangles.
Does OpenGL have a function that ...
1
vote
0answers
114 views
Updating physics for animated models
For a new game we have do set up a scene with a minimum of 30 bone animated models.(shooter)
The problem is that the update process for the animated models takes too long.
Thats what I do:
Each ...
3
votes
1answer
656 views
Circle-Rectangle collision in a tile map game
I am making a 2D tile map based putt-putt game.
I have collision detection working between the ball and the walls of the map, although when the ball collides at the meeting point between 2 tiles I ...
1
vote
1answer
534 views
Java 2D Tile Collision
I have been working on a way to do collision detection forever, and just can't figure it out. Here's my simple 2D array:
for (int x = 0; x < 16; x++) {
for (int y = 0; y < 16; y++) {
...
2
votes
1answer
116 views
2D SAT How to find collision center or point or area?
I've just implemented collision detection using SAT and this article as reference to my implementation. The detection is working as expected but I need to know where both rectangles are colliding.
...
2
votes
1answer
118 views
Change collision action
I have a collision detection and its working fine, the problem is, that whenever my "bird" is hitting a "cloud", the cloud dissapers and i get some points. The same happens for the "sol" which it ...
2
votes
1answer
257 views
Simple (and fast) dices physics
I'm programming a throw of 5 dices in Actionscript 3 + AwayPhysics (BulletPhysics port).
I had a lot of fun tweaking frictions, masses etc. and in the end I found best results with more physics ...
6
votes
3answers
981 views
Collision detection with curves
I'm working on a 2D game in which I would like to do collision detection between a moving circle and some kind of static curves (maybe Bezier curves).
Currently my game features only straight lines ...
0
votes
2answers
476 views
Collision between sprites in game programming?
I've since just started coding for an android game using eclipse. I've read Beginning Android Game Programming and various other e-books. Recently, I've encountered a problem with collision between ...
0
votes
2answers
375 views
Calculate the intersection depth between a rectangle and a right triangle
all. I'm working on a 2D platformer built in C#/XNA, and I'm having a lot of problems calculating the intersection depth between a standard rectangle (used for sprites) and a right triangle (used for ...
3
votes
3answers
160 views
Collision and Graphics integration
I'm a little confused about the integration between collision and graphics. They both need to share the same position in the world. The most obvious choice is the center of the entity, which is good ...
2
votes
1answer
538 views
Collision Detection for a 2D RPG
First of all, I have done some research on this topic before asking, and I'm asking this question as a mean to get some opinions on this topic, so I don't make a decision only on my own, but taking ...
5
votes
3answers
502 views
Best system for creating a 2d racing track
I am working a 2D racing game and I'm trying to figure out what is the best way to define the track.
At the very least, I need to be able to create a closed circuit with any amount of turns at any ...
1
vote
1answer
193 views
How would I be able to get a game over screen using the pause function?
I am having problems with my snake game, when the snake collides with itself it draws a "game over" image in the background, but only while it's colliding with itself. I want it to behave like the ...
1
vote
2answers
101 views
How to fetch only the sprites in the player's range of motion for collision testing? (2D, axis aligned sprites)
I am working on a 2D sprite game for educational purposes. (In case you want to know, it uses WebGl and Javascript) I've implemented movement using the Euler method (and delta time) to keep things ...
1
vote
1answer
243 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
2answers
362 views
My grid based collision detection is slow
Something about my implementation of a basic 2x4 grid for collision detection is slow - so slow in fact, that it's actually faster to simply check every bullet from every enemy to see if the ...
4
votes
3answers
240 views
How to get distance from point to line with distinction between side of line?
I'm making a 2d racing game. I'm taking the nice standard approach of having a set of points defining the center of the track and detecting whether the car is off the track by detecting its distance ...
0
votes
1answer
312 views
Collision Detection fails with AI cars
I am making a car parking game in flash and AS3 wherein I drive my car along with other AI traffic cars moving along a specified path using Guidelines.
I am using CDK for collision detection.
The ...
0
votes
0answers
159 views
What collision detection approach for top down car game?
I have a quite advanced top down car game and i use masks to detect collisions. I have the actual designed track (what the player see) with fancy graphics etc. and two other pictures i use as mask for ...
1
vote
1answer
152 views
Reacting to rectangle on rectangle collisions
I don't know how to react to collisions between two axis aligned rectangles that have x, y, width and height values (x and y are from the centre of the box) to make them simply not overlap.
I figured ...
0
votes
2answers
118 views
sprite animation system height recalculating has some issues
Basically, the way it works is that it update the frame to show every let's say 24 ticks and every time the frame update, it recalculates the height and width of the new sprite to render so that my ...
1
vote
1answer
182 views
Viewport.Unproject - Checking if a model intersects a large sprite
Let's say I have a sprite, drawn like this:
spriteBatch.Draw(levelCannons[i].texture, levelCannons[i].position, null, alpha, levelCannons[i].rotation, Vector2.Zero, scale, SpriteEffects.None, 0);
...
1
vote
1answer
88 views
Intersection of player and mesh
I have a 3D scene, and a player that can move about in it.
In a time-step the player can move from point A to point B. The player should follow the terrain height but slow going up cliffs and then ...
3
votes
2answers
139 views
Adding delay between damage
I have a bunch of enemies chasing my main-character, and if they intersect I want them to damage him and that's all good. The problem is that right now they damage him as long as they stand around ...
5
votes
2answers
265 views
How to make my character slide (not bounce) off a slope
My character needs to slide and not bounce off a slope.
The solutions I found here use a Reflection vector, but they make my character bouncy when they run downwards a slope.
var reflectVector = ...
4
votes
1answer
321 views
Collision Detection with SAT: False Collision for Diagonal Movement Towards Vertical Tile-Walls?
I'm developing my first tile-based 2D-game with Javascript. To learn the basics, I decided to write my own "game engine". I have successfully implemented collision detection using the separating axis ...
3
votes
2answers
463 views
how to solve ArrayList outOfBoundsExeption?
Im getting:
09-02 17:15:39.140: E/AndroidRuntime(533): java.lang.IndexOutOfBoundsException: Invalid index 1, size is 1
09-02 17:15:39.140: E/AndroidRuntime(533): at ...
2
votes
1answer
175 views
Colored Collision Detection
Several years ago, i made a fast collision detection for 2D, it was just checking a bullets front-pixel's color to check if it were to hit something. Lets say the target rgb color is (124,200,255) ...
