If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

collision detection

I had an idea for a project i could do, writing a 2d game framework.
I want to do collision detection and have a collision listener CollisionListener.
I only have a vague idea of how listeners work, and I have no experiance writing one, I've just used them.

Can someone explain the internal workings of listeners or give me a link to a page that does?

Listeners are objects that sign on to another objects listener-list.
That object checks its listeners-list when events occur and informs the listenersof the event using a defined interface. Here is a simple example, note: this must be coded in three separate java-files...

Hint: you have to have a way of telling that two objects occupy the same area on the driveway at the same time, so you must have a driveway/area, and the location of each driver in that area at any time.