Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: mjn.mixael on November 19, 2010, 05:16:09 pm

Title: Mainhall Animations Idea
Post by: mjn.mixael on November 19, 2010, 05:16:09 pm
Here is a thought I had, hopefully it won't be too difficult.

This will apply to the misc animations for the mainhalls mostly. I'm going to use the Bastion mainhall as an example for this.

Currently the mainhall code plays a single looping animation for background animations. Think of the crane in the Bastion mainhall. It comes in, grabs a crate then goes off screen. Then it returns and repeats the process. I was thinking that it would interesting if the code randomly selected from a set of animations for the same area. If each animation had the same start and end point, it would look seamless. This way the crane could grab the crate, then the next time maybe it could grab a fighter or something.

Essentially this is all to add further immersion into the mainhalls.

This came to me when I was watching the stars in Bastion. Consistently a couple Hercs fly by. Makes me wonder just how many Hercs are out there! But with this system, one time it could be Hercs, another time could be just stars, and the next could be a fenris or something!

Now, this CAN currently be done by making one HUGE ANI file. However, with a randomly selecting system, it will break the monotony even further by sometimes doing the same ANI twice in a row, or leaving one out for a while.

It would probably require a file naming system where it plays the ANI with the name selected, then (similar to the texture naming system) it selects the next ANI based on that. So you would have Crane.ani, Crane-a.ani, Crane-b.ani... etc.

I hope that was clear. Thoughts? Opinions?
Title: Re: Mainhall Animations Idea
Post by: pecenipicek on November 19, 2010, 07:00:09 pm
*supports*




also finally add keyframing support to eff's (or get MNG in engine) so the ani format can be purgified from that part permanently.
Title: Re: Mainhall Animations Idea
Post by: CommanderDJ on November 19, 2010, 08:20:02 pm
This definitely sounds like an awesome idea. I have no idea as to the feasibility/difficulty of implementing it though. You have my support anyway.
Title: Re: Mainhall Animations Idea
Post by: Colonol Dekker on November 19, 2010, 08:23:25 pm
It'd work in some cases. But not every. The crane wouldn't be doable without some sort of associated table entries. You'd end up with scenes of crates and fighters blinking in and out of existance without otherwise established guidance.
 
 
But I fully support the endeavour.
Title: Re: Mainhall Animations Idea
Post by: mjn.mixael on November 19, 2010, 08:39:40 pm
It'd work in some cases. But not every. The crane wouldn't be doable without some sort of associated table entries. You'd end up with scenes of crates and fighters blinking in and out of existance without otherwise established guidance.
 
 
But I fully support the endeavour.

If each animation had the same start and end point, it would look seamless.
Title: Re: Mainhall Animations Idea
Post by: Kolgena on November 19, 2010, 08:46:10 pm
Right, but I think he means that it's going to be difficult to show a crane removing a fighter without changing the number of visible fighters. It's doable if the crane moves a hidden fighter, but it might not work for all the current anis. It seems like it's possible to work around it, so you also have my support.
Title: Re: Mainhall Animations Idea
Post by: Galemp on November 19, 2010, 09:29:16 pm
ANIs loop. You'd make one that unload the fighter, then loads it back in place again.
Title: Re: Mainhall Animations Idea
Post by: mjn.mixael on November 19, 2010, 09:29:30 pm
people, people, people.... you underestimate my awesomeness!

remove the fighter, then...  :nervous: ...  bring it back! (in a single ANI)

That's just the simplest workaround.. I have thought of a lot of possible combos using various transparencies and whatnot.
Title: Re: Mainhall Animations Idea
Post by: CommanderDJ on November 19, 2010, 10:15:32 pm
people, people, people.... you underestimate my awesomeness!

Truth.
Title: Re: Mainhall Animations Idea
Post by: newman on November 20, 2010, 07:18:33 am
remove the fighter, then...  :nervous: ...  bring it back! (in a single ANI)

Well, if the point is to increase immersion, then it should make sense too. Removing a fighter by crane only to return it a few seconds later doesn't qualify as making sense to me.
Title: Re: Mainhall Animations Idea
Post by: mjn.mixael on November 20, 2010, 08:30:19 am
 :wtf:

Well, it doesn't matter if you guys understand WHAT or HOW I'm going to make the crane work.

How's about you just trust me to do what I do best and instead let's talk about how this would work in the code because that is something I don't do very well.
Title: Re: Mainhall Animations Idea
Post by: Spicious on November 20, 2010, 06:16:35 pm
Doing this nicely seems possible by using finite state machines with animations played during transitions between states.
Title: Re: Mainhall Animations Idea
Post by: Trivial Psychic on November 20, 2010, 07:52:11 pm
I say, screw the ani and image-based mainhall and replace it with a fully-rendered on-the-fly mainhall!!!!!


 :beamz:



... OK, well, maybe in ten years or so.
Title: Re: Mainhall Animations Idea
Post by: DaBrain on November 21, 2010, 02:16:43 am
In my eyes this is something that shouldn't be hardcoded, but scripted.

I don't know if this is already possible somehow though.
Title: Re: Mainhall Animations Idea
Post by: Goober5000 on November 22, 2010, 03:52:37 am
This can be done... and pretty simply too.  It just requires changing a few lines of code in main_hall_render_misc_anims.  Now I just need to think of the right algorithm with which to do it.
Title: Re: Mainhall Animations Idea
Post by: The E on November 22, 2010, 04:03:41 am
Shouldn't this start out somewhere in mainhall.tbl? something like
Code: [Select]
$Misc anim X: ani_1, ani_2, ani_3, .... , ani_N
+Sequential ;; Plays anis in order
+Random ;; Chooses a random one
Title: Re: Mainhall Animations Idea
Post by: Goober5000 on November 22, 2010, 04:23:28 am
That's what I originally thought, but then I realized that I could simply add a check to randomly select from all misc animations with the same coordinates.  No table format changes needed.

EDIT: But that only works if you want to pick a random animation equally out of the ones provided.  More complicated stuff, like sequential play or weighted randomness, would need a format change.
Title: Re: Mainhall Animations Idea
Post by: mjn.mixael on November 22, 2010, 07:39:49 am
I'd be interested in sequential stuff and whatnot too, but I'm also all about simplicity. I would be happy with just the random selection.
Title: Re: Mainhall Animations Idea
Post by: Cobra on November 22, 2010, 08:28:35 pm
also finally add keyframing support to eff's (or get MNG in engine) so the ani format can be purgified from that part permanently.

NO.

Granted, .eff's are better-looking and all, but they're horribly inefficient, making hundreds of new fles when an .ani is just one file.
Title: Re: Mainhall Animations Idea
Post by: The E on November 23, 2010, 01:52:18 am
You're outvoted, Cobra.

Also, we have keyframing support for effs.
Title: Re: Mainhall Animations Idea
Post by: Goober5000 on November 23, 2010, 02:11:42 am
The proper way to go is MNG.  Not EFFs for interface animations, which is what I think Cobra was against.
Title: Re: Mainhall Animations Idea
Post by: mjn.mixael on November 23, 2010, 10:24:19 am
Hey! Who hijacked my topic? This discussion is about random use of multiple ANIs in mainhalls, not about the type of ANI used.

That discussion is here. (http://www.hard-light.net/forums/index.php?topic=72090.0)
Title: Re: Mainhall Animations Idea
Post by: General Battuta on November 23, 2010, 10:30:57 am
(http://www.gunandgame.com/forums/attachments/powder-keg/27088d1258511571-lee-ermy-show-fragmentation-round-hijack-deniro.jpg)
Title: Re: Mainhall Animations Idea
Post by: Goober5000 on November 25, 2010, 03:22:23 pm
Okay, random selection stuff is working. :)  Catch me on IM or IRC for the details.