More Q's about Video

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

More Q's about Video

Post by Merk »

Sorry everybody -- I'm not really trying to take over the Hugo discussion. It just seems like I'm the only person asking questions right now. :)

Regarding video, I mentioned before that I solved the problem of having the video freeze on the last frame by showing a frame identical to the last frame, as a JPG. This was Kent's suggestion, and it worked great. Originally, though, I thought it might only work if not playing video in "background" mode -- because otherwise I wouldn't have any idea when the video ends, in order to show my still image afterwards. It turns out, though, that the video appears in front. So as long as I show the video and the image in the same window { } block, it works like a charm. When the video ends, the image remains "under" it. It's pretty slick.

So, my first question is this. Does that hold true on all platforms that support video? Will the media player appear in front, or are there platforms where it's actually embedded in the screen? I'm hoping that this trick will work, but I'm worried about other platforms.

Second thing -- because I'm playing video in the background, it continues to play at inappropriate times until it ends. I solved this by making a tiny 1x1 pixel AVI with one frame, basically an "blank" AVI. I play this, and it effectively kills whatever background video was previously playing. So.... again, does this hold true on other platforms, besides just Windows? Will starting a new AVI always end the one playing before?

Thanks,

---- Mike.

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

Post by Merk »

You know, it seems like I remember seeing something in the Hugo Book, regarding stopping video. Maybe I should re-check that, for my second question...

Roody_Yogurt
Posts: 2256
Joined: Mon Apr 29, 2002 6:23 pm
Location: Milwaukee

Post by Roody_Yogurt »

I think every Hugo person here thinks it's cool that someone's asking questions.

User avatar
Ice Cream Jonsey
Posts: 30193
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Post by Ice Cream Jonsey »

Roody_Yogurt wrote:I think every Hugo person here thinks it's cool that someone's asking questions.
Yeah, I don't get a chance to really read something on the forum that has more to it than "you're gay no you are" and you usually get an answer before I get home and can think about it. But definitely keep posting your questions. I'll probably run into all of them myself sooner rather than later.
the dark and gritty...Ice Cream Jonsey!

Merk
Posts: 192
Joined: Mon Nov 22, 2004 3:19 pm
Location: Wichita, KS
Contact:

Post by Merk »

It looks like the "STOP" command is for stopping background music. I didn't see anything for stopping background video. My work-around might be the right way of doing it? I guess as long as Hugo is only able to play one video at a time, then that would always work. But if there are any ports out there capable of playing more than one video at the same time, it may not...

Anybody run video-enabled versions of Hugo on a platform other than Windows? I could probably come up with a test program. :)

Kent
Posts: 119
Joined: Fri Jun 27, 2003 12:10 pm

Post by Kent »

I don't think you can be guaranteed that any video will play "in front" of an image behind it, but the way it works on all current platforms is probably the case. DirectX on Windows and QuickTime on the Mac, for instance, open an invisible child window to play the video in front of, and may use overlay to play video depending on the system, video card, driver, etc. BeOS similarly opens a child view to play the video in overtop of the current window.

The reason I say it's not guaranteed is because it's conceivable that someone could in the future on some currently unsupported platform like Linux, Pocket PC, Palm, etc., come up with some system for video playback that draws straight to the game canvas.

To stop video, try "video 0". Not very pretty: the current library routines for handling video are lacking. The FB source code contains some much better media handling code, especially for things like video.

Hugella2

Post by Hugella2 »

Perhaps the FB media handling code will be part of what you release? :)

Post Reply