You can use a raycasting (or linecasting) based collision detection system. At a very high level, you cast rays from your player (preferably from the edges of it's collider box) into the game map. When the ray hits something, you can check to see what its hit, and if it's a collidable surface, resolve the collision and adjust player movement as appropriate. This method is pretty agnostic to how your game map is built (tilemap, models, geometric shapes, etc).
For more technical details, you can view my own questionquestion on a similar topic. While the code presented is C# (and for Unity), you could easily adapt it for any language.
Here's an image to help visualize the system
Some resources: