TIGSource Forums

Community => Versus => Topic started by: Troshinsky on February 08, 2011, 02:15:28 PM



Title: Low Bitrate Fighters (FINISHED)
Post by: Troshinsky on February 08, 2011, 02:15:28 PM
Hi,

I´m joining the competition with a two player fighting game made out of videos of real street fights found around the net. It´s called "Low Bitrate Fighters".

(http://www.troshinsky.com/lbftest01.jpg)

Each fighter´s video takes one half of the screen. As fighters get physically destroyed, the video quality gets digitally destroyed: with every hit taken the video quality lowers, so the quality of the video serves as life counter.

Here some new tests using ffdshow codec and quicktime graphic compression:

(http://www.troshinsky.com/compressiontest2.jpg)

I´ll be using this one.

Gameplay will be as stupid and as skillful as a street fight can get: Players only have one attack button. To avoid the opponent´s hit all you can do is to hit back within half a second. The first who stops punching will get hit.

Will test this and maybe add some more rules, but the point is not really about making it fun to play. I will also experiment with overlaying videos, not sure how it will look like but I´ll keep it really simple.

Guess I will spend most of the time compressing video over and over. ¿Anybody has an idea of a practical way for doing this? ¿Anybody knows a codec that excels in detroying the immage?

EDIT:

Added some randomness, so when both players are desperately trying to hit each other there are some chances that someone will get hit. Also, if both players keep fighting without hitting each other they will be separated.

FINISHED:

-Added some more videos, would have loved to put even more, but it's too much work and the game is getting really big already.
-Inversed the control scheme: left player punches with the "0" numpad key, right player punches with the left "control" key. This way players have to physically invade each other's space.
-Fighters heal if they stop to catch their breath for some seconds.

I think the idea is funnier than the game, but I'm still happy with the experiment.

Download here:

http://gamejolt.com/freeware/games/arcade/low-bitrate-fighters/4539/

Windows, 127.Mb


Title: Re: Low Bitrate Fighters
Post by: XRA on February 08, 2011, 04:33:36 PM
i like the concept :)  I've wondered about a practical way to achieve compression artifacts too, i'd say maybe a pixel shader could be used but that depends on what tools you're using to build the game and also shader writing knowledge.

One option might be to look at GIF animation tools that have a Lossy option, GIF isn't supposed to be lossy, but by rearranging the pixels there are ways to make them compress more.. Lossy compression on gif has an effect sort of like a VHS tape with poor tracking, where certain colors/pixels start to scatter off horziontally.

My favorite type of compression artifacts are when streaming video messes up and keeps a still blocky image that distorts based on motion vector information.  If you have ability to write to surfaces/images maybe you can do some kind of emulation of that.. I know I've seen plugins for video players that overlay a grid of lines which show the motion of pixels in the video.


Title: Re: Low Bitrate Fighters
Post by: Troshinsky on February 08, 2011, 05:13:40 PM
Yeah, that last artifact you talk about is defenitely the best one, but I have no idea how to achieve that. There is this music video that explores that in very interesting ways:

http://www.youtube.com/watch?v=3pU9oAIFLcY (http://www.youtube.com/watch?v=3pU9oAIFLcY)

I also saw some experimental short film that played with broken immages. They burned the video on a cd, then scratched the cd, then captured the broken video and repeated the process several times. It was beautiful.

I have no programming skills (I use Multimedia Fusion 2), so it´s impossible for me to write custom shaders. What I was planning is to reencode each video clip several times and save them as .mov files. Then make the game access the files. It´s not difficult, just long.

I will have a look to that gif compression too, could be interesting.

EDIT:

Just found this one:

http://www.youtube.com/watch?v=7Z_H7gUxSL4 (http://www.youtube.com/watch?v=7Z_H7gUxSL4)

Really beautiful.


Title: Re: Low Bitrate Fighters
Post by: XRA on February 08, 2011, 06:26:21 PM
that second one is great!  reminds me a bit of the film Decasia..except in digital form.  

You definitely would need to have a way to compare the general movement of pixels in the current frame to the last, it is probably just done with the luminance information too. It would see how much pixels have moved (roughly) and use that information to then reposition the pixels of another image or frame of video.
It might involve sampling larger areas of the image and averaging what you're sampling, comparing it to neighbor samples.. I think in video compression those are macro-blocks, kinda guessing, but there might be documents about that online.  

It's an effect I really want to make work in shader form, but I don't know enough about shaders yet or the math behind getting the motion vectors.   I think it could also be related to what goes on in the motion compensation filter/plugins that are available.


I did just find this thread which has some links related to the effect though,
http://forum.doom9.org/showthread.php?t=150467
It seems that at least working with video you can split the motion data from the image data and apply that information to other image sources...
here is another page that came up,
http://spench.net/drupal/research/mv

*edit*
http://en.wikipedia.org/wiki/Motion_compensation


Title: Re: Low Bitrate Fighters
Post by: Troshinsky on February 09, 2011, 03:26:12 AM
Thanks!

Very, very interesting...

Have to look into mpeg2 compression then. I wish they shared that hacked codec on spench.net, it´s exactly what I would need.

The thing is that right now, what I can achieve is to compress each individual video. Ideally, what could be really awesome, is that as different video clips appear one after another they would keep the last frame from the last video and apply the motion compensation of the current one. Unfortunately this is too far away from my skills, I would need a crazy programmer...

Will get back into compression testing see what I can find.

EDIT:

Aha! Found a tutorial:

http://www.youtube.com/watch?v=tYytVzbPky8&feature=related (http://www.youtube.com/watch?v=tYytVzbPky8&feature=related)


Title: Re: Low Bitrate Fighters
Post by: Troshinsky on February 09, 2011, 07:38:00 AM
Been doing some tests mixing ffdshow motion compensation, quicktime, and cinepak compression and it´s not bad.

Although I would prefer colours going mad instead of going to grayscale. Have not found a way for this other than recompressing a houndred times with cinepak, which is way too long and tedious.

If only I could make the game open a video which contains just the vector movement information and apply it over the last frame of the last video in real time...


Title: Re: Low Bitrate Fighters
Post by: Troshinsky on February 13, 2011, 08:45:43 AM
First playable version available:

http://gamejolt.com/freeware/games/low-bitrate-fighters/files/low-bitrate-fighters/download/4539/6057/

I am going to add more videos so you don´t have the same ones constantly looping, although I´m not sure if I´ll be able to do that before the deadline, as the encoding process is rather long. This might end up being the competition version... we´ll see.


Title: Re: Low Bitrate Fighters (FINISHED)
Post by: Troshinsky on February 22, 2011, 06:24:15 PM
Finished!


Title: Re: Low Bitrate Fighters (FINISHED)
Post by: Pierrec on March 01, 2011, 04:14:11 AM
Doesn't work for me, because I haven't any numpad on my keyboard... :concerned:
It looks so good...


Title: Re: Low Bitrate Fighters (FINISHED)
Post by: Troshinsky on March 05, 2011, 01:38:18 PM
"delete" key works too!