I'm using Slick2d to create a game in java it i have run into a problem. I have no idea how to prevent the user from entering "blocked tiles". Does anyone have any tips on how to do this?
Edit: It's not the actual checking if there is a collision that's a problem, it's stopping the player from moving, i have one speed variable of the type float.
There are two basic methods for that:
or
The same principles apply for non-tiled games: Check if there is a collision, either before or after the actual movement, and then do the appropriate actions.