Lemmings Forums

NeoLemmix => Bugs & Suggestions => Closed => Topic started by: ∫tan x dx on February 25, 2020, 08:09:22 PM

Title: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
Post by: ∫tan x dx on February 25, 2020, 08:09:22 PM
A thought came to me one day while I was creating a level using the orig_fire tileset. Specifically, I had placed a vertical line of the flamethrower hazards, and while playtesting I thought "Wouldn't it look cool if those flamethrowers were staggered, instead of all firing at once?"

What I am suggesting is an ability to offset the initial frame of constantly animating objects, such as fire hazards, water hazards, traps with animated idle states, and exit animations.
This should have absolutely no impact in gameplay (i.e. clear physics); it would merely be a cosmetic change.

My idea will of course require changes to the level save format, requiring an extra (optional?) piece of information to specify the frame offset.
But I imagine that it should be easily backwards compatible: if an item does not specify this extra piece of info, then it is treated as having no offset - the item plays from frame 0 as usual.

I would love to hear feedback/ideas/criticisms. :)
Title: Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
Post by: namida on February 25, 2020, 09:10:15 PM
My two concerns here:
- This will be annoying to support in the editor.
- Secondary animations will need to be taken into account - including the case that an object may have been designed with the intent to have some kind of synchronization between the main and secondary (or between two or more secondary) animations.

If there's widespread enough support for this idea, that might make it worthwhile despite the first issue. The latter issue is something that would have to be discussed pending any implementation.
Title: Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
Post by: Dullstar on February 27, 2020, 04:39:47 AM
Could secondary animations also have the same offset applied? It probably wouldn't be necessary to allow them to be offset independently if that would lead to issues.
Title: Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
Post by: Proxima on February 27, 2020, 04:11:36 PM
:thumbsup: Love this suggestion!
Title: Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
Post by: namida on February 27, 2020, 06:17:06 PM
Could secondary animations also have the same offset applied? It probably wouldn't be necessary to allow them to be offset independently if that would lead to issues.

This is very likely how I'd do it.

Essentially, imagine a setting F for how many frames from the start the object would be. The object would load as normal, then invisibly "animate" for F frames - the state it's in after that (across the primary and secondary anims combined) is how it would appear on the first frame in-game. One special rule here would be that, for the purpose of this, an animation with a Random start frame (perhaps only on the primary animation) would instead start at frame 0 if F is non-zero. (For cases where you specifically *want* such an object to start on frame 0, you'd just set the value to that object's frame count, meaning it would complete one full cycle.)

Of course, it wouldn't literally be doing exactly that on a technical level - but I'm more meaning as in, it would have the same ultimate effect as the above.

It should be noted that I foresee it being fairly rare that such a thing would be used on an object that also makes much use of secondary animations - it'd most likely be used on the simpler objects. It's just good to account for this anyway.

If this proposal sounds good, I can consider this feature for V12.10.
Title: Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
Post by: WillLem on February 28, 2020, 12:24:03 PM
I like this idea as well. :thumbsup: