Recording and Replaying Arma Games

What do you want to see in Armagetron soon? Any new feature ideas? Let's ponder these ground breaking ideas...
User avatar
nicolas.b
Grid Clown
Posts: 1718
Joined: Sun Jan 18, 2004 7:18 am
Location: west philly Quotation: "Everybody's stuck being a moderator, but me. Sweet!"
Contact:

Recording and Replaying Arma Games

Post by nicolas.b »

i brought this idea up a couple years ago:
http://forums.armagetronad.net/viewtopic.php?t=543

has any progress been made or interest been shown lately in this concept?

one thing it would be nice to do is to re-render/replay really legendary or amazing rounds. the replays could then be turned into small movies (avi, mpg, mov...) to share online so as to introduce non-arma players to what a great game this is. i'd love to send more people towards arma if i could, but describing the game for people who are unfamiliar with "tron" can be a pain in the arse. this would be a great tool for that purpose, as well as for simply studying, planning and refining technique for the current arma players.

fellow arma players wouldn't need the movies- since they already had arma installed all they would need would be the (smallish?) data files for the rounds in question.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

armagetronad --record yourfile.aarec

It's in 0.2.8. There are problems with compatibility between versions since all it does is capture the input, but I expect those to be worked out in time. It's used for debugging right now.
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Post by Luke-Jr »

And I committed code a few months ago to output video. The catch is you need to compile your client to run at a fixed framerate regardless of GPU capabilities. Which means if your video card can't do at least 30 fps, you'll have glitches.
User avatar
nicolas.b
Grid Clown
Posts: 1718
Joined: Sun Jan 18, 2004 7:18 am
Location: west philly Quotation: "Everybody's stuck being a moderator, but me. Sweet!"
Contact:

Post by nicolas.b »

> It's used for debugging right now.

most excellent. any plans to take this a step further so as to be able to replay sessions within the user client?


> And I committed code a few months ago to output video.

sweet. is this in the current release then? do the movies include sound? are there notes and specs on how to proceed in the sourceforge documents?


also, does this mean people have used this to make some videos? are there arma videos floating around somewhere on the net to show people?
User avatar
Jonathan
A Brave Victim
Posts: 3391
Joined: Thu Feb 03, 2005 12:50 am
Location: Not really lurking anymore

Post by Jonathan »

--playback file

Luke: there shouldn't be a problem if fixed time intervals are used.
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

nicolas.b wrote:also, does this mean people have used this to make some videos? are there arma videos floating around somewhere on the net to show people?
  • Some google videos
  • I made these long ago… (pre-0.2.7.1).
  • I remember somone else posting a link to a video on the forums… probably more out there.
Luke-Jr
Dr Z Level
Posts: 2246
Joined: Sun Mar 20, 2005 4:03 pm
Location: IM: [email protected]

Post by Luke-Jr »

nicolas.b wrote:> And I committed code a few months ago to output video.

sweet. is this in the current release then?
Not sure if it make 0.2.8, but it's almost certainly in all 0.3 releases.
nicolas.b wrote:do the movies include sound?
Nope. It outputs raw uncompressed, unformatted video frames.
nicolas.b wrote:are there notes and specs on how to proceed in the sourceforge documents?
Nope, just the commands I use. To build a client for use with --record, you need:

Code: Select all

make CXXFLAGS='-DFIXED_FRAMERATE=29.97 -DFIXED_FRAMERATE_PRIORITY'
Actual video-generation client should work without these compile flags. To write a MPEG-4 file, use:

Code: Select all

armagetronad --videoout --playback aademo.aarec --benchmark | mencoder - -demuxer rawvideo -rawvideo w=640:h=480:format=rgb24:fps=29.97 -o aarec.avi -of avi -ovc lavc -lavcopts vcodec=mpeg4:vhq
Note that if you plan to use software rendering to make video, you will need to hack with some stuff to prevent it from lowering the detail settings. If you use your video card's hardware rendering, it should work as usual. Video rendering from an AA recording does not need to be in realtime.
I would like to change details to the absolute max quality for video rendering, but I haven't stumbled upon a simple way yet.
nicolas.b wrote:also, does this mean people have used this to make some videos? are there arma videos floating around somewhere on the net to show people?
I made a few, but if they're floating anywhere you'll need to dig ;)
User avatar
Your_mom
Match Winner
Posts: 653
Joined: Sun Jun 06, 2004 1:45 am

Post by Your_mom »

I like the 1 minute google video with the guy losing against the bots in a local game at 9 fps. Classy.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

Any reason there isn't anything on the wiki for how to use this?
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

I didn't put it on the wiki because it's in the included documentation.
User avatar
Lucifer
Project Developer
Posts: 8640
Joined: Sun Aug 15, 2004 3:32 pm
Location: Republic of Texas
Contact:

Post by Lucifer »

I was talking about this, sorry if it wasn't clear:
Luke-Jr wrote:
nicolas.b wrote:> And I committed code a few months ago to output video.

sweet. is this in the current release then?
Not sure if it make 0.2.8, but it's almost certainly in all 0.3 releases.
nicolas.b wrote:do the movies include sound?
Nope. It outputs raw uncompressed, unformatted video frames.
nicolas.b wrote:are there notes and specs on how to proceed in the sourceforge documents?
Nope, just the commands I use. To build a client for use with --record, you need:

Code: Select all

make CXXFLAGS='-DFIXED_FRAMERATE=29.97 -DFIXED_FRAMERATE_PRIORITY'
Actual video-generation client should work without these compile flags. To write a MPEG-4 file, use:

Code: Select all

armagetronad --videoout --playback aademo.aarec --benchmark | mencoder - -demuxer rawvideo -rawvideo w=640:h=480:format=rgb24:fps=29.97 -o aarec.avi -of avi -ovc lavc -lavcopts vcodec=mpeg4:vhq
Image

Be the devil's own, Lucifer's my name.
- Iron Maiden
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

I took a try at adding video recording to the Mac OS X client. I ran into a small problem:

Code: Select all

- (void)addFrame:(void *)d length:(int)length
{
    NSData * data = [[NSData alloc] initWithBytes:d length:length];
    NSImage * image = [[NSImage alloc] initWithData:data];
    
    if (image == nil)
        NSLog(@"problem! image is nil");
	…
}
image is always nil — data however is fine. I'll try to look into it, but I don't know if I feel like taking it any further.
Attachments
video_recording.patch.not.gz
patch against trunk
(18.04 KiB) Downloaded 294 times
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Post by dlh »

nemostultae wrote:I took a try at adding video recording to the Mac OS X client. I ran into a small problem …
Fixed it. Still some problems — like the video only playing back in Quicktime, and not VLC. The performance is quite bad, too.

http://generalconsumption.org/tmp/recording.mov
Attachments
recording2.patch.not.gz
(19.78 KiB) Downloaded 318 times
User avatar
one™
Posts: 1
Joined: Fri Sep 08, 2006 1:32 pm
Location: right here right now

?

Post by one™ »

I have a mac and i checked the generalconsumption recording but it doesnt play.

Am I right in thinking, you are trying to write a program which converts the recording files of armagetron into something like a quicktime-readable format?
seriously™
User avatar
dlh
Formerly That OS X Guy
Posts: 2035
Joined: Fri Jan 02, 2004 12:05 am
Contact:

Re: ?

Post by dlh »

one™ wrote:I have a mac and i checked the generalconsumption recording but it doesnt play.

Am I right in thinking, you are trying to write a program which converts the recording files of armagetron into something like a quicktime-readable format?
I don't know why it won't play on your computer — are you running 10.4 or 10.3? (10.4 here). The program (that is, Armagetron) creates a video while you are playing. You could also create a recording and play that back to create the video.

I don't think I'll commit this stuff because:

a) it is slow
b) only plays backs in quicktime — I've tried other formats too.
c) only works on 10.4, so I'd be dropping 10.3.9 users.
Post Reply