I've came across to some really bad limits in a 2D environment / engine.
The game i'm working on is fully isometric, and should offer multiplayer.
As i've worked myself through the most basic mechanics already, i was starting to think about having multiple floors within the same map/layer or whatever you may call it.
In short: without being forced to load a new map!
So i want the player to be able to enter houses, which are having at least a second floor up or downwards.
For all the old gamers it might be clear.
In the past in games like diablo or similiar isometric games, there was never the existance of multiple floors, unless it simply loaded the next map.
But i don't want to have these limits, i'm trying to find a solution to get this actually to work.
Including enemy AI to understand the floors and act properly in case they are chasing a player (peer) up or down to a different floor. Including proper line of sight calculation.
While i've made some thoughts for myself already, i wanted to get some feedback and maybe even experience from other developers who might faced this rather big "problem" already.
I've made some simple sketches to let you guys understand what i'm willing to achieve.
Sketch #1 (2nd floor)
Blue = Solid object on 1st floor (can not be walked through)
Red = Walkable space were both floors are "coliding"
Please note that players should also be able to move behind the building!
So imagine objects which may be placed behind the house (bushes etc...) or objects inside the houses like tables etc...
Peer#1 should NOT colide with any objects or unwalkable space which is placed on the 1st floor!
Sketch #2 (1st floor)
While Peer#2 is at the 1st floor, he should not see nor colide with anything that's placed on the 2nd floor.
Not to forget that:
- Bullets fired from Peer#1 should be invisible and never kill an enemy moving on the 1st floor.
-- So actions of Peer#1 should be kinda ignored, or simply only happening within the 2nd floor. The same for the opposite.
Sketch #3 (1st floor + AI)
In case an Enemy AI had line of sight with Peer#1 before, and saw him walking up stairs.... the AI should understand the existence of a second floor and walk correctly upstairs and not try to walk directly through maybe a door or something else which wouldn't make sense within a 3D environment.
In case an enemy is on a different floor it should never be able to get line of sight!
So what are your thoughts, ideas?
Do you think that's possible?
Or do you have an idea to handle this completly different?
Looking forward to some constructive feedback.