wow, didn't expect so much replies
Anyway thx for tips. Meanwhile we have been able to make an applet that lets a car move over a certain field. The problem is now the collisions. How should we let the car folow a a circuit. Is there something like pixel recognition, pixelgrabber ? eg. the car should drive normal on tarmac ( grey) and should slow down or stop on gras, mud ...
what do you guys suggest ?
You will pretty much end up having two maps - the "visual" one which you draw to the screen and the "virtual" one, which just differentiates between different terrains. This way, the visual one can be really pretty - even texture-mapped - and the virtual one is just for collision detection etc.
If I interpreted the GAGE posts correctly, it uses a virtual map made of 16x16 pixel squares? EDIT: I stand corrected - it can use arbitrary precision (which is obviously a very good thing, and shows how you can get better features out of a purpose-built API like GAGE rather than a generic one like J2D)
Personally, for the virtual map I'd use Java2D Shapes and Areas to define the different parts of your map (e.g. one Area for "tarmac" a different Area for each separate chunk of grass, etc). This gives you arbitrarily fine detail, and it's easy to use, built in to the standard libraries, and works. (I'm not suggesting you DON'T use GAGE or etc, just that personally I'd do it that way since I already know j2d, and have never used GAGE before).
Then you create a rectangle to represent each of your cars, and use the intersects() tests you were originally attempting to use