Your questions are too broad, so I'll give you a broad answer:
1.1) How to draw:A tile has at least 3 properties: width, height and a drawable (which can be a sprite, a colored rectangle, etc). A map is composed of multiple tiles, which can be represented by a 2 by 2 matrix:
int TileMap[width][height] =
{1, 0, 0,
0, 2, 0,
0, 0, 3};
Given that you know which tile should be drawn at each position of the map, your drawing function will iterate through each position, get that tile and draw at that position.
for (int i = 0; i < width; i++){
for (int j = 0; j < height; j++){
tile[i][j].setPosition(xOrigin + i*tileWidth, yOrigin + j*tileHeight);
window.draw(tile[i][j]);
}
}
1.2) and interact with a large map:If by interact you mean edit it, there are many ways. See how
this guy did it. For you that are just begining, hard-coding your tile matrix is the way to do it (just like I did at 1.1).
If you mean player interactions with tiles, like collision, somewhere in your
game loop (which is a key expression that you should google), you will check if the tile is, let's say, solid, and if the player is inside that tile. If so, you will correct the player position, because he's not supposed to go there.
2.1) How to make mobs and player damageable?What is damage? Damage is a decrease of health. What is health? Health is a number. If your mobs have these members defined inside their classes, it's just a matter of manipulating these values. Let's say the player loses health if he collides (touches) with a mob:
player.health -= enemy.damage;
2.2) I mean how to watch when mob is attacked and when not (should I place this logic inside player, world class or somewhere)?Do it the way it feels more natural to you. Back to the game loop, you can make it one of 2 ways (and all the other ways I'm choosing to ignore):
while (game.isRunning()){
for (GameObject& object : objects){
updatePosition(object);
updateHealth(object);
}
}
while (game.isRunning()){
for (GameObject& object : objects){
object.updatePosition();
object.updateHealth();
}
}
First approach the object contains only data (position, health, speed, ...), and this data is updated by a third party. Second approach the object contains both data and the manipulators of this data.