I've implemented a slightly simplified version of my ideas from Reply #3. To be precise:
- If the level contains no entrances or preplaced lemmings, the middle of the level is used as a fallback. Not that this matters in practice.
- If the level contains at least one entrance, the focus will be on the entrance or exit closest to the middle of all entrances. (If there is exactly one entrance, in practice this will always select that entrance, rather than an exit.)
- If the level contains no entrances, the focus will be on the preplaced lemming or exit closest to the middle of all preplaced lemmings. (Ditto for exactly one preplaced lemming.)
- If an entrance is selected, the initial screen position will be 48px in front of, and 20px below, the selected entrance.
- If a preplaced lemming is selected, the initial screen position will be 48px in front of, and 12px above, the selected lemming.
- If an exit is selected, the initial screen position will be 12px above the selected exit (with no horizontal offset in either direction).
For the purpose of this, an entrance's position is taken to be the actual trigger point where lemmings spawn. Likewise, for exits, the position is taken to be the center of its trigger area. Finally, all zombie / neutral entrances and preplaced lemmings are treated as if they do not exist throughout this algorithm.
There are edge cases that this doesn't catch (for example, it doesn't produce very nice results on "Compression Method 1" or "The Boiler Room"), but the above already produces a good result on the majority of levels. If particular edge cases it doesn't handle well come to light later, adjustments could be considered. And I will stress that
the ability for level creators to manually set their own screen start position, is not going to be taken away.
Support is added to NeoLemmix player in commit 37b282a. I've moved this topic to the Editor board because I still need to add editor support.
For anyone who's wanting to get "ahead of the crowd" on file formats: Auto screen start is simply specified by
not having a START_X and START_Y line in the file. If one or both of those lines are missing, NL will instead use an automatic screen start position.