Possibly the dumbest question ever

Started by Joseph, Thu 15/10/2009 23:02:54

Previous topic - Next topic

Joseph

Hi fellow SmurfMunchers,

This could possibly be the stupidest question ever posted on the AGS forums:

What would be "better" for displaying a cutscene, an actual movie file (like avi, for example) or creating a View with the individual frames of the movie inside a loop and putting that View into a GUI...?

Im guessing the view with sprites looping could be heavier than just playing the movie, right?

Why would one use one of those methods versus the other?

Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

Virgil

No, there have been dumber questions, and in the past day or two as well. I would think you would have more control with a movie with timing and pauses, instead of just plain frames. It'll also be easier just to make the movie than going in with sprites and doing trial and error.. I would think anyway.

Khris

I guess using an avi will take up much less space than individual sprites.
The only advantages of the sprite method I can see is you could pause the movie at any moment, play it backwards, twice as fast, etc. and prevent people from watching it without playing the game.

It depends on the length; I guess you'd need 20 sprites per second, so five seconds equals one hundred sprites.

You don't need to put them in a view by the way, just change the GUI background to the next frame, then Wait(2).

Joseph

Ah didnt know we could do it by changing the GUI background instead of a view...

...whats faster, using a View with a loop of sprites and animating that on the GUI, or changing the GUI background's image over and over and putting a Wait(2) in between each change?

Im guessing both methods would be just as fast?

Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

monkey0506

GUI's don't have an animation function directly. GUI Buttons do.

Both methods should be completely comparable given the same sprites.

Gord10

Another solution for individual GIFs is to use

Code: ags

int i = StartFrame;
while(i<LastFrame) 
{
object[2].Graphic = i;
i++;
}


for a certain room object that's going to be used as the video displayer. StartFrame and LastFrame are the numbers in the Sprite Manager, so you don't need to prepare them as views.

For sounds, you can add the
Code: ags
 if(i==CertainFrame) PlaySound(2);

conditions into the loop.

Another advantage of using this system could be the quality of the video, as it's not going to be compressed (I'm not sure of this, making the frames GIF's may decrease it more than AVI's), but I guess the main advantage is frames being controllable.
Games are art!
My horror game, Self

Joseph

Ah I see...this is all very very cool stuff, people. Ill use your suggestions and see what I can do.

HOWEVER, well Ive got the 2nd dumbest question then, and it goes a little somthing like this:

**How in the "h-e double-hockey sticks" can I make "Display" function non-blocking?**

I wish there was a flag in the Display function that says "non-blocking"...that way animations can continue running, etc...

Ive got an animated GUI and when I click on something that I want to display text, the GUI's animation stops until I click the message away. Its pretty caca.

I am aware of making a gui for  that text message, and displaying it as a button or something, but if I have lots of display messages to do while that GUI is animating...thats a lot of work creating all those messages as sprites...

Is there a way to do this, or perhaps some module Im unaware of ?

Ill continue searching though, not wanting to piss anyone off :P
Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

NsMn

Simply make your own GUI and Label and set its text to the speech that should be displayed. It would be hard if the text window GUI should change its size, but that's the only way to do it.

monkey0506

Quote from: NsMn on Fri 16/10/2009 18:19:46It would be hard if the text window GUI should change its size

You mean something like:

Code: ags
function CustomDisplay(String text) {
  gDisplay.Visible = false;
  if (String.IsNullOrEmpty(text)) return;
  lblDisplay.Width = MAX_WIDTH;
  int width = GetTextWidth(text, lblDisplay.Font);
  if (width > lblDisplay.Width) width = lblDisplay.Width;
  else lblDisplay.Width = width;
  int height = GetTextHeight(text, lblDisplay.Font, width);
  lblDisplay.Height = height;
  lblDisplay.X = 5;
  lblDisplay.Y = 5;
  lblDisplay.Text = text;
  gDisplay.Width = lblDisplay.Width + 10; // 5px padding on each side
  gDisplay.Height = lblDisplay.Height + 10;
  gDisplay.Centre();
  gDisplay.Visible = true;
}


Doesn't seem too difficult to me. ::)

NsMn

Sure, but a text window has Border graphics, don't forget about that  ;)
Of course, it's possible, but that would end up in a huge code with DynamicSprites, Drawingsurfaces and other stuff. Beastly.

Joseph

Well is it possible for a CustomDisplay module?

It will behave exactly like a normal display, but it doesnt block...

We could even have the border sprites (like top left, top middle, top right, etc) and it resizes depending on the size of the message...

Is it possible?

I would certainly post nasty nude pics of myself in return :) **
Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

NsMn

Of course it is possible... Give me time til tomorrow, I'll see what I can come up with  ;)

Joseph

QuoteOf course it is possible... Give me time til tomorrow, I'll see what I can come up with

Wow! :o

You are one cool sumovabeetch!!

Thanks NsMn
Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

NsMn

Okay, could  take longer. Getting the GUI's dimensions is going to be a bit complex...

Scarab

Quote from: Joseph on Fri 16/10/2009 22:21:23
Wow! :o

You are one cool sumovabeetch!!

Thanks NsMn

Nah, He just wants to see you naked, the randy dog :P

Joseph

Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

Joseph

Any news on this super-fantastic-happy-candy-is-sweet-BlueSunshine-rainbow-glitter module?

ps: It would be great if the actual module could be named as above  ;)
Spread the love...One.Turtle.At.A.Time.
http://www.youtube.com/watch?v=y0A77rohcyg

SMF spam blocked by CleanTalk