Jump to content




Move Your Feet video in ComputerCraft - Visual Demo 2 (DemoScene)

computer media api

39 replies to this topic

#1 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 03 May 2015 - 11:51 AM



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.


#2 Exerro

  • Members
  • 801 posts

Posted 03 May 2015 - 12:22 PM

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!

#3 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 03 May 2015 - 12:26 PM

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.

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 04 May 2015 - 12:16 AM

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?

#5 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 04 May 2015 - 06:47 AM

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.


#6 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 04 May 2015 - 09:26 AM

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

#7 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 04 May 2015 - 11:55 AM

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.

#8 dan200

  • Administrators
  • 542 posts
  • LocationCambridge, England

Posted 05 May 2015 - 10:43 PM

This is my new favourite thing!

#9 timia2109

  • Members
  • 71 posts

Posted 06 May 2015 - 11:11 AM

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

#10 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 06 May 2015 - 09:38 PM

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

#11 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 07 May 2015 - 02:01 AM

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?

#12 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 09 May 2015 - 06:20 PM

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.

#13 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 09 May 2015 - 06:28 PM

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++.

#14 mrpoopy345

  • Members
  • 148 posts
  • LocationMy Computer

Posted 12 May 2015 - 10:39 AM

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

#15 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 12 May 2015 - 11:25 AM

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.

#16 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 12 May 2015 - 02:18 PM

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.

#17 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 12 May 2015 - 02:40 PM

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.


#18 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 12 May 2015 - 02:46 PM

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.

#19 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 12 May 2015 - 04:26 PM

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

#20 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 12 May 2015 - 07:46 PM

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





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users