Playing videos in game

Started by stuh505, Tue 19/04/2005 01:23:34

Previous topic - Next topic

stuh505

If videos arent compiled into the executable, then players will likely view them outside of the game.  I don't want players to be able to view the final ending movie (for instance) just because they felt like it!  This reward must be earned.

Luckily, the PlayVideo command does not have any extension checking on the filename string parameter...so video files which have no extensions (or misleading extensions) can still be played.

However, Media Player does not really care if your video files are misnamed...so any so-inclined user wanted to, they could still play those video files without knowing what format they are in, without playing the game first.

Are there any clever solutions to overcome this?

(Before anyone suggests it, loading the frames as sprites is not a solution, because it would be a royal pain loading all those sprites, and you could not create an animation with more than 320 frames this way anyway, unless you linked together multiple views...it would just be horrible!)

Vince Twelve

I'm doing the same thing in my game.  I named the video file to "random string of letters and numbers".dat .  Of course, the players who don't care about fun can open them and watch them as long as they can figure out to open them with a media player, which is quite simple.

To add another layer of masking, create a folder called data or something.  I guess you could even make it a hidden folder.  In this folder, place the game executable, the confguration file, and the videos, and whatever else is needed to play the game, then have the player use a shortcut from a different folder to play the game/use the setup.  Something like:

Supergame (folder)
|-Supergame (shortcut)
|-Setup (shortcut)
|-Manual (txt/html/whatever)
|-Data (hidden folder)
| |-Supergame.exe
| |-Setup (for reals)
| |-01laf.dat (video file)
| |-(more video files and other files)


Of course, the curious and the non-fun-liking people can still break this, but it's their own loss.

strazer

What you could do is enable the resource splitting and hide the videos among those files:

game.exe
game.001
game.002
game.003 <- This is the video file

edmundito


Vince Twelve

Strazer and NetMonkey:  Devious and Deviouser.

...erm... let's say... respectively...

stuh505

Good idea, Strazer.  I didn't even know of resource splitting before!

Rui 'Trovatore' Pires

Great idea, strazer! Thanks, I've been wondering that myself. Not that I need it, but it sure is handy to keep in mind. :=
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Ubel

Excuse me strazer for this stupid question, but how do you exactly do it? Cause I have a 16 mb avi file in the game folder and I don't want others to see it. How do I use that recource splitting thing?

strazer

In the General settings pane, there's a checkbox called "Resource split every Mb:".
Check that and enter how many megabytes each part should have (16 for example, if your exe is big enough. This way, the users won't get suspicious based on the video's larger file size). Save your game, then rename your video so it looks like the last of the resource files.

Pablo_unplugged

Thanks. I'll try that later. :)

ildu

Relating to this:
What video compression should I use, so that it's both user-friendly and workable in AGS. I'm wanting to include a hi-res (768x576) vid in my game. Is DivX still too uncommon, or should I just use MPEG-2? How about .bik?

It's just that if I leave it to small compression, the video will take too much space.

strazer

For small videos, I would recommend using MPEG-1 actually, since that codec is included in Windows by default, so the user won't have to have any special codec installed.

But for larger videos, I think DivX or XviD are the most common. Just be sure to let the user know (in your game manual) that he has to have that codec installed.

stuh505

You might even just include the codec with the game if you go divx.  A lot of people don't have the divX codec and when you're playing a video and ou dont have it its ok to go download and then try again, but in the game, its only going to pop up once and if they get an error message you just made a video for nothing.

simulacra

I'd recommend XVid instead of DivX, because it is open source. (Also, you don't have to distribute spyware with your game.)

I actually use FLC for all video sequences in my game (so far: 6), since the colour depth has less importance in moving pictures than in still images. It depends, of course on how the pictures look. A setting sun wouldn't do good in 256 colours.

ildu

Yeah, I do need good resolution and good color depth. Maybe I'll use divx or xvid. Has anyone tried .bik videos?

FractalCore

DivX doesn't have "spyware". Just because you have to pay for the pro features and they pack extra crap in there, doesn't mean they're including spyware.

scotch

It used to contain adware, and now it doesn't, I think.

Candle

Stay away from the china packs they have the most spyware.
Good place to get them from.
http://www.free-codecs.com/

SMF spam blocked by CleanTalk