[SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects

Started by ∫tan x dx, February 25, 2020, 08:09:22 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

∫tan x dx

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. :)

namida

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.
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)

Dullstar

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.


namida

Quote from: 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.

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.
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)

WillLem