You could use a tilemap, with tiles that equal the size of the player and throw a solid behaviour on it.
Then you can store the player tile position and use that to check vs collision.
So if
player.Tile_X = 5
player.Tile_Y = 5
And the player press Right key to move to the right, you can do a tilemap comparison, so:
Tilemap.compareTileAt Player.Tile_X + 1, Player.Tile_Y not equal 0 --- (If that is the tile you use as collision)
....If that is not the case, you just increase the Player.Tile_X by 1 and convert the Tile position to a pixel value position (standard X,Y)
And you can do that for up and down as well, just by increasing or decreasing the Tile_Y variable.