Implementation ideas
--------------------

Cells

	If collision detection between objects is too slow, we can
	separate the objects into different map cells.  A map would
	probably have 9 or 16 cells.  These variables would need to be
	added the object structure:

		struct object {
		    ...
		    int cell_x;
		    int cell_y;
		    ...
		}

	Then only other objects in the same or adjacent cells as the
	current object need to be checked.

		static inline cells_in_contact (int cell_x1, int cell_y1,
					     	int cell_x2, int cell_y2)
		{
		    return ((ABS (cell_x1 - cell_x2) < 2) &&
  			    (ABS (cell_y1 - cell_y2) < 2));
		}


[Jan 2002:

     Actually, an implementation like that would be stupid as there is
     a bounding box check anyway, which would be faster than
     cells_in_contact (obj1, obj2) + bb_check (obj1, obj2).

     However, if objects in different cells were in different linked
     lists then there might be a speed up available.  But again, many
     bb checks might be faster than having to update the linked lists
     everytime an object moves.

]
