Height management
A layer have to store height of tiles:
- Manage the new layer (store height in tile property ? Found a TMX file solution)
- Impact visibility of units (see https://gamedev.stackexchange.com/questions/151510/determine-height-on-bresenham-line-algorithm-path)
- Think about "Tiled" map editor modifications: can we use use it ? Do we should update "Tiled" map editor ? Write another program ?
Multilevel buildings have different heights at each level. Units in buildings set the level they are occupying which affects their line of sight.
Good point. What it should be planned:

As you say, every unit in a building set the level they are occupying with building level.
When you say "Multilevel buildings": Do you think about:
- A building with 3 floors permit to unit to be at 3 different level
Or you think about my thirst explanation ?
Look at it from a side view.
1 2 3
--------
3 | |
---------------
2 | | |
----------------------
1 | | | u |
----------------------
A unit enters the building on the right at level 1. The other buildings limit the line-of-sight of the unit.
1 2 3
--------
3 | u |
---------------
2 | | |
----------------------
1 | | | |
----------------------
The player moves the unit to level 3. The unit has line of sight over the other buildings but is also visible to enemy units.
The whole unit is on the same level of the building.
Okay i got it about unit line-of-sight. But about:
1 2 3
--------
3 | |
---------------
2 | | |
----------------------
1 | | | u |
----------------------
A unit enters the building on the right at level 1
Considering the following map (top view):
_ _ _ _
| |
| 1 |
|_ _ _ _|
| |
| 2 |
|_ _ _ _|
| |
| 3 |
|_u_ _ _|
When unit enter in the lowest building (at umark) we must consider it directly at the 3st floor. We can't offer the possibility of "select" the unit floor among different floor of building. Technically we can but with complicated user interface menu/informations.
Maybe it's already understood by you, but i just want to clarify this point ? Or maybe you imagine an smart way to do this ? If i don't mistake, this is the Close Combat behavior (unit is directly at top height floor) no ?
You are correct. My suggestion is more complicated than how Close Combat handles buildings. When a unit enters a building in Close Combat, the unit's height becomes the height of the building. Buildings should not work that way, but it is very simple to implement. My suggestion is more realistic but is more difficult to design. The Combat Mission game has a UI that allows player to set unit level in building. Anyway, do not think about my suggestion now but maybe keep this idea in mind for a later improvement.
Okay, it's a good second phase improvement, i created an issue :) #35