How do you feel about vertical scrolling?

Started by Strato Incendus, September 21, 2019, 01:21:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Strato Incendus

Yepp - my widest level "The Grand Puzzle" definitely isn't easy on PC performance! :evil: But at least it's only horizontal. I've done some really huge levels in Paralems with both vertical and horizontal scrolling, so that those could easily have been even larger with regard to the total amount of pixels.
My packs so far:
Lemmings World Tour (New & Old Formats), my music-themed flagship pack, 320 levels - Let's Played by Colorful Arty
Lemmings Open Air, my newest release and follow-up to World Tour, 120 levels
Paralems (Old Formats), a more flavour-driven one, 150 levels
Pit Lems (Old Formats), a more puzzly one, 100 levels - Let's Played by nin10doadict
Lemmicks, a pack for (very old) NeoLemmix 1.43 full of gimmicks, 170 levels

namida

If you do have to make large levels, there are a few things you can do to improve performance.

I will stress that in most cases, you will not need to worry about this. Treat this as "what can I change if my level is being laggy?" rather than "what should I always take into account when designing levels?"

First, note that there are several layers (visually) for objects - backgrounds, moving backgrounds, no-overwrite objects, one-way arrows, only-on-terrain objects, and "everything else". I list "backgrounds" here because although backgrounds themself aren't objects, there's a special case that's relevant - a moving background object that doesn't animate and doesn't move, will get drawn to the background layer rather than the moving background layer. This is done because the background layer just gets drawn once, not redrawn every frame. (A moving background or one-way arrow object always gets drawn to the moving background or one-way arrow layer respectively, never to the no-overwrite or only-on-terrain layers.)

So, to improve performance on such levels (or any level, really), you can:
1. Have fewer total lemmings. Also note that lemmings with permanent skills (simply on a "yes or no" basis, not a "how many?" basis) are very slightly more demanding than those without, zombies are slightly more so again, and zombie-permanents most of all.
2. Have fewer total objects. Non-moving, non-animating moving background objects do not count towards this, and you can go crazy with those.
3. Use fewer of the object layers. While there is a slight impact from having a different amount of objects on a layer, the main improvement comes from "is the layer completely empty or not". So if you can make all (or none) of your objects "No Overwrite" instead of a mixture, for example, this will improve performance a bit compared to having a mixture.
4. Where possible, use resizable objects rather than placing multiple objects. It's slightly more efficient.
5. Use objects with fewer secondary animations. The frame counts of them don't matter much, just the actual number of animations.

What doesn't make much difference:
1. Having more or less terrain.
2. Using or not using a background. However - this is assuming it's a proper background, and not an object-used-as-a-background situation - see above notes on objects for those.
3. Using objects with shorter animation(s), or objects that don't animate at all (outside of the moving background special case, above). This does affect memory usage, but doesn't affect CPU usage, which is generally the bottlenecking factor for NL.
4. Reducing the variety of object types. Unless this causes an extra layer to be used, it makes no difference whether you have three of the same exit, or three different exits, or an exit + a trap + a fire, etc.

I will note that all of these things actually can have an impact on loading time - but they won't have much, if any, impact on in-game lag.

Some of this advice does not hold true for older versions. Since we shouldn't be using those older versions anymore anyway, I am not going to elaborate beyond that.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

ccexplore

The above post is too valuable to be buried inside a thread about vertical scrolling. :thumbsup: Maybe split into its own "tips for improving performance on laggy NeoLemmix levels" topic or similar, possibly even pin the topic on the NeoLemmix Main board?

Strato Incendus

Thanks for the suggestions, namida! ;) The level called "The Grand Puzzle" (last level of Lemmings World Tour) doesn't use anything fancy, though - it's just a classic X-of-everything level with a bunch of terrain that is pretty damn wide.

Indeed I was hoping that performance on this level would improve in New Formats (i.e. after pack conversion, because the level is actually too wide for the New-Formats editor and thus can only be opened by the NeoLemmix player). But so far, that doesn't seem to be the case. I have several hatches in that level, though, and a number of lemmings that goes along with that. It's basically Nepster's "Final Frustration" on steroids... :evil:

(You'll see when I release the New-Formats conversion of the pack; so far, you guys only have it in Old Formats, of course, which was what I blamed for the lagging, but as I said, it's still present in New Formats as well. I could share the individual New-Formats level file, of course - it would just have to be opened in the NeoLemmix player straight away, rather than via the editor, because that would cut off about a quarter of the level.)
My packs so far:
Lemmings World Tour (New & Old Formats), my music-themed flagship pack, 320 levels - Let's Played by Colorful Arty
Lemmings Open Air, my newest release and follow-up to World Tour, 120 levels
Paralems (Old Formats), a more flavour-driven one, 150 levels
Pit Lems (Old Formats), a more puzzly one, 100 levels - Let's Played by nin10doadict
Lemmicks, a pack for (very old) NeoLemmix 1.43 full of gimmicks, 170 levels

ccexplore

Quote from: ccexplore on September 29, 2019, 08:37:11 AMThe above post is too valuable to be buried inside a thread about vertical scrolling. :thumbsup: Maybe split into its own "tips for improving performance on laggy NeoLemmix levels" topic or similar, possibly even pin the topic on the NeoLemmix Main board?

Ok, since no one objected, I split it.  Actually I just started a new topic on "Level Design" board and copied namida's post to it, because I'm not familiar with the effects of split and don't want to take an action that can't be easily undone.

I was going to place the topic on NeoLemmix Main board (the other NeoLemmix boards don't seem to be good fit), but actually have trouble deciding whether NeoLemmix Main board makes more sense vs the general level design board, or maybe it doesn't matter because people likely reaches the topic/post via search?  For that reason I have also not done any pinning of the topic either, even though it kind of defeats purpose if not pinned.

namida

Quote from: Strato Incendus on September 30, 2019, 03:18:32 PM
Thanks for the suggestions, namida! ;) The level called "The Grand Puzzle" (last level of Lemmings World Tour) doesn't use anything fancy, though - it's just a classic X-of-everything level with a bunch of terrain that is pretty damn wide.

Indeed I was hoping that performance on this level would improve in New Formats (i.e. after pack conversion, because the level is actually too wide for the New-Formats editor and thus can only be opened by the NeoLemmix player). But so far, that doesn't seem to be the case. I have several hatches in that level, though, and a number of lemmings that goes along with that. It's basically Nepster's "Final Frustration" on steroids... :evil:

(You'll see when I release the New-Formats conversion of the pack; so far, you guys only have it in Old Formats, of course, which was what I blamed for the lagging, but as I said, it's still present in New Formats as well. I could share the individual New-Formats level file, of course - it would just have to be opened in the NeoLemmix player straight away, rather than via the editor, because that would cut off about a quarter of the level.)

No matter how much of the above you take into account, larger levels will always have worse performance than smaller ones. This is part of the reason why excessively large levels are discouraged; the other reason being that they can get very tedious to play, especially if they're the "also have a huge number of skills" type rather than the "you've got to figure out how to really get the most out of each individual skill" type.

I should have mentioned really: Before worrying about any of the above, the first thought should be "does my level need to be this big"? Of course, maybe the answer is "yes", even if this is purely for thematic reasons - huge, intimidating final levels can be an interesting design choice, and it's what I went with for the LPIV-LPV-LPO2 era of my packs (though I chose not to do this for LPVI or LPA). But reducing the level size is generally going to have a positive impact on speed, probably more so than any of the above, and especially for users who use the high-quality minimap.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

Strato Incendus

Quoteand especially for users who use the high-quality minimap.

Ah, yeah, I remember switching that off sometime in the past :D . It made scrolling (to get back to the topic) a little more fluent, if I recall correctly, but not the overall movement speed of the lemmings themselves.
My packs so far:
Lemmings World Tour (New & Old Formats), my music-themed flagship pack, 320 levels - Let's Played by Colorful Arty
Lemmings Open Air, my newest release and follow-up to World Tour, 120 levels
Paralems (Old Formats), a more flavour-driven one, 150 levels
Pit Lems (Old Formats), a more puzzly one, 100 levels - Let's Played by nin10doadict
Lemmicks, a pack for (very old) NeoLemmix 1.43 full of gimmicks, 170 levels