Skip to main content
grammar and punctuation; removed blacklisted engine tag
Source Link
Gnemlock
  • 5.3k
  • 5
  • 30
  • 60

I'm working on a relatively generic 2D AABB collision detection system for a game engine, and I've re-written it more times than I'd like to admit, due to not calculating/recording or recording specific details of each collision. Right now, this is what I'm collecting:

  • Collsion Time (theCollision time as a fraction of an update cycle in the game loop).
  • Location of the collision.
  • ID of the colliding object.

Each object has a SetSet that holds this data for each collision (I'm working with a Componentcomponent/Entity Systementity system) so other Systemssystems can use the data recorded data. The problem I just ran into was that I needed to know which side of the object the collision takes place on.

Now, my question isn't how to determine this, but rather whatWhat other values/points or points of interest should I calculate/record or record, per collision? Or, whatWhat do you look for in a standard collision detection system?

I'm working on a relatively generic 2D AABB collision detection system for a game engine, and I've re-written it more times than I'd like to admit due to not calculating/recording specific details of each collision. Right now this is what I'm collecting:

  • Collsion Time (the fraction of an update cycle in the game loop)
  • Location of the collision
  • ID of the colliding object

Each object has a Set that holds this data for each collision (I'm working with a Component/Entity System) so other Systems can use the data recorded. The problem I just ran into was I needed to know which side of the object the collision takes place on.

Now, my question isn't how to determine this, but rather what other values/points of interest should I calculate/record per collision? Or, what do you look for in a standard collision detection system?

I'm working on a relatively generic 2D AABB collision detection system for a game engine, and I've re-written it more times than I'd like to admit, due to not calculating or recording specific details of each collision. Right now, this is what I'm collecting:

  • Collision time as a fraction of an update cycle in the game loop.
  • Location of the collision.
  • ID of the colliding object.

Each object has a Set that holds this data for each collision (I'm working with a component/entity system) so other systems can use the recorded data. The problem I just ran into was that I needed to know which side of the object the collision takes place on.

What other values or points of interest should I calculate or record, per collision? What do you look for in a standard collision detection system?

Tweeted twitter.com/#!/StackGameDev/status/228302305966059520
Source Link

What data should a generic collision detection system gather?

I'm working on a relatively generic 2D AABB collision detection system for a game engine, and I've re-written it more times than I'd like to admit due to not calculating/recording specific details of each collision. Right now this is what I'm collecting:

  • Collsion Time (the fraction of an update cycle in the game loop)
  • Location of the collision
  • ID of the colliding object

Each object has a Set that holds this data for each collision (I'm working with a Component/Entity System) so other Systems can use the data recorded. The problem I just ran into was I needed to know which side of the object the collision takes place on.

Now, my question isn't how to determine this, but rather what other values/points of interest should I calculate/record per collision? Or, what do you look for in a standard collision detection system?