Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: RandomTiger on March 27, 2004, 05:47:26 pm

Title: Test request - cutscenes
Post by: RandomTiger on March 27, 2004, 05:47:26 pm
Cant get in contact with our head of QA so Im throwing this one open to all:

I need the build in my sig (updated when I posted this thread) to be tested for two things relating to cutscenes:

1. The background should clear properly in D3D and OGL
2. As you progress * through the campaign movies you have seen should be added to the techroom cutscene list.

* You have to play through the campaign, you cant just use a pilot file that is already past that point.
Title: Test request - cutscenes
Post by: RandomTiger on March 28, 2004, 04:57:18 am
Oh comeone, someone give me some help here.
Title: Test request - cutscenes
Post by: Stunaep on March 28, 2004, 05:21:29 am
I was going to play through LM3 anyway, for testing purposes. So I'll do, just give me a day of so.
Title: Test request - cutscenes
Post by: karajorma on March 28, 2004, 02:00:10 pm
I'm going to give this a try in a bit. The first one should be easy to test. :)
Title: Test request - cutscenes
Post by: Admiral Nelson on March 28, 2004, 02:01:09 pm
Hi Random Tiger,
The intro cutscene does play correctly for me in this build, where it was all messed up before. I haven't played through the campaign at all to see if movies are added correctly.
Win 2000 SP4
Radeon 9800 Pro

HTH,
Thanks for the build!
Title: Test request - cutscenes
Post by: RandomTiger on March 28, 2004, 03:49:28 pm
Its the second one that really needs the testing.
Thanks for you time though. :)
Title: Test request - cutscenes
Post by: karajorma on March 28, 2004, 04:38:01 pm
I gave it a try using an edited version of the campaign file (I removed the training missions and made it jump straight from mission 1 to the mission with Bosch's Monologue.

Absolutely no difference. Wouldn't add the movie, wouldn't play intro from the techroom.

I then tried making a new pilot. Still no difference.

The movie playing code itself seems okay though. It flashes up the desktop a couple of time when playing the intro on start up. When I skiped to the monologue mission it played it faultlessly.
Title: Test request - cutscenes
Post by: karajorma on March 28, 2004, 05:12:35 pm
ADDENDUM : Hope RT didn't see my earlier post and go off to correct the code cause there isn't anything wrong with it :)

The problem is not in the code itself. The problem is as follows. Although FS2_open looks for intro.avi on startup and plays it correctly it can't add it to the techroom properly because the cutscene.tbl tells it to look for intro.mve.

Since it can't find this it can't add the movie to the techroom.

The in-game cutscenes are slightly more complicated because you need to use an edited campaign file that tells FS2_open to play mono1.avi instead of mono1.mve.  Unlike with the intro FS2_open won't play the other standard cutscenes without the names being changed in the campaign file. Fortunately someone included the one I made in the media.vp so I doubt anyone has run into that problem :)

The solution to both problems is to edit the cutscene table and replace .mve with .avi

As soon as you do that the cutscenes should start to work. If you're feeling lazy I've done it for you. I've also included the edited campaign file I used for testing. With it you don't need to play through the main campaign again just to test this. It starts at mission 1. Simply hit alt-J though and it will take you to the first cutscene. You can get the file here (http://homepage.ntlworld.com/karajorma/freespace/Downloads/RandomTigersMovieCodeTest.zip)

If you use the files in that download testing RT's code should take no more than 5 minutes to do so you've got no excuse not to now.

NB
I haven't tested the end-of-game cutscenes yet. These are a special case. They are only triggered when the campaign file is called freespace2.fc2 and the special SEXP is triggered. I have no idea what FS2_open will do when it comes across that. I don't even know if they ever worked in FS2_open at all.

RT while I'm here can I request a tiny featurette? At the moment FS2  only looks for files in the main FS2 folder. Would it be possible to make it also look in the -mod folder first? That way campaigns could have their own custom intros without having to interfere with each other.
 Actually why not just make the code look in the -mod folder first for all movies? :D
Title: Test request - cutscenes
Post by: Bobboau on March 28, 2004, 06:25:31 pm
why don't we make aa small hack were it changes mve to avi when it reads the table.
Title: Test request - cutscenes
Post by: karajorma on March 28, 2004, 06:28:18 pm
I had heard that someone had already done that so I tested it. Still not done :)

That said the cutscene.tbl is less than 1k in size and if it's in the media.vp (which I imagine anyone with the movies is probably going to get first) I really can't see this causing a problem. The only potential problem I can see is with the ending cutscenes. But in those cases the filename is hardcoded anyway.
Title: Test request - cutscenes
Post by: RandomTiger on March 29, 2004, 12:51:28 am
If you just call the movies .mve should be fine.
Title: Test request - cutscenes
Post by: RandomTiger on March 29, 2004, 12:53:37 am
Thanks for your efforts karajorma, will think about this more when I have time.
Title: Test request - cutscenes
Post by: taylor on March 29, 2004, 02:01:28 am
Why not just strip off the extension in movie_play() and add back what you want?  Then you can support more than one codec as well.  Since it's much easier to make (and play) mpegs in Linux than any other video format supporting it might be beneficial in the future.

edit: that was stupid...

Anyway, remove the extension and add a new one to search for just like bmpman does.  Search for the file with cf_find_file_location() and it will return the full path to the file if found.  If not found then try another extension and so on.  This also gives the  benefit of having the movies in any location that the game can search.  Linux/OSX uses two roots so searching both is done automatically and you get to search the cdrom drive as well.  Just a thought.
Title: Test request - cutscenes
Post by: RandomTiger on March 29, 2004, 11:39:30 am
If thats a solution feel free to implement it
Title: Test request - cutscenes
Post by: karajorma on March 29, 2004, 12:05:18 pm
Sounds like a good idea to me. I'm assuming that this system would also give preference to a movie in the -mod folder over one in the main FS2_Open folder.
Title: Test request - cutscenes
Post by: taylor on March 29, 2004, 12:33:03 pm
Preference is whatever CFILE uses so yes, it would search mod folders first.  This also means that you don't have to put the movies in the root of the game folder and movies can be in "data/movies" again and CFILE will find them.  Almost done coding this so I'll test it out in a little while.
Title: Test request - cutscenes
Post by: Goober5000 on March 29, 2004, 01:30:40 pm
Cool.  Thanks, taylor. :)
Title: Test request - cutscenes
Post by: taylor on March 29, 2004, 05:35:27 pm
Done, tested, revised, tested again.  Works.

Are there any formats that I should add besides avi and mpg?  For now it will look for avi first and then mpg.  Should I add mve as well even though it's not going to work?  I removed the double movie_play() call for the intro movie since it will actually play twice now.  There will no longer be a need for the modified campaign file either.  I can go ahead and commit this tonight if there aren't any objections.
Title: Test request - cutscenes
Post by: ChronoReverse on March 29, 2004, 05:43:06 pm
Matroska (.mkv) and .ogm.  Especially .mkv if you really like completely open-sourced container formats ;)
Title: Test request - cutscenes
Post by: jdjtcagle on March 29, 2004, 06:43:25 pm
EDIT: nevermind
:D
Title: Test request - cutscenes
Post by: RandomTiger on March 30, 2004, 12:48:52 am
Quote
Originally posted by taylor
Done, tested, revised, tested again.  Works.


Thanks, I'll close the bug then
Title: Test request - cutscenes
Post by: taylor on March 30, 2004, 01:58:46 am
Quote
Matroska (.mkv) and .ogm. Especially .mkv if you really like completely open-sourced container formats
I haven't looked much into these but they are Win32 only aren't they?  Personally I want to encourage formats that are cross platform so that I, as a Linux user, can enjoy them as well.  A few Linux video players support the use of Win32 codecs but that's extra work for the user and I'm pretty sure that won't work on PPC.  I'm just going to leave it with avi and mpg for now but it can be easily changed later.
Title: Test request - cutscenes
Post by: ChronoReverse on March 30, 2004, 09:48:26 am
.mkv and .ogm were specifically made ot be open-sourced and cross-platform.  ESPECIALLY .mkv
Title: Test request - cutscenes
Post by: taylor on March 30, 2004, 12:37:09 pm
Ok found a better set of websites to look at this time.  Looking at the codecs they support though the files could still be platform centric but that would be the fault of whoever encoded the mkv in the first place.  Almost all of the formats are ok so this isn't really a big deal.
Title: Test request - cutscenes
Post by: ChronoReverse on March 30, 2004, 02:13:10 pm
Well, you'd need the playback decoder to be available for the platform you're on, but people generally use mpeg4 anyways so it's not a problem usually.