Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
0 answers
217 views

I just managed to implement my Sweep and Prune algorithm together with AABB and it's working correctly in the first axis (I haven't implemented second and third yet to complete the collision detection)...
Zoler1337's user avatar
0 votes
3 answers
149 views

I'm making a simple game engine using Java and have found a major issue. To create accurate collision detection I decided to convert a transparent image into a ...
Grinding For Reputation's user avatar
2 votes
1 answer
738 views

I am writing code that requires me to find all points within circle on certain parts of the screen hundreds of times per frame. I wrote a quadtree for this and have 1 method called query_circle that ...
Aayush's user avatar
  • 67
0 votes
0 answers
22 views

In my unity 2d game I had large amount of scripts which were components of different enemies and obstacles. All of them were checking for collison, had FixedUpdate, Start and OnCollisionEnter2D and ...
Lordoftherings's user avatar
1 vote
1 answer
488 views

This question can be generalized to "how does one efficiently determine if a collision has taken place between curvy lines" On https://slither.io there are snakes that players play as that ...
Ryan Peschel's user avatar
5 votes
1 answer
3k views

I have a whole bunch of entities constantly being processed and testing for collisions. I've tried to optimize this by stopping certain entity types from checking each other, dead entities not being ...
Aquaphor's user avatar
0 votes
3 answers
3k views

I'm building a 2D MORPG using JavaScript, Node JS and socket.io To prevent cheating, I have to run all collisions for all players on my server. I'm currently doing fairly simple square collisions ...
Pascal Claes's user avatar
3 votes
2 answers
3k views

In Unity3D, and others, there are Layer Based Collision System which makes collisions only happen between specified Layers. It defaults to all layers colliding with all others. Does making use of ...
Jethro's user avatar
  • 309
0 votes
1 answer
325 views

For detecting collisions between sprites, I know a 2D spatial hash is a way to optimize the number of collision checks that need to happen. But is there a way to optimize even further for objects that ...
rurouniwallace's user avatar
0 votes
2 answers
534 views

I gave an answer to How to decide which GameObject should handle the collision?, and received a lot of negative feedback on it, claiming that it does not matter who does the collision detection. I am ...
Evorlor's user avatar
  • 5,881
1 vote
1 answer
710 views

I have two ways of doing frustum culling taken from different web sources. First one takes 200ms to check 10k AABBs, second around 50ms for the same box count. I read some forum answers, people say 0....
Russoul's user avatar
  • 282
14 votes
4 answers
14k views

Part for the sake of optimization, part for learning purposes, I will dare to ask: How can I most efficiently check whether a 2D point P is inside a 2D rotated ...
Louis15's user avatar
  • 569
0 votes
2 answers
544 views

My project has upwards of 3000 2D objects but not all of them collide with each other. Between each object that can collide, a CollisionPair is created and stored inside a flattened array. Currently, ...
JPtheK9's user avatar
  • 2,031
0 votes
2 answers
185 views

I am developping a spaceinvader-like game. There comes the problem of how to handle collision detection. At first I was doing like that : ...
realUser404's user avatar
  • 1,057
3 votes
1 answer
331 views

I am new to game programming and working on clone of this game in libgdx. The game has some static balls and one ball that moves. I want to check if the moving ball collides with any static ones, but ...
Zohaib Amir's user avatar
6 votes
2 answers
8k views

I'm new to programming and want to speed up the collision detection in my C++ 2D platformer game engine. Currently, only the player's collision detection works: Every frame, the player's update ...
barwin's user avatar
  • 63
2 votes
0 answers
301 views

I'm writing the beginnings of a lightweight 2d rigid body engine (in javascript, as a hobby project), and i'm debating whether to store collision shapes in local or in (updated as needed) world ...
skwashi's user avatar
  • 36
24 votes
6 answers
8k views

While developing a reasonably simple RTS-like game, I noticed my distance calculations were causing an impact in performance. At all times, there are distance checks to know if a unit is in range to ...
Grimshaw's user avatar
  • 3,131
9 votes
4 answers
7k views

I was recently reading about the technology of Ocarina of Time/Majoras Mask and discovered that world collision is done using a single triangle mesh (vertices, normals, etc) for an entire area. There ...
Justin Meiners's user avatar
20 votes
3 answers
12k views

Are physics engine able to decrease that complexity, for example by grouping objects who are near each other and check for collisions inside this group instead of against all objects ? (for example, ...
jokoon's user avatar
  • 5,253
5 votes
2 answers
3k views

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) space. ...
Marian Ivanov's user avatar
1 vote
2 answers
595 views

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 ...
Fibericon's user avatar
  • 657
5 votes
1 answer
14k views

The target platform of my game is mobile devices therefore I try to develop it performance oriented. It will be a strategy game so I don't really need physics in it, consequently I did not add ...
nosferat's user avatar
  • 822