Incorporating a video intro into a T3D Game?
by Mike S · in Technical Issues · 08/24/2011 (12:29 am) · 7 replies
Hi there,
Just wondered if it is possible to incorporate a video at the beginning, or at various parts (Levels) of a Game? Any good resources I can look at to do?
#2
08/24/2011 (10:23 am)
Only to inform that U can easily capture u r game play and world editing video by using recordMovie().it is a stock function located core/scripts/client/screencapture.cs.no need of fraps.so it can be said u also will be play.using webkit u can play streaming. video on u r object's surface.these r common info.just search in resource section.
#3
This is not entirely what I want, but somewhat in the spirit of what I want to head towards, just embedded within the game play (body) itself.
08/25/2011 (1:28 am)
Very helpful to know Muzaheed, but not sure if you know what I'm suggesting here. Think Tomb Raider here, but with various parts of the puzzle with hints, done as short video sequences. This is not entirely what I want, but somewhat in the spirit of what I want to head towards, just embedded within the game play (body) itself.
#4
08/25/2011 (3:52 am)
You would need theora ogg video's, a number of gui's, and some scripts to pull it all together. The gui plays the video, the scripts tell torque when to push the gui and when to remove them. Ted's suggestion is the best here.
#5
was not feeling to tell anything else about playing video in game.bcz,ted has told what to do.if still u have not found solution then go to gui editor->select "MainMenuGui"->go to library tab from right side window->images->GuiTheoraCtrl->place in main menu->go gui tab->select GuiTheoraCtrl->from properties do this:
matchVideoSize->deselect
stopOnSleep->select
then,file->save
done.
now write u r script and place them in proper function u want:
gamescriptsservergameCore.cs
or
gamescriptsservergame.cs.
if i found time i will post a script for olaying video at beginning of a misson
08/25/2011 (4:02 am)
here i was saying if u need to capture video from t3d.then u have to do what i written.bcz,there is no description about this.was not feeling to tell anything else about playing video in game.bcz,ted has told what to do.if still u have not found solution then go to gui editor->select "MainMenuGui"->go to library tab from right side window->images->GuiTheoraCtrl->place in main menu->go gui tab->select GuiTheoraCtrl->from properties do this:
matchVideoSize->deselect
stopOnSleep->select
then,file->save
done.
now write u r script and place them in proper function u want:
gamescriptsservergameCore.cs
or
gamescriptsservergame.cs.
if i found time i will post a script for olaying video at beginning of a misson
#6
but it have some problem in using check()?
i have asked for a solution here:
http://www.garagegames.com/community/forums/viewthread/127522
08/27/2011 (5:28 am)
here is my code(videoLayer.cs)://--- OBJECT WRITE BEGIN ---
%guiContent = new GuiTheoraCtrl(videoLayer) {
backgroundColor = "0 0 0 255";
playOnWake = "1";
stopOnSleep = "1";
matchVideoSize = "0";
renderDebugInfo = "0";
transcoder = "Auto";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
horizSizing = "windowRelative";
vertSizing = "windowRelative";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "1";
};
//--- OBJECT WRITE END ---
function playVideo(%file)
{
videoLayer.theoraFile=%file;
Canvas.pushDialog(videoLayer);
}
function check()
{
if(!videoLayer.isPlaybackDone())
{
echo("playing");
$d=schedule(2000,0,check);
}
else if(videoLayer.isPlaybackDone())
{
//cancel($d);
echo("stopped");
Canvas.popLayer();
//Canvas.popLayer(1);
//Canvas.popLayer(0);
//videoLayer.delete();
//videoLayer.deleteAllObjects();
//Canvas.popDialog(videoLayer);
//Canvas.pushDialog(PlayGui);
}
}
function videoLayer::onWake(%this)
{
echo("waking");
echo("going to play"@videoLayer.theoraFile);
//check();
}
function videoLayer::onSleep(%this)
{
//videoLayer.theoraFile = "";
echo("going to sleep with"@videoLayer.theoraFile);
}
function videoLayer::onStop(%this)
{
echo("why i never called!!!!!!!!??????????");
}but it have some problem in using check()?
i have asked for a solution here:
http://www.garagegames.com/community/forums/viewthread/127522
#7
08/27/2011 (8:55 pm)
Wow, thanks for the code - nice Muzaheed, and thanks too Mike!
Torque 3D Owner Ted Southard