Author Topic: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects  (Read 1662 times)

0 Members and 1 Guest are viewing this topic.

Offline ∫tan x dx

  • Posts: 83
    • View Profile
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. :)

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
« Reply #1 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.
My Lemmings 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)

Offline Dullstar

  • Posts: 2092
    • View Profile
    • Leafwing Studios Website (EXTREMELY OUTDATED)
Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
« Reply #2 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.

Offline Proxima

  • Posts: 4569
    • View Profile
Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
« Reply #3 on: February 27, 2020, 04:11:36 PM »
:thumbsup: Love this suggestion!

Offline namida

  • Administrator
  • Posts: 12399
    • View Profile
    • NeoLemmix Website
Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
« Reply #4 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.
My Lemmings 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)

Online WillLem

  • Posts: 3382
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [SUG][PLAYER/EDITOR] - Frame offsets for constantly animating objects
« Reply #5 on: February 28, 2020, 12:24:03 PM »
I like this idea as well. :thumbsup: