Thread: Tomb Editor
View Single Post
Old 24-02-17, 10:38   #300
Tomb Editor
MontyTRC's Avatar
Join Date: Mar 2010
Location: Italy
Posts: 506

Yes, you are right @TR-Freaks. I meant the generation of the navigation mesh. I'll explain a bit (we programmers tend to think that all people are programmers ):

First: Boxes. Boxes are invisible squares in which enemies can walk. Each box has width, height, and floor Y height.

Second: Overlaps. They connect boxes. So in overlaps for example there is the info that box #45 is linked with box #67. Boxes can be overlapped or touching on the edges, but cannot be separated for being overlapped. The only exception are boxes separated by 2 sectors, they are added to the overlap list for enemies that can jump 2 sectors like skeletons or baddy 1 & 2.

Third: Zones. Zones are group of boxes that an enemy can reach. So, if a mummy is on box #45 and zone id is #4, mummy can go only on boxes reachable looking in overlaps list and with zone id #4. Classic example is for flying enemies. They can go everywhere (so typically zone id is #1 for almost all boxes) but not in water, so room in waters have zone id #2. And enemies in water, which are in zone #2, can't go outiside water. If you don't setup zones correctly, you can see funny things like baddy 2 that from land goes on the floor of the water room and walks XD. Each box has 5 zones for normal state and 5 zones for alternate state. In each set, first zone is for mummy like enemies (they can climb 1 click); second zone is for skeleton like enemies (they can climb 1 click and jump 2 sectors); third zone is for crocodile enemies (they can climb 1 click on land and swim in water); fourth zone is for baddy like enemies (they can climb 4 clicks, monkey, jump 2 sectors); fifth zone is for flying enemies. In my procedure I look boxes height difference, distance, if we are in water or not, if box has monkey flag, etc and I group them for each kind of enemy.

I hope that it's more clear now.
Tomb Editor Main developer

Last edited by MontyTRC; 24-02-17 at 11:52.
MontyTRC is offline   Reply With Quote