Import/export Demos?

9 replies [Last post]
daimadoshi85
daimadoshi85's picture
User offline. Last seen 13 years 42 weeks ago. Offline
Joined: 2008-05-04
Posts: 372

Hey guys!I think that a little tool to import/export demos to/from hedgewars could be really a good thing. But I don't know if you can , for example, encode a hwd_27 file to a video file like avi. Do you think it's possible, developers?

Come to the dark side, we have cookies... - V

Hedgewars script for ubuntu is here...but maybe I have to update it first Smile

rbaleksandar
rbaleksandar's picture
User offline. Last seen 10 years 16 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

Already discussed. unC0Rr said that it's hell of a big work to do.

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

daimadoshi85
daimadoshi85's picture
User offline. Last seen 13 years 42 weeks ago. Offline
Joined: 2008-05-04
Posts: 372

Ok Wink Smiley

Come to the dark side, we have cookies... - V

Hedgewars script for ubuntu is here...but maybe I have to update it first Smile

unC0Rr
unC0Rr's picture
User offline. Last seen 16 weeks 2 days ago. Offline
Joined: 2006-11-27
Posts: 576

It's possible, but I don't feel like doing that. Basically, all you need is to force engine to render each 40th tick into an image, and then make a movie of them. I can add frames dumper easily. You'll just get tons of TGA files. Is it okay to you? Big Grin

rbaleksandar
rbaleksandar's picture
User offline. Last seen 10 years 16 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

Big Grin I don't think so. Smile But is it possible to integrate some kind of open source convertor that will gather them from the image dumper (maybe compress them automatically in some format which doesn't need too much space) and then - when the game's over - join them and make a GIF or FLV, or something like that(I don't think high quality is THAT necessary for a demo as long as you can recognize whut's goin' on on the screen)?

Something like that:

1)While game's runnin' with "record demo"-option enabled, store images in TGA (it'll be nice if you can store them in some other format Smile) in the image dumper.
2)When a new image is stored in the dumper, the converter is called to convert it in some other format (suitable for making video files). It also automatically removes the source, so that you don't get lots of MBs of a TGA-image and its converted variant.
3)When the game's over, HW will automatically call the converter to join all the images and build a demo-file from them, store it in the demo-folder and finally remove all source images, which were used for the demo.

Dunno how much power this whole procedure will need.

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

Smaxx
Smaxx's picture
User offline. Last seen 13 years 33 weeks ago. Offline
Joined: 2009-04-29
Posts: 391

It is possible (with OpenCV for example; actually working on something similar for university) but this would add even more overhead code/dependencies to the game most people won't use anyway. This would be done without writing seperate image files first - just the resulting AVI container.

Easiest "workaround": Use a screen recorder tool. Examples for Windows would be Microsoft's free Windows Media Encoder, Fraps, GameCam and many more. I'm sure there are alternatives for Linux and Mac as well.

nemo
nemo's picture
User offline. Last seen 24 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

To chime in with the linux solution.
My very favourite is the oh-so-clever.
http://recordmydesktop.sourceforge.net/about.php

Available as:
gtk-recordMyDesktop for GNOME/GTK
and
qt-recordMyDesktop for KDE/Qt

I recorded the hw bounce video on frontpage in it.
Just played back demo to part I wanted, hit pause in demo, clicked record in gtk-recordMyDesktop, unpaused, recorded the sequence I liked, then paused and halted recording again. I found results were best when I was running compiz - on my system at least.

Outputs a nice ogv that Firefox can play by direct link or HTML5 tag (or you can upload to youtube, whatever).

There's others I've used in past that can write to swf and such, but I do like this one best. Can convert it later if needed.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

rbaleksandar
rbaleksandar's picture
User offline. Last seen 10 years 16 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

Well, Smaxx and nemo, we all use screen capturing software, if we want to make it in a popular format. But the point is that it'll be much better to make the demos in such a way, so that they can be easily viewed on the web (for example) AND to remove the dependace on the game itself that is - you need the engine to run a demo.
Since I'm not into programming such things (I'm more of a micro-controller-dude), I can't give any big tips but what I think is possible and probably not that difficult is to take some open source converter, examine the code and "extract" the part we need for the game, and adjust it so that it can be fully functional. I'm not talking about anything fancy. Just having an AVI, or GIF, or FLV, or any other popular format you guys choose to use.

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

nemo
nemo's picture
User offline. Last seen 24 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

I like encouraging dependence on game. People should install it Big Grin

But anyway, reasons for it not happening have been covered. I suspect arguing further for it won't get much interest from folks here. Certainly no one stopping you from figuring it out yourself Smile

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

rbaleksandar
rbaleksandar's picture
User offline. Last seen 10 years 16 weeks ago. Offline
Joined: 2009-01-09
Posts: 685

Big Grin Ok, I get the point. Smile

HTML = How To Meet the Ladies

Here is my Unofficial Manual for HW. Hope you like it. Wink Smiley Still working on it. Don't worry. Will get it finished...Sometime in the future. Big Grin

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]