Hello all,
I developing a ‘Pick-Up Stick’ game. I would want to record a short video from the main camera,When the player starting an action, So he could see he did something wrong…
I searched this problem on the internet but i couldnt find any suggestions to the problem.
Hi, you would probably be better off just recording the locations/rotations/etc. of your game objects that are involved and then just use that data to do a replay rather than trying to record an actual video… kinda like how the demos work in Half Life/CS/etc or Halo or probably any other game.
Hi,
The link you gave me is quite great! but i got 2 problems…
How do I reload those picture at the same order?
How do I save them in the place where the game export?
I mean when I build and export him to someone else, where can i be sure the save will be saved?
you can make a waypoint like system, and store all the critical events and the time they occur, then use the same scene with the ‘waypoints’ and the events you store in some structure or class or whatever fits your needs.
should be same thing, but beware of the physics engine >:) mwhahaha
I thought about a solution what will fix for both and i got the Queue.
By using system.Collections.Generic I can use Queue,There the pictures will be saved and I could see the pictures in the same order
But like always i got a problem…
which type is CaptureScreenShot? and how can i change them to texture2d or anything I can show?
thank you for your help
thank you for reply…
WWW downloads the picture from the path I gives it, but the problem it is slow, very slow for 200 in a sec, so it take too many time to do it.
this is the code i gave to load the pictures
public void LoadImages(){
Queue<Texture2D> tempvidoe=new Queue<Texture2D>();
working=true;
//loading the picture from the path
while(CurrectlyIncrement<imageIncrement){
if(temp.isDone){
temp=new WWW(Application.dataPath+myString + "_" + CurrectlyIncrement + ".png");
kindaVidoe.Enqueue(temp.texture);
lastFrameTime = Time.time;
CurrectlyIncrement++;
}
}
//show them on gui
while(kindaVidoe.Count>0){
temp2=kindaVidoe.Peek();
tempvidoe.Enqueue(kindaVidoe.Dequeue());
}
//returning them to the main queue for replays
working=false;
while(tempvidoe.Count>0)
kindaVidoe.Enqueue(tempvidoe.Dequeue());
}
If you’re trying to implement a “replay” feature that is probably the worst way to go about it for the exact reason you just pointed out. That and long games would literally eat someone’s hard drive.
so what are you suggest? to record the locations and the roatation and all this for just a reply?
Is there a code which save all teh gameobject locations and ratations?
and How do i will load it? just to put for each gameobject the location he is doing?
thanks by the way for your help… I wouldnt know what to do else