How a "Collision System" should be implemented?

Posted by nathan on Game Development See other posts from Game Development or by nathan
Published on 2012-10-28T19:39:21Z Indexed on 2012/10/28 23:23 UTC
Read the original article Hit count: 342

My game is written using a entity system approach using Artemis Framework. Right know my collision detection is called from the Movement System but i'm wondering if it's a proper way to do collision detection using such an approach.

Right know i'm thinking of a new system dedicated to collision detection that would proceed all the solid entities to check if they are in collision with another one.

I'm wondering if it's a correct way to handle collision detection with an entity system approach? Also, how should i implement this collision system?

I though of an IntervalEntitySystem that would check every 200ms (this value is chosen regarding the Artemis documentation) if some entities are colliding.

protected void processEntities(ImmutableBag<Entity> ib) {
    for (int i = 0; i < ib.size(); i++) {
        Entity e = ib.get(i);
        //check of collision with other entities here
     }
}

© Game Development or respective owner

Related posts about java

Related posts about collision-detection