←  Media

ComputerCraft | Programmable Computers for Minecraft

»

Move Your Feet video in ComputerCraft - Vi...

CrazedProgrammer's Photo CrazedProgrammer 12 May 2015

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

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
So it can either go 1.5x faster or 0.75x faster (or 8/9 times faster if you use Note), which isn't ideal :P
Edited by CrazedProgrammer, 12 May 2015 - 07:52 PM.
Quote

Cranium's Photo Cranium 12 May 2015

Yep. I've had so much trouble trying to transcribe songs for Minecraft.
Quote

Bomb Bloke's Photo Bomb Bloke 13 May 2015

It may or may not help to know that the script is playing a video intended for rendering at 25 FPS (0.04s between frames), but due to the exact same limitation imposed on Note (that being the MineCraft server tick rate), it caps out at 20 FPS (0.05s between frames) - 4/5, or 80%, speed.

To complicate matters further, it always sleeps after rendering each frame, regardless as to the time already taken to render it. So if it takes more than a tick to get a frame drawn (which it almost certainly will when scaling over a full-sized external monitor), then that time + a 0.05 sleep = 40% speed (10 FPS). Ideally the script would keep tabs on the clock to work out whether it needs to use a timer or just instantly yield/resume before getting on with the next image...

There are 4967 frames, so at full FPS it plays for ~3:18, whereas in MineCraft it plays for at least ~4:08.
Edited by Bomb Bloke, 13 May 2015 - 01:43 AM.
Quote

CrazedProgrammer's Photo CrazedProgrammer 13 May 2015

View PostBomb Bloke, on 13 May 2015 - 01:43 AM, said:

It may or may not help to know that the script is playing a video intended for rendering at 25 FPS (0.04s between frames), but due to the exact same limitation imposed on Note (that being the MineCraft server tick rate), it caps out at 20 FPS (0.05s between frames) - 4/5, or 80%, speed.

To complicate matters further, it always sleeps after rendering each frame, regardless as to the time already taken to render it. So if it takes more than a tick to get a frame drawn (which it almost certainly will when scaling over a full-sized external monitor), then that time + a 0.05 sleep = 40% speed (10 FPS). Ideally the script would keep tabs on the clock to work out whether it needs to use a timer or just instantly yield/resume before getting on with the next image...

There are 4967 frames, so at full FPS it plays for ~3:18, whereas in MineCraft it plays for at least ~4:08.
Yep, you're exactly right.
It took me around 8 minutes to record the video because it only ran at 10fps (8x6 block 0.5 scale monitor).
I didn't do any time calculations in the demo, so that's what's causing the problem.
I may make an update so that it includes timing calculations.
Quote

Xerxes's Photo Xerxes 14 May 2015

This is absolutely awesome.

How long did this take to make?
Quote

Creator's Photo Creator 14 May 2015

4 hours. It is mentioned above
Quote

CrazedProgrammer's Photo CrazedProgrammer 14 May 2015

View PostXerxes, on 14 May 2015 - 04:33 PM, said:

This is absolutely awesome.

How long did this take to make?
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.
Quote

LeDark Lua's Photo LeDark Lua 30 Aug 2015

Wow cool, and the song is catchy :D Anyways great job.
Quote

Waitdev_'s Photo Waitdev_ 16 Sep 2015

Still the most awesome thing ever made in computercraft.
Quote

CrazedProgrammer's Photo CrazedProgrammer 19 Sep 2015

View PostLeDark Lua, on 30 August 2015 - 12:15 PM, said:

Wow cool, and the song is catchy :D Anyways great job.

View PostWait_, on 16 September 2015 - 11:46 AM, said:

Still the most awesome thing ever made in computercraft.
Thanks!
Quote

Bomb Bloke's Photo Bomb Bloke 29 Oct 2015

This showed up in my YouTube video suggestions, clearly making use of your video player:

Quote

Waitdev_'s Photo Waitdev_ 30 Oct 2015

thinking about it, you could use a constant palette changer in craftos 2.0 when it comes out, giving you a better colour choice for each frame using the colours not used.
Quote

CrazedProgrammer's Photo CrazedProgrammer 06 Nov 2015

View PostBomb Bloke, on 29 October 2015 - 12:53 AM, said:

This showed up in my YouTube video suggestions, clearly making use of your video player:



Thanks for reporting it.
It is a pretty cool video.
I don't mind when people don't credit my stuff but I appreciate it when they do :P
Quote

Bomb Bloke's Photo Bomb Bloke 06 Nov 2015

Well, I guess it was less a "report" so much as a "thought you might be interested to see it", but I guess it did come off that way. :lol:
Quote

TYKUHN2's Photo TYKUHN2 15 Dec 2015

The size of the program crashes notepad++ :) are you SURE it is maxmimally optimized? ;)
Quote

Anavrins's Photo Anavrins 16 Dec 2015

It's the screen drawings that is optimised.
Opening this in NP++ is pretty much the same thing as opening an actual video file.
Quote

houseofkraft's Photo houseofkraft 28 Dec 2016

I wonder if you can add music with iron noteblocks :)
Quote

CrazedProgrammer's Photo CrazedProgrammer 29 Dec 2016

View Posthouseofkraft, on 28 December 2016 - 03:29 PM, said:

I wonder if you can add music with iron noteblocks :)
That's possible now, but not when this was made :P
My audio API is capable of playing NBS songs so if you made Move Your Feet in Note Block Studio you could totally play it alongside the video.
Quote

Bomb Bloke's Photo Bomb Bloke 29 Dec 2016

View PostCrazedProgrammer, on 29 December 2016 - 12:25 AM, said:

... but not when this was made :P

*cough* :P
Edited by Bomb Bloke, 29 December 2016 - 08:03 AM.
Quote

CrazedProgrammer's Photo CrazedProgrammer 29 Dec 2016

View PostBomb Bloke, on 29 December 2016 - 08:03 AM, said:

View PostCrazedProgrammer, on 29 December 2016 - 12:25 AM, said:

... but not when this was made :P

*cough* :P
Haha, tbh i was just too lazy :P
Edited by CrazedProgrammer, 29 December 2016 - 11:09 PM.
Quote