←  Media

ComputerCraft | Programmable Computers for Minecraft

»

Move Your Feet video in ComputerCraft - Vi...

CrazedProgrammer's Photo CrazedProgrammer 03 May 2015



This is a full music video playing in ComputerCraft.
Download: http://www.mediafire...1eaczwnd4n/demo
I've sped the Minecraft footage up 2.5 times and I've put the music behind it.
The demo will run at 20fps on a normal screen and at 10fps or more on a 0.5 scale 8x6 block Advanced Monitor (184x81 pixels).
The renderer is powered by the Surface API 1.5.3.
It's 30.7 MB, so I couldn't upload it to Pastebin.
To run this demo, you must first set the maximum drive space to at least 33 MB in the file %appdata%\.minecraft\config\ComputerCraft.cfg:
I:computerSpaceLimit=100000000
Then simple copy and paste the file into your ComputerCraft computer folder and run the file.

Move Your Feet original music video: https://www.youtube....h?v=R54ndOpLYIc
Edited by CrazedProgrammer, 03 May 2015 - 09:49 PM.
Quote

Exerro's Photo Exerro 03 May 2015

This is by far the coolest thing I've seen done in CC. I mean Bomb Bloke's GIF renderer was awesome, but this has music with it! You've turned a video you liked (judging by your YouTube channel) into a video that can be played with no lag inside CC. Awesome!
Quote

CrazedProgrammer's Photo CrazedProgrammer 03 May 2015

View Postawsumben13, on 03 May 2015 - 12:22 PM, said:

This is by far the coolest thing I've seen done in CC. I mean Bomb Bloke's GIF renderer was awesome, but this has music with it! You've turned a video you liked (judging by your YouTube channel) into a video that can be played with no lag inside CC. Awesome!
This doesn't have music with it, I put it on the YouTube video.
But thanks nevertheless!
It's really fun to test the boundaries of ComputerCraft.
Quote

Bomb Bloke's Photo Bomb Bloke 04 May 2015

That, plus the difference in frame-rate between the actual game and this video is also quite notable.

You could probably speed it up a bit by pre-calculating all your px/pys, and placing them in a table prior to doing the actual animation. No point in repeating the same mathematical operations for every single frame.

Still, this is very, very impressive! You've got it synced beautifully! That video's going in my archive. :)

By the way, what was your method of capturing the video data? Anything to do with this?
Quote

CrazedProgrammer's Photo CrazedProgrammer 04 May 2015

View PostBomb Bloke, on 04 May 2015 - 12:16 AM, said:

That, plus the difference in frame-rate between the actual game and this video is also quite notable.

You could probably speed it up a bit by pre-calculating all your px/pys, and placing them in a table prior to doing the actual animation. No point in repeating the same mathematical operations for every single frame.

Still, this is very, very impressive! You've got it synced beautifully! That video's going in my archive. :)/>/>

By the way, what was your method of capturing the video data? Anything to do with this?
Thanks for the feedback! :D
I used a video to JPG converter and then I ran my own converter which I made in C#.
The color algorithms were copied from my RGB API.
Maybe I'll make a video player in the future.
Edited by CrazedProgrammer, 04 May 2015 - 06:51 AM.
Quote

Creator's Photo Creator 04 May 2015

Wow, this is truly amazing. Here get a +1. Pushing CC to the limits
Quote

Bomb Bloke's Photo Bomb Bloke 04 May 2015

So I thought to myself, "I wonder if that could be downloaded onto a CC computer without adjusting the config?", and tried converting the video to a GIF.

Still a meg and a half, but here it is, if you're interested.
Quote

dan200's Photo dan200 05 May 2015

This is my new favourite thing!
Quote

timia2109's Photo timia2109 06 May 2015

Wow. Very cool, but can't read the code. Sublime Text and Notepad++ crash on load :D

How long had you worked on it? :D
Quote

Creator's Photo Creator 06 May 2015

When I run it, the PC shutsdown. Sublime text fails to load it.
Quote

Bomb Bloke's Photo Bomb Bloke 07 May 2015

What command are you using to run it, what sort of computer are you running it on, and what version of ComputerCraft are you using?
Quote

CrazedProgrammer's Photo CrazedProgrammer 09 May 2015

View PostCreator, on 04 May 2015 - 09:26 AM, said:

Wow, this is truly amazing. Here get a +1. Pushing CC to the limits
Thanks!
I had a lot of fun making it.

View PostBomb Bloke, on 04 May 2015 - 11:55 AM, said:

So I thought to myself, "I wonder if that could be downloaded onto a CC computer without adjusting the config?", and tried converting the video to a GIF.

Still a meg and a half, but here it is, if you're interested.
That is very impressive!
It's cool to see that you can make GIFs from minute long videos.

View Postdan200, on 05 May 2015 - 10:43 PM, said:

This is my new favourite thing!
Thanks!
I would like to thank you for making ComputerCraft.
I think it's the best mod ever made (and I've played a lot of them).
I have a lot of fun making programs and interacting with the community,
and that, of course, wouldn't be possible without you.
Quote

CrazedProgrammer's Photo CrazedProgrammer 09 May 2015

View Posttimia2109, on 06 May 2015 - 11:11 AM, said:

Wow. Very cool, but can't read the code. Sublime Text and Notepad++ crash on load :D

How long had you worked on it? :D
Thanks!
I worked on it for about 4 hours.
The first hour was spent on downloading the video and converting it to around 5000 JPGs.
The second hour was spent on writing my own converter which takes JPGs, downscales them,
converts them to ComputerCraft colors and then saves them to a file.
The last two hours were spent on writing, testing and optimizing the player.
I mostly tested it on a 8x6 block 0.5 scale monitor with 164x81 pixels, which really tests the limits of ComputerCraft and my scaling algorithms.
Loading the file in Notepad++ seems to work but it only responds every 10 seconds xD

View PostCreator, on 06 May 2015 - 09:38 PM, said:

When I run it, the PC shutsdown. Sublime text fails to load it.
This program is really demanding and maybe ComputerCraft can't handle it on your system.
It is also around 30.7 MB so it will most likely not load on Sublime text or Notepad++.
Quote

mrpoopy345's Photo mrpoopy345 12 May 2015

So theoretically you could do this with any music video, no matter how pixelated?
Quote

CrazedProgrammer's Photo CrazedProgrammer 12 May 2015

View Postmrpoopy345, on 12 May 2015 - 10:39 AM, said:

So theoretically you could do this with any music video, no matter how pixelated?
Yes.
Quote

Cranium's Photo Cranium 12 May 2015

This is great! I love the conversion you've done. Though I see a few color gradient issues, it's near perfect. Seems like some of the areas between different colors are a bit overprocessed, and it kind of blurs the difference between the colors. But other than that, I'm amazed at this!

Sorry, I seem to point out the itty bitty things that aren't absolutely perfect, but most people wouldn't notice.
Quote

CrazedProgrammer's Photo CrazedProgrammer 12 May 2015

View PostCranium, on 12 May 2015 - 02:18 PM, said:

This is great! I love the conversion you've done. Though I see a few color gradient issues, it's near perfect. Seems like some of the areas between different colors are a bit overprocessed, and it kind of blurs the difference between the colors. But other than that, I'm amazed at this!

Sorry, I seem to point out the itty bitty things that aren't absolutely perfect, but most people wouldn't notice.
Thanks!
No need to apologize, I know too that it isn't perfect.
I used a video to jpg converter which compresses things a little so there are small artifacts around borders.
And the gradient issues are caused by the algorithm that converts RGB colors to CC colors , which basically checks for the lowest distance between CC colors in RGB and the RGB color in 3d space.
Edited by CrazedProgrammer, 12 May 2015 - 02:41 PM.
Quote

Cranium's Photo Cranium 12 May 2015

Ah, I thought that might be the case. Otherwise, it's rather impressive. I tried to get a copy of the song's midi file, so I can make it into a noteblock song, but nothing seems to work, due to the fact that the tempo won't fit within Minecraft's tick limit.
Quote

CrazedProgrammer's Photo CrazedProgrammer 12 May 2015

View PostCranium, on 12 May 2015 - 02:46 PM, said:

Ah, I thought that might be the case. Otherwise, it's rather impressive. I tried to get a copy of the song's midi file, so I can make it into a noteblock song, but nothing seems to work, due to the fact that the tempo won't fit within Minecraft's tick limit.
Yeah the tick limit is really limiting if you want to make music.
It would be awesome to have this song play in CC :D
Quote

Cranium's Photo Cranium 12 May 2015

Yeah, when I tried importing the music, I kept getting a tickrate of 7.5 t/s, which is just outside of the range that Minecraft can do, which is 5, 10, or if you use Note, 6.66
Quote