Phantasmagoria Interface

Started by Vincent, Wed 22/06/2016 01:06:17

Previous topic - Next topic

Vincent

Good evening to all AGSer.

I'd like to ask you if there is a way to run a video in a 'windowed' mode ?
or better to say, there is a way to have an interface like Phantasmagoria 1 in Ags ?
I'd like to run a video but keep the interface at the bottom of the screen constantly.. (roll)
Some of you know how to do that ?
I notice that when you play a video it take all the screen (anyway) to play it  (roll)

Mandle

Yes...these is a plugin that does exactly that...I don't remember the name just at the moment, but I used it in my "Feng Shui And The Art Of TV Reception" game, so if you download that you'll see the plugin in the game folder I believe...

Sorry for the vague reply, but I'm just heading out to work...

Vincent

This is really nice to hear Mandle, thank you very much for the quickly reply :)
I must have to check this out tomorrow and see how the plugin work properly :)
Thank you a lot again :)


Vincent

#4
I owe you one Khris, thank you very much :)

Hi guys I am trying to use the plugin as well but I am not really sure how to get it to work properly...
I have try to follow the code examples but I am getting the same error anytime (null pointer reference)

I have imported a graphic interface to keep constantly at the bottom of the screen within a Gui.
I would like to know how do I can play the video with the plugin ?
This is how my code look now but I don't understand how to get it to work..

Code: ags

Theora * video;

function room_Load()
{
  mouse.Mode = eModeInteract;
  
  video = Theora.Open("SEQUENZA_2.avi");
}

function hHotspot1_Interact()
{
  hHotspot1.Enabled = false;
  //PlayVideo("SEQUENZA_2.avi", eVideoSkipAnyKeyOrMouse, 11);

  // Here is were I get the null pointer error when I try to use the plugin commands
  // Still, not sure what to do exactly...
  // Here is were the video should run...

  hHotspot2.Enabled = true;
}

Khris

#5
This plugin only works with actual theora videos, as in *.ogv
You can use ffmpeg2theora to convert them.

You also need to manually advance and draw the video frames in repeatedly_execute, as shown right in the plugin's thread. Not sure what example code you're referring to, try the one in the very first post of the thread.
(To play the video, call video = Theora.Open("SEQUENZA_2.ogv");, this will "activate" the rep_exe code.)

You're probably getting a NPE because Theora.Open() called on a non-ogv returns null.

Vincent

#6
Thank you very much, Khris for the explanation :)

I didn't thought that the plugin was only for *.ogv format, sorry. :(
Anyway, I have another small video on my comp it has *.ogv format, I have try to test this new video..
But I keep get the same error anytime.. :(
So, I am doing something like this :

Code: ags

Theora*video;

function room_Load()
{
  mouse.Mode = eModeInteract;
  
  video = Theora.Open("Intro.ogv"); // this should call the rep_exe event...
}

function room_RepExec()
{
  // all of this doesn't run...
  if (video)
  {
    Display("ok"); // <---- doesn't show
    video.Draw(DsBackground, 0, 260, RtScreen); // nothing
    video.NextFrame(); // nothing
  }
}

/*If I simply do something like this, I will get the error in the same way (NPE)*/

function room_RepExec()
{
  Display("ok"); 
  video.Draw(DsBackground, 0, 260, RtScreen);
  video.NextFrame();
}


Do you think there is something wrong with the video or I am simply doing it in the wrong way ?
Also, what do you mean about 'You need to manually advance and draw the video frames' ?
It is something that do the plugin by calling (Draw, DrawEx) ?



:EDIT: I am sorry Khris, I have return here to say that it's all working very much good now !!!! :)
The new video in *.ogv format was not running because it was placed in the wrong folder...
Thank you very much again for your support !!! :)

Khris

What I meant by draw and advance it exactly what you have in lines 16 and 17, yes :)
Glad it's working!

Vincent


KyriakosCH

I personally use characters and extensive views to do this -- have a 'video' (character animation, but it is the same frames) ;)
This is the Way - A dark allegory. My Twitter!  My Youtube!

SMF spam blocked by CleanTalk