|
|
Re: How to Record a Demo
[Re: GhostwriterDoF]
#67603
03/30/06 08:44
03/30/06 08:44
|
Joined: Oct 2003
Posts: 560 Germany / NRW / Essen
Shinobi
OP
User
|
OP
User
Joined: Oct 2003
Posts: 560
Germany / NRW / Essen
|
Another thing i forgot to Point out is , you dont have to use while(1); in your recording and playing functions loop , you dont have to save every tick . Better for the performance would be 3 or more . Best for me and my slowly Computer is for example wait(3);
function demo_record()
{ if(demo_mode!=0){return;} // if we already recording or playing , end here demo_mode=1; counter=0; start_timer(); filehandle=file_open_write("demo.DEM"); str_cpy(show_info.string,"Recording Demo !!"); while(demo_mode==1) { file_var_write(filehandle,player.pan); file_asc_write(filehandle,13); file_var_write(filehandle,player.x); file_asc_write(filehandle,13); file_var_write(filehandle,player.y); file_asc_write(filehandle,13); file_var_write(filehandle,player.z); file_asc_write(filehandle,13); file_var_write(filehandle,speed.x); file_asc_write(filehandle,13); file_var_write(filehandle,speed.y); file_asc_write(filehandle,13); file_var_write(filehandle,speed.z); file_asc_write(filehandle,13); counter+=1; wait(1); // wait(3); for slower Computer play with 3 } file_close(filehandle); str_cpy(show_info.string,"Stoped Recording !!"); }
Dont forget to change Both functions , recording and for Playing
if you want the demo to play Faster as recorded so let it (1) in play function and maybe (2) or (3) while recording .
if you want the demo to play in slow motion so let i (3) in play function and maybe (1) or (2) while recording.
|
|
|
Re: How to Record a Demo
[Re: Shinobi]
#67604
03/30/06 18:32
03/30/06 18:32
|
Joined: Aug 2005
Posts: 343 Germany
HPW
Senior Member
|
Senior Member
Joined: Aug 2005
Posts: 343
Germany
|
It's better to use waitt(1) instead of wait(1) to solve speed problems, isn't it?
Evil Blood (v. 0.52) RPG Commport.de (Social Network Community)
|
|
|
Re: How to Record a Demo
[Re: Shinobi]
#67608
03/30/06 22:52
03/30/06 22:52
|
Joined: Aug 2005
Posts: 343 Germany
HPW
Senior Member
|
Senior Member
Joined: Aug 2005
Posts: 343
Germany
|
Sorry, I don't know this is old syntax. I still have A5 not A6, but waitt(1) or <?>wait(-1)<?> working with time instead of frames.
With the functions from conitec we can only record the user inputs, this means we can as example only record the player actions but what's with the npc actions?
Last edited by HPW; 03/30/06 22:57.
|
|
|
|