Finally implemented a nearly working collision detection.
At the moment it only prevents the player from entering a solid tile
from above.