Game impediments


I’m programming a little game at the moment; in this game you can “drive” with a little square in a little map.
The map is drawn with loaded images; black squares which don’t move.
Now my question:
How can I make this impediments impassable?
They are little squaers with a size of 100x100 pixels.
Do I have to write code for each one or does any trick exist to avoid this?
I mean, it would be a lot of code.
I hope that you can help me!


Perhaps something similar to this auto-generated tile map? :thinking:


See also this related discussion: