I make my map into an entity. A grid (which FP calls “masks”) can be added to an entity, and then the grid will be used to collide with other objects. then just set the map’s type to something memorable, like “solid”. Then in your player, use the type “solid” anywhere you want to check if you’re hitting the world. You can use any type you want, like “solid”, “world”, or “banana”.
The gist is this.
Your map (as in the environment the player can interact with) is just another entity, no different than the player himself, a bullet, or an enemy. Make the tilemap you divined out of the ogmo file the graphic, and make the grid you got the “mask”. Mask just means collision gird. You don’t need a special class made up, just a default empty entity will work fine.
// make the world entity
map = new Entity(0, 0, mapImage, mapGrid);
// give it the type "solid" and unique name "map"
map.type = "solid";
map.name = "map";
// add it to the world
add(map);
The map will be placed at 0,0, with the tilemap image as it’s graphic, and the grid from the ogmo as it’s collider/mask/grid. Also wise to set it’s name to something easy to use, so you can single it out for collision checks separate from other “solid” objects.
As to if you should handle input in your player class or the world, really it depends, but in almost all cases it’s better to handle it in the world, and use states to decide where input goes. What about if you show a menu? Does it make sense to have the player entity control that? What about if the player dies and is removed from the world, or if you have a scene where the player isn’t present? You’d need to scatter input checks into some other object to handle it in his absence.
If you’d like to keep it compartmentalized somewhat you could make a separate class that extends flashpunk.world, and then have your worlds extend that class, and have your input handling done there, which would keep you having to redefine the input in every world type, like if you had a separate world class for cutscenes, menus, credits, etc.