Author Topic: Possible bug in the Playmovie / AVI event.  (Read 347 times)

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Possible bug in the Playmovie / AVI event.
« on: July 21, 2017, 05:01:38 AM »
When I try to play an avi clip, it crashes the game if that clip doesn't have an audio stream; (at least on my own system —Win7~64bit).


Here is a (version 302) mini-mod that demonstrates this. It's two rooms, each with a PlayMovie event that loads the same video; one with sound, and one without.
The one without audio is the trouble maker.
« Last Edit: July 21, 2017, 05:04:17 AM by Mechanaut »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9859
Re: Possible bug in the Playmovie / AVI event.
« Reply #1 on: July 21, 2017, 01:19:59 PM »
Thank you for the mini-mod. i will take a look at this tonight.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #2 on: July 22, 2017, 11:13:53 AM »
The big question for me, is does it crash for everyone else?  (It definitely crashes for me.)

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9859
Re: Possible bug in the Playmovie / AVI event.
« Reply #3 on: July 25, 2017, 12:26:19 PM »
I can't duplicate. In fact, I can't get the aVI to play.

You didn't provide a playfile log, but I assume you just walked forward into each room...

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #4 on: July 25, 2017, 01:09:55 PM »
Shocked... I tried it (extracted from the zip), and it didn't work for me either.

The problem comes of using the "extract archive to folder" option to extract. It is that Dungeoncraft seems not to be using a relative file path for the AVIs.  When I extracted the 7zip file, it placed the game folder into a folder of the same name as the one in the archive.
IE. "\Desktop\Bug~videoplayback\Bug~videoplayback", and when run... the game couldn't find the videos; (because of the difference in the complete path)... That's likely a bug too.


I extracted the game a second time, but instead, I pulled the archived Bug~videoplayback folder straight on to the desktop.  Then the mod worked as expected.

Just step into the rooms. The first one plays just fine; the second one crashes the game.  They are the same AVI (settings), except that the second one was saved without audio.

Video recording of it: https://www.dropbox.com/s/izcv0r8mlnei900/DCclip.avi?dl=0
« Last Edit: July 25, 2017, 01:37:37 PM by Mechanaut »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9859
Re: Possible bug in the Playmovie / AVI event.
« Reply #5 on: July 25, 2017, 01:26:36 PM »
Two bugs here. Paul and I have to fix the first one before I can even test the second one, unless I want to recreate your folder structure (and I don't).

I will proceed with Paul.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #6 on: July 25, 2017, 02:18:58 PM »
Just extracting the "Bug~videoplayback" folder in the archive to the desktop (or anywhere), will (should) allow the game to find the avi files. The problem (for me) was with 7zip extracting the "Bug~videoplayback" folder itself...into a folder named "Bug~videoplayback".

This resulted in the path:
"c:\users\%username%\Desktop\Bug~videoplayback\Bug~videoplayback\resources"

Instead of:
"c:\users\%username%\Desktop\Bug~videoplayback\resources"  —which works fine.

**But you're right... I wonder if DC uses even the username and/or drive letter of the author's environment to locate the avi? (Obviously the other graphics display just fine—don't they?)
« Last Edit: July 25, 2017, 02:27:57 PM by Mechanaut »

Offline Paul R. Stevens

  • Dungeon Craft Tester
  • Hero Member
  • ***
  • Posts: 2235
Re: Possible bug in the Playmovie / AVI event.
« Reply #7 on: September 09, 2017, 06:17:19 PM »
Quote from: Mechanaut
When I try to play an avi clip, it crashes the game if that clip doesn't have an audio stream

We have done extensive testing and debugging.  I am totally
convinced that the problem lies deep within Windoze or
DirectDraw or the codec your system is using. 

I am running Windoze 10 64-bit and cannot get anything to fail.
I coded an entirely different method of playing the movie and it
works for me but not for Manikus.

I give up.  You will have to include an audio track if that makes
it work for you.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #8 on: September 09, 2017, 09:17:49 PM »
I will do that. Thank you very much for looking into it and testing it. I'm sorry it turned out a wild goose chase of a sort. I am running Windows 7 and have a pretty stable machine. If the game uses local libraries to play videos... then it could be anywhere.   


*While the AVI code is still on your mind (and perhaps not to waste the endeavor), do you know off hand (or if it's feasible) for Dungeoncraft to be made to support looping an AVI?   The reason I ask is that DC doesn't support looping animations larger than small-pic; (as far as I can tell). I don't expect it will ever support palette animations, but if it did support looping video, then the FRUA palette animations could be imported as AVIs; as well as other animated GIFs, and animated PNGs  [*.aPNG]




Something so simple as the Phlan Deluge (from Pool of Radiance), is not simple at all in Dungeoncraft. The Phlan Deluge big-pic animation can be as few as six frames long... but to do the effect in the current Dungeoncraft is impossible.  DC won't use an animated Big-Pic sprite image, and a six frame AVI ends as soon as it starts; while a minute long video of just ten loops through the animation is as big as Dungeoncraft itself... (13 to 80 MB depending on codec)—and I couldn't get it to play in the engine anyway.


Looped AVI assets seems like a great solution. 

** Though... is there a particular reason DC does not support animated sprites as bic-pics or full screen?  Perhaps that could work instead? 
« Last Edit: September 09, 2017, 09:27:37 PM by Mechanaut »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9859
Re: Possible bug in the Playmovie / AVI event.
« Reply #9 on: September 11, 2017, 01:26:54 PM »
I would think that adding animation to bigpic would be far easier than adding AVI to all event types that currently support bigpics.

Also, you can load pretty much any size image in a smallpic, the main issue is that the uper left corner is in the viewport, not the upper corner of the 3D screen. If you have seen Dinonykos designs, he is using "larger" smallpics. I just did a test bigpic animation in the smallpic, and it worked just fine (except for the issue mentioned above).

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #10 on: September 11, 2017, 01:47:27 PM »
I would think that adding animation to bigpic would be far easier than adding AVI to all event types that currently support bigpics.
Good point... though I was thinking of only adding looped AVI specifically to the PlayMovie event; (a check-box as to whether it loops or not).


Does the engine allow dynamic changes to the frame during the game? (...like art swaps, and coordinate changes). Can one move the viewport during the game, or reposition the top-left for the video?
« Last Edit: September 11, 2017, 01:51:32 PM by Mechanaut »

Offline manikus

  • Skriptor
  • Administrator
  • Hero Member
  • *****
  • Posts: 9859
Re: Possible bug in the Playmovie / AVI event.
« Reply #11 on: September 11, 2017, 02:12:09 PM »
I would think that adding animation to bigpic would be far easier than adding AVI to all event types that currently support bigpics.
Good point... though I was thinking of only adding looped AVI specifically to the PlayMovie event; (a check-box as to whether it loops or not).
Oh, that makes sense. :)
I wasl already thinking about what does loop, took myself down a different path.

Does the engine allow dynamic changes to the frame during the game? (...like art swaps, and coordinate changes). Can one move the viewport during the game, or reposition the top-left for the video?
No and neither. When the bugs get squashed, I am going to ask Paul to add functions so we can change frames during play, but that still wouldn't allow coordinate changes during the game.
There is the special graphic which can be anything, anywhere on the screen and is dynamic during play. But, it does not support animation, per se.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #12 on: September 11, 2017, 03:08:29 PM »
There is the special graphic which can be anything, anywhere on the screen and is dynamic during play. But, it does not support animation, per se.
I was going to ask if that could be used to manually cycle animation frames via script, but I thought about it just 'painting' over the UI, and assumed that the ui would still react to mouse clicks.

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #13 on: September 11, 2017, 03:09:50 PM »
There is the special graphic which can be anything, anywhere on the screen and is dynamic during play. But, it does not support animation, per se.
I was going to ask if that could be used to manually cycle animation frames via script, but I thought about it just 'painting' over the UI, and assumed that the ui would still react to mouse clicks. (Perhaps meaning the player changes the selected character without realizing it.)

Offline Mechanaut

  • Full Member
  • ***
  • Posts: 146
Re: Possible bug in the Playmovie / AVI event.
« Reply #14 on: September 11, 2017, 03:10:13 PM »
There is the special graphic which can be anything, anywhere on the screen and is dynamic during play. But, it does not support animation, per se.
I was going to ask if that could be used to manually cycle animation frames via script, but I thought about it just 'painting' over the UI, and assumed that the ui would still react to mouse clicks. (Perhaps meaning the player changes the selected character without realizing it.)

 

anything