pacman wrote:Thank you for explanation It makes me wonder about two problems.
1. How a map is created/stored? Did you make map editor where you can draw these lines and mess with them?
Spot on. The collision maps are stored as tables. The complete level is split into small chunks that are loaded as the player traverses the map. These tables only contain the sector information (2D line coordinates and sector “properties”) I mentioned before. For the time being, I have a very rough level editor that aids me in creating these collision maps.
2. How do you apply texture/graphic to polygons?
The collision maps are created totally independent from graphics. That was my main motivation behind this “path system”. There are no tiles, just a table describing the collision map and an image layer applied "in top of" the collision map. The image is also created in smaller chunks and “stitched” together in-game, as the player moves around the map. So far is working good; however, it has advantages and disadvantages.