** NOTE ** This FAQ is far from complete... there may be errors, some sections are not yet written (most notably the sections on SIDEs), and it is not yet illustrated. It's a work in progress, so please bear with me. Thanks, and happy Marathoning! --- Marathon Engine FAQ 0.6 No, this isn't a FAQ on how to keep your Interstallar Colony ship's engine running smooth and knock-free. It's a document that explains, for the most part, how Marathon's maps WORK. Although you may find these technical details boring, understanding them will help you create better, more reliable maps. On we go... -- Changes since 0.5 * Fixed several errors (light source limitations, etc) * Added additional "engine limitations" info * Added ascii illustration for 3D engine section -- Polygons: Our 8-Sided Friends Marathon's basic "building block" is the polygon. Every map is made up of dozens and dozens (sometimes hundreds) of polygons connected together to make hallways, rooms, etc. Because of the way Marathon's engine operates, a Map is designed in 2D. You cannot "model" a three-dimensional room by creating a 3D cube and sticking other 3D cubes onto it, as you would in a 3D program like InfiniD or Ray Dream Designer. Instead, you create polygons outlining a room's boundaries, or walls. You then tell Marathon the height of the floor, and the height of the ceiling. You link these polygons together, creating pseudo-3D structures by changing the floor and ceiling heights. Ledges are simply polygons whose FLOOR heights are higher than the rest of the room. Staircases are simply hallways whose floor heights go up or down... Platforms and doors are "special cases" -- regular old polygons whose ceiling heights and floor heights can change dynamically. A door, for example, is just another 2D polygon in a map, connecting two larger rooms. But when you're playing the game, walk up, and hit the action key, its ceiling height changes and it appears to slide upward, allowing you to pass. -- Pseudo-3D: Smoke and Mirrors "But wait," you cry! "That sounds like the way DOOM does things! I thought Marathon's engine was superior to DOOM's, able to do 'real' 3D maps!" You're right, partially. Marathon IS capable of creating maps with rooms on top of one another. But it's all smoke and mirrors -- understanding that is the KEY to understanding map creation. Picture a flat map, with no elevation changes. It's shaped like a big "U". _______________ | | | _______ | | | | | | | | | | | | | | | | | |___| |___| If you twist one side of the "U" around, so that it overlaps the other side, you will have two polygons that occupy the VERY same space in the "world." _______________ | | | _______ | | | | | _____|___|_______| | | | . | | <-- dot indicates overlapping area |____|___|___________| | | |___| However, when you open that map in Marathon, you won't SEE the second hallway when you're in the first one. They are two separate "rooms," even though they occupy the same space in Marathon's "universe." What happens when you change the ELEVATION of one of those rooms, though? Suddenly, you have two rooms that are on TOP of each other as far as you, the player are concerned. Although the actual map defines them as 2D spaces that overlap, the Marathon engine turns them into 3D rooms on different "floors" of a structure. -- SIDEs: "Oooooo! The walls are all fuzzy!" -- Misc. Marathon Engine Limitations No more than 8 points per polygon No defining polygons in a counter-clockwise fashion. Polygon points must always go clockwise. _NO_ internal angles greater than 180 degrees or less than 15 degrees. (In other words, no REALLY thin polygons or concave polygons) No rooms larger than about 10,000 units -- they start smearing and looking funny at this size. Solve this by making your rooms somewhat "twisty," like the long running areas in Colony Ship For Sale. No ceilings higher than 32767, no floors lower than -32767. No more than 256, no fewer than 2 polygons in a single map No more than 32 platforms in a single map No more than 32 lighting types in a single map No more than 256 sprites (aliens, weapons, players, scenery, ammo, etc.) in a single map No more than 64 TYPES of sprites in a single map. Not likely unless you put one of everything in. No Traveling over 75 mph in the right lane