Tagged Questions
0
votes
1answer
76 views
My logic in collision detection in diagonal code correct? [closed]
I made this code to detect collision from the diagonal(top left). I'm trying to find the problem on what I'm doing wrong. Is it necessary to have a diagonal collision for the wall?
Player class:
...
-1
votes
1answer
183 views
How was traditional 2D collision detection/resolution being done? [closed]
Just out of pure curiosity, I'm wondering how classic 2D games of the 80s/90s (The Legend of Zelda, Super Mario, Warcraft, ...) approached collision detection/resolution.
For some reason I can't ...
0
votes
0answers
50 views
Collision detection issue on 2D game engine with isometric game graphics [duplicate]
Let me first show you an example of issue so you'll see the problem.
http://i.imgur.com/dTxJIN7.jpg
The player object has red colored collision borders. Since I'm using an 2D engine, his head ...
-1
votes
1answer
64 views
Breakout style ball-paddle bounce, error at corner
I am trying to make a breakout game where you have a paddle and a ball bounces around breaking bricks. The problem is that if the ball touches the corner of player it goes inside of player. I change ...
1
vote
2answers
67 views
Mapping of positions on images in different frames
I am looking for a possibility to map different positions on a 2D Image which has different frames.
Let's say I have an image, consisting of three frames, which shows a spaceship.
The first frame ...
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
1answer
118 views
How to do 2D Raycasting on a slope
I have a 2d platformer game where my slope can be set at any angle, so I've setup a middle raycast that points to the ground onto the player to handle the collision. This works perfectly fine on a ...
3
votes
2answers
72 views
Sperating axis test glitch help
I'm working on a pretty basic 2d platformer and I'm wondering if I could get advice on an issue I've run into. To keep collision detection simple I'm using AABBs and separating axis tests for ...
3
votes
2answers
244 views
How Does Ultima 7 manage different floors in 2d
In U7, you can move among floors without the function "tranport" the player to another place, as for example the first ff ones.
How can it tell whenever the character is moving from floor z to ...
1
vote
1answer
285 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 ...
0
votes
1answer
71 views
How do I check for non tilted 2D rectangle collision?
I'm trying to find out how to check collision with different rectangles. Now the cubes I have have a x, y, height, and width to them.
So it might look like this on the screen:
And not like this:
...
1
vote
1answer
140 views
Application design for specific points on image
Hi guys I am starting a simple hobby app in Unity, its a 2D app, which have some alphabets like A,B,C..Z (images) . There ll be specific paths where user touch one by one to complete drawing the ...
1
vote
1answer
288 views
2D tile-based collisions: using different methods by tile?
I'm trying to write a collision handling method that handles each of the 9 potentially colliding tiles (the player's and the 8 around him) differently according to a "CollisionType" value attached to ...
1
vote
0answers
126 views
iOS cocos2d - sprite gets stuck in collision detection
I'm developing a top down game in cocos2d and I have collision code that checks collisions between enemies and the player so that they don't go through each other. The code seems to work but the ...
0
votes
1answer
157 views
Collision with Two Angled Platforms
I've encountered a problem in my attempt to implement Collision Handling for a game I'm creating, involving a collision with two angled platforms.
I'm using GJK-EPA for detecting/handling collisions ...
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 ...
6
votes
2answers
231 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 ...
0
votes
1answer
73 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
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 ...
4
votes
3answers
444 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
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 ...
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
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
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 ...
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
521 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 ...
9
votes
2answers
974 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
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 ...
0
votes
2answers
411 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 ...
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 ...
3
votes
3answers
343 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 ...
2
votes
1answer
405 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 ...
1
vote
1answer
535 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
117 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.
...
5
votes
3answers
511 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
197 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
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 ...
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);
...
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 ...
4
votes
1answer
324 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 ...
1
vote
1answer
1k views
Resolving bounding box collision detection
I'm working on a simple collision detection and resolution method for a 2d tile-based bounding box system. Collision appears to work correctly, but I'm having issues with resolving a collision after ...
0
votes
2answers
355 views
When to Use Collision Detection Methods
I've done some research into different collision detection methods but I don't know when I should be using one over the others. Some I've seen are:
Continuous Collision Detection (CCD) or Raycasting
...
6
votes
1answer
519 views
Creating custom collision map for 2D
I have a 2D level that I have built in my map editor, and I was wondering the best way to create a collision map for it.
I have a collision map layer in my map editor, which saves each node (for ...
2
votes
2answers
368 views
Do I have too many colliders on my screen?
I'm running into a situation where my frame rate drops from 70 FPS (on my desktop computer) down to 5 FPS (on my iphone) and I'm trying to understand why. At the moment, I'm only drawing simple ...
0
votes
2answers
136 views
Collision on the first rectangle only - Why?
I've made a very simple collision detection, it works fine. However when i decided to load in all my rectangles into a list and then give each of them collision, it only adds it to the first one. Any ...
7
votes
2answers
647 views
What is the best way to handle simultaneous collisions in a physics engine?
I'm writing a 2d physics engine in javascript so that I can learn more about physics in video games. I have it working correctly for rigid body collisions, except for if any body collides with two or ...
1
vote
2answers
215 views
Boolean checks with a single quadtree, or multiple quadtrees?
I'm currently developing a 2D sidescrolling shooter game for PC (think metroidvania but with a lot more happening at once). Using XNA.
I'm utilising quadtrees for my spatial partitioning system.
All ...
0
votes
4answers
241 views
Big level objects collision system for 2d game
I read many variants today and get some knowledge in general, so here is a steps of mine thoughts in pictures (horrible paint.net ones).
We need to develop grid system, so we check only thing near, ...
1
vote
1answer
1k views
XNA 2D Collision with specific tiles
I am new to game programming and to these sites for help. I am making a 2D game but I can't seem to get the collision between my character and certain tiles. I have a map filled with grass tiles and ...

