Jump to content




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

computer media api

39 replies to this topic

#21 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 12 May 2015 - 07:49 PM

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.


#22 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 12 May 2015 - 09:46 PM

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

#23 Bomb Bloke

    Hobbyist Coder

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

Posted 13 May 2015 - 01:43 AM

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.


#24 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 13 May 2015 - 06:40 AM

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.

#25 Xerxes

  • Members
  • 55 posts
  • LocationSwitchCraft

Posted 14 May 2015 - 04:33 PM

This is absolutely awesome.

How long did this take to make?

#26 Creator

    Mad Dash Victor

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

Posted 14 May 2015 - 05:02 PM

4 hours. It is mentioned above

#27 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 14 May 2015 - 06:07 PM

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.

#28 LeDark Lua

  • Members
  • 369 posts
  • LocationLeLua

Posted 30 August 2015 - 12:15 PM

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

#29 Waitdev_

  • Members
  • 432 posts
  • LocationWherever you want me to be

Posted 16 September 2015 - 11:46 AM

Still the most awesome thing ever made in computercraft.

#30 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 19 September 2015 - 04:15 PM

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!

#31 Bomb Bloke

    Hobbyist Coder

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

Posted 29 October 2015 - 12:53 AM

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



#32 Waitdev_

  • Members
  • 432 posts
  • LocationWherever you want me to be

Posted 30 October 2015 - 08:11 AM

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.

#33 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 06 November 2015 - 02:14 PM

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

#34 Bomb Bloke

    Hobbyist Coder

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

Posted 06 November 2015 - 10:23 PM

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:

#35 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 15 December 2015 - 08:21 PM

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

#36 Anavrins

  • Members
  • 775 posts

Posted 16 December 2015 - 02:20 AM

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

#37 houseofkraft

  • Members
  • 170 posts
  • LocationUSA

Posted 28 December 2016 - 03:29 PM

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

#38 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 29 December 2016 - 12:25 AM

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.

#39 Bomb Bloke

    Hobbyist Coder

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

Posted 29 December 2016 - 08:03 AM

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.


#40 CrazedProgrammer

  • Members
  • 495 posts
  • LocationWageningen, The Netherlands

Posted 29 December 2016 - 11:07 PM

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.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users